r15840 - gnucash/trunk/src - Conditionally remove some more deprecated functions.

David Hampton hampton at cvs.gnucash.org
Fri Apr 6 00:44:08 EDT 2007


Author: hampton
Date: 2007-04-06 00:44:07 -0400 (Fri, 06 Apr 2007)
New Revision: 15840
Trac: http://svn.gnucash.org/trac/changeset/15840

Modified:
   gnucash/trunk/src/gnome-utils/dialog-options.c
   gnucash/trunk/src/gnome-utils/dialog-preferences.c
   gnucash/trunk/src/gnome-utils/dialog-transfer.c
   gnucash/trunk/src/gnome-utils/dialog-utils.c
   gnucash/trunk/src/gnome-utils/gnc-date-edit.c
   gnucash/trunk/src/gnome-utils/gnc-html.c
   gnucash/trunk/src/gnome-utils/gnc-tree-view.c
   gnucash/trunk/src/gnome/dialog-sx-from-trans.c
   gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c
   gnucash/trunk/src/register/register-gnome/combocell-gnome.c
   gnucash/trunk/src/register/register-gnome/datecell-gnome.c
   gnucash/trunk/src/register/register-gnome/gnucash-sheet.c
Log:
Conditionally remove some more deprecated functions.


Modified: gnucash/trunk/src/gnome/dialog-sx-from-trans.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-from-trans.c	2007-04-06 02:49:19 UTC (rev 15839)
+++ gnucash/trunk/src/gnome/dialog-sx-from-trans.c	2007-04-06 04:44:07 UTC (rev 15840)
@@ -363,9 +363,12 @@
     w = GTK_WIDGET(glade_xml_get_widget( sxfti->gxml, SXFTD_EX_CAL_FRAME ));
     sxfti->dense_cal_model = gnc_dense_cal_store_new(num_marks);
     sxfti->example_cal = GNC_DENSE_CAL(gnc_dense_cal_new_with_model(GNC_DENSE_CAL_MODEL(sxfti->dense_cal_model)));
-    // gobject-2.10: g_object_ref_sink(sxfti->example_cal);
+#ifdef HAVE_GTK_2_10
+    g_object_ref_sink(sxfti->example_cal);
+#else
     g_object_ref(G_OBJECT(sxfti->example_cal));
     gtk_object_sink(GTK_OBJECT(sxfti->example_cal));
+#endif
 
     g_assert(sxfti->example_cal);
     gnc_dense_cal_set_num_months( sxfti->example_cal, SXFTD_EXCAL_NUM_MONTHS );

Modified: gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c	2007-04-06 02:49:19 UTC (rev 15839)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c	2007-04-06 04:44:07 UTC (rev 15840)
@@ -343,9 +343,12 @@
 
         priv->dense_cal_model = gnc_sx_instance_dense_cal_adapter_new(GNC_SX_INSTANCE_MODEL(priv->instances));
         priv->gdcal = GNC_DENSE_CAL(gnc_dense_cal_new_with_model(GNC_DENSE_CAL_MODEL(priv->dense_cal_model)));
-        // gobject-2.10: g_object_ref_sink(G_OBJECT(priv->gdcal));
+#ifdef HAVE_GTK_2_10
+        g_object_ref_sink(priv->gdcal);
+#else
         g_object_ref(G_OBJECT(priv->gdcal));
         gtk_object_sink(GTK_OBJECT(priv->gdcal));
+#endif
 
         gnc_dense_cal_set_months_per_col(priv->gdcal, 4);
         gnc_dense_cal_set_num_months(priv->gdcal, 12);

Modified: gnucash/trunk/src/gnome-utils/dialog-options.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-options.c	2007-04-06 02:49:19 UTC (rev 15839)
+++ gnucash/trunk/src/gnome-utils/dialog-options.c	2007-04-06 04:44:07 UTC (rev 15840)
@@ -732,8 +732,12 @@
 
   /* Create the tooltips */
   tooltips = gtk_tooltips_new ();
+#ifdef HAVE_GTK_2_10
+  g_object_ref_sink(tooltips);
+#else
   g_object_ref (tooltips);
   gtk_object_sink (GTK_OBJECT (tooltips));
+#endif
 
   /* Iterate over the options and create a radio button for each one */
   for (i = 0; i < num_values; i++)
@@ -1229,8 +1233,12 @@
   propertybox->tips = gtk_tooltips_new();
   propertybox->option_db = odb;
 
+#ifdef HAVE_GTK_2_10
+  g_object_ref_sink(propertybox->tips);
+#else
   g_object_ref (propertybox->tips);
   gtk_object_sink (GTK_OBJECT (propertybox->tips));
+#endif
 
   num_sections = gnc_option_db_num_sections(odb);
   default_section_name = gnc_option_db_get_default_section(odb);

Modified: gnucash/trunk/src/gnome-utils/dialog-preferences.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-preferences.c	2007-04-06 02:49:19 UTC (rev 15839)
+++ gnucash/trunk/src/gnome-utils/dialog-preferences.c	2007-04-06 04:44:07 UTC (rev 15840)
@@ -515,7 +515,11 @@
   gtk_container_foreach(GTK_CONTAINER(new_content), gnc_prefs_move_table_entry,
 			&copydata);
 
+#ifdef HAVE_GTK_2_10
+  g_object_ref_sink(new_content);
+#else
   gtk_object_sink(GTK_OBJECT(new_content));
+#endif
   LEAVE("added content to page");
 }
 

Modified: gnucash/trunk/src/gnome-utils/dialog-transfer.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-transfer.c	2007-04-06 02:49:19 UTC (rev 15839)
+++ gnucash/trunk/src/gnome-utils/dialog-transfer.c	2007-04-06 04:44:07 UTC (rev 15840)
@@ -1653,8 +1653,12 @@
 
   xferData->tips = gtk_tooltips_new();
 
