[dia/dia-next: 9/59] Convert remaining GtkObject -> GObject



commit 9567f8ad311eae63c6f33e414d7cc2f8dc854cd4
Author: Zander Brown <zbrown gnome org>
Date:   Tue Dec 11 00:25:30 2018 +0000

    Convert remaining GtkObject -> GObject

 app/diapagelayout.c                   | 12 ++++++------
 app/disp_callbacks.c                  |  2 +-
 app/sheets_dialog.c                   |  6 +++---
 lib/diadynamicmenu.c                  | 10 +++++-----
 lib/dialinechooser.c                  |  2 +-
 lib/dialinestyleselector.c            |  2 +-
 objects/UML/class_attributes_dialog.c |  4 ++--
 objects/UML/class_dialog.c            |  6 +++---
 objects/UML/class_operations_dialog.c |  8 ++++----
 objects/UML/class_templates_dialog.c  |  4 ++--
 10 files changed, 28 insertions(+), 28 deletions(-)
---
diff --git a/app/diapagelayout.c b/app/diapagelayout.c
index 38c0348b..f566707e 100644
--- a/app/diapagelayout.c
+++ b/app/diapagelayout.c
@@ -80,11 +80,11 @@ enum {
 };
 
 static guint pl_signals[LAST_SIGNAL] = { 0 };
-static GtkObjectClass *parent_class;
+static GObjectClass *parent_class;
 
 static void dia_page_layout_class_init(DiaPageLayoutClass *class);
 static void dia_page_layout_init(DiaPageLayout *self);
-static void dia_page_layout_destroy(GtkObject *object);
+static void dia_page_layout_destroy(GObject *object);
 
 GType
 dia_page_layout_get_type(void)
@@ -111,9 +111,9 @@ dia_page_layout_get_type(void)
 static void
 dia_page_layout_class_init(DiaPageLayoutClass *class)
 {
-  GtkObjectClass *object_class;
+  GObjectClass *object_class;
   
-  object_class = (GtkObjectClass*) class;
+  object_class = (GObjectClass*) class;
   parent_class = g_type_class_peek_parent (class);
 
   pl_signals[CHANGED] =
@@ -125,7 +125,7 @@ dia_page_layout_class_init(DiaPageLayoutClass *class)
                 dia_marshal_VOID__VOID,
                 G_TYPE_NONE, 0);
 #if 0 /* FIXME ?*/
-  gtk_object_class_add_signals(object_class, pl_signals, LAST_SIGNAL);
+  g_object_class_add_signals(object_class, pl_signals, LAST_SIGNAL);
 #endif
 
   object_class->destroy = dia_page_layout_destroy;
@@ -825,7 +825,7 @@ scale_changed(DiaPageLayout *self)
 }
 
 static void
