diff --git a/ChangeLog b/ChangeLog index cc54e4a139..01772bc7a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-08-05 David Hampton + + * src/core-utils/gnc-gtk-utils.[ch]: + * src/core-utils/gnc-gtk-utils.h: + * src/import-export/import-main-matcher.c: + * src/report/report-gnome/dialog-style-sheet.c: + * src/gnome-utils/gnc-main-window.c: Fix compilation errors on + FC3. + 2006-08-05 Andreas Köhler * various: Unref all new stores. diff --git a/src/core-utils/gnc-gtk-utils.c b/src/core-utils/gnc-gtk-utils.c index d9827b1f93..7b6002d9a9 100644 --- a/src/core-utils/gnc-gtk-utils.c +++ b/src/core-utils/gnc-gtk-utils.c @@ -29,6 +29,25 @@ #define CHANGED_ID "changed_id" +#ifndef HAVE_GTK26 +/* Backwards compatability support for function introduced in gtk + * 2.6. */ +gchar * +gtk_combo_box_get_active_text (GtkComboBox *combo_box) +{ + GtkTreeModel *model; + GtkTreeIter iter; + gchar *text; + + if (!gtk_combo_box_get_active_iter(combo_box, &iter)) + return NULL; + model = gtk_combo_box_get_model(combo_box); + gtk_tree_model_get(model, &iter, 0, &text, -1); + return text; +} +#endif + + /** Find an entry in the GtkComboBoxEntry by its text value, and set * the widget to that value. This function also records the index of * that text value for use when the user leaves the widget. diff --git a/src/core-utils/gnc-gtk-utils.h b/src/core-utils/gnc-gtk-utils.h index 8a8cceaafb..acbf4bead7 100644 --- a/src/core-utils/gnc-gtk-utils.h +++ b/src/core-utils/gnc-gtk-utils.h @@ -39,6 +39,16 @@ #include +/** @name gtk Backwards Compatability Functions + @{ +*/ +#ifndef HVE_GTK26 +gchar *gtk_combo_box_get_active_text (GtkComboBox *combo_box); +#endif + +/** @} */ + + /** @name gtk Miscellaneous Functions @{ */ @@ -47,7 +57,6 @@ void gnc_cbe_set_by_string(GtkComboBoxEntry *cbe, const gchar *text); void gnc_cbe_add_completion (GtkComboBoxEntry *cbe); void gnc_cbe_require_list_item (GtkComboBoxEntry *cbe); - /** @} */ #endif /* GNC_GTK_UTILS_H */ diff --git a/src/gnome-utils/gnc-main-window.c b/src/gnome-utils/gnc-main-window.c index 88e112949a..d6a860a227 100644 --- a/src/gnome-utils/gnc-main-window.c +++ b/src/gnome-utils/gnc-main-window.c @@ -581,8 +581,8 @@ gnc_main_window_restore_window (GncMainWindow *window, GncMainWindowSaveData *da (pos[0] > gdk_screen_width()) || (pos[1] + (geom ? geom[1] : 0) < 0) || (pos[1] > gdk_screen_height())) { - g_debug("position %dx%d, size%dx%d is offscreen; will not move", - pos[0], pos[1], geom[0], geom[1]); +// g_debug("position %dx%d, size%dx%d is offscreen; will not move", +// pos[0], pos[1], geom[0], geom[1]); } else { gtk_window_move(GTK_WINDOW(window), pos[0], pos[1]); DEBUG("window (%p) position %dx%d", window, pos[0], pos[1]); diff --git a/src/import-export/import-main-matcher.c b/src/import-export/import-main-matcher.c index bb4eaa6757..f943e7885e 100644 --- a/src/import-export/import-main-matcher.c +++ b/src/import-export/import-main-matcher.c @@ -135,7 +135,6 @@ on_matcher_ok_clicked (GtkButton *button, anyway? */ for (item = refs_list; item; item = g_slist_next(item)) { ref = item->data; - model = gtk_tree_row_reference_get_model(ref); path = gtk_tree_row_reference_get_path(ref); if (gtk_tree_model_get_iter(model, &iter, path)) gtk_list_store_remove(GTK_LIST_STORE(model), &iter); diff --git a/src/report/report-gnome/dialog-style-sheet.c b/src/report/report-gnome/dialog-style-sheet.c index 96f3540fb7..f10349063f 100644 --- a/src/report/report-gnome/dialog-style-sheet.c +++ b/src/report/report-gnome/dialog-style-sheet.c @@ -30,6 +30,7 @@ #include "dialog-style-sheet.h" #include "dialog-options.h" #include "dialog-utils.h" +#include "gnc-gtk-utils.h" #include "gnc-report.h" #include "gnc-ui.h"