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.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21689 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2011-12-08 17:11:43 +00:00
parent 4712503102
commit 0c945eb31d
2 changed files with 11 additions and 0 deletions

View File

@ -59,10 +59,14 @@ gnc_option_menu_cb(GtkWidget *w, gpointer data)
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
}
/********************************************************************\

View File

@ -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)