r21689 - gnucash/trunk/src - Add more conditional parts based on GTKCOMBO_BOX_TOOLTIPS_WORK
Geert Janssens
gjanssens at code.gnucash.org
Thu Dec 8 12:11:43 EST 2011
Author: gjanssens
Date: 2011-12-08 12:11:43 -0500 (Thu, 08 Dec 2011)
New Revision: 21689
Trac: http://svn.gnucash.org/trac/changeset/21689
Modified:
gnucash/trunk/src/gnome-utils/dialog-utils.c
gnucash/trunk/src/import-export/import-format-dialog.c
Log:
Add more conditional parts based on GTKCOMBO_BOX_TOOLTIPS_WORK
Without these parts gnucash would not build if the GTKCOMBO_BOX_TOOLTIPS_WORK
were set. It doesn't yet fix the core reason itself for the conditionals.
More work is needed to implement per-entry tooltips in comboboxes before
the old OptionMenu based code can be removed.
Modified: gnucash/trunk/src/gnome-utils/dialog-utils.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-utils.c 2011-12-08 17:11:32 UTC (rev 21688)
+++ gnucash/trunk/src/gnome-utils/dialog-utils.c 2011-12-08 17:11:43 UTC (rev 21689)
@@ -59,10 +59,14 @@
cb = g_object_get_data(G_OBJECT(w), "gnc_option_cb");
+#ifdef GTKCOMBOBOX_TOOLTIPS_WORK
+ cb(w, data);
+#else
_index = g_object_get_data(G_OBJECT(w), "gnc_option_index");
index = GPOINTER_TO_INT(_index);
cb(w, index, data);
+#endif
}
/********************************************************************\
Modified: gnucash/trunk/src/import-export/import-format-dialog.c
===================================================================
--- gnucash/trunk/src/import-export/import-format-dialog.c 2011-12-08 17:11:32 UTC (rev 21688)
+++ gnucash/trunk/src/import-export/import-format-dialog.c 2011-12-08 17:11:43 UTC (rev 21689)
@@ -37,12 +37,19 @@
#define MAX_CHOICES 6
+#ifdef GTKCOMBOBOX_TOOLTIPS_WORK
static void
+choice_option_changed (GtkWidget *widget, gpointer index_p)
+{
+}
+#else
+static void
choice_option_changed (GtkWidget *widget, gint index, gpointer index_p)
{
gint *my_index = index_p;
*my_index = index;
}
+#endif
static GncImportFormat
add_menu_and_run_dialog(GtkWidget *dialog, GtkWidget *menu_box, GncImportFormat fmt)
More information about the gnucash-changes
mailing list