Verified Commit 292266f5 authored by Zander's avatar Zander 💥

Convert remaining GtkObject -> GObject

parent b3e04738
......@@ -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);
......
......@@ -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;
}
......
......@@ -251,16 +251,16 @@ 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);
gtk_widget_set_can_default (GTK_WIDGET (ok_button), TRUE);
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);
gtk_widget_set_can_default (GTK_WIDGET (cancel_button1), TRUE);
......
......@@ -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
......
......@@ -311,7 +311,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++) {
......
......@@ -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);
......
......@@ -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);
......
......@@ -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;
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment