Use G_CALLBACK() instead deprecated GTK_SIGNAL_FUNC()
This commit is contained in:
@ -1910,7 +1910,7 @@ given item, and perform the cast. Some common ones you will see are:</para>
|
|||||||
G_OBJECT (object)
|
G_OBJECT (object)
|
||||||
GTK_WIDGET (widget)
|
GTK_WIDGET (widget)
|
||||||
GTK_OBJECT (object)
|
GTK_OBJECT (object)
|
||||||
GTK_SIGNAL_FUNC (function)
|
G_CALLBACK (function)
|
||||||
GTK_CONTAINER (container)
|
GTK_CONTAINER (container)
|
||||||
GTK_WINDOW (window)
|
GTK_WINDOW (window)
|
||||||
GTK_BOX (box)
|
GTK_BOX (box)
|
||||||
@ -6145,7 +6145,7 @@ gint main( gint argc,
|
|||||||
gtk_widget_set_events (drawingarea, GDK_BUTTON_PRESS_MASK);
|
gtk_widget_set_events (drawingarea, GDK_BUTTON_PRESS_MASK);
|
||||||
|
|
||||||
g_signal_connect (GTK_OBJECT (drawingarea), "event",
|
g_signal_connect (GTK_OBJECT (drawingarea), "event",
|
||||||
GTK_SIGNAL_FUNC (area_event), (gpointer) drawingarea);
|
G_CALLBACK (area_event), (gpointer) drawingarea);
|
||||||
|
|
||||||
/* Add drawingarea to window, then show them both */
|
/* Add drawingarea to window, then show them both */
|
||||||
|
|
||||||
@ -7642,7 +7642,7 @@ the toolbar widget.</para>
|
|||||||
"Closes this app", /* this button's tooltip */
|
"Closes this app", /* this button's tooltip */
|
||||||
"Private", /* tooltip private info */
|
"Private", /* tooltip private info */
|
||||||
iconw, /* icon widget */
|
iconw, /* icon widget */
|
||||||
GTK_SIGNAL_FUNC (delete_event), /* a signal */
|
G_CALLBACK (delete_event), /* a signal */
|
||||||
NULL);
|
NULL);
|
||||||
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); /* space after item */
|
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); /* space after item */
|
||||||
</programlisting>
|
</programlisting>
|
||||||
@ -7666,7 +7666,7 @@ widget, so that we can work with it in the normal way.</para>
|
|||||||
"Only icons in toolbar", /* tooltip */
|
"Only icons in toolbar", /* tooltip */
|
||||||
"Private", /* tooltip private string */
|
"Private", /* tooltip private string */
|
||||||
iconw, /* icon */
|
iconw, /* icon */
|
||||||
GTK_SIGNAL_FUNC (radio_event), /* signal */
|
G_CALLBACK (radio_event), /* signal */
|
||||||
toolbar); /* data for signal */
|
toolbar); /* data for signal */
|
||||||
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
|
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
|
||||||
</programlisting>
|
</programlisting>
|
||||||
@ -7692,7 +7692,7 @@ tutorial).</para>
|
|||||||
"Only texts in toolbar",
|
"Only texts in toolbar",
|
||||||
"Private",
|
"Private",
|
||||||
iconw,
|
iconw,
|
||||||
GTK_SIGNAL_FUNC (radio_event),
|
G_CALLBACK (radio_event),
|
||||||
toolbar);
|
toolbar);
|
||||||
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
|
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
|
||||||
|
|
||||||
@ -7705,7 +7705,7 @@ tutorial).</para>
|
|||||||
"Icons and text in toolbar",
|
"Icons and text in toolbar",
|
||||||
"Private",
|
"Private",
|
||||||
iconw,
|
iconw,
|
||||||
GTK_SIGNAL_FUNC (radio_event),
|
G_CALLBACK (radio_event),
|
||||||
toolbar);
|
toolbar);
|
||||||
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
|
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (both_button), TRUE);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (both_button), TRUE);
|
||||||
@ -7726,7 +7726,7 @@ between them).</para>
|
|||||||
"Toolbar with or without tips",
|
"Toolbar with or without tips",
|
||||||
"Private",
|
"Private",
|
||||||
iconw,
|
iconw,
|
||||||
GTK_SIGNAL_FUNC (toggle_event),
|
G_CALLBACK (toggle_event),
|
||||||
toolbar);
|
toolbar);
|
||||||
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
|
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tooltips_button), TRUE);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tooltips_button), TRUE);
|
||||||
@ -15065,10 +15065,10 @@ gtk_dial_set_adjustment (GtkDial *dial,
|
|||||||
g_object_ref (GTK_OBJECT (dial->adjustment));
|
g_object_ref (GTK_OBJECT (dial->adjustment));
|
||||||
|
|
||||||
g_signal_connect (GTK_OBJECT (adjustment), "changed",
|
g_signal_connect (GTK_OBJECT (adjustment), "changed",
|
||||||
GTK_SIGNAL_FUNC (gtk_dial_adjustment_changed),
|
G_CALLBACK (gtk_dial_adjustment_changed),
|
||||||
(gpointer) dial);
|
(gpointer) dial);
|
||||||
g_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
g_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
||||||
GTK_SIGNAL_FUNC (gtk_dial_adjustment_value_changed),
|
G_CALLBACK (gtk_dial_adjustment_value_changed),
|
||||||
(gpointer) dial);
|
(gpointer) dial);
|
||||||
|
|
||||||
dial->old_value = adjustment->value;
|
dial->old_value = adjustment->value;
|
||||||
|
|||||||
@ -97,7 +97,7 @@ gint main( gint argc,
|
|||||||
/* Attach to the "delete" and "destroy" events so we can exit */
|
/* Attach to the "delete" and "destroy" events so we can exit */
|
||||||
|
|
||||||
g_signal_connect (GTK_OBJECT (window), "delete_event",
|
g_signal_connect (GTK_OBJECT (window), "delete_event",
|
||||||
GTK_SIGNAL_FUNC (destroy_window), (gpointer) window);
|
G_CALLBACK (destroy_window), (gpointer) window);
|
||||||
|
|
||||||
/* Create drawingarea, set size and catch button events */
|
/* Create drawingarea, set size and catch button events */
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ gint main( gint argc,
|
|||||||
gtk_widget_set_events (drawingarea, GDK_BUTTON_PRESS_MASK);
|
gtk_widget_set_events (drawingarea, GDK_BUTTON_PRESS_MASK);
|
||||||
|
|
||||||
g_signal_connect (GTK_OBJECT (drawingarea), "event",
|
g_signal_connect (GTK_OBJECT (drawingarea), "event",
|
||||||
GTK_SIGNAL_FUNC (area_event), (gpointer) drawingarea);
|
G_CALLBACK (area_event), (gpointer) drawingarea);
|
||||||
|
|
||||||
/* Add drawingarea to window, then show them both */
|
/* Add drawingarea to window, then show them both */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user