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>
* gtk/gtkfilesystem.c: use the correct gi18n header.
......
......@@ -1170,10 +1170,10 @@ gtk_clist_set_hadjustment (GtkCList *clist,
g_object_ref_sink (clist->hadjustment);
gtk_signal_connect (GTK_OBJECT (clist->hadjustment), "changed",
(GtkSignalFunc) hadjustment_changed,
G_CALLBACK (hadjustment_changed),
(gpointer) clist);
gtk_signal_connect (GTK_OBJECT (clist->hadjustment), "value-changed",
(GtkSignalFunc) hadjustment_value_changed,
G_CALLBACK (hadjustment_value_changed),
(gpointer) clist);
}
......@@ -1217,10 +1217,10 @@ gtk_clist_set_vadjustment (GtkCList *clist,
g_object_ref_sink (clist->vadjustment);
gtk_signal_connect (GTK_OBJECT (clist->vadjustment), "changed",
(GtkSignalFunc) vadjustment_changed,
G_CALLBACK (vadjustment_changed),
(gpointer) clist);
gtk_signal_connect (GTK_OBJECT (clist->vadjustment), "value-changed",
(GtkSignalFunc) vadjustment_value_changed,
G_CALLBACK (vadjustment_value_changed),
(gpointer) clist);
}
......@@ -1375,7 +1375,7 @@ gtk_clist_column_title_active (GtkCList *clist,
clist->column[column].button_passive = FALSE;
gtk_signal_disconnect_by_func (GTK_OBJECT (clist->column[column].button),
(GtkSignalFunc) column_title_passive_func,
G_CALLBACK (column_title_passive_func),
NULL);
GTK_WIDGET_SET_FLAGS (clist->column[column].button, GTK_CAN_FOCUS);
......@@ -1406,7 +1406,8 @@ gtk_clist_column_title_passive (GtkCList *clist,
gtk_button_leave (button);
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);
if (GTK_WIDGET_VISIBLE (clist))
......@@ -2138,7 +2139,7 @@ column_button_create (GtkCList *clist,
gtk_widget_set_parent (button, GTK_WIDGET (clist));
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) column_button_clicked,
G_CALLBACK (column_button_clicked),
(gpointer) clist);
gtk_widget_show (button);
}
......
......@@ -985,46 +985,46 @@ gtk_list_insert_items (GtkList *list,
gtk_widget_set_parent (widget, GTK_WIDGET (list));
gtk_signal_connect (GTK_OBJECT (widget), "drag-begin",
GTK_SIGNAL_FUNC (gtk_list_signal_drag_begin),
G_CALLBACK (gtk_list_signal_drag_begin),
list);
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);
gtk_signal_connect (GTK_OBJECT (widget), "select-all",
GTK_SIGNAL_FUNC (gtk_list_signal_select_all),
G_CALLBACK (gtk_list_signal_select_all),
list);
gtk_signal_connect (GTK_OBJECT (widget), "unselect-all",
GTK_SIGNAL_FUNC (gtk_list_signal_unselect_all),
G_CALLBACK (gtk_list_signal_unselect_all),
list);
gtk_signal_connect (GTK_OBJECT (widget), "undo-selection",
GTK_SIGNAL_FUNC (gtk_list_signal_undo_selection),
G_CALLBACK (gtk_list_signal_undo_selection),
list);
gtk_signal_connect (GTK_OBJECT (widget), "start-selection",
GTK_SIGNAL_FUNC (gtk_list_signal_start_selection),
G_CALLBACK (gtk_list_signal_start_selection),
list);
gtk_signal_connect (GTK_OBJECT (widget), "end-selection",
GTK_SIGNAL_FUNC (gtk_list_signal_end_selection),
G_CALLBACK (gtk_list_signal_end_selection),
list);
gtk_signal_connect (GTK_OBJECT (widget), "extend-selection",
GTK_SIGNAL_FUNC (gtk_list_signal_extend_selection),
G_CALLBACK (gtk_list_signal_extend_selection),
list);
gtk_signal_connect (GTK_OBJECT (widget), "scroll-horizontal",
GTK_SIGNAL_FUNC (gtk_list_signal_scroll_horizontal),
G_CALLBACK (gtk_list_signal_scroll_horizontal),
list);
gtk_signal_connect (GTK_OBJECT (widget), "scroll-vertical",
GTK_SIGNAL_FUNC (gtk_list_signal_scroll_vertical),
G_CALLBACK (gtk_list_signal_scroll_vertical),
list);
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);
gtk_signal_connect (GTK_OBJECT (widget), "select",
GTK_SIGNAL_FUNC (gtk_list_signal_item_select),
G_CALLBACK (gtk_list_signal_item_select),
list);
gtk_signal_connect (GTK_OBJECT (widget), "deselect",
GTK_SIGNAL_FUNC (gtk_list_signal_item_deselect),
G_CALLBACK (gtk_list_signal_item_deselect),
list);
gtk_signal_connect (GTK_OBJECT (widget), "toggle",
GTK_SIGNAL_FUNC (gtk_list_signal_item_toggle),
G_CALLBACK (gtk_list_signal_item_toggle),
list);
}
......
......@@ -2450,7 +2450,7 @@ gtk_print (gchar *str)
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) gtk_widget_destroyed,
G_CALLBACK (gtk_widget_destroyed),
&window);
gtk_window_set_title (GTK_WINDOW (window), "Messages");
......@@ -2501,7 +2501,7 @@ gtk_print (gchar *str)
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_hide,
G_CALLBACK (gtk_widget_hide),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
......
......@@ -102,7 +102,7 @@ gtk_signal_emit_stop_by_name (GtkObject *object,
void
gtk_signal_connect_object_while_alive (GtkObject *object,
const gchar *name,
GtkSignalFunc func,
GCallback func,
GtkObject *alive_object)
{
g_return_if_fail (GTK_IS_OBJECT (object));
......@@ -116,7 +116,7 @@ gtk_signal_connect_object_while_alive (GtkObject *object,
void
gtk_signal_connect_while_alive (GtkObject *object,
const gchar *name,
GtkSignalFunc func,
GCallback func,
gpointer func_data,
GtkObject *alive_object)
{
......@@ -135,7 +135,7 @@ gtk_signal_connect_while_alive (GtkObject *object,
gulong
gtk_signal_connect_full (GtkObject *object,
const gchar *name,
GtkSignalFunc func,
GCallback func,
GtkCallbackMarshal unsupported,
gpointer data,
GDestroyNotify destroy_func,
......@@ -157,7 +157,7 @@ gtk_signal_connect_full (GtkObject *object,
void
gtk_signal_compat_matched (GtkObject *object,
GtkSignalFunc func,
GCallback func,
gpointer data,
GSignalMatchType match,
guint action)
......
......@@ -38,7 +38,7 @@ G_BEGIN_DECLS
/* --- compat defines --- */
#define GTK_SIGNAL_OFFSET GTK_STRUCT_OFFSET
#define GTK_SIGNAL_OFFSET G_STRUCT_OFFSET
#define gtk_signal_lookup(name,object_type) \
g_signal_lookup ((name), (object_type))
#define gtk_signal_name(signal_id) \
......@@ -91,34 +91,34 @@ G_BEGIN_DECLS
/* --- compat functions --- */
guint gtk_signal_newv (const gchar *name,
GtkSignalRunType signal_flags,
GtkType object_type,
GType object_type,
guint function_offset,
GtkSignalMarshaller marshaller,
GtkType return_val,
GType return_val,
guint n_args,
GtkType *args);
GType *args);
guint gtk_signal_new (const gchar *name,
GtkSignalRunType signal_flags,
GtkType object_type,
GType object_type,
guint function_offset,
GtkSignalMarshaller marshaller,
GtkType return_val,
GType return_val,
guint n_args,
...);
void gtk_signal_emit_stop_by_name (GtkObject *object,
const gchar *name);
void gtk_signal_connect_object_while_alive (GtkObject *object,
const gchar *name,
GtkSignalFunc func,
GCallback func,
GtkObject *alive_object);
void gtk_signal_connect_while_alive (GtkObject *object,
const gchar *name,
GtkSignalFunc func,
GCallback func,
gpointer func_data,
GtkObject *alive_object);
gulong gtk_signal_connect_full (GtkObject *object,
const gchar *name,
GtkSignalFunc func,
GCallback func,
GtkCallbackMarshal unsupported,
gpointer data,
GDestroyNotify destroy_func,
......@@ -137,7 +137,7 @@ void gtk_signal_emitv_by_name (GtkObject *object,
const gchar *name,
GtkArg *args);
void gtk_signal_compat_matched (GtkObject *object,
GtkSignalFunc func,
GCallback func,
gpointer data,
GSignalMatchType match,
guint action);
......
......@@ -812,13 +812,13 @@ gtk_text_set_adjustments (GtkText *text,
g_object_ref_sink (text->hadj);
gtk_signal_connect (GTK_OBJECT (text->hadj), "changed",
(GtkSignalFunc) gtk_text_adjustment,
G_CALLBACK (gtk_text_adjustment),
text);
gtk_signal_connect (GTK_OBJECT (text->hadj), "value-changed",
(GtkSignalFunc) gtk_text_adjustment,
G_CALLBACK (gtk_text_adjustment),
text);
gtk_signal_connect (GTK_OBJECT (text->hadj), "destroy",
(GtkSignalFunc) gtk_text_adjustment_destroyed,
G_CALLBACK (gtk_text_adjustment_destroyed),
text);
gtk_text_adjustment (hadj, text);
......@@ -831,13 +831,13 @@ gtk_text_set_adjustments (GtkText *text,
g_object_ref_sink (text->vadj);
gtk_signal_connect (GTK_OBJECT (text->vadj), "changed",
(GtkSignalFunc) gtk_text_adjustment,
G_CALLBACK (gtk_text_adjustment),
text);
gtk_signal_connect (GTK_OBJECT (text->vadj), "value-changed",
(GtkSignalFunc) gtk_text_adjustment,
G_CALLBACK (gtk_text_adjustment),
text);
gtk_signal_connect (GTK_OBJECT (text->vadj), "destroy",
(GtkSignalFunc) gtk_text_adjustment_destroyed,
G_CALLBACK (gtk_text_adjustment_destroyed),
text);
gtk_text_adjustment (vadj, text);
......
......@@ -231,13 +231,13 @@ gtk_tree_item_init (GtkTreeItem *tree_item)
eventbox = gtk_event_box_new();
gtk_widget_set_events (eventbox, GDK_BUTTON_PRESS_MASK);
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);
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);
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);
gtk_object_set_user_data(GTK_OBJECT(eventbox), tree_item);
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