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
This commit is contained in:
Emmanuele Bassi 2013-07-26 13:49:49 -04:00 committed by Matthias Clasen
parent 62aa54f536
commit 89ae3524a3
39 changed files with 472 additions and 459 deletions

View File

@ -253,22 +253,22 @@ gtk_message_row_class_init (GtkMessageRowClass *klass)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
gtk_widget_class_set_template_from_resource (widget_class, "/listbox/listbox.ui");
gtk_widget_class_bind_child (widget_class, GtkMessageRow, content_label);
gtk_widget_class_bind_child (widget_class, GtkMessageRow, source_name);
gtk_widget_class_bind_child (widget_class, GtkMessageRow, source_nick);
gtk_widget_class_bind_child (widget_class, GtkMessageRow, short_time_label);
gtk_widget_class_bind_child (widget_class, GtkMessageRow, detailed_time_label);
gtk_widget_class_bind_child (widget_class, GtkMessageRow, extra_buttons_box);
gtk_widget_class_bind_child (widget_class, GtkMessageRow, details_revealer);
gtk_widget_class_bind_child (widget_class, GtkMessageRow, avatar_image);
gtk_widget_class_bind_child (widget_class, GtkMessageRow, resent_box);
gtk_widget_class_bind_child (widget_class, GtkMessageRow, resent_by_button);
gtk_widget_class_bind_child (widget_class, GtkMessageRow, n_reshares_label);
gtk_widget_class_bind_child (widget_class, GtkMessageRow, n_favorites_label);
gtk_widget_class_bind_child (widget_class, GtkMessageRow, expand_button);
gtk_widget_class_bind_callback (widget_class, expand_clicked);
gtk_widget_class_bind_callback (widget_class, reshare_clicked);
gtk_widget_class_bind_callback (widget_class, favorite_clicked);
gtk_widget_class_bind_template_child (widget_class, GtkMessageRow, content_label);
gtk_widget_class_bind_template_child (widget_class, GtkMessageRow, source_name);
gtk_widget_class_bind_template_child (widget_class, GtkMessageRow, source_nick);
gtk_widget_class_bind_template_child (widget_class, GtkMessageRow, short_time_label);
gtk_widget_class_bind_template_child (widget_class, GtkMessageRow, detailed_time_label);
gtk_widget_class_bind_template_child (widget_class, GtkMessageRow, extra_buttons_box);
gtk_widget_class_bind_template_child (widget_class, GtkMessageRow, details_revealer);
gtk_widget_class_bind_template_child (widget_class, GtkMessageRow, avatar_image);
gtk_widget_class_bind_template_child (widget_class, GtkMessageRow, resent_box);
gtk_widget_class_bind_template_child (widget_class, GtkMessageRow, resent_by_button);
gtk_widget_class_bind_template_child (widget_class, GtkMessageRow, n_reshares_label);
gtk_widget_class_bind_template_child (widget_class, GtkMessageRow, n_favorites_label);
gtk_widget_class_bind_template_child (widget_class, GtkMessageRow, expand_button);
gtk_widget_class_bind_template_callback (widget_class, expand_clicked);
gtk_widget_class_bind_template_callback (widget_class, reshare_clicked);
gtk_widget_class_bind_template_callback (widget_class, favorite_clicked);
widget_class->state_flags_changed = gtk_message_row_state_flags_changed;
}

View File

@ -5513,10 +5513,10 @@ gtk_widget_compute_expand
gtk_widget_init_template
gtk_widget_class_set_template
gtk_widget_class_set_template_from_resource
gtk_widget_get_automated_child
gtk_widget_class_bind_child
gtk_widget_class_bind_child_internal
gtk_widget_class_automate_child
gtk_widget_get_template_child
gtk_widget_class_bind_template_child
gtk_widget_class_bind_template_child_internal
gtk_widget_class_bind_template_child_full
gtk_widget_class_bind_callback
gtk_widget_class_declare_callback
gtk_widget_class_set_connect_func

View File

@ -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 *

View File

@ -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 *

View File

@ -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 *

View File

@ -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 *

View File

@ -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 *

View File

@ -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 *

View File

@ -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 *

View File

@ -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 *

View File

@ -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 *

View File

@ -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 *

View File

@ -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 *

View File

@ -557,26 +557,26 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gtk/libgtk/gtkaboutdialog.ui");
gtk_widget_class_bind_child (widget_class, GtkAboutDialog, notebook);
gtk_widget_class_bind_child (widget_class, GtkAboutDialog, logo_image);
gtk_widget_class_bind_child (widget_class, GtkAboutDialog, name_label);
gtk_widget_class_bind_child (widget_class, GtkAboutDialog, version_label);
gtk_widget_class_bind_child (widget_class, GtkAboutDialog, comments_label);
gtk_widget_class_bind_child (widget_class, GtkAboutDialog, copyright_label);
gtk_widget_class_bind_child (widget_class, GtkAboutDialog, license_label);
gtk_widget_class_bind_child (widget_class, GtkAboutDialog, website_label);
gtk_widget_class_bind_child (widget_class, GtkAboutDialog, credits_button);
gtk_widget_class_bind_child (widget_class, GtkAboutDialog, license_button);
gtk_widget_class_bind_child (widget_class, GtkAboutDialog, credits_grid);
gtk_widget_class_bind_child (widget_class, GtkAboutDialog, license_view);
gtk_widget_class_bind_template_child (widget_class, GtkAboutDialog, notebook);
gtk_widget_class_bind_template_child (widget_class, GtkAboutDialog, logo_image);
gtk_widget_class_bind_template_child (widget_class, GtkAboutDialog, name_label);
gtk_widget_class_bind_template_child (widget_class, GtkAboutDialog, version_label);
gtk_widget_class_bind_template_child (widget_class, GtkAboutDialog, comments_label);
gtk_widget_class_bind_template_child (widget_class, GtkAboutDialog, copyright_label);
gtk_widget_class_bind_template_child (widget_class, GtkAboutDialog, license_label);
gtk_widget_class_bind_template_child (widget_class, GtkAboutDialog, website_label);
gtk_widget_class_bind_template_child (widget_class, GtkAboutDialog, credits_button);
gtk_widget_class_bind_template_child (widget_class, GtkAboutDialog, license_button);
gtk_widget_class_bind_template_child (widget_class, GtkAboutDialog, credits_grid);
gtk_widget_class_bind_template_child (widget_class, GtkAboutDialog, license_view);
gtk_widget_class_bind_callback (widget_class, credits_button_clicked);
gtk_widget_class_bind_callback (widget_class, license_button_clicked);
gtk_widget_class_bind_callback (widget_class, emit_activate_link);
gtk_widget_class_bind_callback (widget_class, text_view_event_after);
gtk_widget_class_bind_callback (widget_class, text_view_key_press_event);
gtk_widget_class_bind_callback (widget_class, text_view_visibility_notify_event);
gtk_widget_class_bind_callback (widget_class, text_view_motion_notify_event);
gtk_widget_class_bind_template_callback (widget_class, credits_button_clicked);
gtk_widget_class_bind_template_callback (widget_class, license_button_clicked);
gtk_widget_class_bind_template_callback (widget_class, emit_activate_link);
gtk_widget_class_bind_template_callback (widget_class, text_view_event_after);
gtk_widget_class_bind_template_callback (widget_class, text_view_key_press_event);
gtk_widget_class_bind_template_callback (widget_class, text_view_visibility_notify_event);
gtk_widget_class_bind_template_callback (widget_class, text_view_motion_notify_event);
}
static gboolean

View File

@ -660,11 +660,11 @@ gtk_app_chooser_dialog_class_init (GtkAppChooserDialogClass *klass)
widget_class = GTK_WIDGET_CLASS (klass);
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gtk/libgtk/gtkappchooserdialog.ui");
gtk_widget_class_bind_child (widget_class, GtkAppChooserDialog, label);
gtk_widget_class_bind_child (widget_class, GtkAppChooserDialog, button);
gtk_widget_class_bind_child (widget_class, GtkAppChooserDialog, show_more_button);
gtk_widget_class_bind_child (widget_class, GtkAppChooserDialog, inner_box);
gtk_widget_class_bind_callback (widget_class, show_more_button_clicked_cb);
gtk_widget_class_bind_template_child (widget_class, GtkAppChooserDialog, label);
gtk_widget_class_bind_template_child (widget_class, GtkAppChooserDialog, button);
gtk_widget_class_bind_template_child (widget_class, GtkAppChooserDialog, show_more_button);
gtk_widget_class_bind_template_child (widget_class, GtkAppChooserDialog, inner_box);
gtk_widget_class_bind_template_callback (widget_class, show_more_button_clicked_cb);
}
static void