+#ifdef HAVE_GTK_2_10
+  g_object_ref_sink(xferData->tips);
+#else
   g_object_ref (xferData->tips);
   gtk_object_sink (GTK_OBJECT (xferData->tips));
+#endif
 
   /* default to quickfilling off of the "From" account. */
   xferData->quickfill = XFER_DIALOG_FROM;

Modified: gnucash/trunk/src/gnome-utils/dialog-utils.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-utils.c	2007-04-06 02:49:19 UTC (rev 15839)
+++ gnucash/trunk/src/gnome-utils/dialog-utils.c	2007-04-06 04:44:07 UTC (rev 15840)
@@ -99,8 +99,12 @@
 
   tooltips = gtk_tooltips_new();
 
+#ifdef HAVE_GTK_2_10
+  g_object_ref_sink(tooltips);
+#else
   g_object_ref (tooltips);
   gtk_object_sink (GTK_OBJECT (tooltips));
+#endif
 
   for (i = 0; i < num_options; i++)
   {

Modified: gnucash/trunk/src/gnome-utils/gnc-date-edit.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-date-edit.c	2007-04-06 02:49:19 UTC (rev 15839)
+++ gnucash/trunk/src/gnome-utils/gnc-date-edit.c	2007-04-06 04:44:07 UTC (rev 15840)
@@ -713,7 +713,7 @@
 	gtk_widget_show (GTK_WIDGET(frame));
 
 	gde->calendar = gtk_calendar_new ();
-	gtk_calendar_display_options
+	gtk_calendar_set_display_options
                 (GTK_CALENDAR (gde->calendar),
                  (GTK_CALENDAR_SHOW_DAY_NAMES
                   | GTK_CALENDAR_SHOW_HEADING

Modified: gnucash/trunk/src/gnome-utils/gnc-html.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-html.c	2007-04-06 02:49:19 UTC (rev 15839)
+++ gnucash/trunk/src/gnome-utils/gnc-html.c	2007-04-06 04:44:07 UTC (rev 15840)
@@ -1044,8 +1044,12 @@
   //retval->http         = gnc_http_new();
   retval->history      = gnc_html_history_new();
 
+#ifdef HAVE_GTK_2_10
+  g_object_ref_sink(retval->container);
+#else
   g_object_ref (retval->container);
   gtk_object_sink (GTK_OBJECT (retval->container));
+#endif
 
   /* signals */
   g_signal_connect(retval->html, "url_requested",

Modified: gnucash/trunk/src/gnome-utils/gnc-tree-view.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-view.c	2007-04-06 02:49:19 UTC (rev 15839)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-view.c	2007-04-06 04:44:07 UTC (rev 15840)
@@ -1363,8 +1363,12 @@
   /* Create the menu if we don't have one already */
   if (!priv->column_menu) {
     priv->column_menu = gtk_menu_new();
+#ifdef HAVE_GTK_2_10
+    g_object_ref_sink(priv->column_menu);
+#else
     g_object_ref(priv->column_menu);
     gtk_object_sink(GTK_OBJECT(priv->column_menu));
+#endif
   }
 
   /* Create the check menu item */

Modified: gnucash/trunk/src/register/register-gnome/combocell-gnome.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/combocell-gnome.c	2007-04-06 02:49:19 UTC (rev 15839)
+++ gnucash/trunk/src/register/register-gnome/combocell-gnome.c	2007-04-06 04:44:07 UTC (rev 15840)
@@ -753,8 +753,12 @@
 		box->item_list = gnc_item_edit_new_list(box->item_edit, cell->shared_store);
 	else
 		box->item_list = gnc_item_edit_new_list(box->item_edit, box->tmp_store);
+#ifdef HAVE_GTK_2_10
+        g_object_ref_sink(box->item_list);
+#else
 	g_object_ref (box->item_list);
 	gtk_object_sink (GTK_OBJECT(box->item_list));
+#endif
 
 	/* to mark cell as realized, remove the realize method */
 	cell->cell.gui_realize = NULL;

Modified: gnucash/trunk/src/register/register-gnome/datecell-gnome.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/datecell-gnome.c	2007-04-06 02:49:19 UTC (rev 15839)
+++ gnucash/trunk/src/register/register-gnome/datecell-gnome.c	2007-04-06 04:44:07 UTC (rev 15840)
@@ -549,8 +549,12 @@
   box->sheet = sheet;
   box->item_edit = item_edit;
   box->date_picker = gnc_item_edit_new_date_picker (box->item_edit);
+#ifdef HAVE_GTK_2_10
+  g_object_ref_sink(box->date_picker);
+#else
   g_object_ref (box->date_picker);
   gtk_object_sink (GTK_OBJECT(box->date_picker));
+#endif
 
   /* to mark cell as realized, remove the realize method */
   cell->cell.gui_realize = NULL;

Modified: gnucash/trunk/src/register/register-gnome/gnucash-sheet.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-sheet.c	2007-04-06 02:49:19 UTC (rev 15839)
+++ gnucash/trunk/src/register/register-gnome/gnucash-sheet.c	2007-04-06 04:44:07 UTC (rev 15840)
@@ -2408,8 +2408,12 @@
 
         /* The entry widget */
         sheet->entry = gtk_entry_new ();
+#ifdef HAVE_GTK_2_10
+        g_object_ref_sink(sheet->entry);
+#else
         g_object_ref(sheet->entry);
         gtk_object_sink(GTK_OBJECT(sheet->entry));
+#endif
 	/*gtk_layout_put (GTK_LAYOUT (sheet), sheet->entry, 0, 0);*/
 
         /* set up the editor */



More information about the gnucash-changes mailing list