[dia] No more gtk_signal_* use.
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] No more gtk_signal_* use.
- Date: Sun, 31 Oct 2010 16:52:57 +0000 (UTC)
commit 3f6fc95236f6ae1d564af04b6aba8734ec0205b1
Author: Hans Breuer <hans breuer org>
Date: Sun Oct 31 18:59:24 2010 +0100
No more gtk_signal_* use.
Further small step in handling Gtk+ deprecations.
app/diapagelayout.c | 29 +++--
app/interface.c | 14 +-
app/layer_dialog.c | 36 +++---
app/splash.c | 8 +-
lib/prop_widgets.c | 12 +-
lib/widgets.c | 25 ++---
objects/Database/table_dialog.c | 76 +++++------
objects/SISSI/sissi_dialog.c | 22 ++--
objects/UML/class_dialog.c | 262 +++++++++++++++++----------------------
plug-ins/xslt/xsltdialog.c | 10 +-
10 files changed, 218 insertions(+), 276 deletions(-)
---
diff --git a/app/diapagelayout.c b/app/diapagelayout.c
index dc2eae4..c320ffe 100644
--- a/app/diapagelayout.c
+++ b/app/diapagelayout.c
@@ -25,7 +25,7 @@
#include <config.h>
#endif
-#undef GTK_DISABLE_DEPRECATED /* GtkOptionMenu, GtkSignal, ... */
+#undef GTK_DISABLE_DEPRECATED /* GtkOptionMenu, ... */
#include "diapagelayout.h"
#include "widgets.h"
@@ -38,6 +38,8 @@
#include "paper.h"
#include "prefs.h"
+#include "lib/diamarshal.h"
+
/* private class : noone wants to inherit and noone needs to mess with details */
#define DIA_PAGE_LAYOUT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST(klass, dia_page_layout_get_type(), DiaPageLayoutClass)
#define DIA_IS_PAGE_LAYOUT(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, dia_page_layout_get_type())
@@ -115,12 +117,13 @@ dia_page_layout_class_init(DiaPageLayoutClass *class)
parent_class = gtk_type_class(gtk_table_get_type());
pl_signals[CHANGED] =
- gtk_signal_new("changed",
- GTK_RUN_FIRST,
- G_TYPE_FROM_CLASS (object_class),
- GTK_SIGNAL_OFFSET(DiaPageLayoutClass, changed),
- gtk_signal_default_marshaller,
- GTK_TYPE_NONE, 0);
+ g_signal_new("changed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET(DiaPageLayoutClass, changed),
+ NULL, NULL,
+ dia_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
#if 0 /* FIXME ?*/
gtk_object_class_add_signals(object_class, pl_signals, LAST_SIGNAL);
#endif
@@ -436,7 +439,7 @@ dia_page_layout_set_margins(DiaPageLayout *self,
dia_unit_spinner_set_value(DIA_UNIT_SPINNER(self->rmargin), rmargin);
self->block_changed = FALSE;
- gtk_signal_emit(GTK_OBJECT(self), pl_signals[CHANGED]);
+ g_signal_emit(G_OBJECT(self), pl_signals[CHANGED], 0);
}
DiaPageOrientation
@@ -743,7 +746,7 @@ paper_size_change(GtkMenuItem *item, DiaPageLayout *self)
get_paper_psheight(self->papernum));
gtk_label_set_text(GTK_LABEL(self->paper_label), buf);
- gtk_signal_emit(GTK_OBJECT(self), pl_signals[CHANGED]);
+ g_signal_emit(G_OBJECT(self), pl_signals[CHANGED], 0);
}
static void
@@ -773,7 +776,7 @@ orient_changed(DiaPageLayout *self)
}
if (!self->block_changed)
- gtk_signal_emit(GTK_OBJECT(self), pl_signals[CHANGED]);
+ g_signal_emit(G_OBJECT(self), pl_signals[CHANGED], 0);
}
static void
@@ -781,7 +784,7 @@ margin_changed(DiaPageLayout *self)
{
gtk_widget_queue_draw(self->darea);
if (!self->block_changed)
- gtk_signal_emit(GTK_OBJECT(self), pl_signals[CHANGED]);
+ g_signal_emit(G_OBJECT(self), pl_signals[CHANGED], 0);
}
static void
@@ -797,14 +800,14 @@ scalemode_changed(DiaPageLayout *self)
gtk_widget_set_sensitive(self->fith, FALSE);
}
if (!self->block_changed)
- gtk_signal_emit(GTK_OBJECT(self), pl_signals[CHANGED]);
+ g_signal_emit(G_OBJECT(self), pl_signals[CHANGED], 0);
}
static void
scale_changed(DiaPageLayout *self)
{
if (!self->block_changed)
- gtk_signal_emit(GTK_OBJECT(self), pl_signals[CHANGED]);
+ g_signal_emit(G_OBJECT(self), pl_signals[CHANGED], 0);
}
static void
diff --git a/app/interface.c b/app/interface.c
index dcb01b2..a4f7dc9 100644
--- a/app/interface.c
+++ b/app/interface.c
@@ -22,7 +22,7 @@
#undef GTK_DISABLE_DEPRECATED /* gnome */
#include <gnome.h>
#else
-#undef GTK_DISABLE_DEPRECATED /* e.g. GTK_SIGNAL_FUNC */
+#undef GTK_DISABLE_DEPRECATED /* GtkPixmap, gtk_type_new, gtk_object_set_data_full */
#include <gtk/gtk.h>
#endif
#include "gtkwrapbox.h"
@@ -311,7 +311,7 @@ origin_button_press(GtkWidget *widget, GdkEventButton *event, gpointer data)
/* stop the signal emission so the button doesn't grab the
* pointer from us */
- gtk_signal_emit_stop_by_name(GTK_OBJECT(widget), "button_press_event");
+ g_signal_stop_emission_by_name (G_OBJECT(widget), "button_press_event");
return FALSE;
}
@@ -393,7 +393,7 @@ zoom_popup_menu(GtkWidget *button, GdkEventButton *event, gpointer user_data) {
event->button, event->time);
/* stop the signal emission so the button doesn't grab the
* pointer from us */
- gtk_signal_emit_stop_by_name(GTK_OBJECT(button), "button_press_event");
+ g_signal_stop_emission_by_name (G_OBJECT(button), "button_press_event");
}
static GtkWidget*
@@ -554,8 +554,8 @@ use_integrated_ui_for_display_shell(DDisplay *ddisp, char *title)
GTK_ICON_SIZE_MENU);
gtk_container_add (GTK_CONTAINER(close_button), image);
- gtk_signal_connect (GTK_OBJECT (close_button), "clicked",
- GTK_SIGNAL_FUNC (close_notebook_page_callback), ddisp->container);
+ g_signal_connect (G_OBJECT (close_button), "clicked",
+ G_CALLBACK (close_notebook_page_callback), ddisp->container);
/* </from GEdit> */
gtk_box_pack_start( GTK_BOX(tab_label_container), close_button, FALSE, FALSE, 0 );
@@ -1328,8 +1328,8 @@ fill_sheet_wbox(Sheet *sheet)
if (active_tool != NULL &&
active_tool->type == CREATE_OBJECT_TOOL &&
first_button != NULL)
- gtk_signal_emit_by_name(GTK_OBJECT(first_button), "toggled",
- GTK_BUTTON(first_button), NULL);
+ g_signal_emit_by_name(G_OBJECT(first_button), "toggled",
+ GTK_BUTTON(first_button), NULL);
}
static void
diff --git a/app/layer_dialog.c b/app/layer_dialog.c
index f88a552..4a63406 100644
--- a/app/layer_dialog.c
+++ b/app/layer_dialog.c
@@ -29,7 +29,7 @@
#include <assert.h>
#include <string.h>
#include <gdk/gdkkeysyms.h>
-#undef GTK_DISABLE_DEPRECATED
+#undef GTK_DISABLE_DEPRECATED /* GtkListItem, gtk_list_new, ... */
#include <gtk/gtk.h>
#include "intl.h"
@@ -327,8 +327,8 @@ GtkWidget * create_layer_view_widget (void)
GTK_ICON_SIZE_MENU);
gtk_container_add (GTK_CONTAINER(hide_button), image);
- gtk_signal_connect (GTK_OBJECT (hide_button), "clicked",
- GTK_SIGNAL_FUNC (layer_view_hide_button_clicked), NULL);
+ g_signal_connect (G_OBJECT (hide_button), "clicked",
+ G_CALLBACK (layer_view_hide_button_clicked), NULL);
gtk_box_pack_start (GTK_BOX (hbox), hide_button, FALSE, FALSE, 2);
@@ -359,9 +359,8 @@ GtkWidget * create_layer_view_widget (void)
gtk_widget_show (scrolled_win);
gtk_widget_show (list);
- g_signal_connect (GTK_OBJECT (list), "event",
- (GtkSignalFunc) layer_list_events,
- NULL);
+ g_signal_connect (G_OBJECT (list), "event",
+ G_CALLBACK (layer_list_events), NULL);
return vbox;
}
@@ -433,9 +432,8 @@ create_layer_dialog(void)
gtk_widget_show (scrolled_win);
gtk_widget_show (list);
- g_signal_connect (GTK_OBJECT (list), "event",
- (GtkSignalFunc) layer_list_events,
- NULL);
+ g_signal_connect (G_OBJECT (list), "event",
+ G_CALLBACK (layer_list_events), NULL);
button_box = create_button_box(dialog, TRUE);
@@ -718,9 +716,8 @@ layer_dialog_update_diagram_list(void)
menu_item = gtk_menu_item_new_with_label(filename);
- g_signal_connect (GTK_OBJECT (menu_item), "activate",
- (GtkSignalFunc) layer_dialog_select_diagram_callback,
- (gpointer) dia);
+ g_signal_connect (G_OBJECT (menu_item), "activate",
+ G_CALLBACK (layer_dialog_select_diagram_callback), dia);
gtk_menu_append( GTK_MENU(new_menu), menu_item);
gtk_widget_show (menu_item);
@@ -731,9 +728,8 @@ layer_dialog_update_diagram_list(void)
if (dia_open_diagrams()==NULL) {
menu_item = gtk_menu_item_new_with_label (_("none"));
- g_signal_connect (GTK_OBJECT (menu_item), "activate",
- (GtkSignalFunc) layer_dialog_select_diagram_callback,
- (gpointer) NULL);
+ g_signal_connect (G_OBJECT (menu_item), "activate",
+ G_CALLBACK (layer_dialog_select_diagram_callback), NULL);
gtk_menu_append( GTK_MENU(new_menu), menu_item);
gtk_widget_show (menu_item);
}
@@ -1019,12 +1015,10 @@ dia_layer_widget_init(DiaLayerWidget *lw)
gtk_container_add(GTK_CONTAINER(lw), hbox);
- g_signal_connect (GTK_OBJECT (lw), "select",
- (GtkSignalFunc) dia_layer_select_callback,
- (gpointer) NULL);
- g_signal_connect (GTK_OBJECT (lw), "deselect",
- (GtkSignalFunc) dia_layer_deselect_callback,
- (gpointer) NULL);
+ g_signal_connect (G_OBJECT (lw), "select",
+ G_CALLBACK (dia_layer_select_callback), NULL);
+ g_signal_connect (G_OBJECT (lw), "deselect",
+ G_CALLBACK (dia_layer_deselect_callback), NULL);
}
GtkType
diff --git a/app/splash.c b/app/splash.c
index 7295a0d..08f6981 100644
--- a/app/splash.c
+++ b/app/splash.c
@@ -1,6 +1,6 @@
#include <config.h>
-#undef GTK_DISABLE_DEPRECATED /* GtkPixmap */
+#undef GTK_DISABLE_DEPRECATED /* gtk_pixmap_new */
#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
@@ -78,12 +78,12 @@ app_splash_init (const gchar* fname)
gtk_widget_show_all (splash);
- signal_id = g_signal_connect_after(GTK_OBJECT(splash), "expose_event",
- GTK_SIGNAL_FUNC(splash_expose), NULL);
+ signal_id = g_signal_connect_after(G_OBJECT(splash), "expose_event",
+ G_CALLBACK(splash_expose), NULL);
/* splash_expose gets us out of this */
gtk_main();
- g_signal_handler_disconnect(GTK_OBJECT(splash), signal_id);
+ g_signal_handler_disconnect(G_OBJECT(splash), signal_id);
}
void
diff --git a/lib/prop_widgets.c b/lib/prop_widgets.c
index 96d87a0..6a6426a 100644
--- a/lib/prop_widgets.c
+++ b/lib/prop_widgets.c
@@ -152,10 +152,10 @@ frame_beginprop_get_widget(FrameProperty *prop, PropDialog *dialog)
prop_dialog_add_raw_with_flags(dialog, unfoldbutton, FALSE, FALSE);
- gtk_signal_connect(GTK_OBJECT(foldbutton), "clicked",
- GTK_SIGNAL_FUNC(frame_fold_unfold), info);
- gtk_signal_connect(GTK_OBJECT(unfoldbutton), "clicked",
- GTK_SIGNAL_FUNC(frame_fold_unfold), info);
+ g_signal_connect(G_OBJECT (foldbutton), "clicked",
+ G_CALLBACK (frame_fold_unfold), info);
+ g_signal_connect(G_OBJECT (unfoldbutton), "clicked",
+ G_CALLBACK (frame_fold_unfold), info);
prop_dialog_container_push(dialog,vbox);
@@ -457,8 +457,8 @@ listprop_get_widget(ListProperty *prop, PropDialog *dialog)
gtk_list_set_selection_mode(GTK_LIST(ret),GTK_SELECTION_BROWSE);
gtk_list_unselect_all(GTK_LIST(ret));
- gtk_signal_connect(GTK_OBJECT(ret), "select-child",
- GTK_SIGNAL_FUNC(listprop_select_child_signal), prop);
+ g_signal_connect(G_OBJECT(ret), "select-child",
+ G_CALLBACK (listprop_select_child_signal), prop);
prophandler_connect(&prop->common, G_OBJECT(ret), "selection-changed");
return ret;
diff --git a/lib/widgets.c b/lib/widgets.c
index d9fecc0..63ce9e4 100644
--- a/lib/widgets.c
+++ b/lib/widgets.c
@@ -199,9 +199,8 @@ dia_size_selector_init (DiaSizeSelector *ss)
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ss->aspect_locked), TRUE);
gtk_widget_show(GTK_WIDGET(ss->aspect_locked));
- gtk_signal_connect (GTK_OBJECT (ss->aspect_locked), "clicked",
- (GtkSignalFunc) dia_size_selector_lock_pressed,
- 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)),
"value_changed",
@@ -631,12 +630,10 @@ dia_color_selector_more_callback(GtkWidget *widget, gpointer userdata)
gtk_widget_hide(dialog->help_button);
- gtk_signal_connect (GTK_OBJECT (dialog->ok_button), "clicked",
- (GtkSignalFunc) dia_color_selector_more_ok,
- dialog);
- gtk_signal_connect_object(GTK_OBJECT (dialog->cancel_button), "clicked",
- (GtkSignalFunc) gtk_widget_destroy,
- GTK_OBJECT(dialog));
+ g_signal_connect (G_OBJECT (dialog->ok_button), "clicked",
+ G_CALLBACK (dia_color_selector_more_ok), dialog);
+ g_signal_connect_swapped (G_OBJECT (dialog->cancel_button), "clicked",
+ gtk_widget_destroy, G_OBJECT(dialog));
g_object_set_data(G_OBJECT(dialog), "ddm", ddm);
gtk_widget_show(GTK_WIDGET(dialog));
@@ -999,9 +996,8 @@ dia_file_selector_browse_pressed(GtkWidget *widget, gpointer data)
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT);
g_signal_connect(GTK_OBJECT(dialog), "response",
G_CALLBACK(file_open_response_callback), NULL);
- gtk_signal_connect (GTK_OBJECT (fs->dialog), "destroy",
- GTK_SIGNAL_FUNC (gtk_widget_destroyed),
- &fs->dialog);
+ g_signal_connect (G_OBJECT (fs->dialog), "destroy",
+ G_CALLBACK (gtk_widget_destroyed), &fs->dialog);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("Supported Formats"));
@@ -1045,9 +1041,8 @@ dia_file_selector_init (DiaFileSelector *fs)
fs->browse = GTK_BUTTON(gtk_button_new_with_label(_("Browse")));
gtk_box_pack_start(GTK_BOX(fs), GTK_WIDGET(fs->browse), FALSE, TRUE, 0);
- gtk_signal_connect (GTK_OBJECT (fs->browse), "clicked",
- (GtkSignalFunc) dia_file_selector_browse_pressed,
- fs);
+ g_signal_connect (G_OBJECT (fs->browse), "clicked",
+ G_CALLBACK(dia_file_selector_browse_pressed), fs);
gtk_widget_show(GTK_WIDGET(fs->browse));
}
diff --git a/objects/Database/table_dialog.c b/objects/Database/table_dialog.c
index a100055..d598d9f 100644
--- a/objects/Database/table_dialog.c
+++ b/objects/Database/table_dialog.c
@@ -165,10 +165,8 @@ table_get_properties_dialog (Table * table, gboolean is_default)
g_object_set_data (G_OBJECT (notebook), "user_data", (gpointer) table);
- gtk_signal_connect (GTK_OBJECT (notebook),
- "destroy",
- GTK_SIGNAL_FUNC (destroy_prop_dialog),
- (gpointer) table);
+ g_signal_connect (G_OBJECT (notebook), "destroy",
+ G_CALLBACK (destroy_prop_dialog), table);
create_dialog_pages (GTK_NOTEBOOK (notebook), table);
/* by default the table name entry is focused */
@@ -627,9 +625,8 @@ create_attribute_page (GtkNotebook * notebook, Table * table)
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolledwindow), list);
gtk_container_set_focus_vadjustment (GTK_CONTAINER (list),
gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolledwindow)));
- gtk_signal_connect (GTK_OBJECT (list), "selection_changed",
- GTK_SIGNAL_FUNC (attributes_list_selection_changed_cb),
- table);
+ g_signal_connect (G_OBJECT (list), "selection_changed",
+ G_CALLBACK (attributes_list_selection_changed_cb), table);
gtk_widget_show (list);
/* vbox for the button on the right side of the attributes list */
@@ -637,33 +634,29 @@ create_attribute_page (GtkNotebook * notebook, Table * table)
/* the "new" button */
button = gtk_button_new_with_mnemonic (_("_New"));
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC (attributes_list_new_button_clicked_cb),
- table);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (attributes_list_new_button_clicked_cb), table);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
/* the "delete" button */
button = gtk_button_new_with_mnemonic (_("_Delete"));
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC (attributes_list_delete_button_clicked_cb),
- table);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (attributes_list_delete_button_clicked_cb), table);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
/* the "Move up" button */
button = gtk_button_new_with_mnemonic (_("Move up"));
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC (attributes_list_moveup_button_clicked_cb),
- table);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (attributes_list_moveup_button_clicked_cb), table);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
/* the "Move down" button */
button = gtk_button_new_with_mnemonic (_("Move down"));
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC (attributes_list_movedown_button_clicked_cb),
- table);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (attributes_list_movedown_button_clicked_cb), table);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
@@ -683,10 +676,10 @@ create_attribute_page (GtkNotebook * notebook, Table * table)
label = gtk_label_new (_("Name:"));
entry = gtk_entry_new ();
prop_dialog->attribute_name = GTK_ENTRY (entry);
- gtk_signal_connect (GTK_OBJECT (entry), "focus_out_event",
- GTK_SIGNAL_FUNC (current_attribute_update_event), table);
- gtk_signal_connect (GTK_OBJECT (entry), "activate",
- GTK_SIGNAL_FUNC (current_attribute_update), table);
+ g_signal_connect (G_OBJECT (entry), "focus_out_event",
+ G_CALLBACK (current_attribute_update_event), table);
+ g_signal_connect (G_OBJECT (entry), "activate",
+ G_CALLBACK (current_attribute_update), table);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (gtk_table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0);
gtk_table_attach (GTK_TABLE (gtk_table), entry, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, 0, 0, 2);
@@ -695,10 +688,10 @@ create_attribute_page (GtkNotebook * notebook, Table * table)
label = gtk_label_new (_("Type:"));
entry = gtk_entry_new ();
prop_dialog->attribute_type = GTK_ENTRY (entry);
- gtk_signal_connect (GTK_OBJECT (entry), "focus_out_event",
- GTK_SIGNAL_FUNC (current_attribute_update_event), table);
- gtk_signal_connect (GTK_OBJECT (entry), "activate",
- GTK_SIGNAL_FUNC (current_attribute_update), table);
+ g_signal_connect (G_OBJECT (entry), "focus_out_event",
+ G_CALLBACK (current_attribute_update_event), table);
+ g_signal_connect (G_OBJECT (entry), "activate",
+ G_CALLBACK (current_attribute_update), table);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (gtk_table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0);
gtk_table_attach (GTK_TABLE (gtk_table), entry, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, 0, 0, 2);
@@ -706,10 +699,10 @@ create_attribute_page (GtkNotebook * notebook, Table * table)
label = gtk_label_new (_("Default:"));
entry = gtk_entry_new ();
prop_dialog->attribute_default_value = GTK_ENTRY (entry);
- gtk_signal_connect (GTK_OBJECT (entry), "focus_out_event",
- GTK_SIGNAL_FUNC (current_attribute_update_event), table);
- gtk_signal_connect (GTK_OBJECT (entry), "activate",
- GTK_SIGNAL_FUNC (current_attribute_update), table);
+ g_signal_connect (G_OBJECT (entry), "focus_out_event",
+ G_CALLBACK (current_attribute_update_event), table);
+ g_signal_connect (G_OBJECT (entry), "activate",
+ G_CALLBACK (current_attribute_update), table);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (gtk_table), label, 0, 1, 2, 3, GTK_FILL, 0, 0, 0);
gtk_table_attach (GTK_TABLE (gtk_table), entry, 1, 2, 2, 3, GTK_FILL | GTK_EXPAND, 0, 0, 2);
@@ -724,8 +717,8 @@ create_attribute_page (GtkNotebook * notebook, Table * table)
gtk_container_add (GTK_CONTAINER (scrolledwindow), entry);
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (entry), GTK_WRAP_WORD);
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (entry), TRUE);
- gtk_signal_connect (GTK_OBJECT (entry), "focus_out_event",
- GTK_SIGNAL_FUNC (current_attribute_update_event), table);
+ g_signal_connect (G_OBJECT (entry), "focus_out_event",
+ G_CALLBACK (current_attribute_update_event), table);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (gtk_table), label, 0, 1, 3, 4, GTK_FILL, 0, 0, 0);
gtk_table_attach (GTK_TABLE (gtk_table), scrolledwindow, 1, 2, 3, 4, GTK_FILL | GTK_EXPAND, 0, 0, 2);
@@ -735,22 +728,22 @@ create_attribute_page (GtkNotebook * notebook, Table * table)
gtk_box_pack_start (GTK_BOX (vbox2), gtk_table, FALSE, FALSE, 0);
checkbox = gtk_check_button_new_with_mnemonic (_("_Primary key"));
- gtk_signal_connect (GTK_OBJECT (checkbox), "toggled",
- GTK_SIGNAL_FUNC (attribute_primary_key_toggled_cb), table);
+ g_signal_connect (G_OBJECT (checkbox), "toggled",
+ G_CALLBACK (attribute_primary_key_toggled_cb), table);
prop_dialog->attribute_primary_key = GTK_TOGGLE_BUTTON (checkbox);
gtk_table_attach (GTK_TABLE (gtk_table), checkbox, 0, 1, 0, 1,
GTK_FILL | GTK_EXPAND, 0, 0, 0);
checkbox = gtk_check_button_new_with_mnemonic (_("N_ullable"));
- gtk_signal_connect (GTK_OBJECT (checkbox), "toggled",
- GTK_SIGNAL_FUNC (attribute_nullable_toggled_cb), table);
+ g_signal_connect (G_OBJECT (checkbox), "toggled",
+ G_CALLBACK (attribute_nullable_toggled_cb), table);
prop_dialog->attribute_nullable = GTK_TOGGLE_BUTTON (checkbox);
gtk_table_attach (GTK_TABLE (gtk_table), checkbox, 1, 2, 0, 1,
GTK_FILL | GTK_EXPAND, 0, 0, 0);
checkbox = gtk_check_button_new_with_mnemonic (_("Uni_que"));
- gtk_signal_connect (GTK_OBJECT (checkbox), "toggled",
- GTK_SIGNAL_FUNC (attribute_unique_toggled_cb), table);
+ g_signal_connect (G_OBJECT (checkbox), "toggled",
+ G_CALLBACK (attribute_unique_toggled_cb), table);
prop_dialog->attribute_unique = GTK_TOGGLE_BUTTON (checkbox);
gtk_table_attach (GTK_TABLE (gtk_table), checkbox, 1, 2, 1, 2,
GTK_FILL | GTK_EXPAND, 0, 0, 0);
@@ -1177,9 +1170,8 @@ attributes_list_add_attribute (Table * table,
g_free (attrstr);
g_object_set_data (G_OBJECT (list_item), "user_data", attribute);
- gtk_signal_connect (GTK_OBJECT (list_item), "destroy",
- GTK_SIGNAL_FUNC (attribute_list_item_destroy_cb),
- NULL);
+ g_signal_connect (G_OBJECT (list_item), "destroy",
+ G_CALLBACK (attribute_list_item_destroy_cb), NULL);
list = g_list_append (NULL, list_item);
gtk_list_append_items (prop_dialog->attributes_list, list);
if (select)
diff --git a/objects/SISSI/sissi_dialog.c b/objects/SISSI/sissi_dialog.c
index 911cf0b..f1bb394 100644
--- a/objects/SISSI/sissi_dialog.c
+++ b/objects/SISSI/sissi_dialog.c
@@ -737,9 +737,8 @@ gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(pScroll_others), prop_
gtk_table_attach_defaults (GTK_TABLE (prop_dialog->table_others), (GtkWidget *)object_sissi->properties_dialog->name, 1,2,3,4);
button = gtk_button_new_with_mnemonic (_("_New"));
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC(others_new_callback),
- object_sissi);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (others_new_callback), object_sissi);
gtk_table_attach_defaults (GTK_TABLE (prop_dialog->table_others), button, 2, 3, 3, 4);
@@ -869,9 +868,8 @@ static void document_create_page(GtkNotebook *notebook, ObjetSISSI *object_sissi
button = gtk_button_new_with_mnemonic (_("_New"));
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC(document_new_callback),
- object_sissi);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (document_new_callback), object_sissi);
gtk_table_attach_defaults (GTK_TABLE (prop_dialog->table_document), button, 0, 1, 0, 1);
@@ -1160,14 +1158,10 @@ extern GtkWidget *object_sissi_get_properties_dialog(ObjetSISSI *object_sissi, g
g_object_set_data(G_OBJECT(notebook), "user_data", (gpointer) object_sissi);
- gtk_signal_connect (GTK_OBJECT (notebook),
- "switch_page",
- GTK_SIGNAL_FUNC(switch_page_callback),
- (gpointer) object_sissi);
- gtk_signal_connect (GTK_OBJECT (object_sissi->properties_dialog->dialog),
- "destroy",
- GTK_SIGNAL_FUNC(destroy_properties_dialog),
- (gpointer) object_sissi);
+ g_signal_connect (G_OBJECT (notebook), "switch_page",
+ G_CALLBACK (switch_page_callback), object_sissi);
+ g_signal_connect (G_OBJECT (object_sissi->properties_dialog->dialog), "destroy",
+ G_CALLBACK (destroy_properties_dialog), object_sissi);
create_dialog_pages(GTK_NOTEBOOK( notebook ), object_sissi);
diff --git a/objects/UML/class_dialog.c b/objects/UML/class_dialog.c
index ed818cd..0046918 100644
--- a/objects/UML/class_dialog.c
+++ b/objects/UML/class_dialog.c
@@ -788,9 +788,8 @@ attributes_list_new_callback(GtkWidget *button,
g_free (utfstr);
g_object_set_data(G_OBJECT(list_item), "user_data", attr);
- gtk_signal_connect (GTK_OBJECT (list_item), "destroy",
- GTK_SIGNAL_FUNC (attribute_list_item_destroy_callback),
- NULL);
+ g_signal_connect (G_OBJECT (list_item), "destroy",
+ G_CALLBACK (attribute_list_item_destroy_callback), NULL);
list = g_list_append(NULL, list_item);
gtk_list_append_items(prop_dialog->attributes_list, list);
@@ -997,9 +996,8 @@ attributes_fill_in_dialog(UMLClass *umlclass)
attr_copy->left_connection = attr->left_connection;
attr_copy->right_connection = attr->right_connection;
g_object_set_data(G_OBJECT(list_item), "user_data", (gpointer) attr_copy);
- gtk_signal_connect (GTK_OBJECT (list_item), "destroy",
- GTK_SIGNAL_FUNC (attribute_list_item_destroy_callback),
- NULL);
+ g_signal_connect (G_OBJECT (list_item), "destroy",
+ G_CALLBACK (attribute_list_item_destroy_callback), NULL);
gtk_container_add (GTK_CONTAINER (prop_dialog->attributes_list), list_item);
gtk_widget_show (list_item);
@@ -1045,7 +1043,6 @@ attributes_create_page(GtkNotebook *notebook, UMLClass *umlclass)
GtkWidget *frame;
GtkWidget *omenu;
GtkWidget *scrolledwindow;
- GSList *group;
prop_dialog = umlclass->properties_dialog;
@@ -1072,34 +1069,29 @@ attributes_create_page(GtkNotebook *notebook, UMLClass *umlclass)
gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolled_win)));
gtk_widget_show (list);
- gtk_signal_connect (GTK_OBJECT (list), "selection_changed",
- GTK_SIGNAL_FUNC(attributes_list_selection_changed_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (list), "selection_changed",
+ G_CALLBACK(attributes_list_selection_changed_callback), umlclass);
vbox2 = gtk_vbox_new(FALSE, 5);
button = gtk_button_new_from_stock (GTK_STOCK_NEW);
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC(attributes_list_new_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK(attributes_list_new_callback), umlclass);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
button = gtk_button_new_from_stock (GTK_STOCK_DELETE);
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC(attributes_list_delete_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK(attributes_list_delete_callback), umlclass);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
button = gtk_button_new_from_stock (GTK_STOCK_GO_UP);
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC(attributes_list_move_up_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK(attributes_list_move_up_callback), umlclass);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
button = gtk_button_new_from_stock (GTK_STOCK_GO_DOWN);
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC(attributes_list_move_down_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK(attributes_list_move_down_callback), umlclass);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
@@ -1120,10 +1112,10 @@ attributes_create_page(GtkNotebook *notebook, UMLClass *umlclass)
label = gtk_label_new(_("Name:"));
entry = gtk_entry_new();
prop_dialog->attr_name = GTK_ENTRY(entry);
- gtk_signal_connect (GTK_OBJECT (entry), "focus_out_event",
- GTK_SIGNAL_FUNC (attributes_update_event), umlclass);
- gtk_signal_connect (GTK_OBJECT (entry), "activate",
- GTK_SIGNAL_FUNC (attributes_update), umlclass);
+ g_signal_connect (G_OBJECT (entry), "focus_out_event",
+ G_CALLBACK (attributes_update_event), umlclass);
+ g_signal_connect (G_OBJECT (entry), "activate",
+ G_CALLBACK (attributes_update), umlclass);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0,1,0,1, GTK_FILL,0, 0,0);
gtk_table_attach (GTK_TABLE (table), entry, 1,2,0,1, GTK_FILL | GTK_EXPAND,0, 0,2);
@@ -1131,10 +1123,10 @@ attributes_create_page(GtkNotebook *notebook, UMLClass *umlclass)
label = gtk_label_new(_("Type:"));
entry = gtk_entry_new();
prop_dialog->attr_type = GTK_ENTRY(entry);
- gtk_signal_connect (GTK_OBJECT (entry), "focus_out_event",
- GTK_SIGNAL_FUNC (attributes_update_event), umlclass);
- gtk_signal_connect (GTK_OBJECT (entry), "activate",
- GTK_SIGNAL_FUNC (attributes_update), umlclass);
+ g_signal_connect (G_OBJECT (entry), "focus_out_event",
+ G_CALLBACK (attributes_update_event), umlclass);
+ g_signal_connect (G_OBJECT (entry), "activate",
+ G_CALLBACK (attributes_update), umlclass);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0,1,1,2, GTK_FILL,0, 0,0);
gtk_table_attach (GTK_TABLE (table), entry, 1,2,1,2, GTK_FILL | GTK_EXPAND,0, 0,2);
@@ -1142,10 +1134,10 @@ attributes_create_page(GtkNotebook *notebook, UMLClass *umlclass)
label = gtk_label_new(_("Value:"));
entry = gtk_entry_new();
prop_dialog->attr_value = GTK_ENTRY(entry);
- gtk_signal_connect (GTK_OBJECT (entry), "focus_out_event",
- GTK_SIGNAL_FUNC (attributes_update_event), umlclass);
- gtk_signal_connect (GTK_OBJECT (entry), "activate",
- GTK_SIGNAL_FUNC (attributes_update), umlclass);
+ g_signal_connect (G_OBJECT (entry), "focus_out_event",
+ G_CALLBACK (attributes_update_event), umlclass);
+ g_signal_connect (G_OBJECT (entry), "activate",
+ G_CALLBACK (attributes_update), umlclass);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0,1,2,3, GTK_FILL,0, 0,0);
gtk_table_attach (GTK_TABLE (table), entry, 1,2,2,3, GTK_FILL | GTK_EXPAND,0, 0,2);
@@ -1159,13 +1151,13 @@ attributes_create_page(GtkNotebook *notebook, UMLClass *umlclass)
gtk_container_add (GTK_CONTAINER (scrolledwindow), entry);
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (entry), GTK_WRAP_WORD);
gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW (entry),TRUE);
- gtk_signal_connect (GTK_OBJECT (entry), "focus_out_event",
- GTK_SIGNAL_FUNC (attributes_update_event), umlclass);
+ g_signal_connect (G_OBJECT (entry), "focus_out_event",
+ G_CALLBACK (attributes_update_event), umlclass);
#if 0 /* while the GtkEntry has a "activate" signal, GtkTextView does not.
* Maybe we should connect to "set-focus-child" instead?
*/
- gtk_signal_connect (GTK_OBJECT (entry), "activate",
- GTK_SIGNAL_FUNC (attributes_update), umlclass);
+ g_signal_connect (G_OBJECT (entry), "activate",
+ G_CALLBACK (attributes_update), umlclass);
#endif
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0,1,3,4, GTK_FILL,0, 0,0);
@@ -1701,9 +1693,8 @@ operations_list_new_callback(GtkWidget *button,
g_free (utfstr);
g_object_set_data(G_OBJECT(list_item), "user_data", op);
- gtk_signal_connect (GTK_OBJECT (list_item), "destroy",
- GTK_SIGNAL_FUNC (operations_list_item_destroy_callback),
- NULL);
+ g_signal_connect (G_OBJECT (list_item), "destroy",
+ G_CALLBACK (operations_list_item_destroy_callback), NULL);
list = g_list_append(NULL, list_item);
gtk_list_append_items(prop_dialog->operations_list, list);
@@ -1902,9 +1893,8 @@ operations_fill_in_dialog(UMLClass *umlclass)
op_copy->left_connection = op->left_connection;
op_copy->right_connection = op->right_connection;
g_object_set_data(G_OBJECT(list_item), "user_data", (gpointer) op_copy);
- gtk_signal_connect (GTK_OBJECT (list_item), "destroy",
- GTK_SIGNAL_FUNC (operations_list_item_destroy_callback),
- NULL);
+ g_signal_connect (G_OBJECT (list_item), "destroy",
+ G_CALLBACK (operations_list_item_destroy_callback), NULL);
gtk_container_add (GTK_CONTAINER (prop_dialog->operations_list), list_item);
gtk_widget_show (list_item);
@@ -1944,7 +1934,6 @@ operations_data_create_hbox (UMLClass *umlclass)
GtkWidget *omenu;
GtkWidget *scrolledwindow;
GtkWidget *checkbox;
- GSList *group;
prop_dialog = umlclass->properties_dialog;
@@ -1961,10 +1950,10 @@ operations_data_create_hbox (UMLClass *umlclass)
label = gtk_label_new(_("Name:"));
entry = gtk_entry_new();
prop_dialog->op_name = GTK_ENTRY(entry);
- gtk_signal_connect (GTK_OBJECT (entry), "focus_out_event",
- GTK_SIGNAL_FUNC (operations_update_event), umlclass);
- gtk_signal_connect (GTK_OBJECT (entry), "activate",
- GTK_SIGNAL_FUNC (operations_update), umlclass);
+ g_signal_connect (G_OBJECT (entry), "focus_out_event",
+ G_CALLBACK (operations_update_event), umlclass);
+ g_signal_connect (G_OBJECT (entry), "activate",
+ G_CALLBACK (operations_update), umlclass);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0,1,0,1, GTK_FILL,0, 0,0);
gtk_table_attach (GTK_TABLE (table), entry, 1,2,0,1, GTK_FILL | GTK_EXPAND,0, 0,2);
@@ -1972,10 +1961,10 @@ operations_data_create_hbox (UMLClass *umlclass)
label = gtk_label_new(_("Type:"));
entry = gtk_entry_new();
prop_dialog->op_type = GTK_ENTRY(entry);
- gtk_signal_connect (GTK_OBJECT (entry), "focus_out_event",
- GTK_SIGNAL_FUNC (operations_update_event), umlclass);
- gtk_signal_connect (GTK_OBJECT (entry), "activate",
- GTK_SIGNAL_FUNC (operations_update), umlclass);
+ g_signal_connect (G_OBJECT (entry), "focus_out_event",
+ G_CALLBACK (operations_update_event), umlclass);
+ g_signal_connect (G_OBJECT (entry), "activate",
+ G_CALLBACK (operations_update), umlclass);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0,1,1,2, GTK_FILL,0, 0,0);
gtk_table_attach (GTK_TABLE (table), entry, 1,2,1,2, GTK_FILL | GTK_EXPAND,0, 0,2);
@@ -1983,10 +1972,10 @@ operations_data_create_hbox (UMLClass *umlclass)
label = gtk_label_new(_("Stereotype:"));
entry = gtk_entry_new();
prop_dialog->op_stereotype = GTK_ENTRY(entry);
- gtk_signal_connect (GTK_OBJECT (entry), "focus_out_event",
- GTK_SIGNAL_FUNC (operations_update_event), umlclass);
- gtk_signal_connect (GTK_OBJECT (entry), "activate",
- GTK_SIGNAL_FUNC (operations_update), umlclass);
+ g_signal_connect (G_OBJECT (entry), "focus_out_event",
+ G_CALLBACK (operations_update_event), umlclass);
+ g_signal_connect (G_OBJECT (entry), "activate",
+ G_CALLBACK (operations_update), umlclass);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0,1,2,3, GTK_FILL,0, 0,0);
gtk_table_attach (GTK_TABLE (table), entry, 1,2,2,3, GTK_FILL | GTK_EXPAND,0, 0,2);
@@ -2041,12 +2030,9 @@ operations_data_create_hbox (UMLClass *umlclass)
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (entry), GTK_WRAP_WORD);
gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW (entry),TRUE);
- gtk_signal_connect (GTK_OBJECT (entry), "focus_out_event",
- GTK_SIGNAL_FUNC (operations_update_event), umlclass);
-#if 0 /* no "activate" signal on GtkTextView */
- gtk_signal_connect (GTK_OBJECT (entry), "activate",
- GTK_SIGNAL_FUNC (operations_update), umlclass);
-#endif
+ g_signal_connect (G_OBJECT (entry), "focus_out_event",
+ G_CALLBACK (operations_update_event), umlclass);
+
gtk_table_attach (GTK_TABLE (table), label, 4,5,0,1, GTK_FILL,0, 0,0);
gtk_table_attach (GTK_TABLE (table), scrolledwindow, 4,5,1,3, GTK_FILL | GTK_EXPAND,0, 0,0);
gtk_box_pack_start (GTK_BOX (hbox), vbox2, TRUE, TRUE, 0);
@@ -2095,38 +2081,34 @@ operations_parameters_editor_create_vbox (UMLClass *umlclass)
gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolled_win)));
gtk_widget_show (list);
- gtk_signal_connect (GTK_OBJECT (list), "selection_changed",
- GTK_SIGNAL_FUNC(parameters_list_selection_changed_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (list), "selection_changed",
+ G_CALLBACK(parameters_list_selection_changed_callback),
+ umlclass);
vbox3 = gtk_vbox_new(FALSE, 5);
button = gtk_button_new_from_stock (GTK_STOCK_NEW);
prop_dialog->param_new_button = button;
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC(parameters_list_new_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK(parameters_list_new_callback), umlclass);
gtk_box_pack_start (GTK_BOX (vbox3), button, FALSE, TRUE, 0);
gtk_widget_show (button);
button = gtk_button_new_from_stock (GTK_STOCK_DELETE);
prop_dialog->param_delete_button = button;
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC(parameters_list_delete_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK(parameters_list_delete_callback), umlclass);
gtk_box_pack_start (GTK_BOX (vbox3), button, FALSE, TRUE, 0);
gtk_widget_show (button);
button = gtk_button_new_from_stock (GTK_STOCK_GO_UP);
prop_dialog->param_up_button = button;
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC(parameters_list_move_up_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK(parameters_list_move_up_callback), umlclass);
gtk_box_pack_start (GTK_BOX (vbox3), button, FALSE, TRUE, 0);
gtk_widget_show (button);
button = gtk_button_new_from_stock (GTK_STOCK_GO_DOWN);
prop_dialog->param_down_button = button;
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC(parameters_list_move_down_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK(parameters_list_move_down_callback), umlclass);
gtk_box_pack_start (GTK_BOX (vbox3), button, FALSE, TRUE, 0);
gtk_widget_show (button);
@@ -2150,7 +2132,6 @@ operations_parameters_data_create_vbox (UMLClass *umlclass)
GtkWidget *entry;
GtkWidget *scrolledwindow;
GtkWidget *omenu;
- GSList *group;
prop_dialog = umlclass->properties_dialog;
@@ -2169,20 +2150,20 @@ operations_parameters_data_create_vbox (UMLClass *umlclass)
label = gtk_label_new(_("Name:"));
entry = gtk_entry_new();
prop_dialog->param_name = GTK_ENTRY(entry);
- gtk_signal_connect (GTK_OBJECT (entry), "focus_out_event",
- GTK_SIGNAL_FUNC (operations_update_event), umlclass);
- gtk_signal_connect (GTK_OBJECT (entry), "activate",
- GTK_SIGNAL_FUNC (operations_update), umlclass);
+ g_signal_connect (G_OBJECT (entry), "focus_out_event",
+ G_CALLBACK (operations_update_event), umlclass);
+ g_signal_connect (G_OBJECT (entry), "activate",
+ G_CALLBACK (operations_update), umlclass);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0,1,0,1, GTK_FILL,0, 0,0);
gtk_table_attach (GTK_TABLE (table), entry, 1,2,0,1, GTK_FILL | GTK_EXPAND,0, 0,2);
label = gtk_label_new(_("Type:"));
entry = gtk_entry_new();
- gtk_signal_connect (GTK_OBJECT (entry), "focus_out_event",
- GTK_SIGNAL_FUNC (operations_update_event), umlclass);
- gtk_signal_connect (GTK_OBJECT (entry), "activate",
- GTK_SIGNAL_FUNC (operations_update), umlclass);
+ g_signal_connect (G_OBJECT (entry), "focus_out_event",
+ G_CALLBACK (operations_update_event), umlclass);
+ g_signal_connect (G_OBJECT (entry), "activate",
+ G_CALLBACK (operations_update), umlclass);
prop_dialog->param_type = GTK_ENTRY(entry);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0,1,1,2, GTK_FILL,0, 0,0);
@@ -2191,10 +2172,10 @@ operations_parameters_data_create_vbox (UMLClass *umlclass)
label = gtk_label_new(_("Def. value:"));
entry = gtk_entry_new();
prop_dialog->param_value = GTK_ENTRY(entry);
- gtk_signal_connect (GTK_OBJECT (entry), "focus_out_event",
- GTK_SIGNAL_FUNC (operations_update_event), umlclass);
- gtk_signal_connect (GTK_OBJECT (entry), "activate",
- GTK_SIGNAL_FUNC (operations_update), umlclass);
+ g_signal_connect (G_OBJECT (entry), "focus_out_event",
+ G_CALLBACK (operations_update_event), umlclass);
+ g_signal_connect (G_OBJECT (entry), "activate",
+ G_CALLBACK (operations_update), umlclass);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0,1,2,3, GTK_FILL,0, 0,0);
gtk_table_attach (GTK_TABLE (table), entry, 1,2,2,3, GTK_FILL | GTK_EXPAND,0, 0,2);
@@ -2212,12 +2193,9 @@ operations_parameters_data_create_vbox (UMLClass *umlclass)
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (entry), GTK_WRAP_WORD);
gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW (entry),TRUE);
- gtk_signal_connect (GTK_OBJECT (entry), "focus_out_event",
- GTK_SIGNAL_FUNC (operations_update_event), umlclass);
-#if 0 /* no "activate" signal on GtkTextView */
- gtk_signal_connect (GTK_OBJECT (entry), "activate",
- GTK_SIGNAL_FUNC (operations_update), umlclass);
-#endif
+ g_signal_connect (G_OBJECT (entry), "focus_out_event",
+ G_CALLBACK (operations_update_event), umlclass);
+
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 2,3,1,2, GTK_FILL,0, 0,0);
gtk_table_attach (GTK_TABLE (table), scrolledwindow, 3,4,1,3, GTK_FILL | GTK_EXPAND,0, 0,2);
@@ -2283,34 +2261,31 @@ operations_create_page(GtkNotebook *notebook, UMLClass *umlclass)
gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolled_win)));
gtk_widget_show (list);
- gtk_signal_connect (GTK_OBJECT (list), "selection_changed",
- GTK_SIGNAL_FUNC(operations_list_selection_changed_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (list), "selection_changed",
+ G_CALLBACK(operations_list_selection_changed_callback),
+ umlclass);
vbox2 = gtk_vbox_new(FALSE, 5);
button = gtk_button_new_from_stock (GTK_STOCK_NEW);
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC(operations_list_new_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK(operations_list_new_callback),
+ umlclass);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
button = gtk_button_new_from_stock (GTK_STOCK_DELETE);
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC(operations_list_delete_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK(operations_list_delete_callback), umlclass);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
button = gtk_button_new_from_stock (GTK_STOCK_GO_UP);
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC(operations_list_move_up_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK(operations_list_move_up_callback), umlclass);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
button = gtk_button_new_from_stock (GTK_STOCK_GO_DOWN);
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC(operations_list_move_down_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK(operations_list_move_down_callback), umlclass);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
@@ -2472,9 +2447,8 @@ templates_list_new_callback(GtkWidget *button,
g_free (utfstr);
g_object_set_data(G_OBJECT(list_item), "user_data", param);
- gtk_signal_connect (GTK_OBJECT (list_item), "destroy",
- GTK_SIGNAL_FUNC (templates_list_item_destroy_callback),
- NULL);
+ g_signal_connect (G_OBJECT (list_item), "destroy",
+ G_CALLBACK (templates_list_item_destroy_callback), NULL);
list = g_list_append(NULL, list_item);
gtk_list_append_items(prop_dialog->templates_list, list);
@@ -2629,9 +2603,8 @@ templates_fill_in_dialog(UMLClass *umlclass)
param_copy = uml_formalparameter_copy(param);
g_object_set_data(G_OBJECT(list_item), "user_data",
(gpointer) param_copy);
- gtk_signal_connect (GTK_OBJECT (list_item), "destroy",
- GTK_SIGNAL_FUNC (templates_list_item_destroy_callback),
- NULL);
+ g_signal_connect (G_OBJECT (list_item), "destroy",
+ G_CALLBACK (templates_list_item_destroy_callback), NULL);
gtk_container_add (GTK_CONTAINER (prop_dialog->templates_list),
list_item);
gtk_widget_show (list_item);
@@ -2710,34 +2683,29 @@ templates_create_page(GtkNotebook *notebook, UMLClass *umlclass)
gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolled_win)));
gtk_widget_show (list);
- gtk_signal_connect (GTK_OBJECT (list), "selection_changed",
- GTK_SIGNAL_FUNC(templates_list_selection_changed_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (list), "selection_changed",
+ G_CALLBACK(templates_list_selection_changed_callback), umlclass);
vbox2 = gtk_vbox_new(FALSE, 5);
button = gtk_button_new_from_stock (GTK_STOCK_NEW);
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC(templates_list_new_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK(templates_list_new_callback), umlclass);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
button = gtk_button_new_from_stock (GTK_STOCK_DELETE);
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC(templates_list_delete_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK(templates_list_delete_callback), umlclass);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
button = gtk_button_new_from_stock (GTK_STOCK_GO_UP);
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC(templates_list_move_up_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK(templates_list_move_up_callback), umlclass);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
button = gtk_button_new_from_stock (GTK_STOCK_GO_DOWN);
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC(templates_list_move_down_callback),
- umlclass);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK(templates_list_move_down_callback), umlclass);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
@@ -2758,10 +2726,10 @@ templates_create_page(GtkNotebook *notebook, UMLClass *umlclass)
label = gtk_label_new(_("Name:"));
entry = gtk_entry_new();
prop_dialog->templ_name = GTK_ENTRY(entry);
- gtk_signal_connect (GTK_OBJECT (entry), "focus_out_event",
- GTK_SIGNAL_FUNC (templates_update_event), umlclass);
- gtk_signal_connect (GTK_OBJECT (entry), "activate",
- GTK_SIGNAL_FUNC (templates_update), umlclass);
+ g_signal_connect (G_OBJECT (entry), "focus_out_event",
+ G_CALLBACK (templates_update_event), umlclass);
+ g_signal_connect (G_OBJECT (entry), "activate",
+ G_CALLBACK (templates_update), umlclass);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0,1,0,1, GTK_FILL,0, 0,0);
gtk_table_attach (GTK_TABLE (table), entry, 1,2,0,1, GTK_FILL | GTK_EXPAND,0, 0,2);
@@ -2769,10 +2737,10 @@ templates_create_page(GtkNotebook *notebook, UMLClass *umlclass)
label = gtk_label_new(_("Type:"));
entry = gtk_entry_new();
prop_dialog->templ_type = GTK_ENTRY(entry);
- gtk_signal_connect (GTK_OBJECT (entry), "focus_out_event",
- GTK_SIGNAL_FUNC (templates_update_event), umlclass);
- gtk_signal_connect (GTK_OBJECT (entry), "activate",
- GTK_SIGNAL_FUNC (templates_update), umlclass);
+ g_signal_connect (G_OBJECT (entry), "focus_out_event",
+ G_CALLBACK (templates_update_event), umlclass);
+ g_signal_connect (G_OBJECT (entry), "activate",
+ G_CALLBACK (templates_update), umlclass);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0,1,1,2, GTK_FILL,0, 0,0);
gtk_table_attach (GTK_TABLE (table), entry, 1,2,1,2, GTK_FILL | GTK_EXPAND,0, 0,2);
@@ -2963,14 +2931,10 @@ umlclass_get_properties(UMLClass *umlclass, gboolean is_default)
g_object_set_data(G_OBJECT(notebook), "user_data", (gpointer) umlclass);
- gtk_signal_connect (GTK_OBJECT (notebook),
- "switch_page",
- GTK_SIGNAL_FUNC(switch_page_callback),
- (gpointer) umlclass);
- gtk_signal_connect (GTK_OBJECT (umlclass->properties_dialog->dialog),
- "destroy",
- GTK_SIGNAL_FUNC(destroy_properties_dialog),
- (gpointer) umlclass);
+ g_signal_connect (G_OBJECT (notebook), "switch_page",
+ G_CALLBACK(switch_page_callback), umlclass);
+ g_signal_connect (G_OBJECT (umlclass->properties_dialog->dialog), "destroy",
+ G_CALLBACK(destroy_properties_dialog), umlclass);
create_dialog_pages(GTK_NOTEBOOK( notebook ), umlclass);
diff --git a/plug-ins/xslt/xsltdialog.c b/plug-ins/xslt/xsltdialog.c
index e898a2c..c6eab04 100644
--- a/plug-ins/xslt/xsltdialog.c
+++ b/plug-ins/xslt/xsltdialog.c
@@ -26,7 +26,7 @@
* Opens a dialog for export options
*/
-#undef GTK_DISABLE_DEPRECATED /* gtk_signal_connect, GTK_OPTION_MENU, ... */
+#undef GTK_DISABLE_DEPRECATED /* GTK_OPTION_MENU, ... */
#include "xslt.h"
#include <stdio.h>
@@ -120,8 +120,8 @@ xslt_dialog_create(void) {
while(cur_f != NULL)
{
menuitem = gtk_radio_menu_item_new_with_label (group, cur_f->name);
- gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
- GTK_SIGNAL_FUNC (from_activate), cur_f);
+ g_signal_connect (G_OBJECT (menuitem), "activate",
+ G_CALLBACK (from_activate), cur_f);
group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menuitem));
gtk_menu_append (GTK_MENU (menu), menuitem);
gtk_widget_show (menuitem);
@@ -158,8 +158,8 @@ xslt_dialog_create(void) {
while(cur_to != NULL)
{
menuitem = gtk_radio_menu_item_new_with_label (group, cur_to->name);
- gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
- GTK_SIGNAL_FUNC (to_update), cur_to );
+ g_signal_connect (G_OBJECT (menuitem), "activate",
+ G_CALLBACK (to_update), cur_to );
group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menuitem));
gtk_menu_append (GTK_MENU (menu), menuitem);
gtk_widget_show (menuitem);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]