View File

@ -1086,14 +1086,14 @@ gtk_app_chooser_widget_class_init (GtkAppChooserWidgetClass *klass)
widget_class = GTK_WIDGET_CLASS (klass);
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gtk/libgtk/gtkappchooserwidget.ui");
gtk_widget_class_bind_child (widget_class, GtkAppChooserWidget, program_list);
gtk_widget_class_bind_child (widget_class, GtkAppChooserWidget, program_list_store);
gtk_widget_class_bind_child (widget_class, GtkAppChooserWidget, column);
gtk_widget_class_bind_child (widget_class, GtkAppChooserWidget, padding_renderer);
gtk_widget_class_bind_child (widget_class, GtkAppChooserWidget, secondary_padding);
gtk_widget_class_bind_callback (widget_class, refresh_and_emit_app_selected);
gtk_widget_class_bind_callback (widget_class, program_list_selection_activated);
gtk_widget_class_bind_callback (widget_class, widget_button_press_event_cb);
gtk_widget_class_bind_template_child (widget_class, GtkAppChooserWidget, program_list);
gtk_widget_class_bind_template_child (widget_class, GtkAppChooserWidget, program_list_store);
gtk_widget_class_bind_template_child (widget_class, GtkAppChooserWidget, column);
gtk_widget_class_bind_template_child (widget_class, GtkAppChooserWidget, padding_renderer);
gtk_widget_class_bind_template_child (widget_class, GtkAppChooserWidget, secondary_padding);
gtk_widget_class_bind_template_callback (widget_class, refresh_and_emit_app_selected);
gtk_widget_class_bind_template_callback (widget_class, program_list_selection_activated);
gtk_widget_class_bind_template_callback (widget_class, widget_button_press_event_cb);
}
static void

View File

@ -431,26 +431,26 @@ gtk_assistant_class_init (GtkAssistantClass *class)
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gtk/libgtk/gtkassistant.ui");
gtk_widget_class_bind_child_internal (widget_class, GtkAssistant, action_area);
gtk_widget_class_bind_child (widget_class, GtkAssistant, content);
gtk_widget_class_bind_child (widget_class, GtkAssistant, cancel);
gtk_widget_class_bind_child (widget_class, GtkAssistant, forward);
gtk_widget_class_bind_child (widget_class, GtkAssistant, back);
gtk_widget_class_bind_child (widget_class, GtkAssistant, apply);
gtk_widget_class_bind_child (widget_class, GtkAssistant, close);
gtk_widget_class_bind_child (widget_class, GtkAssistant, last);
gtk_widget_class_bind_child (widget_class, GtkAssistant, sidebar);
gtk_widget_class_bind_child (widget_class, GtkAssistant, button_size_group);
gtk_widget_class_bind_child (widget_class, GtkAssistant, title_size_group);
gtk_widget_class_bind_template_child_internal (widget_class, GtkAssistant, action_area);
gtk_widget_class_bind_template_child (widget_class, GtkAssistant, content);
gtk_widget_class_bind_template_child (widget_class, GtkAssistant, cancel);
gtk_widget_class_bind_template_child (widget_class, GtkAssistant, forward);
gtk_widget_class_bind_template_child (widget_class, GtkAssistant, back);
gtk_widget_class_bind_template_child (widget_class, GtkAssistant, apply);
gtk_widget_class_bind_template_child (widget_class, GtkAssistant, close);
gtk_widget_class_bind_template_child (widget_class, GtkAssistant, last);
gtk_widget_class_bind_template_child (widget_class, GtkAssistant, sidebar);
gtk_widget_class_bind_template_child (widget_class, GtkAssistant, button_size_group);
gtk_widget_class_bind_template_child (widget_class, GtkAssistant, title_size_group);
gtk_widget_class_bind_callback (widget_class, assistant_sidebar_draw_cb);
gtk_widget_class_bind_callback (widget_class, assistant_remove_page_cb);
gtk_widget_class_bind_callback (widget_class, on_assistant_close);
gtk_widget_class_bind_callback (widget_class, on_assistant_apply);
gtk_widget_class_bind_callback (widget_class, on_assistant_forward);
gtk_widget_class_bind_callback (widget_class, on_assistant_back);
gtk_widget_class_bind_callback (widget_class, on_assistant_cancel);
gtk_widget_class_bind_callback (widget_class, on_assistant_last);
gtk_widget_class_bind_template_callback (widget_class, assistant_sidebar_draw_cb);
gtk_widget_class_bind_template_callback (widget_class, assistant_remove_page_cb);
gtk_widget_class_bind_template_callback (widget_class, on_assistant_close);
gtk_widget_class_bind_template_callback (widget_class, on_assistant_apply);
gtk_widget_class_bind_template_callback (widget_class, on_assistant_forward);
gtk_widget_class_bind_template_callback (widget_class, on_assistant_back);
gtk_widget_class_bind_template_callback (widget_class, on_assistant_cancel);
gtk_widget_class_bind_template_callback (widget_class, on_assistant_last);
}
static gint

View File

@ -202,12 +202,12 @@ gtk_color_chooser_dialog_class_init (GtkColorChooserDialogClass *class)
*/
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gtk/libgtk/gtkcolorchooserdialog.ui");
gtk_widget_class_bind_child (widget_class, GtkColorChooserDialog, chooser);
gtk_widget_class_bind_child (widget_class, GtkColorChooserDialog, cancel_button);
gtk_widget_class_bind_child (widget_class, GtkColorChooserDialog, select_button);
gtk_widget_class_bind_callback (widget_class, selected_cb);
gtk_widget_class_bind_callback (widget_class, propagate_notify);
gtk_widget_class_bind_callback (widget_class, color_activated_cb);
gtk_widget_class_bind_template_child (widget_class, GtkColorChooserDialog, chooser);
gtk_widget_class_bind_template_child (widget_class, GtkColorChooserDialog, cancel_button);
gtk_widget_class_bind_template_child (widget_class, GtkColorChooserDialog, select_button);
gtk_widget_class_bind_template_callback (widget_class, selected_cb);
gtk_widget_class_bind_template_callback (widget_class, propagate_notify);
gtk_widget_class_bind_template_callback (widget_class, color_activated_cb);
}
static void

View File

@ -464,34 +464,34 @@ gtk_color_editor_class_init (GtkColorEditorClass *class)
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gtk/libgtk/gtkcoloreditor.ui");
gtk_widget_class_bind_child (widget_class, GtkColorEditor, overlay);
gtk_widget_class_bind_child (widget_class, GtkColorEditor, grid);
gtk_widget_class_bind_child (widget_class, GtkColorEditor, swatch);
gtk_widget_class_bind_child (widget_class, GtkColorEditor, entry);
gtk_widget_class_bind_child (widget_class, GtkColorEditor, h_slider);
gtk_widget_class_bind_child (widget_class, GtkColorEditor, h_popup);
gtk_widget_class_bind_child (widget_class, GtkColorEditor, h_entry);
gtk_widget_class_bind_child (widget_class, GtkColorEditor, a_slider);
gtk_widget_class_bind_child (widget_class, GtkColorEditor, a_popup);
gtk_widget_class_bind_child (widget_class, GtkColorEditor, a_entry);
gtk_widget_class_bind_child (widget_class, GtkColorEditor, sv_plane);
gtk_widget_class_bind_child (widget_class, GtkColorEditor, sv_popup);
gtk_widget_class_bind_child (widget_class, GtkColorEditor, s_entry);
gtk_widget_class_bind_child (widget_class, GtkColorEditor, v_entry);
gtk_widget_class_bind_child (widget_class, GtkColorEditor, h_adj);
gtk_widget_class_bind_child (widget_class, GtkColorEditor, s_adj);
gtk_widget_class_bind_child (widget_class, GtkColorEditor, v_adj);
gtk_widget_class_bind_child (widget_class, GtkColorEditor, a_adj);
gtk_widget_class_bind_template_child (widget_class, GtkColorEditor, overlay);
gtk_widget_class_bind_template_child (widget_class, GtkColorEditor, grid);
gtk_widget_class_bind_template_child (widget_class, GtkColorEditor, swatch);
gtk_widget_class_bind_template_child (widget_class, GtkColorEditor, entry);
gtk_widget_class_bind_template_child (widget_class, GtkColorEditor, h_slider);
gtk_widget_class_bind_template_child (widget_class, GtkColorEditor, h_popup);
gtk_widget_class_bind_template_child (widget_class, GtkColorEditor, h_entry);
gtk_widget_class_bind_template_child (widget_class, GtkColorEditor, a_slider);
gtk_widget_class_bind_template_child (widget_class, GtkColorEditor, a_popup);
gtk_widget_class_bind_template_child (widget_class, GtkColorEditor, a_entry);
gtk_widget_class_bind_template_child (widget_class, GtkColorEditor, sv_plane);
gtk_widget_class_bind_template_child (widget_class, GtkColorEditor, sv_popup);
gtk_widget_class_bind_template_child (widget_class, GtkColorEditor, s_entry);
gtk_widget_class_bind_template_child (widget_class, GtkColorEditor, v_entry);
gtk_widget_class_bind_template_child (widget_class, GtkColorEditor, h_adj);
gtk_widget_class_bind_template_child (widget_class, GtkColorEditor, s_adj);
gtk_widget_class_bind_template_child (widget_class, GtkColorEditor, v_adj);
gtk_widget_class_bind_template_child (widget_class, GtkColorEditor, a_adj);
gtk_widget_class_bind_callback (widget_class, hsv_changed);
gtk_widget_class_bind_callback (widget_class, popup_draw);
gtk_widget_class_bind_callback (widget_class, popup_key_press);
gtk_widget_class_bind_callback (widget_class, dismiss_current_popup);
gtk_widget_class_bind_callback (widget_class, get_child_position);
gtk_widget_class_bind_callback (widget_class, entry_text_changed);
gtk_widget_class_bind_callback (widget_class, entry_apply);
gtk_widget_class_bind_callback (widget_class, entry_focus_out);
gtk_widget_class_bind_callback (widget_class, popup_edit);
gtk_widget_class_bind_template_callback (widget_class, hsv_changed);
gtk_widget_class_bind_template_callback (widget_class, popup_draw);
gtk_widget_class_bind_template_callback (widget_class, popup_key_press);
gtk_widget_class_bind_template_callback (widget_class, dismiss_current_popup);
gtk_widget_class_bind_template_callback (widget_class, get_child_position);
gtk_widget_class_bind_template_callback (widget_class, entry_text_changed);
gtk_widget_class_bind_template_callback (widget_class, entry_apply);
gtk_widget_class_bind_template_callback (widget_class, entry_focus_out);
gtk_widget_class_bind_template_callback (widget_class, popup_edit);
}
static void

View File

@ -331,9 +331,9 @@ gtk_dialog_class_init (GtkDialogClass *class)
/* Bind class to template
*/
gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/gtkdialog.ui");
gtk_widget_class_bind_child_internal (widget_class, GtkDialog, vbox);
gtk_widget_class_bind_child_internal (widget_class, GtkDialog, action_area);
gtk_widget_class_bind_callback (widget_class, gtk_dialog_delete_event_handler);
gtk_widget_class_bind_template_child_internal (widget_class, GtkDialog, vbox);
gtk_widget_class_bind_template_child_internal (widget_class, GtkDialog, action_area);
gtk_widget_class_bind_template_callback (widget_class, gtk_dialog_delete_event_handler);
}
static void

View File

@ -472,17 +472,17 @@ gtk_file_chooser_button_class_init (GtkFileChooserButtonClass * class)
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gtk/libgtk/gtkfilechooserbutton.ui");
gtk_widget_class_bind_child (widget_class, GtkFileChooserButton, model);
gtk_widget_class_bind_child (widget_class, GtkFileChooserButton, button);
gtk_widget_class_bind_child (widget_class, GtkFileChooserButton, image);
gtk_widget_class_bind_child (widget_class, GtkFileChooserButton, label);
gtk_widget_class_bind_child (widget_class, GtkFileChooserButton, combo_box);
gtk_widget_class_bind_child (widget_class, GtkFileChooserButton, icon_cell);
gtk_widget_class_bind_child (widget_class, GtkFileChooserButton, name_cell);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserButton, model);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserButton, button);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserButton, image);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserButton, label);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserButton, combo_box);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserButton, icon_cell);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserButton, name_cell);
gtk_widget_class_bind_callback (widget_class, button_clicked_cb);
gtk_widget_class_bind_callback (widget_class, combo_box_changed_cb);
gtk_widget_class_bind_callback (widget_class, combo_box_notify_popup_shown_cb);
gtk_widget_class_bind_template_callback (widget_class, button_clicked_cb);
gtk_widget_class_bind_template_callback (widget_class, combo_box_changed_cb);
gtk_widget_class_bind_template_callback (widget_class, combo_box_notify_popup_shown_cb);
}
static void

View File

@ -7460,58 +7460,56 @@ _gtk_file_chooser_default_class_init (GtkFileChooserDefaultClass *class)
_gtk_file_chooser_install_properties (gobject_class);
/* Bind class to template */
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gtk/libgtk/gtkfilechooserdefault.ui");
/* A *lot* of widgets that we need to handle .... */
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, browse_widgets_box);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, browse_widgets_hpaned);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, browse_header_box);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, browse_widgets_box);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, places_sidebar);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, browse_files_tree_view);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, browse_new_folder_button);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, browse_path_bar_hbox);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, browse_path_bar_size_group);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, browse_path_bar);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, browse_special_mode_icon);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, browse_special_mode_label);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, browse_select_a_folder_info_bar);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, browse_select_a_folder_label);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, browse_select_a_folder_icon);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, filter_combo_hbox);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, filter_combo);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, preview_box);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, extra_align);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, location_button);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, location_entry_box);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, location_label);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, list_name_column);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, list_pixbuf_renderer);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, list_name_renderer);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, list_mtime_column);
gtk_widget_class_bind_child (widget_class, GtkFileChooserDefault, list_size_column);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, browse_widgets_box);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, browse_widgets_hpaned);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, browse_header_box);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, browse_widgets_box);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, places_sidebar);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, browse_files_tree_view);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, browse_new_folder_button);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, browse_path_bar_hbox);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, browse_path_bar_size_group);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, browse_path_bar);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, browse_special_mode_icon);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, browse_special_mode_label);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, browse_select_a_folder_info_bar);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, browse_select_a_folder_label);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, browse_select_a_folder_icon);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, filter_combo_hbox);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, filter_combo);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, preview_box);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, extra_align);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, location_button);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, location_entry_box);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, location_label);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, list_name_column);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, list_pixbuf_renderer);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, list_name_renderer);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, list_mtime_column);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDefault, list_size_column);
/* And a *lot* of callbacks to bind ... */
gtk_widget_class_bind_callback (widget_class, browse_files_key_press_event_cb);
gtk_widget_class_bind_callback (widget_class, file_list_drag_drop_cb);
gtk_widget_class_bind_callback (widget_class, file_list_drag_data_received_cb);
gtk_widget_class_bind_callback (widget_class, list_popup_menu_cb);
gtk_widget_class_bind_callback (widget_class, file_list_query_tooltip_cb);
gtk_widget_class_bind_callback (widget_class, list_button_press_event_cb);
gtk_widget_class_bind_callback (widget_class, list_row_activated);
gtk_widget_class_bind_callback (widget_class, file_list_drag_motion_cb);
gtk_widget_class_bind_callback (widget_class, list_selection_changed);
gtk_widget_class_bind_callback (widget_class, renderer_editing_canceled_cb);
gtk_widget_class_bind_callback (widget_class, renderer_edited_cb);
gtk_widget_class_bind_callback (widget_class, filter_combo_changed);
gtk_widget_class_bind_callback (widget_class, location_button_toggled_cb);
gtk_widget_class_bind_callback (widget_class, new_folder_button_clicked);
gtk_widget_class_bind_callback (widget_class, path_bar_clicked);
gtk_widget_class_bind_callback (widget_class, places_sidebar_open_location_cb);
gtk_widget_class_bind_callback (widget_class, places_sidebar_show_error_message_cb);
gtk_widget_class_bind_template_callback (widget_class, browse_files_key_press_event_cb);
gtk_widget_class_bind_template_callback (widget_class, file_list_drag_drop_cb);
gtk_widget_class_bind_template_callback (widget_class, file_list_drag_data_received_cb);
gtk_widget_class_bind_template_callback (widget_class, list_popup_menu_cb);
gtk_widget_class_bind_template_callback (widget_class, file_list_query_tooltip_cb);
gtk_widget_class_bind_template_callback (widget_class, list_button_press_event_cb);
gtk_widget_class_bind_template_callback (widget_class, list_row_activated);
gtk_widget_class_bind_template_callback (widget_class, file_list_drag_motion_cb);
gtk_widget_class_bind_template_callback (widget_class, list_selection_changed);
gtk_widget_class_bind_template_callback (widget_class, renderer_editing_canceled_cb);
gtk_widget_class_bind_template_callback (widget_class, renderer_edited_cb);
gtk_widget_class_bind_template_callback (widget_class, filter_combo_changed);
gtk_widget_class_bind_template_callback (widget_class, location_button_toggled_cb);
gtk_widget_class_bind_template_callback (widget_class, new_folder_button_clicked);
gtk_widget_class_bind_template_callback (widget_class, path_bar_clicked);
gtk_widget_class_bind_template_callback (widget_class, places_sidebar_open_location_cb);
gtk_widget_class_bind_template_callback (widget_class, places_sidebar_show_error_message_cb);
}
static void

