r14594 - gnucash/trunk - Fix compilation errors on FC3.

David Hampton hampton at cvs.gnucash.org
Sat Aug 5 17:48:55 EDT 2006


Author: hampton
Date: 2006-08-05 17:48:54 -0400 (Sat, 05 Aug 2006)
New Revision: 14594
Trac: http://svn.gnucash.org/trac/changeset/14594

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/core-utils/gnc-gtk-utils.c
   gnucash/trunk/src/core-utils/gnc-gtk-utils.h
   gnucash/trunk/src/gnome-utils/gnc-main-window.c
   gnucash/trunk/src/import-export/import-main-matcher.c
   gnucash/trunk/src/report/report-gnome/dialog-style-sheet.c
Log:
Fix compilation errors on FC3.


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-08-05 21:15:22 UTC (rev 14593)
+++ gnucash/trunk/ChangeLog	2006-08-05 21:48:54 UTC (rev 14594)
@@ -1,3 +1,12 @@
+2006-08-05  David Hampton  <hampton at employees.org>
+
+	* 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  <andi5.py at gmx.net>
 
 	* various: Unref all new stores.

Modified: gnucash/trunk/src/core-utils/gnc-gtk-utils.c
===================================================================
--- gnucash/trunk/src/core-utils/gnc-gtk-utils.c	2006-08-05 21:15:22 UTC (rev 14593)
+++ gnucash/trunk/src/core-utils/gnc-gtk-utils.c	2006-08-05 21:48:54 UTC (rev 14594)
@@ -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.

Modified: gnucash/trunk/src/core-utils/gnc-gtk-utils.h
===================================================================
--- gnucash/trunk/src/core-utils/gnc-gtk-utils.h	2006-08-05 21:15:22 UTC (rev 14593)
+++ gnucash/trunk/src/core-utils/gnc-gtk-utils.h	2006-08-05 21:48:54 UTC (rev 14594)
@@ -39,6 +39,16 @@
 
 #include <gtk/gtk.h>
 
+/** @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_add_completion (GtkComboBoxEntry *cbe);
 void gnc_cbe_require_list_item (GtkComboBoxEntry *cbe);
 
-
 /** @} */
 
 #endif /* GNC_GTK_UTILS_H */

Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.c	2006-08-05 21:15:22 UTC (rev 14593)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.c	2006-08-05 21:48:54 UTC (rev 14594)
@@ -581,8 +581,8 @@
 	     (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]);

Modified: gnucash/trunk/src/import-export/import-main-matcher.c
===================================================================
--- gnucash/trunk/src/import-export/import-main-matcher.c	2006-08-05 21:15:22 UTC (rev 14593)
+++ gnucash/trunk/src/import-export/import-main-matcher.c	2006-08-05 21:48:54 UTC (rev 14594)
@@ -135,7 +135,6 @@
      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);

Modified: gnucash/trunk/src/report/report-gnome/dialog-style-sheet.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/dialog-style-sheet.c	2006-08-05 21:15:22 UTC (rev 14593)
+++ gnucash/trunk/src/report/report-gnome/dialog-style-sheet.c	2006-08-05 21:48:54 UTC (rev 14594)
@@ -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"
 



More information about the gnucash-changes mailing list