]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtktextutil.c
a11y: Emit active-descendants-changed when focus changes
[~andy/gtk] / gtk / gtktextutil.c
index 4b8c69164109e44a30aaaec190725416e1b7d5ac..a2811f2d3cb8ed0e5ade1a51fa41e103d33eb381 100644 (file)
@@ -12,9 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 /*
@@ -248,8 +246,8 @@ _gtk_text_util_create_drag_icon (GtkWidget *widget,
                                                pixmap_height + 2);
   cr = cairo_create (surface);
 
-  gtk_style_context_save (context);
-  gtk_style_context_add_class (context, GTK_STYLE_CLASS_VIEW);
+  gtk_style_context_save (style_context);
+  gtk_style_context_add_class (style_context, GTK_STYLE_CLASS_VIEW);
 
   gtk_style_context_get_background_color (style_context, state, &color);
   gdk_cairo_set_source_rgba (cr, &color);
@@ -270,7 +268,7 @@ _gtk_text_util_create_drag_icon (GtkWidget *widget,
 
   cairo_surface_set_device_offset (surface, 2, 2);
 
-  gtk_style_context_restore (context);
+  gtk_style_context_restore (style_context);
 
   return surface;
 }
@@ -300,7 +298,7 @@ gtk_text_view_set_attributes_from_style (GtkTextView        *text_view,
   if (values->font)
     pango_font_description_free (values->font);
 
-  values->font = pango_font_description_copy (gtk_style_context_get_font (context, state));
+  gtk_style_context_get (context, state, "font", &values->font, NULL);
 }
 
 cairo_surface_t *