From 0c945eb31d153675a46f97113c6ce7482a58f0e3 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Thu, 8 Dec 2011 17:11:43 +0000 Subject: [PATCH] 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 --- src/gnome-utils/dialog-utils.c | 4 ++++ src/import-export/import-format-dialog.c | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/src/gnome-utils/dialog-utils.c b/src/gnome-utils/dialog-utils.c index 2df6e7caaa..e612bfdb3a 100644 --- a/src/gnome-utils/dialog-utils.c +++ b/src/gnome-utils/dialog-utils.c @@ -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 } /********************************************************************\ diff --git a/src/import-export/import-format-dialog.c b/src/import-export/import-format-dialog.c index 725318576a..801731efbf 100644 --- a/src/import-export/import-format-dialog.c +++ b/src/import-export/import-format-dialog.c @@ -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)