[dia] [gtk-deprectaed] No more GTK_OBJECT ...
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] [gtk-deprectaed] No more GTK_OBJECT ...
- Date: Sun, 19 Aug 2012 17:37:01 +0000 (UTC)
commit 5ff6ca7cc5f48ffd3676d108a1fa5e74d639d734
Author: Hans Breuer <hans breuer org>
Date: Mon Jul 30 19:14:03 2012 +0200
[gtk-deprectaed] No more GTK_OBJECT ...
... in stuff easily ported
app/app_procs.c | 4 +-
app/color_area.c | 4 +-
app/defaults.c | 4 +-
app/diagram_tree_view.c | 2 +-
app/diapagelayout.c | 56 ++++++++++++------------
app/disp_callbacks.c | 4 +-
app/filedlg.c | 12 +++---
app/find-and-replace.c | 2 +-
app/interface.c | 72 +++++++++++++++---------------
app/layer_dialog.c | 76 ++++++++++++++++----------------
app/linewidth_area.c | 6 +-
app/menus.c | 6 +-
app/pagesetup.c | 2 +-
app/plugin-manager.c | 4 +-
app/preferences.c | 6 +-
app/sheets.c | 6 +-
app/sheets_dialog.c | 34 +++++++-------
app/sheets_dialog_callbacks.c | 12 +++---
app/tool.c | 8 ++--
app/toolbox.c | 10 ++--
lib/persistence.c | 10 ++--
lib/prop_matrix.c | 4 +-
lib/propdialogs.c | 2 +-
lib/widgets.c | 8 ++--
plug-ins/libart/export_png.c | 16 +++---
plug-ins/postscript/paginate_psprint.c | 14 +++---
26 files changed, 192 insertions(+), 192 deletions(-)
---
diff --git a/app/app_procs.c b/app/app_procs.c
index da2a134..71fd097 100644
--- a/app/app_procs.c
+++ b/app/app_procs.c
@@ -838,9 +838,9 @@ app_init (int argc, char **argv)
g_warning(_("Can't connect to session manager!\n"));
}
else {
- g_signal_connect(GTK_OBJECT (client), "save_yourself",
+ g_signal_connect(G_OBJECT (client), "save_yourself",
G_CALLBACK (save_state), NULL);
- g_signal_connect(GTK_OBJECT (client), "die",
+ g_signal_connect(G_OBJECT (client), "die",
G_CALLBACK (session_die), NULL);
}
diff --git a/app/color_area.c b/app/color_area.c
index fd5ebf5..a4de1fe 100644
--- a/app/color_area.c
+++ b/app/color_area.c
@@ -341,9 +341,9 @@ color_area_edit (void)
G_CALLBACK(color_selection_delete),
window);
- g_signal_connect (GTK_OBJECT (window), "destroy",
+ g_signal_connect (G_OBJECT (window), "destroy",
G_CALLBACK(color_selection_destroy),
- window);
+ window);
g_signal_connect (
G_OBJECT (gtk_color_selection_dialog_get_color_selection (GTK_COLOR_SELECTION_DIALOG (window))),
diff --git a/app/defaults.c b/app/defaults.c
index 737a6e3..9800831 100644
--- a/app/defaults.c
+++ b/app/defaults.c
@@ -62,7 +62,7 @@ static void create_dialog()
no_defaults_dialog = gtk_label_new(_("This object has no defaults."));
gtk_widget_show (no_defaults_dialog);
- g_object_ref_sink(GTK_OBJECT(no_defaults_dialog));
+ g_object_ref_sink(G_OBJECT(no_defaults_dialog));
}
static gint
@@ -132,7 +132,7 @@ defaults_show(DiaObjectType *objtype, gpointer user_data)
/* don't destroy dialog when window manager close button pressed */
g_signal_connect(G_OBJECT(dialog), "delete_event",
G_CALLBACK(gtk_widget_hide), NULL);
- g_signal_connect(GTK_OBJECT(dialog), "delete_event",
+ g_signal_connect(G_OBJECT(dialog), "delete_event",
G_CALLBACK(gtk_true), NULL);
gtk_box_pack_start(GTK_BOX(dialog_vbox), defaults, TRUE, TRUE, 0);
diff --git a/app/diagram_tree_view.c b/app/diagram_tree_view.c
index 3cfe2ec..c5dcc63 100644
--- a/app/diagram_tree_view.c
+++ b/app/diagram_tree_view.c
@@ -575,7 +575,7 @@ diagram_tree_show (void)
/* expand all rows after the treeview widget has been realized */
g_signal_connect (dtv, "realize",
G_CALLBACK (gtk_tree_view_expand_all), NULL);
- g_signal_connect (GTK_OBJECT (window), "destroy",
+ g_signal_connect (G_OBJECT (window), "destroy",
G_CALLBACK (gtk_widget_destroyed),
&window);
diff --git a/app/diapagelayout.c b/app/diapagelayout.c
index 23d95b4..43b4fa8 100644
--- a/app/diapagelayout.c
+++ b/app/diapagelayout.c
@@ -330,34 +330,34 @@ dia_page_layout_init(DiaPageLayout *self)
gtk_widget_show(self->darea);
/* connect the signal handlers */
- g_signal_connect_swapped(GTK_OBJECT(self->orient_portrait), "toggled",
- G_CALLBACK(orient_changed), GTK_OBJECT(self));
-
- g_signal_connect_swapped(GTK_OBJECT(self->tmargin), "changed",
- G_CALLBACK(margin_changed), GTK_OBJECT(self));
- g_signal_connect_swapped(GTK_OBJECT(self->bmargin), "changed",
- G_CALLBACK(margin_changed), GTK_OBJECT(self));
- g_signal_connect_swapped(GTK_OBJECT(self->lmargin), "changed",
- G_CALLBACK(margin_changed), GTK_OBJECT(self));
- g_signal_connect_swapped(GTK_OBJECT(self->rmargin), "changed",
- G_CALLBACK(margin_changed), GTK_OBJECT(self));
-
- g_signal_connect_swapped(GTK_OBJECT(self->fitto), "toggled",
+ g_signal_connect_swapped(G_OBJECT(self->orient_portrait), "toggled",
+ G_CALLBACK(orient_changed), G_OBJECT(self));
+
+ g_signal_connect_swapped(G_OBJECT(self->tmargin), "changed",
+ G_CALLBACK(margin_changed), G_OBJECT(self));
+ g_signal_connect_swapped(G_OBJECT(self->bmargin), "changed",
+ G_CALLBACK(margin_changed), G_OBJECT(self));
+ g_signal_connect_swapped(G_OBJECT(self->lmargin), "changed",
+ G_CALLBACK(margin_changed), G_OBJECT(self));
+ g_signal_connect_swapped(G_OBJECT(self->rmargin), "changed",
+ G_CALLBACK(margin_changed), G_OBJECT(self));
+
+ g_signal_connect_swapped(G_OBJECT(self->fitto), "toggled",
G_CALLBACK(scalemode_changed),
- GTK_OBJECT(self));
- g_signal_connect_swapped(GTK_OBJECT(self->scaling), "changed",
- G_CALLBACK(scale_changed), GTK_OBJECT(self));
- g_signal_connect_swapped(GTK_OBJECT(self->fitw), "changed",
- G_CALLBACK(scale_changed), GTK_OBJECT(self));
- g_signal_connect_swapped(GTK_OBJECT(self->fith), "changed",
- G_CALLBACK(scale_changed), GTK_OBJECT(self));
-
- g_signal_connect_swapped(GTK_OBJECT(self->darea), "size_allocate",
+ G_OBJECT(self));
+ g_signal_connect_swapped(G_OBJECT(self->scaling), "changed",
+ G_CALLBACK(scale_changed), G_OBJECT(self));
+ g_signal_connect_swapped(G_OBJECT(self->fitw), "changed",
+ G_CALLBACK(scale_changed), G_OBJECT(self));
+ g_signal_connect_swapped(G_OBJECT(self->fith), "changed",
+ G_CALLBACK(scale_changed), G_OBJECT(self));
+
+ g_signal_connect_swapped(G_OBJECT(self->darea), "size_allocate",
G_CALLBACK(darea_size_allocate),
- GTK_OBJECT(self));
- g_signal_connect_swapped(GTK_OBJECT(self->darea), "expose_event",
+ G_OBJECT(self));
+ g_signal_connect_swapped(G_OBJECT(self->darea), "expose_event",
G_CALLBACK(darea_expose_event),
- GTK_OBJECT(self));
+ G_OBJECT(self));
gdk_color_white(gtk_widget_get_colormap(GTK_WIDGET(self)), &self->white);
gdk_color_black(gtk_widget_get_colormap(GTK_WIDGET(self)), &self->black);
@@ -830,7 +830,7 @@ main(int argc, char **argv)
win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(win), _("Page Setup"));
- g_signal_connect(GTK_OBJECT(win), "destroy",
+ g_signal_connect(G_OBJECT(win), "destroy",
G_CALLBACK(gtk_main_quit), NULL);
pl = dia_page_layout_new();
@@ -838,9 +838,9 @@ main(int argc, char **argv)
gtk_container_add(GTK_CONTAINER(win), pl);
gtk_widget_show(pl);
- g_signal_connect(GTK_OBJECT(pl), "changed",
+ g_signal_connect(G_OBJECT(pl), "changed",
G_CALLBACK(changed_signal), NULL);
- g_signal_connect(GTK_OBJECT(pl), "fittopage",
+ g_signal_connect(G_OBJECT(pl), "fittopage",
G_CALLBACK(fittopage_signal), NULL);
gtk_widget_show(win);
diff --git a/app/disp_callbacks.c b/app/disp_callbacks.c
index c17299f..46f0e45 100644
--- a/app/disp_callbacks.c
+++ b/app/disp_callbacks.c
@@ -124,7 +124,7 @@ add_properties_menu_item (GtkMenu *menu, gboolean separator)
}
menu_item = gtk_menu_item_new_with_label(_("Properties\342\200\246"));
- g_signal_connect(GTK_OBJECT(menu_item), "activate", G_CALLBACK(dialogs_properties_callback), NULL);
+ g_signal_connect(G_OBJECT(menu_item), "activate", G_CALLBACK(dialogs_properties_callback), NULL);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
gtk_widget_show(menu_item);
}
@@ -163,7 +163,7 @@ static void
add_follow_link_menu_item (GtkMenu *menu)
{
GtkWidget *menu_item = gtk_menu_item_new_with_label(_("Follow linkâ"));
- g_signal_connect(GTK_OBJECT(menu_item), "activate", G_CALLBACK(_follow_link_callback), NULL);
+ g_signal_connect(G_OBJECT(menu_item), "activate", G_CALLBACK(_follow_link_callback), NULL);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
gtk_widget_show(menu_item);
}
diff --git a/app/filedlg.c b/app/filedlg.c
index 65307b2..6df3a96 100644
--- a/app/filedlg.c
+++ b/app/filedlg.c
@@ -213,7 +213,7 @@ create_open_menu(void)
#endif
g_free(filter_label);
}
- g_signal_connect(GTK_OBJECT(menu), "changed",
+ g_signal_connect(G_OBJECT(menu), "changed",
G_CALLBACK(import_adapt_extension_callback), NULL);
return menu;
}
@@ -308,7 +308,7 @@ file_open_callback(GtkAction *action)
g_free(fnabs);
g_free(filename);
}
- g_signal_connect(GTK_OBJECT(opendlg), "destroy",
+ g_signal_connect(G_OBJECT(opendlg), "destroy",
G_CALLBACK(gtk_widget_destroyed), &opendlg);
} else {
gtk_widget_set_sensitive(opendlg, TRUE);
@@ -343,7 +343,7 @@ file_open_callback(GtkAction *action)
options);
gtk_widget_show(options);
- g_signal_connect(GTK_OBJECT(opendlg), "response",
+ g_signal_connect(G_OBJECT(opendlg), "response",
G_CALLBACK(file_open_response_callback), omenu);
/* set up the gtk file (name) filters */
@@ -514,7 +514,7 @@ file_save_as_dialog_prepare (Diagram *dia, DDisplay *ddisp)
"programs cannot manipulate compressed files."));
g_signal_connect (GTK_FILE_CHOOSER(savedlg),
"response", G_CALLBACK(file_save_as_response_callback), compressbutton);
- g_signal_connect(GTK_OBJECT(savedlg), "destroy",
+ g_signal_connect(G_OBJECT(savedlg), "destroy",
G_CALLBACK(gtk_widget_destroyed), &savedlg);
} else {
GtkWidget *compressbutton = gtk_file_chooser_get_extra_widget(GTK_FILE_CHOOSER(savedlg));
@@ -678,7 +678,7 @@ create_export_menu(void)
#endif
g_free(filter_label);
}
- g_signal_connect(GTK_OBJECT(menu), "changed",
+ g_signal_connect(G_OBJECT(menu), "changed",
G_CALLBACK(export_adapt_extension_callback), NULL);
return menu;
}
@@ -783,7 +783,7 @@ file_export_callback(GtkAction *action)
gtk_dialog_set_default_response(GTK_DIALOG(exportdlg), GTK_RESPONSE_ACCEPT);
gtk_window_set_role(GTK_WINDOW(exportdlg), "export_diagram");
- g_signal_connect(GTK_OBJECT(exportdlg), "destroy",
+ g_signal_connect(G_OBJECT(exportdlg), "destroy",
G_CALLBACK(gtk_widget_destroyed), &exportdlg);
}
if (!gtk_file_chooser_get_extra_widget(GTK_FILE_CHOOSER(exportdlg))) {
diff --git a/app/find-and-replace.c b/app/find-and-replace.c
index abc3fc1..2123fdc 100644
--- a/app/find-and-replace.c
+++ b/app/find-and-replace.c
@@ -445,7 +445,7 @@ fnr_dialog_setup_common (GtkWidget *dialog, gboolean is_replace, DDisplay *ddisp
G_CALLBACK(fnr_respond), ddisp);
g_signal_connect(G_OBJECT(dialog), "delete_event",
G_CALLBACK(gtk_widget_hide), NULL);
- g_signal_connect(GTK_OBJECT(dialog), "delete_event",
+ g_signal_connect(G_OBJECT(dialog), "delete_event",
G_CALLBACK(gtk_true), NULL);
vbox = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
diff --git a/app/interface.c b/app/interface.c
index f2220ba..e6e7141 100644
--- a/app/interface.c
+++ b/app/interface.c
@@ -222,7 +222,7 @@ zoom_add_zoom_amount(GtkWidget *menu, gchar *text, DDisplay *ddisp)
{
GtkWidget *menuitem = gtk_menu_item_new_with_label(text);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
- g_signal_connect(GTK_OBJECT(menuitem),
+ g_signal_connect(G_OBJECT(menuitem),
"activate", G_CALLBACK(zoom_activate_callback),
ddisp);
g_object_set_data(G_OBJECT(menuitem), "zoomamount", text);
@@ -252,7 +252,7 @@ create_zoom_widget(DDisplay *ddisp) {
combo = gtk_hbox_new(FALSE, 0);
entry = gtk_entry_new();
- g_signal_connect (GTK_OBJECT (entry), "activate",
+ g_signal_connect (G_OBJECT (entry), "activate",
G_CALLBACK(zoom_activate_callback),
ddisp);
gtk_box_pack_start(GTK_BOX(combo), entry, TRUE, TRUE, 0);
@@ -283,7 +283,7 @@ create_zoom_widget(DDisplay *ddisp) {
gtk_widget_show_all(menu);
- g_signal_connect (GTK_OBJECT (button), "button_press_event",
+ g_signal_connect (G_OBJECT (button), "button_press_event",
G_CALLBACK(zoom_popup_menu),
menu);
@@ -355,14 +355,14 @@ create_canvas (DDisplay *ddisp)
gtk_widget_set_events (canvas, CANVAS_EVENT_MASK);
GTK_WIDGET_SET_FLAGS (canvas, GTK_CAN_FOCUS);
- g_signal_connect (GTK_OBJECT (canvas), "event",
+ g_signal_connect (G_OBJECT (canvas), "event",
G_CALLBACK(ddisplay_canvas_events),
ddisp);
toolbox_setup_drag_dest (canvas);
- g_signal_connect (GTK_OBJECT (canvas), "drag_drop",
+ g_signal_connect (G_OBJECT (canvas), "drag_drop",
G_CALLBACK(display_drop_callback), NULL);
- g_signal_connect (GTK_OBJECT (canvas), "drag_data_received",
+ g_signal_connect (G_OBJECT (canvas), "drag_data_received",
G_CALLBACK(display_data_received_callback), ddisp);
g_object_set_data (G_OBJECT (canvas), "user_data", (gpointer) ddisp);
@@ -435,16 +435,16 @@ use_integrated_ui_for_display_shell(DDisplay *ddisp, char *title)
GDK_POINTER_MOTION_HINT_MASK |
GDK_FOCUS_CHANGE_MASK);
- g_signal_connect (GTK_OBJECT (ddisp->container), "focus_out_event",
+ g_signal_connect (G_OBJECT (ddisp->container), "focus_out_event",
G_CALLBACK (ddisplay_focus_out_event),
ddisp);
- g_signal_connect (GTK_OBJECT (ddisp->container), "focus_in_event",
+ g_signal_connect (G_OBJECT (ddisp->container), "focus_in_event",
G_CALLBACK (ddisplay_focus_in_event),
ddisp);
- g_signal_connect (GTK_OBJECT (ddisp->container), "realize",
+ g_signal_connect (G_OBJECT (ddisp->container), "realize",
G_CALLBACK (ddisplay_realize),
ddisp);
- g_signal_connect (GTK_OBJECT (ddisp->container), "unrealize",
+ g_signal_connect (G_OBJECT (ddisp->container), "unrealize",
G_CALLBACK (ddisplay_unrealize),
ddisp);
@@ -471,14 +471,14 @@ use_integrated_ui_for_display_shell(DDisplay *ddisp, char *title)
gtk_frame_set_shadow_type (GTK_FRAME (ddisp->origin), GTK_SHADOW_OUT);
ddisp->hrule = gtk_hruler_new ();
- g_signal_connect_swapped (GTK_OBJECT (ddisp->container), "motion_notify_event",
+ g_signal_connect_swapped (G_OBJECT (ddisp->container), "motion_notify_event",
G_CALLBACK(GTK_WIDGET_GET_CLASS (ddisp->hrule)->motion_notify_event),
- GTK_OBJECT (ddisp->hrule));
+ G_OBJECT (ddisp->hrule));
ddisp->vrule = gtk_vruler_new ();
- g_signal_connect_swapped (GTK_OBJECT (ddisp->container), "motion_notify_event",
+ g_signal_connect_swapped (G_OBJECT (ddisp->container), "motion_notify_event",
G_CALLBACK(GTK_WIDGET_GET_CLASS (ddisp->vrule)->motion_notify_event),
- GTK_OBJECT (ddisp->vrule));
+ G_OBJECT (ddisp->vrule));
/* Get the width/height of the Notebook child area */
/* TODO: Fix width/height hardcoded values */
@@ -495,10 +495,10 @@ use_integrated_ui_for_display_shell(DDisplay *ddisp, char *title)
GTK_WIDGET_UNSET_FLAGS (ddisp->vsb, GTK_CAN_FOCUS);
/* set up the scrollbar observers */
- g_signal_connect (GTK_OBJECT (ddisp->hsbdata), "value_changed",
+ g_signal_connect (G_OBJECT (ddisp->hsbdata), "value_changed",
G_CALLBACK(ddisplay_hsb_update),
ddisp);
- g_signal_connect (GTK_OBJECT (ddisp->vsbdata), "value_changed",
+ g_signal_connect (G_OBJECT (ddisp->vsbdata), "value_changed",
G_CALLBACK(ddisplay_vsb_update),
ddisp);
@@ -629,22 +629,22 @@ create_display_shell(DDisplay *ddisp,
GDK_FOCUS_CHANGE_MASK);
/* GDK_ALL_EVENTS_MASK */
- g_signal_connect (GTK_OBJECT (ddisp->shell), "delete_event",
+ g_signal_connect (G_OBJECT (ddisp->shell), "delete_event",
G_CALLBACK (ddisplay_delete),
ddisp);
- g_signal_connect (GTK_OBJECT (ddisp->shell), "destroy",
+ g_signal_connect (G_OBJECT (ddisp->shell), "destroy",
G_CALLBACK (ddisplay_destroy),
ddisp);
- g_signal_connect (GTK_OBJECT (ddisp->shell), "focus_out_event",
+ g_signal_connect (G_OBJECT (ddisp->shell), "focus_out_event",
G_CALLBACK (ddisplay_focus_out_event),
ddisp);
- g_signal_connect (GTK_OBJECT (ddisp->shell), "focus_in_event",
+ g_signal_connect (G_OBJECT (ddisp->shell), "focus_in_event",
G_CALLBACK (ddisplay_focus_in_event),
ddisp);
- g_signal_connect (GTK_OBJECT (ddisp->shell), "realize",
+ g_signal_connect (G_OBJECT (ddisp->shell), "realize",
G_CALLBACK (ddisplay_realize),
ddisp);
- g_signal_connect (GTK_OBJECT (ddisp->shell), "unrealize",
+ g_signal_connect (G_OBJECT (ddisp->shell), "unrealize",
G_CALLBACK (ddisplay_unrealize),
ddisp);
@@ -675,7 +675,7 @@ create_display_shell(DDisplay *ddisp,
gtk_container_add(GTK_CONTAINER(ddisp->origin), widget);
gtk_widget_set_tooltip_text(widget, _("Diagram menu."));
gtk_widget_show(widget);
- g_signal_connect(GTK_OBJECT(ddisp->origin), "button_press_event",
+ g_signal_connect(G_OBJECT(ddisp->origin), "button_press_event",
G_CALLBACK(origin_button_press), ddisp);
}
else {
@@ -685,14 +685,14 @@ create_display_shell(DDisplay *ddisp,
ddisp->hrule = gtk_hruler_new ();
- g_signal_connect_swapped (GTK_OBJECT (ddisp->shell), "motion_notify_event",
+ g_signal_connect_swapped (G_OBJECT (ddisp->shell), "motion_notify_event",
G_CALLBACK(GTK_WIDGET_GET_CLASS (ddisp->hrule)->motion_notify_event),
- GTK_OBJECT (ddisp->hrule));
+ G_OBJECT (ddisp->hrule));
ddisp->vrule = gtk_vruler_new ();
- g_signal_connect_swapped (GTK_OBJECT (ddisp->shell), "motion_notify_event",
+ g_signal_connect_swapped (G_OBJECT (ddisp->shell), "motion_notify_event",
G_CALLBACK(GTK_WIDGET_GET_CLASS (ddisp->vrule)->motion_notify_event),
- GTK_OBJECT (ddisp->vrule));
+ G_OBJECT (ddisp->vrule));
ddisp->hsb = gtk_hscrollbar_new (ddisp->hsbdata);
GTK_WIDGET_UNSET_FLAGS (ddisp->hsb, GTK_CAN_FOCUS);
@@ -700,10 +700,10 @@ create_display_shell(DDisplay *ddisp,
GTK_WIDGET_UNSET_FLAGS (ddisp->vsb, GTK_CAN_FOCUS);
/* set up the scrollbar observers */
- g_signal_connect (GTK_OBJECT (ddisp->hsbdata), "value_changed",
+ g_signal_connect (G_OBJECT (ddisp->hsbdata), "value_changed",
G_CALLBACK(ddisplay_hsb_update),
ddisp);
- g_signal_connect (GTK_OBJECT (ddisp->vsbdata), "value_changed",
+ g_signal_connect (G_OBJECT (ddisp->vsbdata), "value_changed",
G_CALLBACK(ddisplay_vsb_update),
ddisp);
@@ -867,7 +867,7 @@ toolbox_delete (GtkWidget *widget, GdkEvent *event, gpointer data)
handlerid = g_signal_handler_find(widget, G_SIGNAL_MATCH_FUNC,
0, 0, NULL, toolbox_destroy, NULL);
if (handlerid != 0)
- g_signal_handler_disconnect (GTK_OBJECT (widget), handlerid);
+ g_signal_handler_disconnect (G_OBJECT (widget), handlerid);
/** If the app didn't exit, don't close the window */
return (!app_exit());
@@ -920,11 +920,11 @@ create_integrated_ui (void)
app_set_icon (GTK_WINDOW (window));
- g_signal_connect (GTK_OBJECT (window), "delete_event",
+ g_signal_connect (G_OBJECT (window), "delete_event",
G_CALLBACK (toolbox_delete),
window);
- g_signal_connect (GTK_OBJECT (window), "destroy",
+ g_signal_connect (G_OBJECT (window), "destroy",
G_CALLBACK (toolbox_destroy),
window);
@@ -959,7 +959,7 @@ create_integrated_ui (void)
wrapbox = toolbox_create();
gtk_box_pack_start (GTK_BOX (hbox), wrapbox, FALSE, TRUE, 0);
- g_signal_connect (GTK_OBJECT (wrapbox), "drag_data_received",
+ g_signal_connect (G_OBJECT (wrapbox), "drag_data_received",
G_CALLBACK (dia_dnd_file_drag_data_received),
NULL); /* userdata == NULL here intentionally */
@@ -1031,11 +1031,11 @@ create_toolbox ()
}
}
- g_signal_connect (GTK_OBJECT (window), "delete_event",
+ g_signal_connect (G_OBJECT (window), "delete_event",
G_CALLBACK (toolbox_delete),
window);
- g_signal_connect (GTK_OBJECT (window), "destroy",
+ g_signal_connect (G_OBJECT (window), "destroy",
G_CALLBACK (toolbox_destroy),
window);
@@ -1049,7 +1049,7 @@ create_toolbox ()
wrapbox = toolbox_create();
gtk_box_pack_end (GTK_BOX (main_vbox), wrapbox, TRUE, TRUE, 0);
- g_signal_connect (GTK_OBJECT (wrapbox), "drag_data_received",
+ g_signal_connect (G_OBJECT (wrapbox), "drag_data_received",
G_CALLBACK (dia_dnd_file_drag_data_received),
NULL); /* userdata == NULL here intentionally */
gtk_widget_show (main_vbox);
diff --git a/app/layer_dialog.c b/app/layer_dialog.c
index 4230748..164f907 100644
--- a/app/layer_dialog.c
+++ b/app/layer_dialog.c
@@ -210,9 +210,9 @@ create_button_box(GtkWidget *parent, gboolean show_labels)
gtk_button_set_image (GTK_BUTTON (button), image);
}
- g_signal_connect_swapped (GTK_OBJECT (button), "clicked",
- G_CALLBACK(buttons[i].callback),
- GTK_OBJECT (parent));
+ g_signal_connect_swapped (G_OBJECT (button), "clicked",
+ G_CALLBACK(buttons[i].callback),
+ G_OBJECT (parent));
gtk_widget_set_tooltip_text (button, gettext(buttons[i].tooltip));
@@ -391,11 +391,11 @@ layer_dialog_create(void)
gtk_window_set_role (GTK_WINDOW (dialog), "layer_window");
gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
- g_signal_connect (GTK_OBJECT (dialog), "delete_event",
- G_CALLBACK(layer_dialog_delete), NULL);
- g_signal_connect (GTK_OBJECT (dialog), "destroy",
- G_CALLBACK(gtk_widget_destroyed),
- &(layer_dialog->dialog));
+ g_signal_connect (G_OBJECT (dialog), "delete_event",
+ G_CALLBACK(layer_dialog_delete), NULL);
+ g_signal_connect (G_OBJECT (dialog), "destroy",
+ G_CALLBACK(gtk_widget_destroyed),
+ &(layer_dialog->dialog));
vbox = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
@@ -448,9 +448,9 @@ layer_dialog_create(void)
button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
button, TRUE, TRUE, 0);
- g_signal_connect_swapped(GTK_OBJECT (button), "clicked",
+ g_signal_connect_swapped(G_OBJECT (button), "clicked",
G_CALLBACK(gtk_widget_hide),
- GTK_OBJECT(dialog));
+ G_OBJECT(dialog));
gtk_widget_show (button);
@@ -852,11 +852,8 @@ dia_layer_widget_unrealize(GtkWidget *widget)
static void
dia_layer_widget_class_init(DiaLayerWidgetClass *klass)
{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
-
- object_class = (GtkObjectClass*) klass;
- widget_class = (GtkWidgetClass*) klass;
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
widget_class->unrealize = dia_layer_widget_unrealize;
}
@@ -1023,24 +1020,27 @@ dia_layer_widget_init(DiaLayerWidget *lw)
G_CALLBACK (dia_layer_deselect_callback), NULL);
}
-GtkType
+GType
dia_layer_widget_get_type(void)
{
- static GtkType dlw_type = 0;
+ static GType dlw_type = 0;
if (!dlw_type) {
- static const GtkTypeInfo dlw_info = {
- "DiaLayerWidget",
- sizeof (DiaLayerWidget),
+ static const GTypeInfo dlw_info = {
sizeof (DiaLayerWidgetClass),
- (GtkClassInitFunc) dia_layer_widget_class_init,
- (GtkObjectInitFunc) dia_layer_widget_init,
- NULL,
- NULL,
- (GtkClassInitFunc) NULL,
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) dia_layer_widget_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof(DiaLayerWidget),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc)dia_layer_widget_init,
};
- dlw_type = gtk_type_unique (gtk_list_item_get_type (), &dlw_info);
+ dlw_type = g_type_register_static (gtk_list_item_get_type (),
+ "DiaLayerWidget",
+ &dlw_info, 0);
}
return dlw_type;
@@ -1201,12 +1201,12 @@ layer_dialog_edit_layer (DiaLayerWidget *layer_widget, Diagram *dia, Layer *laye
gtk_window_set_position (GTK_WINDOW (dialog->dialog), GTK_WIN_POS_MOUSE);
/* handle the wm close signal */
- g_signal_connect (GTK_OBJECT (dialog->dialog), "delete_event",
- G_CALLBACK (edit_layer_delete_callback),
- dialog);
- g_signal_connect (GTK_OBJECT (dialog->dialog), "destroy",
- G_CALLBACK (gtk_widget_destroy),
- &dialog->dialog);
+ g_signal_connect (G_OBJECT (dialog->dialog), "delete_event",
+ G_CALLBACK (edit_layer_delete_callback),
+ dialog);
+ g_signal_connect (G_OBJECT (dialog->dialog), "destroy",
+ G_CALLBACK (gtk_widget_destroy),
+ &dialog->dialog);
/* the main vbox */
vbox = gtk_vbox_new (FALSE, 1);
@@ -1244,13 +1244,13 @@ layer_dialog_edit_layer (DiaLayerWidget *layer_widget, Diagram *dia, Layer *laye
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog->dialog)->action_area),
button, TRUE, TRUE, 0);
if (layer_widget)
- g_signal_connect (GTK_OBJECT (button), "clicked",
+ g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK(edit_layer_ok_callback), dialog);
else if (layer)
- g_signal_connect (GTK_OBJECT (button), "clicked",
+ g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK(edit_layer_rename_ok_callback), dialog);
else if (dia)
- g_signal_connect (GTK_OBJECT (button), "clicked",
+ g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK(edit_layer_add_ok_callback), dialog);
gtk_widget_grab_default (button);
@@ -1264,9 +1264,9 @@ layer_dialog_edit_layer (DiaLayerWidget *layer_widget, Diagram *dia, Layer *laye
#endif
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog->dialog)->action_area),
button, TRUE, TRUE, 0);
- g_signal_connect (GTK_OBJECT (button), "clicked",
- G_CALLBACK(edit_layer_cancel_callback),
- dialog);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK(edit_layer_cancel_callback),
+ dialog);
gtk_widget_show (button);
gtk_widget_show (vbox);
diff --git a/app/linewidth_area.c b/app/linewidth_area.c
index f658e99..c84db04 100644
--- a/app/linewidth_area.c
+++ b/app/linewidth_area.c
@@ -193,7 +193,7 @@ linewidth_area_create (void)
linewidth_area = gtk_drawing_area_new ();
gtk_widget_set_size_request (linewidth_area, AREA_WIDTH, AREA_HEIGHT);
gtk_widget_set_events (linewidth_area, GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK);
- g_signal_connect (GTK_OBJECT (linewidth_area), "event",
+ g_signal_connect (G_OBJECT (linewidth_area), "event",
G_CALLBACK(linewidth_area_events),
NULL);
@@ -275,9 +275,9 @@ linewidth_create_dialog(GtkWindow *toplevel)
g_signal_connect_after(G_OBJECT (linewidth_button), "activate",
G_CALLBACK (linewidth_dialog_ok), NULL);
- g_signal_connect (GTK_OBJECT (linewidth_dialog), "delete_event",
+ g_signal_connect (G_OBJECT (linewidth_dialog), "delete_event",
G_CALLBACK(gtk_widget_hide), NULL);
- g_signal_connect (GTK_OBJECT (linewidth_dialog), "destroy",
+ g_signal_connect (G_OBJECT (linewidth_dialog), "destroy",
G_CALLBACK(dialog_destroyed), &linewidth_dialog);
persistence_register_window (GTK_WINDOW (linewidth_dialog));
diff --git a/app/menus.c b/app/menus.c
index 73c2a52..c6ced55 100644
--- a/app/menus.c
+++ b/app/menus.c
@@ -605,9 +605,9 @@ create_integrated_ui_toolbar (void)
w = gtk_bin_get_child (GTK_BIN (w));
gtk_entry_set_width_chars (GTK_ENTRY (w), 6);
- g_signal_connect (GTK_OBJECT (w), "activate",
- G_CALLBACK(integrated_ui_toolbar_zoom_activate),
- NULL);
+ g_signal_connect (G_OBJECT (w), "activate",
+ G_CALLBACK(integrated_ui_toolbar_zoom_activate),
+ NULL);
/* Seperator */
sep = gtk_separator_tool_item_new ();
diff --git a/app/pagesetup.c b/app/pagesetup.c
index 7b34115..0a6ed2a 100644
--- a/app/pagesetup.c
+++ b/app/pagesetup.c
@@ -114,7 +114,7 @@ create_page_setup_dlg(Diagram *dia)
gtk_box_pack_start(GTK_BOX(vbox), ps->paper, TRUE, TRUE, 0);
gtk_widget_show(ps->paper);
- g_signal_connect(GTK_OBJECT(ps->paper), "changed",
+ g_signal_connect(G_OBJECT(ps->paper), "changed",
G_CALLBACK(pagesetup_changed), ps);
gtk_widget_show(ps->window);
diff --git a/app/plugin-manager.c b/app/plugin-manager.c
index 8b3df96..9715644 100644
--- a/app/plugin-manager.c
+++ b/app/plugin-manager.c
@@ -211,9 +211,9 @@ get_plugin_manager(void)
G_CALLBACK(pm_respond), NULL);
g_signal_connect(G_OBJECT(dialog), "delete_event",
G_CALLBACK(gtk_widget_hide), NULL);
- g_signal_connect(GTK_OBJECT(dialog), "delete_event",
+ g_signal_connect(G_OBJECT(dialog), "delete_event",
G_CALLBACK(gtk_true), NULL);
- g_signal_connect(GTK_OBJECT(dialog), "destroy",
+ g_signal_connect(G_OBJECT(dialog), "destroy",
G_CALLBACK(gtk_widget_destroyed), &dialog);
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
diff --git a/app/preferences.c b/app/preferences.c
index a430c1b..1504942 100644
--- a/app/preferences.c
+++ b/app/preferences.c
@@ -490,7 +490,7 @@ prefs_get_property_widget(DiaPrefData *data)
switch(data->type) {
case PREF_BOOLEAN:
widget = gtk_toggle_button_new_with_label (_("No"));
- g_signal_connect (GTK_OBJECT (widget), "toggled",
+ g_signal_connect (G_OBJECT (widget), "toggled",
G_CALLBACK (prefs_boolean_toggle), NULL);
break;
case PREF_INT:
@@ -609,9 +609,9 @@ prefs_create_dialog(void)
g_signal_connect(G_OBJECT (prefs_dialog), "response",
G_CALLBACK (prefs_respond), NULL);
- g_signal_connect (GTK_OBJECT (prefs_dialog), "delete_event",
+ g_signal_connect (G_OBJECT (prefs_dialog), "delete_event",
G_CALLBACK(gtk_widget_hide), NULL);
- g_signal_connect (GTK_OBJECT (prefs_dialog), "destroy",
+ g_signal_connect (G_OBJECT (prefs_dialog), "destroy",
G_CALLBACK(gtk_widget_destroyed), &prefs_dialog);
notebook = gtk_notebook_new ();
diff --git a/app/sheets.c b/app/sheets.c
index 57c3308..102175d 100644
--- a/app/sheets.c
+++ b/app/sheets.c
@@ -167,7 +167,7 @@ sheets_optionmenu_create(GtkWidget *option_menu, GtkWidget *wrapbox,
g_object_set_data(G_OBJECT(menu_item), "wrapbox", wrapbox);
- g_signal_connect(GTK_OBJECT(menu_item), "activate",
+ g_signal_connect(G_OBJECT(menu_item), "activate",
G_CALLBACK(on_sheets_dialog_optionmenu_activate),
(gpointer)sheet_mod);
}
@@ -229,9 +229,9 @@ sheets_dialog_create(void)
return FALSE;
}
/* Make sure to null our pointer when destroyed */
- g_signal_connect (GTK_OBJECT (sheets_dialog), "destroy",
+ g_signal_connect (G_OBJECT (sheets_dialog), "destroy",
G_CALLBACK (gtk_widget_destroyed),
- &sheets_dialog);
+ &sheets_dialog);
sheet_left = NULL;
sheet_right = NULL;
diff --git a/app/sheets_dialog.c b/app/sheets_dialog.c
index ab9d292..bdf7e9b 100644
--- a/app/sheets_dialog.c
+++ b/app/sheets_dialog.c
@@ -90,8 +90,8 @@ create_sheets_main_dialog (void)
sheets_main_dialog = GTK_WIDGET (gtk_builder_get_object (builder, "sheets_main_dialog"));
g_object_set_data (G_OBJECT(sheets_main_dialog), "_sheet_dialogs_builder", builder);
- g_signal_connect (GTK_OBJECT (sheets_main_dialog), "destroy",
- G_CALLBACK (sheets_dialog_destroyed), NULL);
+ g_signal_connect (G_OBJECT (sheets_main_dialog), "destroy",
+ G_CALLBACK (sheets_dialog_destroyed), NULL);
optionmenu_right = GTK_WIDGET (gtk_builder_get_object (builder, "optionmenu_right"));
optionmenu_right_menu = gtk_menu_new ();
@@ -159,8 +159,8 @@ create_sheets_new_dialog (void)
sheets_new_dialog = GTK_WIDGET (gtk_builder_get_object (builder, "sheets_new_dialog"));
g_object_set_data (G_OBJECT(sheets_new_dialog), "_sheet_dialogs_builder", builder);
- g_signal_connect (GTK_OBJECT (sheets_new_dialog), "destroy",
- G_CALLBACK (sheets_dialog_destroyed), NULL);
+ g_signal_connect (G_OBJECT (sheets_new_dialog), "destroy",
+ G_CALLBACK (sheets_dialog_destroyed), NULL);
g_signal_connect (gtk_builder_get_object (builder,"radiobutton_svg_shape"), "toggled",
G_CALLBACK (on_sheets_new_dialog_radiobutton_svg_shape_toggled),
@@ -192,8 +192,8 @@ create_sheets_edit_dialog (void)
sheets_edit_dialog = GTK_WIDGET (gtk_builder_get_object (builder,"sheets_edit_dialog"));
g_object_set_data (G_OBJECT(sheets_edit_dialog), "_sheet_dialogs_builder", builder);
- g_signal_connect (GTK_OBJECT (sheets_edit_dialog), "destroy",
- G_CALLBACK (sheets_dialog_destroyed), NULL);
+ g_signal_connect (G_OBJECT (sheets_edit_dialog), "destroy",
+ G_CALLBACK (sheets_dialog_destroyed), NULL);
g_signal_connect (gtk_builder_get_object (builder, "entry_object_description"), "changed",
G_CALLBACK (on_sheets_edit_dialog_entry_object_description_changed),
@@ -225,8 +225,8 @@ create_sheets_remove_dialog (void)
sheets_remove_dialog = GTK_WIDGET (gtk_builder_get_object (builder, "sheets_remove_dialog"));
g_object_set_data (G_OBJECT(sheets_remove_dialog), "_sheet_dialogs_builder", builder);
- g_signal_connect (GTK_OBJECT (sheets_remove_dialog), "destroy",
- G_CALLBACK (sheets_dialog_destroyed), NULL);
+ g_signal_connect (G_OBJECT (sheets_remove_dialog), "destroy",
+ G_CALLBACK (sheets_dialog_destroyed), NULL);
g_signal_connect (gtk_builder_get_object (builder,"radiobutton_object"), "toggled",
G_CALLBACK (on_sheets_remove_dialog_radiobutton_object_toggled),
NULL);
@@ -253,11 +253,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);
+ gtk_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);
+ gtk_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);
@@ -266,7 +266,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);
+ gtk_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);
@@ -274,12 +274,12 @@ create_sheets_shapeselection_dialog (void)
GTK_WIDGET_SET_FLAGS (cancel_button1, GTK_CAN_DEFAULT);
#endif
- g_signal_connect (GTK_OBJECT (ok_button), "clicked",
- G_CALLBACK (on_sheets_shapeselection_dialog_button_ok_clicked),
- NULL);
- g_signal_connect (GTK_OBJECT (cancel_button1), "clicked",
- G_CALLBACK (on_sheets_shapeselection_dialog_button_cancel_clicked),
- NULL);
+ g_signal_connect (G_OBJECT (ok_button), "clicked",
+ G_CALLBACK (on_sheets_shapeselection_dialog_button_ok_clicked),
+ NULL);
+ g_signal_connect (G_OBJECT (cancel_button1), "clicked",
+ G_CALLBACK (on_sheets_shapeselection_dialog_button_cancel_clicked),
+ NULL);
return sheets_shapeselection_dialog;
}
diff --git a/app/sheets_dialog_callbacks.c b/app/sheets_dialog_callbacks.c
index 89618b6..b31ea1b 100644
--- a/app/sheets_dialog_callbacks.c
+++ b/app/sheets_dialog_callbacks.c
@@ -288,9 +288,9 @@ sheets_dialog_wrapbox_add_line_break(GtkWidget *wrapbox)
gtk_widget_set_tooltip_text(button, _("Line Break"));
- g_signal_connect(GTK_OBJECT(button), "toggled",
+ g_signal_connect(G_OBJECT(button), "toggled",
G_CALLBACK(on_sheets_dialog_object_button_toggled),
- wrapbox);
+ wrapbox);
}
static void
@@ -338,9 +338,9 @@ sheets_dialog_create_object_button(SheetObjectMod *som, SheetMod *sm,
g_object_set_data(G_OBJECT(button), "sheet_mod", sm);
g_object_set_data(G_OBJECT(button), "sheet_object_mod", som);
- g_signal_connect(GTK_OBJECT(button), "toggled",
+ g_signal_connect(G_OBJECT(button), "toggled",
G_CALLBACK(on_sheets_dialog_object_button_toggled),
- wrapbox);
+ wrapbox);
return button;
}
@@ -376,9 +376,9 @@ on_sheets_dialog_optionmenu_activate (GtkMenuItem *menuitem,
radio_group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(hidden_button));
}
- g_signal_connect(GTK_OBJECT(hidden_button), "toggled",
+ g_signal_connect(G_OBJECT(hidden_button), "toggled",
G_CALLBACK(on_sheets_dialog_object_button_toggled),
- wrapbox);
+ wrapbox);
g_object_set_data(G_OBJECT(hidden_button), "is_hidden_button",
(gpointer)TRUE);
g_object_set_data(G_OBJECT(wrapbox), "hidden_button", hidden_button);
diff --git a/app/tool.c b/app/tool.c
index 632bc1c..492af30 100644
--- a/app/tool.c
+++ b/app/tool.c
@@ -36,16 +36,16 @@ void
tool_select_former(void)
{
if (former_button) {
- g_signal_emit_by_name(GTK_OBJECT(former_button), "clicked",
- GTK_BUTTON(former_button), NULL);
+ g_signal_emit_by_name(G_OBJECT(former_button), "clicked",
+ GTK_BUTTON(former_button), NULL);
}
}
void
tool_reset(void)
{
- g_signal_emit_by_name(GTK_OBJECT(modify_tool_button), "clicked",
- GTK_BUTTON(modify_tool_button), NULL);
+ g_signal_emit_by_name(G_OBJECT(modify_tool_button), "clicked",
+ GTK_BUTTON(modify_tool_button), NULL);
}
void
diff --git a/app/toolbox.c b/app/toolbox.c
index 2ed88f3..cbcd7ff 100644
--- a/app/toolbox.c
+++ b/app/toolbox.c
@@ -238,7 +238,7 @@ tool_setup_drag_source(GtkWidget *button, ToolButtonData *tooldata,
gtk_drag_source_set(button, GDK_BUTTON1_MASK,
display_target_table, display_n_targets,
GDK_ACTION_DEFAULT|GDK_ACTION_COPY);
- g_signal_connect(GTK_OBJECT(button), "drag_data_get",
+ g_signal_connect(G_OBJECT(button), "drag_data_get",
G_CALLBACK(tool_drag_data_get), tooldata);
if (pixmap)
gtk_drag_source_set_icon(button, gtk_widget_get_colormap(button),
@@ -340,9 +340,9 @@ fill_sheet_wbox(Sheet *sheet)
data, (GDestroyNotify)g_free);
if (first_button == NULL) first_button = button;
- g_signal_connect (GTK_OBJECT (button), "clicked",
+ g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (tool_select_update), data);
- g_signal_connect (GTK_OBJECT (button), "button_press_event",
+ g_signal_connect (G_OBJECT (button), "button_press_event",
G_CALLBACK (tool_button_press), data);
tool_setup_drag_source(button, data, pixmap, mask);
@@ -703,11 +703,11 @@ create_tools(GtkWidget *parent)
gtk_container_add (GTK_CONTAINER (button), pixmapwidget);
- g_signal_connect (GTK_OBJECT (button), "clicked",
+ g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (tool_select_update),
&tool_data[i].callback_data);
- g_signal_connect (GTK_OBJECT (button), "button_press_event",
+ g_signal_connect (G_OBJECT (button), "button_press_event",
G_CALLBACK (tool_button_press),
&tool_data[i].callback_data);
diff --git a/lib/persistence.c b/lib/persistence.c
index 38f5f9a..a946e35 100644
--- a/lib/persistence.c
+++ b/lib/persistence.c
@@ -667,16 +667,16 @@ persistence_register_window(GtkWindow *window)
g_object_ref(window);
}
- g_signal_connect(GTK_OBJECT(window), "configure-event",
+ g_signal_connect(G_OBJECT(window), "configure-event",
G_CALLBACK(persistence_window_event_handler), NULL);
- g_signal_connect(GTK_OBJECT(window), "map-event",
+ g_signal_connect(G_OBJECT(window), "map-event",
G_CALLBACK(persistence_window_event_handler), NULL);
- g_signal_connect(GTK_OBJECT(window), "unmap-event",
+ g_signal_connect(G_OBJECT(window), "unmap-event",
G_CALLBACK(persistence_window_event_handler), NULL);
- g_signal_connect(GTK_OBJECT(window), "hide",
+ g_signal_connect(G_OBJECT(window), "hide",
G_CALLBACK(persistence_hide_show_window), NULL);
- g_signal_connect(GTK_OBJECT(window), "show",
+ g_signal_connect(G_OBJECT(window), "show",
G_CALLBACK(persistence_hide_show_window), NULL);
}
diff --git a/lib/prop_matrix.c b/lib/prop_matrix.c
index 0588732..1570d15 100644
--- a/lib/prop_matrix.c
+++ b/lib/prop_matrix.c
@@ -165,7 +165,7 @@ matrixprop_set_from_offset(MatrixProperty *prop,
static GtkWidget *
matrixprop_get_widget (MatrixProperty *prop, PropDialog *dialog)
{
- GtkObject *adj;
+ GtkWidget *adj;
GtkWidget *ret, *sb;
int i;
@@ -195,7 +195,7 @@ matrixprop_reset_widget(MatrixProperty *prop, GtkWidget *widget)
{
GList *children, *child;
GtkWidget *sb;
- GtkObject *adj;
+ GtkAdjustment *adj;
real angle, sx, sy;
int i = 0;
diff --git a/lib/propdialogs.c b/lib/propdialogs.c
index 130e209..3b1e4e1 100644
--- a/lib/propdialogs.c
+++ b/lib/propdialogs.c
@@ -166,7 +166,7 @@ prop_dialog_container_pop(PropDialog *dialog)
}
static void
-property_signal_handler(GtkObject *obj,
+property_signal_handler(GObject *obj,
gpointer func_data)
{
PropEventData *ped = (PropEventData *)func_data;
diff --git a/lib/widgets.c b/lib/widgets.c
index 38cf606..be87beb 100644
--- a/lib/widgets.c
+++ b/lib/widgets.c
@@ -190,10 +190,10 @@ dia_size_selector_init (DiaSizeSelector *ss)
g_signal_connect (G_OBJECT (ss->aspect_locked), "clicked",
G_CALLBACK (dia_size_selector_lock_pressed), ss);
/* Make sure that the aspect ratio stays the same */
- g_signal_connect(GTK_OBJECT(gtk_spin_button_get_adjustment(ss->width)),
+ g_signal_connect(G_OBJECT(gtk_spin_button_get_adjustment(ss->width)),
"value_changed",
G_CALLBACK(dia_size_selector_ratio_callback), (gpointer)ss);
- g_signal_connect(GTK_OBJECT(gtk_spin_button_get_adjustment(ss->height)),
+ g_signal_connect(G_OBJECT(gtk_spin_button_get_adjustment(ss->height)),
"value_changed",
G_CALLBACK(dia_size_selector_ratio_callback), (gpointer)ss);
}
@@ -397,7 +397,7 @@ dia_file_selector_browse_pressed(GtkWidget *widget, gpointer data)
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
NULL);
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT);
- g_signal_connect(GTK_OBJECT(dialog), "response",
+ g_signal_connect(G_OBJECT(dialog), "response",
G_CALLBACK(file_open_response_callback), NULL);
g_signal_connect (G_OBJECT (fs->dialog), "destroy",
G_CALLBACK (gtk_widget_destroyed), &fs->dialog);
@@ -438,7 +438,7 @@ dia_file_selector_init (DiaFileSelector *fs)
fs->entry = GTK_ENTRY(gtk_entry_new());
gtk_box_pack_start(GTK_BOX(fs), GTK_WIDGET(fs->entry), FALSE, TRUE, 0);
- g_signal_connect(GTK_OBJECT(fs->entry), "changed",
+ g_signal_connect(G_OBJECT(fs->entry), "changed",
G_CALLBACK(dia_file_selector_entry_changed), fs);
gtk_widget_show(GTK_WIDGET(fs->entry));
diff --git a/plug-ins/libart/export_png.c b/plug-ins/libart/export_png.c
index c8e8e2a..a9daec9 100644
--- a/plug-ins/libart/export_png.c
+++ b/plug-ins/libart/export_png.c
@@ -257,9 +257,9 @@ export_png_ok(GtkButton *button, gpointer userdata)
error:
g_object_unref(renderer);
if (button != NULL) {
- g_signal_handlers_disconnect_matched (GTK_OBJECT(export_png_okay_button),
+ g_signal_handlers_disconnect_matched (G_OBJECT(export_png_okay_button),
G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, userdata);
- g_signal_handlers_disconnect_matched (GTK_OBJECT(export_png_cancel_button),
+ g_signal_handlers_disconnect_matched (G_OBJECT(export_png_cancel_button),
G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, userdata);
}
g_free(cbdata->filename);
@@ -277,9 +277,9 @@ export_png_cancel(GtkButton *button, gpointer userdata)
{
struct png_callback_data *cbdata = (struct png_callback_data *)userdata;
- g_signal_handlers_disconnect_matched (GTK_OBJECT(export_png_okay_button),
+ g_signal_handlers_disconnect_matched (G_OBJECT(export_png_okay_button),
G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, userdata);
- g_signal_handlers_disconnect_matched (GTK_OBJECT(export_png_cancel_button),
+ g_signal_handlers_disconnect_matched (G_OBJECT(export_png_cancel_button),
G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, userdata);
gtk_widget_hide(export_png_dialog);
@@ -338,10 +338,10 @@ export_png(DiagramData *data, DiaContext *ctx,
0.0, 10000.0, 0);
/* Make sure that the aspect ratio stays the same */
- g_signal_connect(GTK_OBJECT(gtk_spin_button_get_adjustment(export_png_width_entry)),
+ g_signal_connect(G_OBJECT(gtk_spin_button_get_adjustment(export_png_width_entry)),
"value_changed",
G_CALLBACK(export_png_ratio), (gpointer)export_png_height_entry);
- g_signal_connect(GTK_OBJECT(gtk_spin_button_get_adjustment(export_png_height_entry)),
+ g_signal_connect(G_OBJECT(gtk_spin_button_get_adjustment(export_png_height_entry)),
"value_changed",
G_CALLBACK(export_png_ratio), (gpointer)export_png_width_entry);
@@ -365,9 +365,9 @@ export_png(DiagramData *data, DiaContext *ctx,
/* gtk_spin_button_set_value(export_png_height_entry, (float)height);*/
/* Set OK and Cancel buttons to call the relevant callbacks with cbdata */
- g_signal_connect(GTK_OBJECT(export_png_okay_button), "clicked",
+ g_signal_connect(G_OBJECT(export_png_okay_button), "clicked",
G_CALLBACK(export_png_ok), (gpointer)cbdata);
- g_signal_connect(GTK_OBJECT(export_png_cancel_button), "clicked",
+ g_signal_connect(G_OBJECT(export_png_cancel_button), "clicked",
G_CALLBACK(export_png_cancel), (gpointer)cbdata);
/* Show the whole thing */
diff --git a/plug-ins/postscript/paginate_psprint.c b/plug-ins/postscript/paginate_psprint.c
index 75b1ff8..52a5061 100644
--- a/plug-ins/postscript/paginate_psprint.c
+++ b/plug-ins/postscript/paginate_psprint.c
@@ -262,11 +262,11 @@ diagram_print_ps(DiagramData *dia, const gchar* original_filename)
/* the dialog has it's own reference to the diagram */
g_object_ref(dia);
g_object_set_data(G_OBJECT(dialog), "diagram", dia);
- g_signal_connect(GTK_OBJECT(dialog), "destroy",
+ g_signal_connect(G_OBJECT(dialog), "destroy",
G_CALLBACK(diagram_print_destroy), NULL);
- g_signal_connect(GTK_OBJECT(dialog), "delete_event",
+ g_signal_connect(G_OBJECT(dialog), "delete_event",
G_CALLBACK(gtk_main_quit), NULL);
- g_signal_connect(GTK_OBJECT(dialog), "delete_event",
+ g_signal_connect(G_OBJECT(dialog), "delete_event",
G_CALLBACK(gtk_true), NULL);
vbox = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
@@ -292,7 +292,7 @@ diagram_print_ps(DiagramData *dia, const gchar* original_filename)
GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0);
gtk_widget_show(cmd);
- g_signal_connect(GTK_OBJECT(iscmd), "toggled",
+ g_signal_connect(G_OBJECT(iscmd), "toggled",
G_CALLBACK(change_entry_state), cmd);
isofile = gtk_radio_button_new_with_label(GTK_RADIO_BUTTON(iscmd)->group,
@@ -306,13 +306,13 @@ diagram_print_ps(DiagramData *dia, const gchar* original_filename)
gtk_table_attach(GTK_TABLE(table), ofile, 1,2, 1,2,
GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0);
gtk_widget_show(ofile);
- g_signal_connect(GTK_OBJECT(isofile), "toggled",
+ g_signal_connect(G_OBJECT(isofile), "toggled",
G_CALLBACK(change_entry_state), ofile);
box = GTK_DIALOG(dialog)->action_area;
button = gtk_button_new_with_label(_("OK"));
- g_signal_connect(GTK_OBJECT(button), "clicked",
+ g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(ok_pressed), &cont);
#if GTK_CHECK_VERSION(2,18,0)
gtk_widget_set_can_default (GTK_WIDGET (button), TRUE);
@@ -324,7 +324,7 @@ diagram_print_ps(DiagramData *dia, const gchar* original_filename)
gtk_widget_show(button);
button = gtk_button_new_with_label(_("Cancel"));
- g_signal_connect(GTK_OBJECT(button), "clicked",
+ g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(gtk_main_quit), NULL);
#if GTK_CHECK_VERSION(2,18,0)
gtk_widget_set_can_default (GTK_WIDGET (button), TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]