View File

@ -248,11 +248,11 @@ gtk_file_chooser_dialog_class_init (GtkFileChooserDialogClass *class)
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gtk/libgtk/gtkfilechooserdialog.ui");
gtk_widget_class_bind_child (widget_class, GtkFileChooserDialog, widget);
gtk_widget_class_bind_callback (widget_class, response_cb);
gtk_widget_class_bind_callback (widget_class, file_chooser_widget_file_activated);
gtk_widget_class_bind_callback (widget_class, file_chooser_widget_default_size_changed);
gtk_widget_class_bind_callback (widget_class, file_chooser_widget_response_requested);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserDialog, widget);
gtk_widget_class_bind_template_callback (widget_class, response_cb);
gtk_widget_class_bind_template_callback (widget_class, file_chooser_widget_file_activated);
gtk_widget_class_bind_template_callback (widget_class, file_chooser_widget_default_size_changed);
gtk_widget_class_bind_template_callback (widget_class, file_chooser_widget_response_requested);
}
static void

View File

@ -545,9 +545,9 @@ gtk_font_button_class_init (GtkFontButtonClass *klass)
/* Bind class to template
*/
gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/gtkfontbutton.ui");
gtk_widget_class_bind_child (widget_class, GtkFontButton, font_label);
gtk_widget_class_bind_child (widget_class, GtkFontButton, size_label);
gtk_widget_class_bind_child (widget_class, GtkFontButton, font_size_box);
gtk_widget_class_bind_template_child (widget_class, GtkFontButton, font_label);
gtk_widget_class_bind_template_child (widget_class, GtkFontButton, size_label);
gtk_widget_class_bind_template_child (widget_class, GtkFontButton, font_size_box);
}
static void

View File

@ -136,10 +136,10 @@ gtk_font_chooser_dialog_class_init (GtkFontChooserDialogClass *klass)
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gtk/libgtk/gtkfontchooserdialog.ui");
gtk_widget_class_bind_child (widget_class, GtkFontChooserDialog, fontchooser);
gtk_widget_class_bind_child (widget_class, GtkFontChooserDialog, select_button);
gtk_widget_class_bind_child (widget_class, GtkFontChooserDialog, cancel_button);
gtk_widget_class_bind_callback (widget_class, font_activated_cb);
gtk_widget_class_bind_template_child (widget_class, GtkFontChooserDialog, fontchooser);
gtk_widget_class_bind_template_child (widget_class, GtkFontChooserDialog, select_button);
gtk_widget_class_bind_template_child (widget_class, GtkFontChooserDialog, cancel_button);
gtk_widget_class_bind_template_callback (widget_class, font_activated_cb);
}
static void

View File

@ -482,27 +482,27 @@ gtk_font_chooser_widget_class_init (GtkFontChooserWidgetClass *klass)
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gtk/libgtk/gtkfontchooserwidget.ui");
gtk_widget_class_bind_child (widget_class, GtkFontChooserWidget, search_entry);
gtk_widget_class_bind_child (widget_class, GtkFontChooserWidget, family_face_list);
gtk_widget_class_bind_child (widget_class, GtkFontChooserWidget, family_face_column);
gtk_widget_class_bind_child (widget_class, GtkFontChooserWidget, family_face_cell);
gtk_widget_class_bind_child (widget_class, GtkFontChooserWidget, list_scrolled_window);
gtk_widget_class_bind_child (widget_class, GtkFontChooserWidget, list_notebook);
gtk_widget_class_bind_child (widget_class, GtkFontChooserWidget, model);
gtk_widget_class_bind_child (widget_class, GtkFontChooserWidget, filter_model);
gtk_widget_class_bind_child (widget_class, GtkFontChooserWidget, preview);
gtk_widget_class_bind_child (widget_class, GtkFontChooserWidget, size_spin);
gtk_widget_class_bind_child (widget_class, GtkFontChooserWidget, size_slider);
gtk_widget_class_bind_template_child (widget_class, GtkFontChooserWidget, search_entry);
gtk_widget_class_bind_template_child (widget_class, GtkFontChooserWidget, family_face_list);
gtk_widget_class_bind_template_child (widget_class, GtkFontChooserWidget, family_face_column);
gtk_widget_class_bind_template_child (widget_class, GtkFontChooserWidget, family_face_cell);
gtk_widget_class_bind_template_child (widget_class, GtkFontChooserWidget, list_scrolled_window);
gtk_widget_class_bind_template_child (widget_class, GtkFontChooserWidget, list_notebook);
gtk_widget_class_bind_template_child (widget_class, GtkFontChooserWidget, model);
gtk_widget_class_bind_template_child (widget_class, GtkFontChooserWidget, filter_model);
gtk_widget_class_bind_template_child (widget_class, GtkFontChooserWidget, preview);
gtk_widget_class_bind_template_child (widget_class, GtkFontChooserWidget, size_spin);
gtk_widget_class_bind_template_child (widget_class, GtkFontChooserWidget, size_slider);
gtk_widget_class_bind_callback (widget_class, text_changed_cb);
gtk_widget_class_bind_callback (widget_class, cursor_changed_cb);
gtk_widget_class_bind_callback (widget_class, row_activated_cb);
gtk_widget_class_bind_callback (widget_class, gtk_font_chooser_widget_set_cell_size);
gtk_widget_class_bind_callback (widget_class, resize_by_scroll_cb);
gtk_widget_class_bind_callback (widget_class, row_deleted_cb);
gtk_widget_class_bind_callback (widget_class, row_inserted_cb);
gtk_widget_class_bind_callback (widget_class, row_deleted_cb);
gtk_widget_class_bind_callback (widget_class, size_change_cb);
gtk_widget_class_bind_template_callback (widget_class, text_changed_cb);
gtk_widget_class_bind_template_callback (widget_class, cursor_changed_cb);
gtk_widget_class_bind_template_callback (widget_class, row_activated_cb);
gtk_widget_class_bind_template_callback (widget_class, gtk_font_chooser_widget_set_cell_size);
gtk_widget_class_bind_template_callback (widget_class, resize_by_scroll_cb);
gtk_widget_class_bind_template_callback (widget_class, row_deleted_cb);
gtk_widget_class_bind_template_callback (widget_class, row_inserted_cb);
gtk_widget_class_bind_template_callback (widget_class, row_deleted_cb);
gtk_widget_class_bind_template_callback (widget_class, size_change_cb);
}
static void

View File

@ -546,9 +546,9 @@ gtk_info_bar_class_init (GtkInfoBarClass *klass)
/* Bind class to template
*/
gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/gtkinfobar.ui");
gtk_widget_class_bind_child_internal (widget_class, GtkInfoBar, content_area);
gtk_widget_class_bind_child_internal (widget_class, GtkInfoBar, action_area);
gtk_widget_class_bind_child_internal (widget_class, GtkInfoBar, close_button);
gtk_widget_class_bind_template_child_internal (widget_class, GtkInfoBar, content_area);
gtk_widget_class_bind_template_child_internal (widget_class, GtkInfoBar, action_area);
gtk_widget_class_bind_template_child_internal (widget_class, GtkInfoBar, close_button);
}
static void

View File

@ -307,11 +307,11 @@ gtk_lock_button_class_init (GtkLockButtonClass *klass)
/* Bind class to template
*/
gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/gtklockbutton.ui");
gtk_widget_class_bind_child (widget_class, GtkLockButton, box);
gtk_widget_class_bind_child (widget_class, GtkLockButton, image);
gtk_widget_class_bind_child (widget_class, GtkLockButton, label_lock);
gtk_widget_class_bind_child (widget_class, GtkLockButton, label_unlock);
gtk_widget_class_bind_child (widget_class, GtkLockButton, label_group);
gtk_widget_class_bind_template_child (widget_class, GtkLockButton, box);
gtk_widget_class_bind_template_child (widget_class, GtkLockButton, image);
gtk_widget_class_bind_template_child (widget_class, GtkLockButton, label_lock);
gtk_widget_class_bind_template_child (widget_class, GtkLockButton, label_unlock);
gtk_widget_class_bind_template_child (widget_class, GtkLockButton, label_group);
gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_LOCK_BUTTON_ACCESSIBLE);
}

View File

@ -295,10 +295,10 @@ gtk_message_dialog_class_init (GtkMessageDialogClass *class)
/* Setup Composite data */
gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/gtkmessagedialog.ui");
gtk_widget_class_bind_child (widget_class, GtkMessageDialog, image);
gtk_widget_class_bind_child (widget_class, GtkMessageDialog, label);
gtk_widget_class_bind_child (widget_class, GtkMessageDialog, secondary_label);
gtk_widget_class_bind_child_internal (widget_class, GtkMessageDialog, message_area);
gtk_widget_class_bind_template_child (widget_class, GtkMessageDialog, image);
gtk_widget_class_bind_template_child (widget_class, GtkMessageDialog, label);
gtk_widget_class_bind_template_child (widget_class, GtkMessageDialog, secondary_label);
gtk_widget_class_bind_template_child_internal (widget_class, GtkMessageDialog, message_area);
}
static void

View File

@ -162,20 +162,20 @@ gtk_page_setup_unix_dialog_class_init (GtkPageSetupUnixDialogClass *class)
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gtk/libgtk/gtkpagesetupunixdialog.ui");
gtk_widget_class_bind_child (widget_class, GtkPageSetupUnixDialog, printer_list);
gtk_widget_class_bind_child (widget_class, GtkPageSetupUnixDialog, page_setup_list);
gtk_widget_class_bind_child (widget_class, GtkPageSetupUnixDialog, custom_paper_list);
gtk_widget_class_bind_child (widget_class, GtkPageSetupUnixDialog, printer_combo);
gtk_widget_class_bind_child (widget_class, GtkPageSetupUnixDialog, paper_size_combo);
gtk_widget_class_bind_child (widget_class, GtkPageSetupUnixDialog, paper_size_label);
gtk_widget_class_bind_child (widget_class, GtkPageSetupUnixDialog, paper_size_cell);
gtk_widget_class_bind_child (widget_class, GtkPageSetupUnixDialog, portrait_radio);
gtk_widget_class_bind_child (widget_class, GtkPageSetupUnixDialog, reverse_portrait_radio);
gtk_widget_class_bind_child (widget_class, GtkPageSetupUnixDialog, landscape_radio);
gtk_widget_class_bind_child (widget_class, GtkPageSetupUnixDialog, reverse_landscape_radio);
gtk_widget_class_bind_template_child (widget_class, GtkPageSetupUnixDialog, printer_list);
gtk_widget_class_bind_template_child (widget_class, GtkPageSetupUnixDialog, page_setup_list);
gtk_widget_class_bind_template_child (widget_class, GtkPageSetupUnixDialog, custom_paper_list);
gtk_widget_class_bind_template_child (widget_class, GtkPageSetupUnixDialog, printer_combo);
gtk_widget_class_bind_template_child (widget_class, GtkPageSetupUnixDialog, paper_size_combo);
gtk_widget_class_bind_template_child (widget_class, GtkPageSetupUnixDialog, paper_size_label);
gtk_widget_class_bind_template_child (widget_class, GtkPageSetupUnixDialog, paper_size_cell);
gtk_widget_class_bind_template_child (widget_class, GtkPageSetupUnixDialog, portrait_radio);
gtk_widget_class_bind_template_child (widget_class, GtkPageSetupUnixDialog, reverse_portrait_radio);
gtk_widget_class_bind_template_child (widget_class, GtkPageSetupUnixDialog, landscape_radio);
gtk_widget_class_bind_template_child (widget_class, GtkPageSetupUnixDialog, reverse_landscape_radio);
gtk_widget_class_bind_callback (widget_class, printer_changed_callback);
gtk_widget_class_bind_callback (widget_class, paper_size_changed);
gtk_widget_class_bind_template_callback (widget_class, printer_changed_callback);
gtk_widget_class_bind_template_callback (widget_class, paper_size_changed);
}
static void

View File

@ -259,16 +259,16 @@ gtk_path_bar_class_init (GtkPathBarClass *path_bar_class)
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gtk/libgtk/gtkpathbar.ui");
gtk_widget_class_bind_child (widget_class, GtkPathBar, up_slider_button);
gtk_widget_class_bind_child (widget_class, GtkPathBar, down_slider_button);
gtk_widget_class_bind_template_child (widget_class, GtkPathBar, up_slider_button);
gtk_widget_class_bind_template_child (widget_class, GtkPathBar, down_slider_button);
gtk_widget_class_bind_callback (widget_class, gtk_path_bar_slider_button_press);
gtk_widget_class_bind_callback (widget_class, gtk_path_bar_slider_button_release);
gtk_widget_class_bind_callback (widget_class, gtk_path_bar_slider_up_defocus);
gtk_widget_class_bind_callback (widget_class, gtk_path_bar_slider_down_defocus);
gtk_widget_class_bind_callback (widget_class, gtk_path_bar_scroll_up);
gtk_widget_class_bind_callback (widget_class, gtk_path_bar_scroll_down);
gtk_widget_class_bind_callback (widget_class, on_slider_unmap);
gtk_widget_class_bind_template_callback (widget_class, gtk_path_bar_slider_button_press);
gtk_widget_class_bind_template_callback (widget_class, gtk_path_bar_slider_button_release);
gtk_widget_class_bind_template_callback (widget_class, gtk_path_bar_slider_up_defocus);
gtk_widget_class_bind_template_callback (widget_class, gtk_path_bar_slider_down_defocus);
gtk_widget_class_bind_template_callback (widget_class, gtk_path_bar_scroll_up);
gtk_widget_class_bind_template_callback (widget_class, gtk_path_bar_scroll_down);
gtk_widget_class_bind_template_callback (widget_class, on_slider_unmap);
}

View File

@ -480,86 +480,86 @@ gtk_print_unix_dialog_class_init (GtkPrintUnixDialogClass *class)
"/org/gtk/libgtk/gtkprintunixdialog.ui");
/* GtkTreeView / GtkTreeModel */
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, printer_treeview);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, printer_list);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, printer_list_filter);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, page_setup_list);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, custom_paper_list);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, printer_icon_column);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, printer_name_column);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, printer_location_column);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, printer_status_column);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, printer_icon_renderer);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, printer_name_renderer);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, printer_location_renderer);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, printer_status_renderer);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, printer_treeview);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, printer_list);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, printer_list_filter);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, page_setup_list);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, custom_paper_list);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, printer_icon_column);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, printer_name_column);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, printer_location_column);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, printer_status_column);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, printer_icon_renderer);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, printer_name_renderer);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, printer_location_renderer);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, printer_status_renderer);
/* General Widgetry */
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, notebook);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, all_pages_radio);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, all_pages_radio);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, current_page_radio);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, selection_radio);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, range_table);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, page_range_radio);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, page_range_entry);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, copies_spin);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, collate_check);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, reverse_check);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, collate_image);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, page_layout_preview);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, scale_spin);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, page_set_combo);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, print_now_radio);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, print_at_radio);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, print_at_entry);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, print_hold_radio);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, preview_button);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, paper_size_combo);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, paper_size_combo_label);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, paper_size_renderer);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, orientation_combo);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, orientation_combo_label);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, conflicts_widget);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, job_page);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, finishing_table);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, finishing_page);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, image_quality_table);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, image_quality_page);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, color_table);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, color_page);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, advanced_vbox);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, advanced_page);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, extension_point);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, notebook);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, all_pages_radio);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, all_pages_radio);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, current_page_radio);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, selection_radio);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, range_table);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, page_range_radio);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, page_range_entry);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, copies_spin);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, collate_check);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, reverse_check);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, collate_image);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, page_layout_preview);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, scale_spin);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, page_set_combo);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, print_now_radio);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, print_at_radio);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, print_at_entry);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, print_hold_radio);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, preview_button);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, paper_size_combo);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, paper_size_combo_label);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, paper_size_renderer);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, orientation_combo);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, orientation_combo_label);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, conflicts_widget);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, job_page);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, finishing_table);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, finishing_page);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, image_quality_table);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, image_quality_page);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, color_table);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, color_page);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, advanced_vbox);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, advanced_page);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, extension_point);
/* GtkPrinterOptionWidgets... */
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, pages_per_sheet);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, duplex);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, paper_type);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, paper_source);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, output_tray);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, job_prio);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, billing_info);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, cover_before);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, cover_after);
gtk_widget_class_bind_child (widget_class, GtkPrintUnixDialog, number_up_layout);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, pages_per_sheet);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, duplex);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, paper_type);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, paper_source);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, output_tray);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, job_prio);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, billing_info);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, cover_before);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, cover_after);
gtk_widget_class_bind_template_child (widget_class, GtkPrintUnixDialog, number_up_layout);
/* Callbacks handled in the UI */
gtk_widget_class_bind_callback (widget_class, gtk_print_unix_dialog_destroy);
gtk_widget_class_bind_callback (widget_class, redraw_page_layout_preview);
gtk_widget_class_bind_callback (widget_class, error_dialogs);
gtk_widget_class_bind_callback (widget_class, emit_ok_response);
gtk_widget_class_bind_callback (widget_class, selected_printer_changed);
gtk_widget_class_bind_callback (widget_class, update_page_range_entry_sensitivity);
gtk_widget_class_bind_callback (widget_class, update_print_at_entry_sensitivity);
gtk_widget_class_bind_callback (widget_class, update_print_at_option);
gtk_widget_class_bind_callback (widget_class, update_dialog_from_capabilities);
gtk_widget_class_bind_callback (widget_class, update_collate_icon);
gtk_widget_class_bind_callback (widget_class, draw_collate_cb);
gtk_widget_class_bind_callback (widget_class, redraw_page_layout_preview);
gtk_widget_class_bind_callback (widget_class, update_number_up_layout);
gtk_widget_class_bind_callback (widget_class, redraw_page_layout_preview);
gtk_widget_class_bind_callback (widget_class, draw_page_cb);
gtk_widget_class_bind_template_callback (widget_class, gtk_print_unix_dialog_destroy);
gtk_widget_class_bind_template_callback (widget_class, redraw_page_layout_preview);
gtk_widget_class_bind_template_callback (widget_class, error_dialogs);
gtk_widget_class_bind_template_callback (widget_class, emit_ok_response);
gtk_widget_class_bind_template_callback (widget_class, selected_printer_changed);
gtk_widget_class_bind_template_callback (widget_class, update_page_range_entry_sensitivity);
gtk_widget_class_bind_template_callback (widget_class, update_print_at_entry_sensitivity);
gtk_widget_class_bind_template_callback (widget_class, update_print_at_option);
gtk_widget_class_bind_template_callback (widget_class, update_dialog_from_capabilities);
gtk_widget_class_bind_template_callback (widget_class, update_collate_icon);
gtk_widget_class_bind_template_callback (widget_class, draw_collate_cb);
gtk_widget_class_bind_template_callback (widget_class, redraw_page_layout_preview);
gtk_widget_class_bind_template_callback (widget_class, update_number_up_layout);
gtk_widget_class_bind_template_callback (widget_class, redraw_page_layout_preview);
gtk_widget_class_bind_template_callback (widget_class, draw_page_cb);
}
/* Returns a toplevel GtkWindow, or NULL if none */

View File

@ -348,24 +348,24 @@ _gtk_recent_chooser_default_class_init (GtkRecentChooserDefaultClass *klass)
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gtk/libgtk/gtkrecentchooserdefault.ui");
gtk_widget_class_bind_child (widget_class, GtkRecentChooserDefault, filter_combo_hbox);
gtk_widget_class_bind_child (widget_class, GtkRecentChooserDefault, filter_combo);
gtk_widget_class_bind_child (widget_class, GtkRecentChooserDefault, recent_view);
gtk_widget_class_bind_child (widget_class, GtkRecentChooserDefault, recent_store);
gtk_widget_class_bind_child (widget_class, GtkRecentChooserDefault, icon_column);
gtk_widget_class_bind_child (widget_class, GtkRecentChooserDefault, meta_column);
gtk_widget_class_bind_child (widget_class, GtkRecentChooserDefault, icon_renderer);
gtk_widget_class_bind_child (widget_class, GtkRecentChooserDefault, meta_renderer);
gtk_widget_class_bind_child (widget_class, GtkRecentChooserDefault, selection);
gtk_widget_class_bind_template_child (widget_class, GtkRecentChooserDefault, filter_combo_hbox);
gtk_widget_class_bind_template_child (widget_class, GtkRecentChooserDefault, filter_combo);
gtk_widget_class_bind_template_child (widget_class, GtkRecentChooserDefault, recent_view);
gtk_widget_class_bind_template_child (widget_class, GtkRecentChooserDefault, recent_store);
gtk_widget_class_bind_template_child (widget_class, GtkRecentChooserDefault, icon_column);
gtk_widget_class_bind_template_child (widget_class, GtkRecentChooserDefault, meta_column);
gtk_widget_class_bind_template_child (widget_class, GtkRecentChooserDefault, icon_renderer);
gtk_widget_class_bind_template_child (widget_class, GtkRecentChooserDefault, meta_renderer);
gtk_widget_class_bind_template_child (widget_class, GtkRecentChooserDefault, selection);
gtk_widget_class_bind_callback (widget_class, selection_changed_cb);
gtk_widget_class_bind_callback (widget_class, row_activated_cb);
gtk_widget_class_bind_callback (widget_class, filter_combo_changed_cb);
gtk_widget_class_bind_callback (widget_class, recent_view_popup_menu_cb);
gtk_widget_class_bind_callback (widget_class, recent_view_button_press_cb);
gtk_widget_class_bind_callback (widget_class, recent_view_drag_begin_cb);
gtk_widget_class_bind_callback (widget_class, recent_view_drag_data_get_cb);
gtk_widget_class_bind_callback (widget_class, recent_view_query_tooltip_cb);
gtk_widget_class_bind_template_callback (widget_class, selection_changed_cb);
gtk_widget_class_bind_template_callback (widget_class, row_activated_cb);
gtk_widget_class_bind_template_callback (widget_class, filter_combo_changed_cb);
gtk_widget_class_bind_template_callback (widget_class, recent_view_popup_menu_cb);
gtk_widget_class_bind_template_callback (widget_class, recent_view_button_press_cb);
gtk_widget_class_bind_template_callback (widget_class, recent_view_drag_begin_cb);
gtk_widget_class_bind_template_callback (widget_class, recent_view_drag_data_get_cb);
gtk_widget_class_bind_template_callback (widget_class, recent_view_query_tooltip_cb);
}
static void

View File

@ -360,21 +360,21 @@ gtk_scale_button_class_init (GtkScaleButtonClass *klass)
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gtk/libgtk/gtkscalebutton.ui");
gtk_widget_class_bind_child_internal (widget_class, GtkScaleButton, plus_button);
gtk_widget_class_bind_child_internal (widget_class, GtkScaleButton, minus_button);
gtk_widget_class_bind_child (widget_class, GtkScaleButton, dock);
gtk_widget_class_bind_child (widget_class, GtkScaleButton, box);
gtk_widget_class_bind_child (widget_class, GtkScaleButton, scale);
gtk_widget_class_bind_child (widget_class, GtkScaleButton, image);
gtk_widget_class_bind_child (widget_class, GtkScaleButton, adjustment);
gtk_widget_class_bind_template_child_internal (widget_class, GtkScaleButton, plus_button);
gtk_widget_class_bind_template_child_internal (widget_class, GtkScaleButton, minus_button);
gtk_widget_class_bind_template_child (widget_class, GtkScaleButton, dock);
gtk_widget_class_bind_template_child (widget_class, GtkScaleButton, box);
gtk_widget_class_bind_template_child (widget_class, GtkScaleButton, scale);
gtk_widget_class_bind_template_child (widget_class, GtkScaleButton, image);
gtk_widget_class_bind_template_child (widget_class, GtkScaleButton, adjustment);
gtk_widget_class_bind_callback (widget_class, cb_dock_button_press);
gtk_widget_class_bind_callback (widget_class, cb_dock_key_release);
gtk_widget_class_bind_callback (widget_class, cb_dock_grab_notify);
gtk_widget_class_bind_callback (widget_class, cb_dock_grab_broken_event);
gtk_widget_class_bind_callback (widget_class, cb_button_press);
gtk_widget_class_bind_callback (widget_class, cb_button_release);
gtk_widget_class_bind_callback (widget_class, cb_scale_grab_notify);
gtk_widget_class_bind_template_callback (widget_class, cb_dock_button_press);
gtk_widget_class_bind_template_callback (widget_class, cb_dock_key_release);
gtk_widget_class_bind_template_callback (widget_class, cb_dock_grab_notify);
gtk_widget_class_bind_template_callback (widget_class, cb_dock_grab_broken_event);
gtk_widget_class_bind_template_callback (widget_class, cb_button_press);
gtk_widget_class_bind_template_callback (widget_class, cb_button_release);
gtk_widget_class_bind_template_callback (widget_class, cb_scale_grab_notify);
gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_SCALE_BUTTON_ACCESSIBLE);
}

View File

@ -413,10 +413,10 @@ gtk_search_bar_class_init (GtkSearchBarClass *klass)
g_object_class_install_properties (object_class, LAST_PROPERTY, widget_props);
gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/gtksearchbar.ui");
gtk_widget_class_bind_child_internal (widget_class, GtkSearchBar, toolbar);
gtk_widget_class_bind_child_internal (widget_class, GtkSearchBar, revealer);
gtk_widget_class_bind_child_internal (widget_class, GtkSearchBar, box_center);
gtk_widget_class_bind_child_internal (widget_class, GtkSearchBar, close_button);
gtk_widget_class_bind_template_child_internal (widget_class, GtkSearchBar, toolbar);
gtk_widget_class_bind_template_child_internal (widget_class, GtkSearchBar, revealer);
gtk_widget_class_bind_template_child_internal (widget_class, GtkSearchBar, box_center);
gtk_widget_class_bind_template_child_internal (widget_class, GtkSearchBar, close_button);
}
static void

View File

@ -180,9 +180,9 @@ gtk_statusbar_class_init (GtkStatusbarClass *class)
/* Bind class to template
*/
gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/gtkstatusbar.ui");
gtk_widget_class_bind_child_internal (widget_class, GtkStatusbar, message_area);
gtk_widget_class_bind_child (widget_class, GtkStatusbar, frame);
gtk_widget_class_bind_child (widget_class, GtkStatusbar, label);
gtk_widget_class_bind_template_child_internal (widget_class, GtkStatusbar, message_area);
gtk_widget_class_bind_template_child (widget_class, GtkStatusbar, frame);
gtk_widget_class_bind_template_child (widget_class, GtkStatusbar, label);
gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_STATUSBAR_ACCESSIBLE);
}

View File

@ -161,8 +161,8 @@ gtk_volume_button_class_init (GtkVolumeButtonClass *klass)
/* Bind class to template
*/
gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/gtkvolumebutton.ui");
gtk_widget_class_bind_callback (widget_class, cb_query_tooltip);
gtk_widget_class_bind_callback (widget_class, cb_value_changed);
gtk_widget_class_bind_template_callback (widget_class, cb_query_tooltip);
gtk_widget_class_bind_template_callback (widget_class, cb_value_changed);
}
static void

View File

@ -815,10 +815,10 @@ static void gtk_widget_real_adjust_baseline_allocation (GtkWidget
gint *baseline);
/* --- functions dealing with template data structures --- */
static AutomaticChildClass *automatic_child_class_new (const gchar *name,
gboolean internal_child,
gssize offset);
static void automatic_child_class_free (AutomaticChildClass *child_class);
static AutomaticChildClass *template_child_class_new (const gchar *name,
gboolean internal_child,
gssize offset);
static void template_child_class_free (AutomaticChildClass *child_class);
static CallbackSymbol *callback_symbol_new (const gchar *name,
GCallback callback);
static void callback_symbol_free (CallbackSymbol *callback);
@ -826,11 +826,11 @@ static void template_data_free (GtkWidgetTempla
static GHashTable *get_auto_child_hash (GtkWidget *widget,
GType type,
gboolean create);
static gboolean setup_automatic_child (GtkWidgetTemplate *template_data,
GType class_type,
AutomaticChildClass *child_class,
GtkWidget *widget,
GtkBuilder *builder);
static gboolean setup_template_child (GtkWidgetTemplate *template_data,
GType class_type,
AutomaticChildClass *child_class,
GtkWidget *widget,
GtkBuilder *builder);
static void gtk_widget_set_usize_internal (GtkWidget *widget,
gint width,
@ -11287,7 +11287,7 @@ finalize_assertion_new (GtkWidget *widget,
FinalizeAssertion *assertion = NULL;
GObject *object;
object = gtk_widget_get_automated_child (widget, widget_type, child_class->name);
object = gtk_widget_get_template_child (widget, widget_type, child_class->name);
/* We control the hash table entry, the object should never be NULL
*/
@ -13260,11 +13260,11 @@ gtk_widget_buildable_get_internal_child (GtkBuildable *buildable,
}
/* Now return the 'internal-child' from the class which declared it, note
* that gtk_widget_get_automated_child() an API used to access objects
* that gtk_widget_get_template_child() an API used to access objects
* which are in the private scope of a given class.
*/
if (internal_child_type != 0)
return gtk_widget_get_automated_child (GTK_WIDGET (buildable), internal_child_type, childname);
return gtk_widget_get_template_child (GTK_WIDGET (buildable), internal_child_type, childname);
return NULL;
}
@ -15529,9 +15529,9 @@ gtk_widget_insert_action_group (GtkWidget *widget,
* GtkBuilder automated templates *
****************************************************************/
static AutomaticChildClass *
automatic_child_class_new (const gchar *name,
gboolean internal_child,
gssize offset)
template_child_class_new (const gchar *name,
gboolean internal_child,
gssize offset)
{
AutomaticChildClass *child_class = g_slice_new0 (AutomaticChildClass);
@ -15543,7 +15543,7 @@ automatic_child_class_new (const gchar *name,
}
static void
automatic_child_class_free (AutomaticChildClass *child_class)
template_child_class_free (AutomaticChildClass *child_class)
{
if (child_class)
{
@ -15580,7 +15580,7 @@ template_data_free (GtkWidgetTemplate *template_data)
if (template_data)
{
g_bytes_unref (template_data->data);
g_slist_free_full (template_data->children, (GDestroyNotify)automatic_child_class_free);
g_slist_free_full (template_data->children, (GDestroyNotify)template_child_class_free);
g_slist_free_full (template_data->callbacks, (GDestroyNotify)callback_symbol_free);
if (template_data->connect_data &&
@ -15629,7 +15629,7 @@ get_auto_child_hash (GtkWidget *widget,
}
static gboolean
setup_automatic_child (GtkWidgetTemplate *template_data,
setup_template_child (GtkWidgetTemplate *template_data,
GType class_type,
AutomaticChildClass *child_class,
GtkWidget *widget,
@ -15647,7 +15647,7 @@ setup_automatic_child (GtkWidgetTemplate *template_data,
}
/* Insert into the hash so that it can be fetched with
* gtk_widget_get_automated_child() and also in automated
* gtk_widget_get_template_child() and also in automated
* implementations of GtkBuildable.get_internal_child()
*/
auto_child_hash = get_auto_child_hash (widget, class_type, TRUE);
@ -15746,7 +15746,7 @@ gtk_widget_init_template (GtkWidget *widget)
* it to be available in any GtkBuildable.get_internal_child()
* invocations which may follow by reference in child classes.
*/
if (!setup_automatic_child (template,
if (!setup_template_child (template,
class_type,
child_class,
widget,
@ -15842,7 +15842,7 @@ gtk_widget_class_set_template_from_resource (GtkWidgetClass *widget_class,
}
/**
* gtk_widget_class_declare_callback:
* gtk_widget_class_bind_template_callback_full:
* @widget_class: A #GtkWidgetClass
* @callback_name: The name of the callback as expected in the template XML
* @callback_symbol: (scope async): The callback symbol
@ -15856,9 +15856,9 @@ gtk_widget_class_set_template_from_resource (GtkWidgetClass *widget_class,
* Since: 3.10
*/
void
gtk_widget_class_declare_callback (GtkWidgetClass *widget_class,
const gchar *callback_name,
GCallback callback_symbol)
gtk_widget_class_bind_template_callback_full (GtkWidgetClass *widget_class,
const gchar *callback_name,
GCallback callback_symbol)
{
CallbackSymbol *cb;
@ -15888,10 +15888,10 @@ gtk_widget_class_declare_callback (GtkWidgetClass *widget_class,
* Since: 3.10
*/
void
gtk_widget_class_set_connect_func (GtkWidgetClass *widget_class,
GtkBuilderConnectFunc connect_func,
gpointer connect_data,
GDestroyNotify connect_data_destroy)
gtk_widget_class_set_connect_func (GtkWidgetClass *widget_class,
GtkBuilderConnectFunc connect_func,
gpointer connect_data,
GDestroyNotify connect_data_destroy)
{
g_return_if_fail (GTK_IS_WIDGET_CLASS (widget_class));
g_return_if_fail (widget_class->priv->template != NULL);
@ -15907,7 +15907,7 @@ gtk_widget_class_set_connect_func (GtkWidgetClass *widget_class,
}
/**
* gtk_widget_class_automate_child:
* gtk_widget_class_bind_template_child_full:
* @widget_class: A #GtkWidgetClass
* @name: The "id" of the child defined in the template XML
* @internal_child: Whether the child should be accessible as an "internal-child"
@ -15937,10 +15937,10 @@ gtk_widget_class_set_connect_func (GtkWidgetClass *widget_class,
* Since: 3.10
*/
void
gtk_widget_class_automate_child (GtkWidgetClass *widget_class,
const gchar *name,
gboolean internal_child,
gssize struct_offset)
gtk_widget_class_bind_template_child_full (GtkWidgetClass *widget_class,
const gchar *name,
gboolean internal_child,
gssize struct_offset)
{
AutomaticChildClass *child_class;
@ -15948,22 +15948,22 @@ gtk_widget_class_automate_child (GtkWidgetClass *widget_class,
g_return_if_fail (widget_class->priv->template != NULL);
g_return_if_fail (name && name[0]);
child_class = automatic_child_class_new (name,
internal_child,
struct_offset);
child_class = template_child_class_new (name,
internal_child,
struct_offset);
widget_class->priv->template->children =
g_slist_prepend (widget_class->priv->template->children, child_class);
}
/**
* gtk_widget_get_automated_child:
* gtk_widget_get_template_child:
* @widget: A #GtkWidget
* @widget_type: The #GType to get an automated child for
* @widget_type: The #GType to get a template child for
* @name: The "id" of the child defined in the template XML
*
* Fetch an object build from the template XML for @widget_type in this @widget instance.
*
* This will only report children which were previously declared with gtk_widget_class_automate_child().
* This will only report children which were previously declared with gtk_widget_class_bind_template_child_full() or one of its variants.
*
* This function is only meant to be called for code which is private to the @widget_type which
* declared the child and is meant for language bindings which cannot easily make use
@ -15972,9 +15972,9 @@ gtk_widget_class_automate_child (GtkWidgetClass *widget_class,
* Returns: (transfer none): The object built in the template XML with the id @name
*/
GObject *
gtk_widget_get_automated_child (GtkWidget *widget,
GType widget_type,
const gchar *name)
gtk_widget_get_template_child (GtkWidget *widget,
GType widget_type,
const gchar *name)
{
GHashTable *auto_child_hash;
GObject *ret = NULL;

View File

@ -1160,18 +1160,21 @@ void gtk_widget_remove_tick_callback (GtkWidget *widget,
guint id);
/**
* gtk_widget_class_bind_callback:
* gtk_widget_class_bind_template_callback:
* @widget_class: a #GtkWidgetClass
* @callback: the callback symbol
*
* Shorthand for gtk_widget_class_declare_callback(), adds a symbol
* by it's own name to the @widget_class.
* Binds a callback function defined in a template to the @widget_class.
*
* This macro is a convenience wrapper around the
* gtk_widget_class_bind_template_callback_full() function.
*
* Since: 3.10
*/
#define gtk_widget_class_bind_callback(widget_class, callback) \
gtk_widget_class_declare_callback (GTK_WIDGET_CLASS (widget_class), \
#callback, G_CALLBACK(callback))
#define gtk_widget_class_bind_template_callback(widget_class, callback) \
gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (widget_class), \
#callback, \
G_CALLBACK (callback))
/**
* gtk_widget_class_bind_child:
@ -1179,58 +1182,70 @@ void gtk_widget_remove_tick_callback (GtkWidget *widget,
* @data_type: the type name of this widget
* @member_name: name of the instance private member on @private_data_type
*
* Shorthand for gtk_widget_class_automate_child(). This macro assumes that
* the @member_name is the name of the component instance to lookup as specified
* in the composite template.
* Binds a child widget defined in a template to the @widget_class.
*
* This macro is a convenience wrapper around the
* gtk_widget_class_bind_template_child_full() function.
*
* This macro will use the offset of the @member_name inside the @TypeName
* private data structure.
*
* Since: 3.10
*/
#define gtk_widget_class_bind_child(widget_class, data_type, member_name) \
gtk_widget_class_automate_child (widget_class, #member_name, FALSE, \
G_PRIVATE_OFFSET (data_type, member_name))
#define gtk_widget_class_bind_template_child(widget_class, TypeName, member_name) \
gtk_widget_class_bind_template_child_full (widget_class, \
#member_name, \
FALSE, \
G_PRIVATE_OFFSET (TypeName, member_name))
/**
* gtk_widget_class_bind_child_internal:
* @widget_class: a #GtkWidgetClass
* @data_type: the type name of this widget
* @TypeName: the type name, in CamelCase
* @member_name: name of the instance private member on @private_data_type
*
* Shorthand for gtk_widget_class_automate_child(). Essentially the same as
* gtk_widget_class_bind_child() except that it will export the child as
* an internal child.
* Binds a child widget defined in a template to the @widget_class.
*
* This macro is a convenience wrapper around the
* gtk_widget_class_bind_template_child_full() function.
*
* This macro will use the offset of the @member_name inside the @TypeName
* private data structure.
*
* Since: 3.10
*/
#define gtk_widget_class_bind_child_internal(widget_class, data_type, member_name) \
gtk_widget_class_automate_child (widget_class, #member_name, TRUE, \
G_PRIVATE_OFFSET (data_type, member_name))
#define gtk_widget_class_bind_template_child_internal(widget_class, TypeName, member_name) \
gtk_widget_class_bind_template_child_full (widget_class, \
#member_name, \
TRUE, \
G_PRIVATE_OFFSET (TypeName, member_name))
GDK_AVAILABLE_IN_3_10
void gtk_widget_init_template (GtkWidget *widget);
void gtk_widget_init_template (GtkWidget *widget);
GDK_AVAILABLE_IN_3_10
GObject *gtk_widget_get_automated_child (GtkWidget *widget,
GType widget_type,
const gchar *name);
GObject *gtk_widget_get_template_child (GtkWidget *widget,
GType widget_type,
const gchar *name);
GDK_AVAILABLE_IN_3_10
void gtk_widget_class_set_template (GtkWidgetClass *widget_class,
GBytes *template_bytes);
void gtk_widget_class_set_template (GtkWidgetClass *widget_class,
GBytes *template_bytes);
GDK_AVAILABLE_IN_3_10
void gtk_widget_class_set_template_from_resource (GtkWidgetClass *widget_class,
const gchar *resource_name);
void gtk_widget_class_set_template_from_resource (GtkWidgetClass *widget_class,
const gchar *resource_name);
GDK_AVAILABLE_IN_3_10
void gtk_widget_class_declare_callback (GtkWidgetClass *widget_class,
const gchar *callback_name,
GCallback callback_symbol);
void gtk_widget_class_bind_template_callback_full (GtkWidgetClass *widget_class,
const gchar *callback_name,
GCallback callback_symbol);
GDK_AVAILABLE_IN_3_10
void gtk_widget_class_set_connect_func (GtkWidgetClass *widget_class,
GtkBuilderConnectFunc connect_func,
gpointer connect_data,
GDestroyNotify connect_data_destroy);
void gtk_widget_class_set_connect_func (GtkWidgetClass *widget_class,
GtkBuilderConnectFunc connect_func,
gpointer connect_data,
GDestroyNotify connect_data_destroy);
GDK_AVAILABLE_IN_3_10
void gtk_widget_class_automate_child (GtkWidgetClass *widget_class,
const gchar *name,
gboolean internal_child,
gssize struct_offset);
void gtk_widget_class_bind_template_child_full (GtkWidgetClass *widget_class,
const gchar *name,
gboolean internal_child,
gssize struct_offset);
G_END_DECLS