diff options
author | Ross Burton <ross@openedhand.com> | 2008-06-16 10:14:57 +0000 |
---|---|---|
committer | Ross Burton <ross@openedhand.com> | 2008-06-16 10:14:57 +0000 |
commit | 0d007363d7ddebcd173cbc76d4fa6f03daa006ac (patch) | |
tree | fb6868cbe015cdad05e3c10daa0cc17098ad1667 /meta/packages/gtk+/gtk+-2.6.10/toggle-font.diff | |
parent | 0a2c4cd9bdf972ce959d68150c175dfddf34eef2 (diff) | |
download | openembedded-core-0d007363d7ddebcd173cbc76d4fa6f03daa006ac.tar.gz openembedded-core-0d007363d7ddebcd173cbc76d4fa6f03daa006ac.tar.bz2 openembedded-core-0d007363d7ddebcd173cbc76d4fa6f03daa006ac.tar.xz openembedded-core-0d007363d7ddebcd173cbc76d4fa6f03daa006ac.zip |
gtk+: remove 2.6.10
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4660 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/gtk+/gtk+-2.6.10/toggle-font.diff')
-rw-r--r-- | meta/packages/gtk+/gtk+-2.6.10/toggle-font.diff | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/meta/packages/gtk+/gtk+-2.6.10/toggle-font.diff b/meta/packages/gtk+/gtk+-2.6.10/toggle-font.diff deleted file mode 100644 index ad3bc6e38..000000000 --- a/meta/packages/gtk+/gtk+-2.6.10/toggle-font.diff +++ /dev/null @@ -1,69 +0,0 @@ -Index: gtk/gtkcellrenderertoggle.c -=================================================================== ---- gtk/gtkcellrenderertoggle.c (revision 18542) -+++ gtk/gtkcellrenderertoggle.c (working copy) -@@ -80,6 +80,8 @@ - typedef struct _GtkCellRendererTogglePrivate GtkCellRendererTogglePrivate; - struct _GtkCellRendererTogglePrivate - { -+ gint indicator_size; -+ GtkWidget *cached_widget; - guint inconsistent : 1; - }; - -@@ -281,6 +283,27 @@ - } - - static void -+on_widget_style_set (GtkWidget *widget, GtkStyle *previous, gpointer user_data) -+{ -+ GtkCellRendererTogglePrivate *priv = user_data; -+ PangoContext *context; -+ PangoFontMetrics *metrics; -+ int height; -+ -+ context = gtk_widget_get_pango_context (widget); -+ metrics = pango_context_get_metrics (context, -+ widget->style->font_desc, -+ pango_context_get_language (context)); -+ -+ height = pango_font_metrics_get_ascent (metrics) + -+ pango_font_metrics_get_descent (metrics); -+ -+ pango_font_metrics_unref (metrics); -+ -+ priv->indicator_size = PANGO_PIXELS (height * 0.85); -+} -+ -+static void - gtk_cell_renderer_toggle_get_size (GtkCellRenderer *cell, - GtkWidget *widget, - GdkRectangle *cell_area, -@@ -291,10 +314,25 @@ - { - gint calc_width; - gint calc_height; -+ GtkCellRendererTogglePrivate *priv; - -- calc_width = (gint) cell->xpad * 2 + TOGGLE_WIDTH; -- calc_height = (gint) cell->ypad * 2 + TOGGLE_WIDTH; -+ priv = GTK_CELL_RENDERER_TOGGLE_GET_PRIVATE (cell); - -+ if (priv->cached_widget != widget) { -+ if (priv->cached_widget) { -+ g_object_remove_weak_pointer (widget, &priv->cached_widget); -+ g_signal_handlers_disconnect_by_func (priv->cached_widget, on_widget_style_set, priv); -+ } -+ priv->cached_widget = widget; -+ g_object_add_weak_pointer (widget, &priv->cached_widget); -+ g_signal_connect (widget, "style-set", on_widget_style_set, priv); -+ -+ on_widget_style_set (widget, NULL, priv); -+ } -+ -+ calc_width = (gint) cell->xpad * 2 + priv->indicator_size; -+ calc_height = (gint) cell->ypad * 2 + priv->indicator_size; -+ - if (width) - *width = calc_width; - |