Commit 1bfcf9ba authored by BST 2002  Tony Gale's avatar BST 2002 Tony Gale Committed by Tony Gale
Browse files

update g_connect_signal usage

Sat Aug 24 12:46:37 BST 2002  Tony Gale <gale@gtk.org>

        * docs/tutorial/gtk-tut.sgml, examples/*:
        update g_connect_signal usage

        * docs/faq/gtk-faq.html: spelling/grammar fixes
parent c22b6145
Sat Aug 24 12:46:37 BST 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/gtk-tut.sgml, examples/*:
update g_connect_signal usage
* docs/faq/gtk-faq.html: spelling/grammar fixes
2002-08-21 Tor Lillqvist <tml@iki.fi>
* gdk/Makefile.am: Move GDK_DEP_LIBS from LDFLAGS to each of the
......
Sat Aug 24 12:46:37 BST 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/gtk-tut.sgml, examples/*:
update g_connect_signal usage
* docs/faq/gtk-faq.html: spelling/grammar fixes
2002-08-21 Tor Lillqvist <tml@iki.fi>
* gdk/Makefile.am: Move GDK_DEP_LIBS from LDFLAGS to each of the
......
Sat Aug 24 12:46:37 BST 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/gtk-tut.sgml, examples/*:
update g_connect_signal usage
* docs/faq/gtk-faq.html: spelling/grammar fixes
2002-08-21 Tor Lillqvist <tml@iki.fi>
* gdk/Makefile.am: Move GDK_DEP_LIBS from LDFLAGS to each of the
......
Sat Aug 24 12:46:37 BST 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/gtk-tut.sgml, examples/*:
update g_connect_signal usage
* docs/faq/gtk-faq.html: spelling/grammar fixes
2002-08-21 Tor Lillqvist <tml@iki.fi>
* gdk/Makefile.am: Move GDK_DEP_LIBS from LDFLAGS to each of the
......
Sat Aug 24 12:46:37 BST 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/gtk-tut.sgml, examples/*:
update g_connect_signal usage
* docs/faq/gtk-faq.html: spelling/grammar fixes
2002-08-21 Tor Lillqvist <tml@iki.fi>
* gdk/Makefile.am: Move GDK_DEP_LIBS from LDFLAGS to each of the
......
Sat Aug 24 12:46:37 BST 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/gtk-tut.sgml, examples/*:
update g_connect_signal usage
* docs/faq/gtk-faq.html: spelling/grammar fixes
2002-08-21 Tor Lillqvist <tml@iki.fi>
* gdk/Makefile.am: Move GDK_DEP_LIBS from LDFLAGS to each of the
......
......@@ -2,7 +2,7 @@
<book>
<bookinfo>
<date>February 27th 2001</date>
<date>August 24th 2002</date>
<title>GTK+ FAQ</title>
<authorgroup>
<author>
......@@ -601,12 +601,12 @@ successful, try executing it.</para>
<title>Whats this CVS thing that everyone keeps talking about,
and how do I access it?</title>
<para>CVS is the Concurent Version System and is a very
<para>CVS is the Concurrent Version System and is a very
popular means of version control for software projects. It is
designed to allow multiple authors to be able to
simultanously operate on the same source tree. This source
tree is centrally maintained, but each developer has a local
mirror of this repository that they make there changes to.</para>
mirror of this repository that they make their changes to.</para>
<para>The GTK+ developers use a CVS repository to store the
master copy of the current development version of GTK+. As
......@@ -2098,13 +2098,13 @@ void gtk_window_set_policy (GtkWindow *window,
gint auto_shrink);
</programlisting>
<para><literal>Auto_shrink</literal> will automatically shrink
<para><literal>auto_shrink</literal> will automatically shrink
the window when the requested size of the child widgets goes
below the current size of the
window. <literal>Allow_shrink</literal> will give the user the
window. <literal>allow_shrink</literal> will give the user the
authorisation to make the window smaller that it should
normally be. <literal>Allow_grow</literal> will give the user
will have the ability to make the window bigger. The default
normally be. <literal>allow_grow</literal> gives the user
the ability to make the window bigger. The default
values for these parameters are:</para>
<programlisting role="C">
......@@ -2334,7 +2334,7 @@ struct _GList
</programlisting>
<para>A GList structure is just a simple structure for doubly
linked lists. there exist several g_list_*() functions to
linked lists. There exist several g_list_*() functions to
modify a linked list in glib.h. However the
GTK_LIST(MyGtkList)->selection is maintained by the
gtk_list_*() functions and should not be modified.</para>
......@@ -2706,7 +2706,7 @@ gtk_misc_set_alignment(GTK_MISC(label), 1.0f, 1.0f);
<title>How do I set the background color of a GtkLabel
widget?</title>
<para>The Gtklabel widget is one of a few GTK+ widgets that
<para>The GtkLabel widget is one of a few GTK+ widgets that
don't create their own window to render themselves
into. Instead, they draw themselves directly onto their
parents window.</para>
......
This diff is collapsed.
......@@ -220,15 +220,15 @@ void calendar_select_font( GtkWidget *button,
g_signal_connect (G_OBJECT (window), "destroy",
G_CALLBACK (gtk_widget_destroyed),
&calendar->font_dialog);
(gpointer) &calendar->font_dialog);
g_signal_connect (G_OBJECT (GTK_FONT_SELECTION_DIALOG (window)->ok_button),
"clicked", G_CALLBACK (calendar_font_selection_ok),
calendar);
(gpointer) calendar);
g_signal_connect_swapped (G_OBJECT (GTK_FONT_SELECTION_DIALOG (window)->cancel_button),
"clicked",
G_CALLBACK (gtk_widget_destroy),
calendar->font_dialog);
G_OBJECT (calendar->font_dialog));
}
window=calendar->font_dialog;
if (!GTK_WIDGET_VISIBLE (window))
......@@ -310,25 +310,25 @@ void create_calendar()
gtk_container_add( GTK_CONTAINER (frame), calendar);
g_signal_connect (G_OBJECT (calendar), "month_changed",
G_CALLBACK (calendar_month_changed),
&calendar_data);
(gpointer) &calendar_data);
g_signal_connect (G_OBJECT (calendar), "day_selected",
G_CALLBACK (calendar_day_selected),
&calendar_data);
(gpointer) &calendar_data);
g_signal_connect (G_OBJECT (calendar), "day_selected_double_click",
G_CALLBACK (calendar_day_selected_double_click),
&calendar_data);
(gpointer) &calendar_data);
g_signal_connect (G_OBJECT (calendar), "prev_month",
G_CALLBACK (calendar_prev_month),
&calendar_data);
(gpointer) &calendar_data);
g_signal_connect (G_OBJECT (calendar), "next_month",
G_CALLBACK (calendar_next_month),
&calendar_data);
(gpointer) &calendar_data);
g_signal_connect (G_OBJECT (calendar), "prev_year",
G_CALLBACK (calendar_prev_year),
&calendar_data);
(gpointer) &calendar_data);
g_signal_connect (G_OBJECT (calendar), "next_year",
G_CALLBACK (calendar_next_year),
&calendar_data);
(gpointer) &calendar_data);
separator = gtk_vseparator_new ();
......@@ -350,7 +350,7 @@ void create_calendar()
g_signal_connect (G_OBJECT (toggle),
"toggled",
G_CALLBACK (calendar_toggle_flag),
&calendar_data);
(gpointer) &calendar_data);
gtk_box_pack_start (GTK_BOX (vbox3), toggle, TRUE, TRUE, 0);
calendar_data.flag_checkboxes[i] = toggle;
}
......@@ -359,7 +359,7 @@ void create_calendar()
g_signal_connect (G_OBJECT (button),
"clicked",
G_CALLBACK (calendar_select_font),
&calendar_data);
(gpointer) &calendar_data);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
/*
......
......@@ -46,7 +46,7 @@ int main( int argc,
G_CALLBACK (gtk_main_quit), NULL);
g_signal_connect_swapped (G_OBJECT (window), "delete_event",
G_CALLBACK (gtk_widget_destroy),
window);
G_OBJECT (window));
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
......@@ -56,7 +56,7 @@ int main( int argc,
gtk_entry_set_max_length (GTK_ENTRY (entry), 50);
g_signal_connect (G_OBJECT (entry), "activate",
G_CALLBACK (enter_callback),
entry);
(gpointer) entry);
gtk_entry_set_text (GTK_ENTRY (entry), "hello");
tmp_pos = GTK_ENTRY (entry)->text_length;
gtk_editable_insert_text (GTK_EDITABLE (entry), " world", -1, &tmp_pos);
......@@ -72,21 +72,21 @@ int main( int argc,
check = gtk_check_button_new_with_label ("Editable");
gtk_box_pack_start (GTK_BOX (hbox), check, TRUE, TRUE, 0);
g_signal_connect (G_OBJECT (check), "toggled",
G_CALLBACK (entry_toggle_editable), entry);
G_CALLBACK (entry_toggle_editable), (gpointer) entry);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), TRUE);
gtk_widget_show (check);
check = gtk_check_button_new_with_label ("Visible");
gtk_box_pack_start (GTK_BOX (hbox), check, TRUE, TRUE, 0);
g_signal_connect (G_OBJECT (check), "toggled",
G_CALLBACK (entry_toggle_visibility), entry);
G_CALLBACK (entry_toggle_visibility), (gpointer) entry);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), TRUE);
gtk_widget_show (check);
button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
g_signal_connect_swapped (G_OBJECT (button), "clicked",
G_CALLBACK (gtk_widget_destroy),
window);
G_OBJECT (window));
gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_grab_default (button);
......
......@@ -22,13 +22,12 @@ int main( int argc,
G_CALLBACK (gtk_main_quit), NULL);
/* Connect the ok_button to file_ok_sel function */
g_signal_connect (G_OBJECT (GTK_FILE_SELECTION (filew)->ok_button),
"clicked",
G_CALLBACK (file_ok_sel), filew);
"clicked", G_CALLBACK (file_ok_sel), (gpointer) filew);
/* Connect the cancel_button to destroy the widget */
g_signal_connect_swapped (G_OBJECT (GTK_FILE_SELECTION (filew)->cancel_button),
"clicked",
G_CALLBACK (gtk_widget_destroy), filew);
"clicked", G_CALLBACK (gtk_widget_destroy),
G_OBJECT (filew));
/* Lets set the filename, as if this were a save dialog, and we are giving
a default filename */
......
......@@ -53,7 +53,7 @@ int main( int argc,
* function move_button() passing it the Fixed Container as its
* argument. */
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (move_button), fixed);
G_CALLBACK (move_button), (gpointer) fixed);
/* This packs the button into the fixed containers window. */
gtk_fixed_put (GTK_FIXED (fixed), button, i*50, i*50);
......
......@@ -57,7 +57,7 @@ int main( int argc,
gtk_widget_show (label);
g_signal_connect (G_OBJECT (adjustment), "value_changed",
G_CALLBACK (value_changed), label);
G_CALLBACK (value_changed), (gpointer) label);
gtk_widget_show (window);
......
......@@ -79,7 +79,7 @@ int main( int argc,
* signal could come from here, or the window manager. */
g_signal_connect_swapped (G_OBJECT (button), "clicked",
G_CALLBACK (gtk_widget_destroy),
window);
G_OBJECT (window));
/* This packs the button into the window (a gtk container). */
gtk_container_add (GTK_CONTAINER (window), button);
......
......@@ -59,7 +59,7 @@ int main( int argc,
/* Now when the button is clicked, we call the "callback" function
* with a pointer to "button 1" as its argument */
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (callback), "button 1");
G_CALLBACK (callback), (gpointer) "button 1");
/* Instead of gtk_container_add, we pack this button into the invisible
* box, which has been packed into the window. */
......@@ -75,7 +75,7 @@ int main( int argc,
/* Call the same callback function with a different argument,
* passing a pointer to "button 2" instead. */
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (callback), "button 2");
G_CALLBACK (callback), (gpointer) "button 2");
gtk_box_pack_start(GTK_BOX (box1), button, TRUE, TRUE, 0);
......
......@@ -54,7 +54,7 @@ int main( int argc,
/* Do something interesting when the menuitem is selected */
g_signal_connect_swapped (G_OBJECT (menu_items), "activate",
G_CALLBACK (menuitem_response),
g_strdup (buf));
(gpointer) g_strdup (buf));
/* Show the widget */
gtk_widget_show (menu_items);
......@@ -85,7 +85,7 @@ int main( int argc,
button = gtk_button_new_with_label ("press me");
g_signal_connect_swapped (G_OBJECT (button), "event",
G_CALLBACK (button_press),
menu);
G_OBJECT (menu));
gtk_box_pack_end (GTK_BOX (vbox), button, TRUE, TRUE, 2);
gtk_widget_show (button);
......
......@@ -134,35 +134,35 @@ int main( int argc,
button = gtk_button_new_with_label ("next page");
g_signal_connect_swapped (G_OBJECT (button), "clicked",
G_CALLBACK (gtk_notebook_next_page),
notebook);
G_OBJECT (notebook));
gtk_table_attach_defaults (GTK_TABLE (table), button, 1, 2, 1, 2);
gtk_widget_show (button);
button = gtk_button_new_with_label ("prev page");
g_signal_connect_swapped (G_OBJECT (button), "clicked",
G_CALLBACK (gtk_notebook_prev_page),
notebook);
G_OBJECT (notebook));
gtk_table_attach_defaults (GTK_TABLE (table), button, 2, 3, 1, 2);
gtk_widget_show (button);
button = gtk_button_new_with_label ("tab position");
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (rotate_book),
notebook);
(gpointer) notebook);
gtk_table_attach_defaults (GTK_TABLE (table), button, 3, 4, 1, 2);
gtk_widget_show (button);
button = gtk_button_new_with_label ("tabs/border on/off");
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (tabsborder_book),
notebook);
(gpointer) notebook);
gtk_table_attach_defaults (GTK_TABLE (table), button, 4, 5, 1, 2);
gtk_widget_show (button);
button = gtk_button_new_with_label ("remove page");
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (remove_book),
notebook);
(gpointer) notebook);
gtk_table_attach_defaults (GTK_TABLE (table), button, 5, 6, 1, 2);
gtk_widget_show (button);
......
......@@ -261,7 +261,7 @@ int main( int argc,
/* Setup the signal to terminate the program when the button is clicked */
g_signal_connect_swapped (G_OBJECT (button), "clicked",
G_CALLBACK (gtk_main_quit),
window);
G_OBJECT (window));
/* Pack the button into the quitbox.
* The last 3 arguments to gtk_box_pack_start are:
* expand, fill, padding. */
......
......@@ -112,7 +112,7 @@ int main( int argc,
g_signal_connect (G_OBJECT (pdata->window), "destroy",
G_CALLBACK (destroy_progress),
pdata);
(gpointer) pdata);
gtk_window_set_title (GTK_WINDOW (pdata->window), "GtkProgressBar");
gtk_container_set_border_width (GTK_CONTAINER (pdata->window), 0);
......@@ -151,7 +151,7 @@ int main( int argc,
5, 5);
g_signal_connect (G_OBJECT (check), "clicked",
G_CALLBACK (toggle_show_text),
pdata);
(gpointer) pdata);
gtk_widget_show (check);
/* Add a check button to toggle activity mode */
......@@ -161,7 +161,7 @@ int main( int argc,
5, 5);
g_signal_connect (G_OBJECT (check), "clicked",
G_CALLBACK (toggle_activity_mode),
pdata);
(gpointer) pdata);
gtk_widget_show (check);
/* Add a check button to toggle orientation */
......@@ -171,14 +171,14 @@ int main( int argc,
5, 5);
g_signal_connect (G_OBJECT (check), "clicked",
G_CALLBACK (toggle_orientation),
pdata);
(gpointer) pdata);
gtk_widget_show (check);
/* Add a button to exit the program */
button = gtk_button_new_with_label ("close");
g_signal_connect_swapped (G_OBJECT (button), "clicked",
G_CALLBACK (gtk_widget_destroy),
pdata->window);
G_OBJECT (pdata->window));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
/* This makes it so the button is the default. */
......
......@@ -67,7 +67,7 @@ int main( int argc,
button = gtk_button_new_with_label ("close");
g_signal_connect_swapped (G_OBJECT (button), "clicked",
G_CALLBACK (close_application),
window);
G_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_grab_default (button);
......
......@@ -59,7 +59,7 @@ GtkWidget *make_menu_item (gchar *name,
item = gtk_menu_item_new_with_label (name);
g_signal_connect (G_OBJECT (item), "activate",
callback, data);
callback, (gpointer) data);
gtk_widget_show (item);
return item;
......@@ -248,7 +248,7 @@ void create_range_controls( void )
adj2 = gtk_adjustment_new (1.0, 1.0, 101.0, 1.0, 1.0, 0.0);
g_signal_connect (G_OBJECT (adj2), "value_changed",
G_CALLBACK (cb_page_size), adj1);
G_CALLBACK (cb_page_size), (gpointer) adj1);
scale = gtk_hscale_new (GTK_ADJUSTMENT (adj2));
gtk_scale_set_digits (GTK_SCALE (scale), 0);
gtk_box_pack_start (GTK_BOX (box2), scale, TRUE, TRUE, 0);
......
......@@ -47,7 +47,7 @@ int main( int argc,
gtk_ruler_set_range (GTK_RULER (hrule), 7, 13, 0, 20);
g_signal_connect_swapped (G_OBJECT (area), "motion_notify_event",
G_CALLBACK (EVENT_METHOD (hrule, motion_notify_event)),
hrule);
G_OBJECT (hrule));
gtk_table_attach (GTK_TABLE (table), hrule, 1, 2, 0, 1,
GTK_EXPAND|GTK_SHRINK|GTK_FILL, GTK_FILL, 0, 0);
......@@ -59,7 +59,7 @@ int main( int argc,
gtk_ruler_set_range (GTK_RULER (vrule), 0, YSIZE, 10, YSIZE );
g_signal_connect_swapped (G_OBJECT (area), "motion_notify_event",
G_CALLBACK (EVENT_METHOD (vrule, motion_notify_event)),
vrule);
G_OBJECT (vrule));
gtk_table_attach (GTK_TABLE (table), vrule, 0, 1, 1, 2,
GTK_FILL, GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0);
......
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