-dia_page_layout_destroy(GtkObject *object)
+dia_page_layout_destroy(GObject *object)
 {
   if (parent_class->destroy)
     (* parent_class->destroy)(object);
diff --git a/app/disp_callbacks.c b/app/disp_callbacks.c
index 82555660..e1af3f9b 100644
--- a/app/disp_callbacks.c
+++ b/app/disp_callbacks.c
@@ -102,7 +102,7 @@ static void
 dia_menu_free(DiaMenu *dia_menu) 
 {
   if (dia_menu->app_data)
-    gtk_object_destroy((GtkObject *)dia_menu->app_data);
+    g_object_destroy((GObject *)dia_menu->app_data);
   dia_menu->app_data = NULL;
   dia_menu->app_data_free = NULL;
 }
diff --git a/app/sheets_dialog.c b/app/sheets_dialog.c
index ce5358f5..f2405bd1 100644
--- a/app/sheets_dialog.c
+++ b/app/sheets_dialog.c
@@ -251,11 +251,11 @@ create_sheets_shapeselection_dialog (void)
   GtkWidget *cancel_button1;
 
   sheets_shapeselection_dialog = gtk_file_selection_new (_("Select SVG Shape File"));
-  gtk_object_set_data (GTK_OBJECT (sheets_shapeselection_dialog), "sheets_shapeselection_dialog", 
sheets_shapeselection_dialog);
+  g_object_set_data (G_OBJECT (sheets_shapeselection_dialog), "sheets_shapeselection_dialog", 
sheets_shapeselection_dialog);
   gtk_container_set_border_width (GTK_CONTAINER (sheets_shapeselection_dialog), 10);
 
   ok_button = GTK_FILE_SELECTION (sheets_shapeselection_dialog)->ok_button;
-  gtk_object_set_data (GTK_OBJECT (sheets_shapeselection_dialog), "ok_button", ok_button);
+  g_object_set_data (G_OBJECT (sheets_shapeselection_dialog), "ok_button", ok_button);
   gtk_widget_show (ok_button);
 #if GTK_CHECK_VERSION(2,18,0)
   gtk_widget_set_can_default (GTK_WIDGET (ok_button), TRUE);
@@ -264,7 +264,7 @@ create_sheets_shapeselection_dialog (void)
 #endif
 
   cancel_button1 = GTK_FILE_SELECTION (sheets_shapeselection_dialog)->cancel_button;
-  gtk_object_set_data (GTK_OBJECT (sheets_shapeselection_dialog), "cancel_button1", cancel_button1);
+  g_object_set_data (G_OBJECT (sheets_shapeselection_dialog), "cancel_button1", cancel_button1);
   gtk_widget_show (cancel_button1);
 #if GTK_CHECK_VERSION(2,18,0)
   gtk_widget_set_can_default (GTK_WIDGET (cancel_button1), TRUE);
diff --git a/lib/diadynamicmenu.c b/lib/diadynamicmenu.c
index 195a4a45..15a813e5 100644
--- a/lib/diadynamicmenu.c
+++ b/lib/diadynamicmenu.c
@@ -61,7 +61,7 @@ static void dia_dynamic_menu_create_sublist(DiaDynamicMenu *ddm,
                                            GList *items, 
                                            DDMCreateItemFunc create);
 static void dia_dynamic_menu_create_menu(DiaDynamicMenu *ddm);
-static void dia_dynamic_menu_destroy(GtkObject *object);
+static void dia_dynamic_menu_destroy(GObject *object);
 
 enum {
     DDM_VALUE_CHANGED,
@@ -98,7 +98,7 @@ dia_dynamic_menu_get_type(void)
 static void
 dia_dynamic_menu_class_init(DiaDynamicMenuClass *class)
 {
-  GtkObjectClass *object_class = (GtkObjectClass*)class;
+  GObjectClass *object_class = (GObjectClass*)class;
 
   object_class->destroy = dia_dynamic_menu_destroy;
   
@@ -117,10 +117,10 @@ dia_dynamic_menu_init(DiaDynamicMenu *self)
 }
 
 void 
-dia_dynamic_menu_destroy(GtkObject *object)
+dia_dynamic_menu_destroy(GObject *object)
 {
   DiaDynamicMenu *ddm = DIA_DYNAMIC_MENU(object);
-  GtkObjectClass *parent_class = GTK_OBJECT_CLASS(g_type_class_peek_parent(GTK_OBJECT_GET_CLASS(object)));
+  GObjectClass *parent_class = G_OBJECT_CLASS(g_type_class_peek_parent(G_OBJECT_GET_CLASS(object)));
 
   if (ddm->active)
     g_free(ddm->active);
@@ -187,7 +187,7 @@ dia_dynamic_menu_select_entry(DiaDynamicMenu *ddm, const gchar *name)
   
   g_free(ddm->active);
   ddm->active = g_strdup(name);
-  g_signal_emit(GTK_OBJECT(ddm), ddm_signals[DDM_VALUE_CHANGED], 0);
+  g_signal_emit(G_OBJECT(ddm), ddm_signals[DDM_VALUE_CHANGED], 0);
 }
 
 static void
diff --git a/lib/dialinechooser.c b/lib/dialinechooser.c
index e5d0ea9a..9f95d048 100644
--- a/lib/dialinechooser.c
+++ b/lib/dialinechooser.c
@@ -319,7 +319,7 @@ dia_line_chooser_init (DiaLineChooser *lchooser)
   lchooser->selector = DIALINESTYLESELECTOR(wid);
 
   menu = gtk_menu_new();
-  g_object_ref_sink(GTK_OBJECT(menu));
+  g_object_ref_sink(G_OBJECT(menu));
   g_object_set_data_full(G_OBJECT(lchooser), button_menu_key, menu,
                         (GDestroyNotify)g_object_unref);
   for (i = 0; i <= LINESTYLE_DOTTED; i++) {
diff --git a/lib/dialinestyleselector.c b/lib/dialinestyleselector.c
index 4c6c4794..6c62e1d8 100644
--- a/lib/dialinestyleselector.c
+++ b/lib/dialinestyleselector.c
@@ -131,7 +131,7 @@ dia_line_style_selector_init (DiaLineStyleSelector *fs)
   
   gtk_menu_set_active(GTK_MENU (menu), DEFAULT_LINESTYLE);
   gtk_option_menu_set_menu (GTK_OPTION_MENU (fs->omenu), menu);
-  g_signal_connect(GTK_OBJECT(menu), "selection-done", 
+  g_signal_connect(G_OBJECT(menu), "selection-done", 
                   G_CALLBACK(linestyle_type_change_callback), fs);
  
   gtk_box_pack_start(GTK_BOX(fs), GTK_WIDGET(fs->omenu), FALSE, TRUE, 0);
diff --git a/objects/UML/class_attributes_dialog.c b/objects/UML/class_attributes_dialog.c
index ce05bff5..39fd041d 100644
--- a/objects/UML/class_attributes_dialog.c
+++ b/objects/UML/class_attributes_dialog.c
@@ -131,7 +131,7 @@ attributes_list_selection_changed_callback(GtkWidget *gtklist,
 {
   GList *list;
   UMLClassDialog *prop_dialog;
-  GtkObject *list_item;
+  GObject *list_item;
   UMLAttribute *attr;
 
   /* Due to GtkList oddities, this may get called during destroy.
@@ -157,7 +157,7 @@ attributes_list_selection_changed_callback(GtkWidget *gtklist,
     return;
   }
   
-  list_item = GTK_OBJECT(list->data);
+  list_item = G_OBJECT(list->data);
   attr = (UMLAttribute *)g_object_get_data(G_OBJECT(list_item), "user_data");
   attributes_set_values(prop_dialog, attr);
   attributes_set_sensitive(prop_dialog, TRUE);
diff --git a/objects/UML/class_dialog.c b/objects/UML/class_dialog.c
index 0aed2d5c..23147518 100644
--- a/objects/UML/class_dialog.c
+++ b/objects/UML/class_dialog.c
@@ -284,7 +284,7 @@ create_font_props_row (GtkTable   *table,
                        GtkSpinButton   **heightsel)
 {
   GtkWidget *label;
-  GtkObject *adj;
+  GObject *adj;
 
   label = gtk_label_new (kind);
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
@@ -312,7 +312,7 @@ class_create_page(GtkNotebook *notebook,  UMLClass *umlclass)
   GtkWidget *scrolledwindow;
   GtkWidget *checkbox;
   GtkWidget *table;
-  GtkObject *adj;
+  GObject *adj;
 
   prop_dialog = umlclass->properties_dialog;
 
@@ -434,7 +434,7 @@ style_create_page(GtkNotebook *notebook,  UMLClass *umlclass)
   GtkWidget *fill_color;
   GtkWidget *line_color;
   GtkWidget *table;
-  GtkObject *adj;
+  GObject *adj;
 
   prop_dialog = umlclass->properties_dialog;
 
diff --git a/objects/UML/class_operations_dialog.c b/objects/UML/class_operations_dialog.c
index 607ba22f..ebce55a5 100644
--- a/objects/UML/class_operations_dialog.c
+++ b/objects/UML/class_operations_dialog.c
@@ -114,7 +114,7 @@ parameters_list_selection_changed_callback(GtkWidget *gtklist,
 {
   GList *list;
   UMLClassDialog *prop_dialog;
-  GtkObject *list_item;
+  GObject *list_item;
   UMLParameter *param;
 
   prop_dialog = umlclass->properties_dialog;
@@ -132,7 +132,7 @@ parameters_list_selection_changed_callback(GtkWidget *gtklist,
     return;
   }
   
-  list_item = GTK_OBJECT(list->data);
+  list_item = G_OBJECT(list->data);
   param = (UMLParameter *)g_object_get_data(G_OBJECT(list_item), "user_data");
   parameters_set_values(prop_dialog, param);
   parameters_set_sensitive(prop_dialog, TRUE);
@@ -464,7 +464,7 @@ operations_list_selection_changed_callback(GtkWidget *gtklist,
 {
   GList *list;
   UMLClassDialog *prop_dialog;
-  GtkObject *list_item;
+  GObject *list_item;
   UMLOperation *op;
 
   prop_dialog = umlclass->properties_dialog;
@@ -482,7 +482,7 @@ operations_list_selection_changed_callback(GtkWidget *gtklist,
     return;
   }
   
-  list_item = GTK_OBJECT(list->data);
+  list_item = G_OBJECT(list->data);
   op = (UMLOperation *)g_object_get_data(G_OBJECT(list_item), "user_data");
   operations_set_values(prop_dialog, op);
   operations_set_sensitive(prop_dialog, TRUE);
diff --git a/objects/UML/class_templates_dialog.c b/objects/UML/class_templates_dialog.c
index 9f9fadb9..285e5265 100644
--- a/objects/UML/class_templates_dialog.c
+++ b/objects/UML/class_templates_dialog.c
@@ -108,7 +108,7 @@ templates_list_selection_changed_callback(GtkWidget *gtklist,
 {
   GList *list;
   UMLClassDialog *prop_dialog;
-  GtkObject *list_item;
+  GObject *list_item;
   UMLFormalParameter *param;
 
   prop_dialog = umlclass->properties_dialog;
@@ -126,7 +126,7 @@ templates_list_selection_changed_callback(GtkWidget *gtklist,
     return;
   }
   
-  list_item = GTK_OBJECT(list->data);
+  list_item = G_OBJECT(list->data);
   param = (UMLFormalParameter *)g_object_get_data(G_OBJECT(list_item), "user_data");
   templates_set_values(prop_dialog, param);
   templates_set_sensitive(prop_dialog, TRUE);


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