Commit 1dc24ea3 authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

gtk/gtksignal.[ch] gtk/gtkclist.c gtk/gtklist.c gtk/gtkmain.c

2008-09-22  Michael Natterer  <mitch@imendio.com>

	* gtk/gtksignal.[ch]
	* gtk/gtkclist.c
	* gtk/gtklist.c
	* gtk/gtkmain.c
	* gtk/gtktext.c
	* gtk/gtktreeitem.c: use G_CALLBACK and GCallback instead of
	GTK_SIGNAL_FUNC and GtkSignalFunc also in deprecated code.


svn path=/trunk/; revision=21488
parent d89074b4
2008-09-22 Michael Natterer <mitch@imendio.com>
* gtk/gtksignal.[ch]
* gtk/gtkclist.c
* gtk/gtklist.c
* gtk/gtkmain.c
* gtk/gtktext.c
* gtk/gtktreeitem.c: use G_CALLBACK and GCallback instead of
GTK_SIGNAL_FUNC and GtkSignalFunc also in deprecated code.
2008-09-22 Frederic Crozat <fcrozat@mandriva.com> 2008-09-22 Frederic Crozat <fcrozat@mandriva.com>
* gtk/gtkfilesystem.c: use the correct gi18n header. * gtk/gtkfilesystem.c: use the correct gi18n header.
......
...@@ -1170,10 +1170,10 @@ gtk_clist_set_hadjustment (GtkCList *clist, ...@@ -1170,10 +1170,10 @@ gtk_clist_set_hadjustment (GtkCList *clist,
g_object_ref_sink (clist->hadjustment); g_object_ref_sink (clist->hadjustment);
gtk_signal_connect (GTK_OBJECT (clist->hadjustment), "changed", gtk_signal_connect (GTK_OBJECT (clist->hadjustment), "changed",
(GtkSignalFunc) hadjustment_changed, G_CALLBACK (hadjustment_changed),
(gpointer) clist); (gpointer) clist);
gtk_signal_connect (GTK_OBJECT (clist->hadjustment), "value-changed", gtk_signal_connect (GTK_OBJECT (clist->hadjustment), "value-changed",
(GtkSignalFunc) hadjustment_value_changed, G_CALLBACK (hadjustment_value_changed),
(gpointer) clist); (gpointer) clist);
} }
...@@ -1217,10 +1217,10 @@ gtk_clist_set_vadjustment (GtkCList *clist, ...@@ -1217,10 +1217,10 @@ gtk_clist_set_vadjustment (GtkCList *clist,
g_object_ref_sink (clist->vadjustment); g_object_ref_sink (clist->vadjustment);
gtk_signal_connect (GTK_OBJECT (clist->vadjustment), "changed", gtk_signal_connect (GTK_OBJECT (clist->vadjustment), "changed",
(GtkSignalFunc) vadjustment_changed, G_CALLBACK (vadjustment_changed),
(gpointer) clist); (gpointer) clist);
gtk_signal_connect (GTK_OBJECT (clist->vadjustment), "value-changed", gtk_signal_connect (GTK_OBJECT (clist->vadjustment), "value-changed",
(GtkSignalFunc) vadjustment_value_changed, G_CALLBACK (vadjustment_value_changed),
(gpointer) clist); (gpointer) clist);
} }
...@@ -1375,7 +1375,7 @@ gtk_clist_column_title_active (GtkCList *clist, ...@@ -1375,7 +1375,7 @@ gtk_clist_column_title_active (GtkCList *clist,
clist->column[column].button_passive = FALSE; clist->column[column].button_passive = FALSE;
gtk_signal_disconnect_by_func (GTK_OBJECT (clist->column[column].button), gtk_signal_disconnect_by_func (GTK_OBJECT (clist->column[column].button),
(GtkSignalFunc) column_title_passive_func, G_CALLBACK (column_title_passive_func),
NULL); NULL);
GTK_WIDGET_SET_FLAGS (clist->column[column].button, GTK_CAN_FOCUS); GTK_WIDGET_SET_FLAGS (clist->column[column].button, GTK_CAN_FOCUS);
...@@ -1406,7 +1406,8 @@ gtk_clist_column_title_passive (GtkCList *clist, ...@@ -1406,7 +1406,8 @@ gtk_clist_column_title_passive (GtkCList *clist,
gtk_button_leave (button); gtk_button_leave (button);
gtk_signal_connect (GTK_OBJECT (clist->column[column].button), "event", gtk_signal_connect (GTK_OBJECT (clist->column[column].button), "event",
(GtkSignalFunc) column_title_passive_func, NULL); G_CALLBACK (column_title_passive_func),
NULL);
GTK_WIDGET_UNSET_FLAGS (clist->column[column].button, GTK_CAN_FOCUS); GTK_WIDGET_UNSET_FLAGS (clist->column[column].button, GTK_CAN_FOCUS);
if (GTK_WIDGET_VISIBLE (clist)) if (GTK_WIDGET_VISIBLE (clist))
...@@ -2138,7 +2139,7 @@ column_button_create (GtkCList *clist, ...@@ -2138,7 +2139,7 @@ column_button_create (GtkCList *clist,
gtk_widget_set_parent (button, GTK_WIDGET (clist)); gtk_widget_set_parent (button, GTK_WIDGET (clist));
gtk_signal_connect (GTK_OBJECT (button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) column_button_clicked, G_CALLBACK (column_button_clicked),
(gpointer) clist); (gpointer) clist);
gtk_widget_show (button); gtk_widget_show (button);
} }
......
...@@ -985,46 +985,46 @@ gtk_list_insert_items (GtkList *list, ...@@ -985,46 +985,46 @@ gtk_list_insert_items (GtkList *list,
gtk_widget_set_parent (widget, GTK_WIDGET (list)); gtk_widget_set_parent (widget, GTK_WIDGET (list));
gtk_signal_connect (GTK_OBJECT (widget), "drag-begin", gtk_signal_connect (GTK_OBJECT (widget), "drag-begin",
GTK_SIGNAL_FUNC (gtk_list_signal_drag_begin), G_CALLBACK (gtk_list_signal_drag_begin),
list); list);
gtk_signal_connect (GTK_OBJECT (widget), "toggle-focus-row", gtk_signal_connect (GTK_OBJECT (widget), "toggle-focus-row",
GTK_SIGNAL_FUNC (gtk_list_signal_toggle_focus_row), G_CALLBACK (gtk_list_signal_toggle_focus_row),
list); list);
gtk_signal_connect (GTK_OBJECT (widget), "select-all", gtk_signal_connect (GTK_OBJECT (widget), "select-all",
GTK_SIGNAL_FUNC (gtk_list_signal_select_all), G_CALLBACK (gtk_list_signal_select_all),
list); list);
gtk_signal_connect (GTK_OBJECT (widget), "unselect-all", gtk_signal_connect (GTK_OBJECT (widget), "unselect-all",
GTK_SIGNAL_FUNC (gtk_list_signal_unselect_all), G_CALLBACK (gtk_list_signal_unselect_all),
list); list);
gtk_signal_connect (GTK_OBJECT (widget), "undo-selection", gtk_signal_connect (GTK_OBJECT (widget), "undo-selection",
GTK_SIGNAL_FUNC (gtk_list_signal_undo_selection), G_CALLBACK (gtk_list_signal_undo_selection),
list); list);
gtk_signal_connect (GTK_OBJECT (widget), "start-selection", gtk_signal_connect (GTK_OBJECT (widget), "start-selection",
GTK_SIGNAL_FUNC (gtk_list_signal_start_selection), G_CALLBACK (gtk_list_signal_start_selection),
list); list);
gtk_signal_connect (GTK_OBJECT (widget), "end-selection", gtk_signal_connect (GTK_OBJECT (widget), "end-selection",
GTK_SIGNAL_FUNC (gtk_list_signal_end_selection), G_CALLBACK (gtk_list_signal_end_selection),
list); list);
gtk_signal_connect (GTK_OBJECT (widget), "extend-selection", gtk_signal_connect (GTK_OBJECT (widget), "extend-selection",
GTK_SIGNAL_FUNC (gtk_list_signal_extend_selection), G_CALLBACK (gtk_list_signal_extend_selection),
list); list);
gtk_signal_connect (GTK_OBJECT (widget), "scroll-horizontal", gtk_signal_connect (GTK_OBJECT (widget), "scroll-horizontal",
GTK_SIGNAL_FUNC (gtk_list_signal_scroll_horizontal), G_CALLBACK (gtk_list_signal_scroll_horizontal),
list); list);
gtk_signal_connect (GTK_OBJECT (widget), "scroll-vertical", gtk_signal_connect (GTK_OBJECT (widget), "scroll-vertical",
GTK_SIGNAL_FUNC (gtk_list_signal_scroll_vertical), G_CALLBACK (gtk_list_signal_scroll_vertical),
list); list);
gtk_signal_connect (GTK_OBJECT (widget), "toggle-add-mode", gtk_signal_connect (GTK_OBJECT (widget), "toggle-add-mode",
GTK_SIGNAL_FUNC (gtk_list_signal_toggle_add_mode), G_CALLBACK (gtk_list_signal_toggle_add_mode),
list); list);
gtk_signal_connect (GTK_OBJECT (widget), "select", gtk_signal_connect (GTK_OBJECT (widget), "select",
GTK_SIGNAL_FUNC (gtk_list_signal_item_select), G_CALLBACK (gtk_list_signal_item_select),
list); list);
gtk_signal_connect (GTK_OBJECT (widget), "deselect", gtk_signal_connect (GTK_OBJECT (widget), "deselect",
GTK_SIGNAL_FUNC (gtk_list_signal_item_deselect), G_CALLBACK (gtk_list_signal_item_deselect),
list); list);
gtk_signal_connect (GTK_OBJECT (widget), "toggle", gtk_signal_connect (GTK_OBJECT (widget), "toggle",
GTK_SIGNAL_FUNC (gtk_list_signal_item_toggle), G_CALLBACK (gtk_list_signal_item_toggle),
list); list);
} }
......
...@@ -2450,7 +2450,7 @@ gtk_print (gchar *str) ...@@ -2450,7 +2450,7 @@ gtk_print (gchar *str)
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy", gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) gtk_widget_destroyed, G_CALLBACK (gtk_widget_destroyed),
&window); &window);
gtk_window_set_title (GTK_WINDOW (window), "Messages"); gtk_window_set_title (GTK_WINDOW (window), "Messages");
...@@ -2501,7 +2501,7 @@ gtk_print (gchar *str) ...@@ -2501,7 +2501,7 @@ gtk_print (gchar *str)
button = gtk_button_new_with_label ("close"); button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked", gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_hide, G_CALLBACK (gtk_widget_hide),
GTK_OBJECT (window)); GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
......
...@@ -102,7 +102,7 @@ gtk_signal_emit_stop_by_name (GtkObject *object, ...@@ -102,7 +102,7 @@ gtk_signal_emit_stop_by_name (GtkObject *object,
void void
gtk_signal_connect_object_while_alive (GtkObject *object, gtk_signal_connect_object_while_alive (GtkObject *object,
const gchar *name, const gchar *name,
GtkSignalFunc func, GCallback func,
GtkObject *alive_object) GtkObject *alive_object)
{ {
g_return_if_fail (GTK_IS_OBJECT (object)); g_return_if_fail (GTK_IS_OBJECT (object));
...@@ -116,7 +116,7 @@ gtk_signal_connect_object_while_alive (GtkObject *object, ...@@ -116,7 +116,7 @@ gtk_signal_connect_object_while_alive (GtkObject *object,
void void
gtk_signal_connect_while_alive (GtkObject *object, gtk_signal_connect_while_alive (GtkObject *object,
const gchar *name, const gchar *name,
GtkSignalFunc func, GCallback func,
gpointer func_data, gpointer func_data,
GtkObject *alive_object) GtkObject *alive_object)
{ {
...@@ -135,7 +135,7 @@ gtk_signal_connect_while_alive (GtkObject *object, ...@@ -135,7 +135,7 @@ gtk_signal_connect_while_alive (GtkObject *object,
gulong gulong
gtk_signal_connect_full (GtkObject *object, gtk_signal_connect_full (GtkObject *object,
const gchar *name, const gchar *name,
GtkSignalFunc func, GCallback func,
GtkCallbackMarshal unsupported, GtkCallbackMarshal unsupported,
gpointer data, gpointer data,
GDestroyNotify destroy_func, GDestroyNotify destroy_func,
...@@ -157,7 +157,7 @@ gtk_signal_connect_full (GtkObject *object, ...@@ -157,7 +157,7 @@ gtk_signal_connect_full (GtkObject *object,
void void
gtk_signal_compat_matched (GtkObject *object, gtk_signal_compat_matched (GtkObject *object,
GtkSignalFunc func, GCallback func,
gpointer data, gpointer data,
GSignalMatchType match, GSignalMatchType match,
guint action) guint action)
......
...@@ -38,7 +38,7 @@ G_BEGIN_DECLS ...@@ -38,7 +38,7 @@ G_BEGIN_DECLS
/* --- compat defines --- */ /* --- compat defines --- */
#define GTK_SIGNAL_OFFSET GTK_STRUCT_OFFSET #define GTK_SIGNAL_OFFSET G_STRUCT_OFFSET
#define gtk_signal_lookup(name,object_type) \ #define gtk_signal_lookup(name,object_type) \
g_signal_lookup ((name), (object_type)) g_signal_lookup ((name), (object_type))
#define gtk_signal_name(signal_id) \ #define gtk_signal_name(signal_id) \
...@@ -91,34 +91,34 @@ G_BEGIN_DECLS ...@@ -91,34 +91,34 @@ G_BEGIN_DECLS
/* --- compat functions --- */ /* --- compat functions --- */
guint gtk_signal_newv (const gchar *name, guint gtk_signal_newv (const gchar *name,
GtkSignalRunType signal_flags, GtkSignalRunType signal_flags,
GtkType object_type, GType object_type,
guint function_offset, guint function_offset,
GtkSignalMarshaller marshaller, GtkSignalMarshaller marshaller,
GtkType return_val, GType return_val,
guint n_args, guint n_args,
GtkType *args); GType *args);
guint gtk_signal_new (const gchar *name, guint gtk_signal_new (const gchar *name,
GtkSignalRunType signal_flags, GtkSignalRunType signal_flags,
GtkType object_type, GType object_type,
guint function_offset, guint function_offset,
GtkSignalMarshaller marshaller, GtkSignalMarshaller marshaller,
GtkType return_val, GType return_val,
guint n_args, guint n_args,
...); ...);
void gtk_signal_emit_stop_by_name (GtkObject *object, void gtk_signal_emit_stop_by_name (GtkObject *object,
const gchar *name); const gchar *name);
void gtk_signal_connect_object_while_alive (GtkObject *object, void gtk_signal_connect_object_while_alive (GtkObject *object,
const gchar *name, const gchar *name,
GtkSignalFunc func, GCallback func,
GtkObject *alive_object); GtkObject *alive_object);
void gtk_signal_connect_while_alive (GtkObject *object, void gtk_signal_connect_while_alive (GtkObject *object,
const gchar *name, const gchar *name,
GtkSignalFunc func, GCallback func,
gpointer func_data, gpointer func_data,
GtkObject *alive_object); GtkObject *alive_object);
gulong gtk_signal_connect_full (GtkObject *object, gulong gtk_signal_connect_full (GtkObject *object,
const gchar *name, const gchar *name,
GtkSignalFunc func, GCallback func,
GtkCallbackMarshal unsupported, GtkCallbackMarshal unsupported,
gpointer data, gpointer data,
GDestroyNotify destroy_func, GDestroyNotify destroy_func,
...@@ -137,7 +137,7 @@ void gtk_signal_emitv_by_name (GtkObject *object, ...@@ -137,7 +137,7 @@ void gtk_signal_emitv_by_name (GtkObject *object,
const gchar *name, const gchar *name,
GtkArg *args); GtkArg *args);
void gtk_signal_compat_matched (GtkObject *object, void gtk_signal_compat_matched (GtkObject *object,
GtkSignalFunc func, GCallback func,
gpointer data, gpointer data,
GSignalMatchType match, GSignalMatchType match,
guint action); guint action);
......
...@@ -812,13 +812,13 @@ gtk_text_set_adjustments (GtkText *text, ...@@ -812,13 +812,13 @@ gtk_text_set_adjustments (GtkText *text,
g_object_ref_sink (text->hadj); g_object_ref_sink (text->hadj);
gtk_signal_connect (GTK_OBJECT (text->hadj), "changed", gtk_signal_connect (GTK_OBJECT (text->hadj), "changed",
(GtkSignalFunc) gtk_text_adjustment, G_CALLBACK (gtk_text_adjustment),
text); text);
gtk_signal_connect (GTK_OBJECT (text->hadj), "value-changed", gtk_signal_connect (GTK_OBJECT (text->hadj), "value-changed",
(GtkSignalFunc) gtk_text_adjustment, G_CALLBACK (gtk_text_adjustment),
text); text);
gtk_signal_connect (GTK_OBJECT (text->hadj), "destroy", gtk_signal_connect (GTK_OBJECT (text->hadj), "destroy",
(GtkSignalFunc) gtk_text_adjustment_destroyed, G_CALLBACK (gtk_text_adjustment_destroyed),
text); text);
gtk_text_adjustment (hadj, text); gtk_text_adjustment (hadj, text);
...@@ -831,13 +831,13 @@ gtk_text_set_adjustments (GtkText *text, ...@@ -831,13 +831,13 @@ gtk_text_set_adjustments (GtkText *text,
g_object_ref_sink (text->vadj); g_object_ref_sink (text->vadj);
gtk_signal_connect (GTK_OBJECT (text->vadj), "changed", gtk_signal_connect (GTK_OBJECT (text->vadj), "changed",
(GtkSignalFunc) gtk_text_adjustment, G_CALLBACK (gtk_text_adjustment),
text); text);
gtk_signal_connect (GTK_OBJECT (text->vadj), "value-changed", gtk_signal_connect (GTK_OBJECT (text->vadj), "value-changed",
(GtkSignalFunc) gtk_text_adjustment, G_CALLBACK (gtk_text_adjustment),
text); text);
gtk_signal_connect (GTK_OBJECT (text->vadj), "destroy", gtk_signal_connect (GTK_OBJECT (text->vadj), "destroy",
(GtkSignalFunc) gtk_text_adjustment_destroyed, G_CALLBACK (gtk_text_adjustment_destroyed),
text); text);
gtk_text_adjustment (vadj, text); gtk_text_adjustment (vadj, text);
......
...@@ -231,13 +231,13 @@ gtk_tree_item_init (GtkTreeItem *tree_item) ...@@ -231,13 +231,13 @@ gtk_tree_item_init (GtkTreeItem *tree_item)
eventbox = gtk_event_box_new(); eventbox = gtk_event_box_new();
gtk_widget_set_events (eventbox, GDK_BUTTON_PRESS_MASK); gtk_widget_set_events (eventbox, GDK_BUTTON_PRESS_MASK);
gtk_signal_connect(GTK_OBJECT(eventbox), "state-changed", gtk_signal_connect(GTK_OBJECT(eventbox), "state-changed",
(GtkSignalFunc)gtk_tree_item_subtree_button_changed_state, G_CALLBACK (gtk_tree_item_subtree_button_changed_state),
(gpointer)NULL); (gpointer)NULL);
gtk_signal_connect(GTK_OBJECT(eventbox), "realize", gtk_signal_connect(GTK_OBJECT(eventbox), "realize",
(GtkSignalFunc)gtk_tree_item_subtree_button_changed_state, G_CALLBACK (gtk_tree_item_subtree_button_changed_state),
(gpointer)NULL); (gpointer)NULL);
gtk_signal_connect(GTK_OBJECT(eventbox), "button-press-event", gtk_signal_connect(GTK_OBJECT(eventbox), "button-press-event",
(GtkSignalFunc)gtk_tree_item_subtree_button_click, G_CALLBACK (gtk_tree_item_subtree_button_click),
(gpointer)NULL); (gpointer)NULL);
gtk_object_set_user_data(GTK_OBJECT(eventbox), tree_item); gtk_object_set_user_data(GTK_OBJECT(eventbox), tree_item);
tree_item->pixmaps_box = eventbox; tree_item->pixmaps_box = eventbox;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment