[dia] Don't use deprecated function gtk_widget_ref().



commit 2829b6e64abe53dba0df7e260ff5d362cb173705
Author: Adam Buchbinder <adam buchbinder gmail com>
Date:   Tue Jul 28 11:57:51 2009 -0400

    Don't use deprecated function gtk_widget_ref().
    
    Replaced gtk_widget_ref() with g_object_ref():
    http://library.gnome.org/devel/gtk/stable/GtkWidget.html#gtk-widget-ref
    
    Signed-off-by: Hans Breuer <hans breuer org>

 app/interface.c                 |    4 ++--
 app/layer_dialog.c              |    4 ++--
 app/sheets.c                    |    4 ++--
 objects/Database/table_dialog.c |    4 ++--
 objects/UML/class_dialog.c      |   16 ++++++++--------
 5 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/app/interface.c b/app/interface.c
index 6ec68f1..05a43c6 100644
--- a/app/interface.c
+++ b/app/interface.c
@@ -1629,7 +1629,7 @@ create_integrated_ui (void)
   window = gnome_app_new ("Dia", _("Diagram Editor"));
 #else
   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_widget_ref (window);
+  g_object_ref (window);
   gtk_window_set_title (GTK_WINDOW (window), "Dia v" VERSION);
 #endif
 
@@ -1753,7 +1753,7 @@ create_toolbox ()
   window = gnome_app_new ("Dia", _("Diagram Editor"));
 #else
   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_widget_ref (window);
+  g_object_ref(window);
   gtk_window_set_title (GTK_WINDOW (window), "Dia v" VERSION);
 #endif
   gtk_window_set_role (GTK_WINDOW (window), "toolbox_window");
diff --git a/app/layer_dialog.c b/app/layer_dialog.c
index 8cc7ea3..65b1f93 100644
--- a/app/layer_dialog.c
+++ b/app/layer_dialog.c
@@ -594,7 +594,7 @@ layer_dialog_raise_callback(GtkWidget *widget, gpointer gdata)
       
       list = g_list_prepend(list, selected);
 
-      gtk_widget_ref(selected);
+      g_object_ref(selected);
       
       gtk_list_remove_items(GTK_LIST(layer_dialog->layer_list),
 			    list);
@@ -639,7 +639,7 @@ layer_dialog_lower_callback(GtkWidget *widget, gpointer gdata)
       
       list = g_list_prepend(list, selected);
 
-      gtk_widget_ref(selected);
+      g_object_ref(selected);
       
       gtk_list_remove_items(GTK_LIST(layer_dialog->layer_list),
 			    list);
diff --git a/app/sheets.c b/app/sheets.c
index c5518df..5e1e02b 100644
--- a/app/sheets.c
+++ b/app/sheets.c
@@ -282,7 +282,7 @@ sheets_dialog_create(void)
   if (wrapbox)
     gtk_container_remove(GTK_CONTAINER(sw), wrapbox);
   wrapbox = gtk_hwrap_box_new(FALSE);
-  gtk_widget_ref(wrapbox);
+  g_object_ref(wrapbox);
   g_object_set_data(G_OBJECT(sheets_dialog), "wrapbox_right", wrapbox);
   gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), wrapbox);
   gtk_wrap_box_set_justify(GTK_WRAP_BOX(wrapbox), GTK_JUSTIFY_TOP);
@@ -298,7 +298,7 @@ sheets_dialog_create(void)
   if (wrapbox)
     gtk_container_remove(GTK_CONTAINER(sw), wrapbox);
   wrapbox = gtk_hwrap_box_new(FALSE);
-  gtk_widget_ref(wrapbox);
+  g_object_ref(wrapbox);
   g_object_set_data(G_OBJECT(sheets_dialog), "wrapbox_left", wrapbox);
   gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), wrapbox);
   gtk_wrap_box_set_justify(GTK_WRAP_BOX(wrapbox), GTK_JUSTIFY_TOP);
