diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2013-07-26 13:49:49 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2013-07-26 13:52:15 -0400 |
commit | 89ae3524a32b8532b9b1da836eaa8b610feec22d (patch) | |
tree | 2fdf029b998abf6323c00c805f529f7216aa076d /examples | |
parent | 62aa54f536d548a2abff6f84dc01ee666193419d (diff) | |
download | gtk+-89ae3524a32b8532b9b1da836eaa8b610feec22d.tar.gz |
Rename the widget template API
The macros and functions are inconsistently named, and are not tied to
the "template" concept - to the point that it seems plausible to use
them without setting the template.
The new naming scheme is as follows:
gtk_widget_class_bind_template_child_full
gtk_widget_class_bind_template_callback_full
With the convenience macros:
gtk_widget_class_bind_template_child
gtk_widget_class_bind_template_child_internal
gtk_widget_class_bind_template_callback
https://bugzilla.gnome.org/show_bug.cgi?id=700898
https://bugzilla.gnome.org/show_bug.cgi?id=700896
Diffstat (limited to 'examples')
-rw-r--r-- | examples/application3/exampleappwin.c | 2 | ||||
-rw-r--r-- | examples/application4/exampleappwin.c | 2 | ||||
-rw-r--r-- | examples/application5/exampleappwin.c | 2 | ||||
-rw-r--r-- | examples/application6/exampleappprefs.c | 6 | ||||
-rw-r--r-- | examples/application6/exampleappwin.c | 2 | ||||
-rw-r--r-- | examples/application7/exampleappprefs.c | 6 | ||||
-rw-r--r-- | examples/application7/exampleappwin.c | 8 | ||||
-rw-r--r-- | examples/application8/exampleappprefs.c | 6 | ||||
-rw-r--r-- | examples/application8/exampleappwin.c | 14 | ||||
-rw-r--r-- | examples/application9/exampleappprefs.c | 6 | ||||
-rw-r--r-- | examples/application9/exampleappwin.c | 18 |
11 files changed, 36 insertions, 36 deletions
diff --git a/examples/application3/exampleappwin.c b/examples/application3/exampleappwin.c index 3493d0e8ba..5977ff9d31 100644 --- a/examples/application3/exampleappwin.c +++ b/examples/application3/exampleappwin.c @@ -32,7 +32,7 @@ example_app_window_class_init (ExampleAppWindowClass *class) { gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class), "/org/gtk/exampleapp/window.ui"); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, stack); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, stack); } ExampleAppWindow * diff --git a/examples/application4/exampleappwin.c b/examples/application4/exampleappwin.c index 3493d0e8ba..5977ff9d31 100644 --- a/examples/application4/exampleappwin.c +++ b/examples/application4/exampleappwin.c @@ -32,7 +32,7 @@ example_app_window_class_init (ExampleAppWindowClass *class) { gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class), "/org/gtk/exampleapp/window.ui"); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, stack); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, stack); } ExampleAppWindow * diff --git a/examples/application5/exampleappwin.c b/examples/application5/exampleappwin.c index 34b148a90a..265238dfaa 100644 --- a/examples/application5/exampleappwin.c +++ b/examples/application5/exampleappwin.c @@ -57,7 +57,7 @@ example_app_window_class_init (ExampleAppWindowClass *class) gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class), "/org/gtk/exampleapp/window.ui"); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, stack); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, stack); } ExampleAppWindow * diff --git a/examples/application6/exampleappprefs.c b/examples/application6/exampleappprefs.c index c20baa11b8..559ab53576 100644 --- a/examples/application6/exampleappprefs.c +++ b/examples/application6/exampleappprefs.c @@ -59,9 +59,9 @@ example_app_prefs_class_init (ExampleAppPrefsClass *class) gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class), "/org/gtk/exampleapp/prefs.ui"); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, font); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, transition); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, close); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, font); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, transition); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, close); } ExampleAppPrefs * diff --git a/examples/application6/exampleappwin.c b/examples/application6/exampleappwin.c index 008cfdbfaa..a36ea29bfe 100644 --- a/examples/application6/exampleappwin.c +++ b/examples/application6/exampleappwin.c @@ -54,7 +54,7 @@ example_app_window_class_init (ExampleAppWindowClass *class) gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class), "/org/gtk/exampleapp/window.ui"); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, stack); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, stack); } ExampleAppWindow * diff --git a/examples/application7/exampleappprefs.c b/examples/application7/exampleappprefs.c index 1effb8c1c6..c6d6bd35e9 100644 --- a/examples/application7/exampleappprefs.c +++ b/examples/application7/exampleappprefs.c @@ -63,9 +63,9 @@ example_app_prefs_class_init (ExampleAppPrefsClass *class) gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class), "/org/gtk/exampleapp/prefs.ui"); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, font); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, transition); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, close); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, font); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, transition); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, close); } ExampleAppPrefs * diff --git a/examples/application7/exampleappwin.c b/examples/application7/exampleappwin.c index 165af0a807..616bdc8ef2 100644 --- a/examples/application7/exampleappwin.c +++ b/examples/application7/exampleappwin.c @@ -116,10 +116,10 @@ example_app_window_class_init (ExampleAppWindowClass *class) gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class), "/org/gtk/exampleapp/window.ui"); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, stack); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, search); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, searchbar); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, searchentry); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, stack); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, search); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, searchbar); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, searchentry); } ExampleAppWindow * diff --git a/examples/application8/exampleappprefs.c b/examples/application8/exampleappprefs.c index 1effb8c1c6..c6d6bd35e9 100644 --- a/examples/application8/exampleappprefs.c +++ b/examples/application8/exampleappprefs.c @@ -63,9 +63,9 @@ example_app_prefs_class_init (ExampleAppPrefsClass *class) gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class), "/org/gtk/exampleapp/prefs.ui"); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, font); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, transition); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, close); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, font); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, transition); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, close); } ExampleAppPrefs * diff --git a/examples/application8/exampleappwin.c b/examples/application8/exampleappwin.c index cd911a6222..e64030653d 100644 --- a/examples/application8/exampleappwin.c +++ b/examples/application8/exampleappwin.c @@ -219,13 +219,13 @@ example_app_window_class_init (ExampleAppWindowClass *class) gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class), "/org/gtk/exampleapp/window.ui"); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, stack); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, search); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, searchbar); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, searchentry); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, gears); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, words); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, sidebar); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, stack); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, search); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, searchbar); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, searchentry); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, gears); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, words); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, sidebar); } ExampleAppWindow * diff --git a/examples/application9/exampleappprefs.c b/examples/application9/exampleappprefs.c index 1effb8c1c6..c6d6bd35e9 100644 --- a/examples/application9/exampleappprefs.c +++ b/examples/application9/exampleappprefs.c @@ -63,9 +63,9 @@ example_app_prefs_class_init (ExampleAppPrefsClass *class) gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class), "/org/gtk/exampleapp/prefs.ui"); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, font); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, transition); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, close); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, font); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, transition); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppPrefs, close); } ExampleAppPrefs * diff --git a/examples/application9/exampleappwin.c b/examples/application9/exampleappwin.c index 6b0e9e051e..4edecee2ad 100644 --- a/examples/application9/exampleappwin.c +++ b/examples/application9/exampleappwin.c @@ -265,15 +265,15 @@ example_app_window_class_init (ExampleAppWindowClass *class) gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class), "/org/gtk/exampleapp/window.ui"); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, stack); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, search); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, searchbar); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, searchentry); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, gears); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, words); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, sidebar); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, lines); - gtk_widget_class_bind_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, lines_label); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, stack); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, search); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, searchbar); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, searchentry); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, gears); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, words); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, sidebar); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, lines); + gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), ExampleAppWindow, lines_label); } ExampleAppWindow * |