/pidgin/main: 02f19be61040: Fix GtkMenuTray parent classes on GTK2.

Elliott Sales de Andrade qulogic at pidgin.im
Tue Jul 24 04:03:57 EDT 2012


Changeset: 02f19be610401dd6afc0ecadfedcff66c57a0d3b
Author:	 Elliott Sales de Andrade <qulogic at pidgin.im>
Date:	 2012-07-24 01:14 -0400
Branch:	 cpw.qulogic.gtk3-required
URL: http://hg.pidgin.im/pidgin/main/rev/02f19be61040

Description:

Fix GtkMenuTray parent classes on GTK2.

diffstat:

 pidgin/gtkmenutray.c |  20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diffs (45 lines):

diff --git a/pidgin/gtkmenutray.c b/pidgin/gtkmenutray.c
--- a/pidgin/gtkmenutray.c
+++ b/pidgin/gtkmenutray.c
@@ -48,6 +48,7 @@
 /******************************************************************************
  * Item Stuff
  *****************************************************************************/
+#if GTK_CHECK_VERSION(3,0,0)
 static void
 pidgin_menu_tray_select(GtkMenuItem *widget) {
 	/* this may look like nothing, but it's really overriding the
@@ -62,6 +63,21 @@
 	 * overridding the select, so it makes sense to override deselect as well.
 	 */
 }
+#else
+static void
+pidgin_menu_tray_select(GtkItem *widget) {
+	/* this may look like nothing, but it's really overriding the
+	 * GtkMenuItem's select function so that it doesn't get highlighted like
+	 * a normal menu item would.
+	 */
+}
+static void
+pidgin_menu_tray_deselect(GtkItem *widget) {
+	/* Probably not necessary, but I'd rather be safe than sorry.  We're
+	 * overridding the select, so it makes sense to override deselect as well.
+	 */
+}
+#endif
 
 /******************************************************************************
  * Widget Stuff
@@ -126,7 +142,11 @@
 static void
 pidgin_menu_tray_class_init(PidginMenuTrayClass *klass) {
 	GObjectClass *object_class = G_OBJECT_CLASS(klass);
+#if GTK_CHECK_VERSION(3,0,0)
 	GtkMenuItemClass *menu_item_class = GTK_MENU_ITEM_CLASS(klass);
+#else
+	GtkItemClass *menu_item_class = GTK_ITEM_CLASS(klass);
+#endif
 	GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
 	GParamSpec *pspec;
 



More information about the Commits mailing list