diff --git a/objects/Database/table_dialog.c b/objects/Database/table_dialog.c
index b7e9519..cae2aed 100644
--- a/objects/Database/table_dialog.c
+++ b/objects/Database/table_dialog.c
@@ -1242,7 +1242,7 @@ attributes_list_moveup_button_clicked_cb (GtkWidget * button, Table * table)
         {
           i--;
 
-          gtk_widget_ref (list_item);
+          g_object_ref (list_item);
           list = g_list_prepend (NULL, list_item);
           gtk_list_remove_items (gtklist, list);
           gtk_list_insert_items (gtklist, list, i);
@@ -1274,7 +1274,7 @@ attributes_list_movedown_button_clicked_cb (GtkWidget * button, Table * table)
         {
           i++;
 
-          gtk_widget_ref (list_item);
+          g_object_ref (list_item);
           list = g_list_prepend (NULL, list_item);
           gtk_list_remove_items (gtklist, list);
           gtk_list_insert_items (gtklist, list, i);
diff --git a/objects/UML/class_dialog.c b/objects/UML/class_dialog.c
index 5603792..817fa7d 100644
--- a/objects/UML/class_dialog.c
+++ b/objects/UML/class_dialog.c
@@ -880,7 +880,7 @@ attributes_list_move_up_callback(GtkWidget *button,
     if (i>0)
       i--;
 
-    gtk_widget_ref(list_item);
+    g_object_ref(list_item);
     list = g_list_prepend(NULL, list_item);
     gtk_list_remove_items(gtklist, list);
     gtk_list_insert_items(gtklist, list, i);
@@ -911,7 +911,7 @@ attributes_list_move_down_callback(GtkWidget *button,
       i++;
 
     
-    gtk_widget_ref(list_item);
+    g_object_ref(list_item);
     list = g_list_prepend(NULL, list_item);
     gtk_list_remove_items(gtklist, list);
     gtk_list_insert_items(gtklist, list, i);
@@ -1478,7 +1478,7 @@ parameters_list_move_up_callback(GtkWidget *button,
 					   i);
 
     /* Move parameter in gtk list: */
-    gtk_widget_ref(list_item);
+    g_object_ref(list_item);
     list = g_list_prepend(NULL, list_item);
     gtk_list_remove_items(gtklist, list);
     gtk_list_insert_items(gtklist, list, i);
@@ -1525,7 +1525,7 @@ parameters_list_move_down_callback(GtkWidget *button,
 					   i);
 
     /* Move parameter in gtk list: */
-    gtk_widget_ref(list_item);
+    g_object_ref(list_item);
     list = g_list_prepend(NULL, list_item);
     gtk_list_remove_items(gtklist, list);
     gtk_list_insert_items(gtklist, list, i);
@@ -1819,7 +1819,7 @@ operations_list_move_up_callback(GtkWidget *button,
     if (i>0)
       i--;
 
-    gtk_widget_ref(list_item);
+    g_object_ref(list_item);
     list = g_list_prepend(NULL, list_item);
     gtk_list_remove_items(gtklist, list);
     gtk_list_insert_items(gtklist, list, i);
@@ -1850,7 +1850,7 @@ operations_list_move_down_callback(GtkWidget *button,
     if (i<(g_list_length(gtklist->children)-1))
       i++;
 
-    gtk_widget_ref(list_item);
+    g_object_ref(list_item);
     list = g_list_prepend(NULL, list_item);
     gtk_list_remove_items(gtklist, list);
     gtk_list_insert_items(gtklist, list, i);
@@ -2620,7 +2620,7 @@ templates_list_move_up_callback(GtkWidget *button,
     if (i>0)
       i--;
 
-    gtk_widget_ref(list_item);
+    g_object_ref(list_item);
     list = g_list_prepend(NULL, list_item);
     gtk_list_remove_items(gtklist, list);
     gtk_list_insert_items(gtklist, list, i);
@@ -2650,7 +2650,7 @@ templates_list_move_down_callback(GtkWidget *button,
     if (i<(g_list_length(gtklist->children)-1))
       i++;
 
-    gtk_widget_ref(list_item);
+    g_object_ref(list_item);
     list = g_list_prepend(NULL, list_item);
     gtk_list_remove_items(gtklist, list);
     gtk_list_insert_items(gtklist, list, i);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]