forked from AuroraMiddleware/gtk
Use G_CALLBACK() instead deprecated GTK_SIGNAL_FUNC()
This commit is contained in:
parent
016093d007
commit
1b0d2fcd51
@ -1910,7 +1910,7 @@ given item, and perform the cast. Some common ones you will see are:</para>
|
||||
G_OBJECT (object)
|
||||
GTK_WIDGET (widget)
|
||||
GTK_OBJECT (object)
|
||||
GTK_SIGNAL_FUNC (function)
|
||||
G_CALLBACK (function)
|
||||
GTK_CONTAINER (container)
|
||||
GTK_WINDOW (window)
|
||||
GTK_BOX (box)
|
||||
@ -6145,7 +6145,7 @@ gint main( gint argc,
|
||||
gtk_widget_set_events (drawingarea, GDK_BUTTON_PRESS_MASK);
|
||||
|
||||
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 */
|
||||
|
||||
@ -7642,7 +7642,7 @@ the toolbar widget.</para>
|
||||
"Closes this app", /* this button's tooltip */
|
||||
"Private", /* tooltip private info */
|
||||
iconw, /* icon widget */
|
||||
GTK_SIGNAL_FUNC (delete_event), /* a signal */
|
||||
G_CALLBACK (delete_event), /* a signal */
|
||||
NULL);
|
||||
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); /* space after item */
|
||||
</programlisting>
|
||||
@ -7666,7 +7666,7 @@ widget, so that we can work with it in the normal way.</para>
|
||||
"Only icons in toolbar", /* tooltip */
|
||||
"Private", /* tooltip private string */
|
||||
iconw, /* icon */
|
||||
GTK_SIGNAL_FUNC (radio_event), /* signal */
|
||||
G_CALLBACK (radio_event), /* signal */
|
||||
toolbar); /* data for signal */
|
||||
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
|
||||
</programlisting>
|
||||
@ -7692,7 +7692,7 @@ tutorial).</para>
|
||||
"Only texts in toolbar",
|
||||
"Private",
|
||||
iconw,
|
||||
GTK_SIGNAL_FUNC (radio_event),
|
||||
G_CALLBACK (radio_event),
|
||||
toolbar);
|
||||
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
|
||||
|
||||
@ -7705,7 +7705,7 @@ tutorial).</para>
|
||||
"Icons and text in toolbar",
|
||||
"Private",
|
||||
iconw,
|
||||
GTK_SIGNAL_FUNC (radio_event),
|
||||
G_CALLBACK (radio_event),
|
||||
toolbar);
|
||||
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (both_button), TRUE);
|
||||
@ -7726,7 +7726,7 @@ between them).</para>
|
||||
"Toolbar with or without tips",
|
||||
"Private",
|
||||
iconw,
|
||||
GTK_SIGNAL_FUNC (toggle_event),
|
||||
G_CALLBACK (toggle_event),
|
||||
toolbar);
|
||||
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
|
||||
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_signal_connect (GTK_OBJECT (adjustment), "changed",
|
||||
GTK_SIGNAL_FUNC (gtk_dial_adjustment_changed),
|
||||
G_CALLBACK (gtk_dial_adjustment_changed),
|
||||
(gpointer) dial);
|
||||
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);
|
||||
|
||||
dial->old_value = adjustment->value;
|
||||
|
@ -97,7 +97,7 @@ gint main( gint argc,
|
||||
/* Attach to the "delete" and "destroy" events so we can exit */
|
||||
|
||||
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 */
|
||||
|
||||
@ -113,7 +113,7 @@ gint main( gint argc,
|
||||
gtk_widget_set_events (drawingarea, GDK_BUTTON_PRESS_MASK);
|
||||
|
||||
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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user