コード例 #1
0
static void
gcal_date_selector_class_init (GcalDateSelectorClass *klass)
{
  GObjectClass *object_class;

  object_class = G_OBJECT_CLASS (klass);
  object_class->constructed = gcal_date_selector_constructed;

  signals[MODIFIED] = g_signal_new ("modified",
                                    GCAL_TYPE_DATE_SELECTOR,
                                    G_SIGNAL_RUN_LAST,
                                    G_STRUCT_OFFSET (GcalDateSelectorClass, modified),
                                    NULL, NULL, NULL,
                                    G_TYPE_NONE, 0);

  gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/calendar/date-selector.ui");

  gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GcalDateSelector, date_label);
  gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GcalDateSelector, calendar);
  gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GcalDateSelector, grid);

  gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (klass), text_inserted);
  gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (klass), date_entry_focus_out);
  gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (klass), entry_activated);
  gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (klass), calendar_day_selected);
}
コード例 #2
0
static void
gt_games_view_child_class_init(GtGamesViewChildClass* klass)
{
    GObjectClass* object_class = G_OBJECT_CLASS(klass);

    object_class->finalize = finalize;
    object_class->get_property = get_property;
    object_class->set_property = set_property;
    object_class->constructed = constructed;

    props[PROP_GAME] = g_param_spec_object("game",
                                           "Game",
                                           "Associated game",
                                           GT_TYPE_GAME,
                                           G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);

    g_object_class_install_properties(object_class,
                                      NUM_PROPS,
                                      props);

    gtk_widget_class_set_template_from_resource(GTK_WIDGET_CLASS(klass),
            "/com/gnome-twitch/ui/gt-games-view-child.ui");
    gtk_widget_class_bind_template_callback(GTK_WIDGET_CLASS(klass), motion_enter_cb);
    gtk_widget_class_bind_template_callback(GTK_WIDGET_CLASS(klass), motion_leave_cb);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtGamesViewChild, preview_image);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtGamesViewChild, middle_revealer);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtGamesViewChild, name_label);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtGamesViewChild, event_box);
}
コード例 #3
0
ファイル: listbox.c プロジェクト: GYGit/gtk
static void
gtk_message_row_class_init (GtkMessageRowClass *klass)
{
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
  GObjectClass *object_class = G_OBJECT_CLASS (klass);

  object_class->finalize = gtk_message_row_finalize;

  gtk_widget_class_set_template_from_resource (widget_class, "/listbox/listbox.ui");
  gtk_widget_class_bind_template_child_private (widget_class, GtkMessageRow, content_label);
  gtk_widget_class_bind_template_child_private (widget_class, GtkMessageRow, source_name);
  gtk_widget_class_bind_template_child_private (widget_class, GtkMessageRow, source_nick);
  gtk_widget_class_bind_template_child_private (widget_class, GtkMessageRow, short_time_label);
  gtk_widget_class_bind_template_child_private (widget_class, GtkMessageRow, detailed_time_label);
  gtk_widget_class_bind_template_child_private (widget_class, GtkMessageRow, extra_buttons_box);
  gtk_widget_class_bind_template_child_private (widget_class, GtkMessageRow, details_revealer);
  gtk_widget_class_bind_template_child_private (widget_class, GtkMessageRow, avatar_image);
  gtk_widget_class_bind_template_child_private (widget_class, GtkMessageRow, resent_box);
  gtk_widget_class_bind_template_child_private (widget_class, GtkMessageRow, resent_by_button);
  gtk_widget_class_bind_template_child_private (widget_class, GtkMessageRow, n_reshares_label);
  gtk_widget_class_bind_template_child_private (widget_class, GtkMessageRow, n_favorites_label);
  gtk_widget_class_bind_template_child_private (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;
}
コード例 #4
0
static void
thunar_uca_editor_class_init (ThunarUcaEditorClass *klass)
{
    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
    GObjectClass   *object_class = G_OBJECT_CLASS (klass);

    /* vfuncs */
    object_class->constructed = thunar_uca_editor_constructed;

    /* Setup the template xml */
    gtk_widget_class_set_template_from_resource (widget_class, "/org/xfce/thunar/uca/editor.ui");

    /* bind stuff */
    gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, notebook);
    gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, name_entry);
    gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, description_entry);
    gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, icon_button);
    gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, command_entry);
    gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, sn_button);
    gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, patterns_entry);
    gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, directories_button);
    gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, audio_files_button);
    gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, image_files_button);
    gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, text_files_button);
    gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, video_files_button);
    gtk_widget_class_bind_template_child (widget_class, ThunarUcaEditor, other_files_button);

    gtk_widget_class_bind_template_callback(widget_class, thunar_uca_editor_icon_clicked);
    gtk_widget_class_bind_template_callback(widget_class, thunar_uca_editor_command_clicked);
}
コード例 #5
0
static void
gtk_app_chooser_dialog_class_init (GtkAppChooserDialogClass *klass)
{
  GtkWidgetClass *widget_class;
  GObjectClass *gobject_class;
  GParamSpec *pspec;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->dispose = gtk_app_chooser_dialog_dispose;
  gobject_class->finalize = gtk_app_chooser_dialog_finalize;
  gobject_class->set_property = gtk_app_chooser_dialog_set_property;
  gobject_class->get_property = gtk_app_chooser_dialog_get_property;
  gobject_class->constructed = gtk_app_chooser_dialog_constructed;

  widget_class = GTK_WIDGET_CLASS (klass);
  widget_class->style_updated = gtk_app_chooser_dialog_style_updated;

  g_object_class_override_property (gobject_class, PROP_CONTENT_TYPE, "content-type");

  /**
   * GtkAppChooserDialog:gfile:
   *
   * The GFile used by the #GtkAppChooserDialog.
   * The dialog's #GtkAppChooserWidget content type will be guessed from the
   * file, if present.
   */
  pspec = g_param_spec_object ("gfile",
                               P_("GFile"),
                               P_("The GFile used by the app chooser dialog"),
                               G_TYPE_FILE,
                               G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
                               G_PARAM_STATIC_STRINGS);
  g_object_class_install_property (gobject_class, PROP_GFILE, pspec);

  /**
   * GtkAppChooserDialog:heading:
   *
   * The text to show at the top of the dialog.
   * The string may contain Pango markup.
   */
  pspec = g_param_spec_string ("heading",
                               P_("Heading"),
                               P_("The text to show at the top of the dialog"),
                               NULL,
                               G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
  g_object_class_install_property (gobject_class, PROP_HEADING, pspec);

  /* Bind class to template
   */
  gtk_widget_class_set_template_from_resource (widget_class,
					       "/org/gtk/libgtk/ui/gtkappchooserdialog.ui");
  gtk_widget_class_bind_template_child_private (widget_class, GtkAppChooserDialog, label);
  gtk_widget_class_bind_template_child_private (widget_class, GtkAppChooserDialog, show_more_button);
  gtk_widget_class_bind_template_child_private (widget_class, GtkAppChooserDialog, software_button);
  gtk_widget_class_bind_template_child_private (widget_class, GtkAppChooserDialog, inner_box);
  gtk_widget_class_bind_template_child_private (widget_class, GtkAppChooserDialog, search_bar);
  gtk_widget_class_bind_template_child_private (widget_class, GtkAppChooserDialog, search_entry);
  gtk_widget_class_bind_template_callback (widget_class, show_more_button_clicked_cb);
  gtk_widget_class_bind_template_callback (widget_class, software_button_clicked_cb);
}
コード例 #6
0
ファイル: glade-preferences.c プロジェクト: GNOME/glade
static void
glade_preferences_class_init (GladePreferencesClass *klass)
{
  GtkWidgetClass *widget_class;

  widget_class  = GTK_WIDGET_CLASS (klass);

  /* Setup the template GtkBuilder xml for this class
   */
  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/glade/glade-preferences.glade");

  /* Define the relationship of the private entry and the entry defined in the xml
   */
  gtk_widget_class_bind_template_child_private (widget_class, GladePreferences, catalog_path_store);
  gtk_widget_class_bind_template_child_private (widget_class, GladePreferences, remove_catalog_button);
  gtk_widget_class_bind_template_child_private (widget_class, GladePreferences, selection);
  gtk_widget_class_bind_template_child_private (widget_class, GladePreferences, create_backups_toggle);
  gtk_widget_class_bind_template_child_private (widget_class, GladePreferences, autosave_toggle);
  gtk_widget_class_bind_template_child_private (widget_class, GladePreferences, autosave_spin);
  gtk_widget_class_bind_template_child_private (widget_class, GladePreferences, versioning_toggle);
  gtk_widget_class_bind_template_child_private (widget_class, GladePreferences, deprecations_toggle);
  gtk_widget_class_bind_template_child_private (widget_class, GladePreferences, unrecognized_toggle);

  /* Declare the callback ports that this widget class exposes, to bind with <signal>
   * connections defined in the GtkBuilder xml
   */
  gtk_widget_class_bind_template_callback (widget_class, autosave_toggled);
  gtk_widget_class_bind_template_callback (widget_class, on_preferences_filechooserdialog_response);
  gtk_widget_class_bind_template_callback (widget_class, catalog_selection_changed);
  gtk_widget_class_bind_template_callback (widget_class, remove_catalog_clicked);
}
コード例 #7
0
ファイル: gtkvolumebutton.c プロジェクト: Davletvm/gtk
static void
gtk_volume_button_class_init (GtkVolumeButtonClass *klass)
{
    GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

    gobject_class->set_property = gtk_volume_button_set_property;
    gobject_class->get_property = gtk_volume_button_get_property;

    /**
     * GtkVolumeButton:use-symbolic:
     *
     * Whether to use symbolic icons as the icons. Note that
     * if the symbolic icons are not available in your installed
     * theme, then the normal (potentially colorful) icons will
     * be used.
     *
     * Since: 3.0
     */
    g_object_class_install_property (gobject_class,
                                     PROP_SYMBOLIC,
                                     g_param_spec_boolean ("use-symbolic",
                                             P_("Use symbolic icons"),
                                             P_("Whether to use symbolic icons"),
                                             TRUE,
                                             G_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_EXPLICIT_NOTIFY));

    /* Bind class to template
     */
    gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/ui/gtkvolumebutton.ui");
    gtk_widget_class_bind_template_callback (widget_class, cb_query_tooltip);
    gtk_widget_class_bind_template_callback (widget_class, cb_value_changed);
}
コード例 #8
0
static void
gcal_week_view_class_init (GcalWeekViewClass *klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  object_class->finalize = gcal_week_view_finalize;
  object_class->set_property = gcal_week_view_set_property;
  object_class->get_property = gcal_week_view_get_property;

  g_object_class_override_property (object_class, PROP_DATE, "active-date");

  signals[EVENT_ACTIVATED] = g_signal_new ("event-activated",
                                           GCAL_TYPE_WEEK_VIEW,
                                           G_SIGNAL_RUN_FIRST,
                                           0,  NULL, NULL, NULL,
                                           G_TYPE_NONE,
                                           1,
                                           GCAL_TYPE_EVENT_WIDGET);

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/week-view.ui");

  gtk_widget_class_bind_template_child (widget_class, GcalWeekView, header);
  gtk_widget_class_bind_template_child (widget_class, GcalWeekView, hours_bar);
  gtk_widget_class_bind_template_child (widget_class, GcalWeekView, scrolled_window);
  gtk_widget_class_bind_template_child (widget_class, GcalWeekView, week_grid);

  gtk_widget_class_bind_template_callback (widget_class, gcal_week_view_draw_hours);
  gtk_widget_class_bind_template_callback (widget_class, on_event_activated);

  gtk_widget_class_set_css_name (widget_class, "calendar-view");
}
コード例 #9
0
ファイル: window.c プロジェクト: Sidnioulz/SandboxGtk
static void
gtk_inspector_window_class_init (GtkInspectorWindowClass *klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  object_class->constructed = gtk_inspector_window_constructed;

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/inspector/window.ui");

  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, widget_tree);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, prop_list);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, child_prop_list);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, signals_list);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, button_path);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, classes_list);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, widget_css_editor);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, object_hierarchy);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, python_shell);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, widget_popup);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, size_groups);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, data_list);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, actions);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, gestures);

  gtk_widget_class_bind_template_callback (widget_class, on_inspect);
  gtk_widget_class_bind_template_callback (widget_class, on_widget_tree_selection_changed);
  gtk_widget_class_bind_template_callback (widget_class, on_send_widget_to_shell_activate);
}
コード例 #10
0
static void
_glade_adaptor_chooser_widget_class_init (_GladeAdaptorChooserWidgetClass *klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  object_class->finalize = _glade_adaptor_chooser_widget_finalize;
  object_class->set_property = _glade_adaptor_chooser_widget_set_property;
  object_class->get_property = _glade_adaptor_chooser_widget_get_property;
  object_class->constructed = _glade_adaptor_chooser_widget_constructed;

  widget_class->map = _glade_adaptor_chooser_widget_map;

  g_object_class_install_property (object_class,
                                   PROP_SHOW_FLAGS,
                                   g_param_spec_flags ("show-flags",
                                                       "Show flags",
                                                       "Widget adaptors show flags",
                                                       _glade_adaptor_chooser_widget_flags_get_type (),
                                                       0,
                                                       G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
  g_object_class_install_property (object_class,
                                   PROP_SHOW_GROUP_TITLE,
                                   g_param_spec_boolean ("show-group-title",
                                                         "Show group title",
                                                         "Whether to show the group title",
                                                         FALSE,
                                                         G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
  g_object_class_install_property (object_class,
                                   PROP_PROJECT,
                                   g_param_spec_object ("project",
                                                        "Glade Project",
                                                        "If set, use project target version to skip unsupported classes",
                                                        GLADE_TYPE_PROJECT,
                                                        G_PARAM_READWRITE));

  adaptor_chooser_signals[ADAPTOR_SELECTED] =
    g_signal_new ("adaptor-selected", G_OBJECT_CLASS_TYPE (klass), 0, 0,
                  NULL, NULL, NULL,
                  G_TYPE_NONE, 1,
                  GLADE_TYPE_WIDGET_ADAPTOR);

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/gladeui/glade-adaptor-chooser-widget.ui");
  gtk_widget_class_bind_template_child_private (widget_class, _GladeAdaptorChooserWidget, treeview);
  gtk_widget_class_bind_template_child_private (widget_class, _GladeAdaptorChooserWidget, store);
  gtk_widget_class_bind_template_child_private (widget_class, _GladeAdaptorChooserWidget, treemodelfilter);
  gtk_widget_class_bind_template_child_private (widget_class, _GladeAdaptorChooserWidget, searchentry);
  gtk_widget_class_bind_template_child_private (widget_class, _GladeAdaptorChooserWidget, entrycompletion);
  gtk_widget_class_bind_template_child_private (widget_class, _GladeAdaptorChooserWidget, column_icon);
  gtk_widget_class_bind_template_child_private (widget_class, _GladeAdaptorChooserWidget, icon_cell);
  gtk_widget_class_bind_template_child_private (widget_class, _GladeAdaptorChooserWidget, column_adaptor);
  gtk_widget_class_bind_template_child_private (widget_class, _GladeAdaptorChooserWidget, adaptor_cell);
  gtk_widget_class_bind_template_child_private (widget_class, _GladeAdaptorChooserWidget, scrolledwindow);
  gtk_widget_class_bind_template_callback (widget_class, on_treeview_row_activated);
  gtk_widget_class_bind_template_callback (widget_class, on_searchentry_search_changed);
  gtk_widget_class_bind_template_callback (widget_class, on_searchentry_activate);
}
コード例 #11
0
ファイル: gt-favourites-view.c プロジェクト: pH5/gnome-twitch
static void
gt_favourites_view_class_init(GtFavouritesViewClass* klass)
{
    GObjectClass* object_class = G_OBJECT_CLASS(klass);

    GT_TYPE_CHANNELS_CONTAINER_FAVOURITE;

    object_class->finalize = finalize;
    object_class->get_property = get_property;
    object_class->set_property = set_property;

    props[PROP_SEARCH_ACTIVE] = g_param_spec_boolean("search-active",
                                "Search Active",
                                "Whether search is active",
                                FALSE,
                                G_PARAM_READWRITE);

    g_object_class_install_properties(object_class,
                                      NUM_PROPS,
                                      props);

    gtk_widget_class_set_template_from_resource(GTK_WIDGET_CLASS(klass), "/com/gnome-twitch/ui/gt-favourites-view.ui");

    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtFavouritesView, favourite_container);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtFavouritesView, search_bar);

    gtk_widget_class_bind_template_callback(GTK_WIDGET_CLASS(klass), search_changed_cb);
}
コード例 #12
0
static void
nautilus_toolbar_class_init (NautilusToolbarClass *klass)
{
	GObjectClass *oclass;
	GtkWidgetClass *widget_class;

	widget_class = GTK_WIDGET_CLASS (klass);
	oclass = G_OBJECT_CLASS (klass);
	oclass->get_property = nautilus_toolbar_get_property;
	oclass->set_property = nautilus_toolbar_set_property;
	oclass->finalize = nautilus_toolbar_finalize;

	properties[PROP_WINDOW] =
		g_param_spec_object ("window",
				     "The NautilusWindow",
				     "The NautilusWindow this toolbar is part of",
				     NAUTILUS_TYPE_WINDOW,
				     G_PARAM_WRITABLE |
				     G_PARAM_STATIC_STRINGS);
	properties[PROP_SHOW_LOCATION_ENTRY] =
		g_param_spec_boolean ("show-location-entry",
				      "Whether to show the location entry",
				      "Whether to show the location entry instead of the pathbar",
				      FALSE,
				      G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
	
	g_object_class_install_properties (oclass, NUM_PROPERTIES, properties);

	gtk_widget_class_set_template_from_resource (widget_class,
						     "/org/gnome/nautilus/nautilus-toolbar-ui.xml");

	gtk_widget_class_bind_template_child_private (widget_class, NautilusToolbar, operations_button);
	gtk_widget_class_bind_template_child_private (widget_class, NautilusToolbar, operations_icon);
	gtk_widget_class_bind_template_child_private (widget_class, NautilusToolbar, operations_container);
	gtk_widget_class_bind_template_child_private (widget_class, NautilusToolbar, operations_revealer);
	gtk_widget_class_bind_template_child_private (widget_class, NautilusToolbar, view_button);
        gtk_widget_class_bind_template_child_private (widget_class, NautilusToolbar, view_icon);
	gtk_widget_class_bind_template_child_private (widget_class, NautilusToolbar, action_button);
	gtk_widget_class_bind_template_child_private (widget_class, NautilusToolbar, path_bar_container);
	gtk_widget_class_bind_template_child_private (widget_class, NautilusToolbar, location_entry_container);
	gtk_widget_class_bind_template_child_private (widget_class, NautilusToolbar, back_button);
	gtk_widget_class_bind_template_child_private (widget_class, NautilusToolbar, forward_button);

        gtk_widget_class_bind_template_callback (widget_class, on_operations_icon_draw);
        gtk_widget_class_bind_template_callback (widget_class, on_operations_button_toggled);
}
コード例 #13
0
ファイル: eog-zoom-entry.c プロジェクト: GNOME/eog
static void
eog_zoom_entry_class_init (EogZoomEntryClass *klass)
{
	GObjectClass *object_class = G_OBJECT_CLASS (klass);
	GtkWidgetClass *wklass = GTK_WIDGET_CLASS (klass);

	object_class->constructed = eog_zoom_entry_constructed;
	object_class->set_property = eog_zoom_entry_set_property;
	object_class->finalize = eog_zoom_entry_finalize;

	gtk_widget_class_set_template_from_resource (wklass,
	                                             "/org/gnome/eog/ui/eog-zoom-entry.ui");
	gtk_widget_class_bind_template_child_private (wklass,
	                                              EogZoomEntry,
	                                              btn_zoom_in);
	gtk_widget_class_bind_template_child_private (wklass,
	                                              EogZoomEntry,
	                                              btn_zoom_out);
	gtk_widget_class_bind_template_child_private (wklass,
	                                              EogZoomEntry,
	                                              value_entry);

	gtk_widget_class_bind_template_callback (wklass,
	                                         eog_zoom_entry_activate_cb);
	gtk_widget_class_bind_template_callback (wklass,
	                                         eog_zoom_entry_icon_press_cb);

	g_object_class_install_property (object_class, PROP_SCROLL_VIEW,
	                                 g_param_spec_object ("scroll-view",
	                                                      "EogScrollView",
	                                                      "The EogScrollView to work with",
	                                                      EOG_TYPE_SCROLL_VIEW,
	                                                      G_PARAM_WRITABLE |
	                                                      G_PARAM_CONSTRUCT_ONLY |
	                                                      G_PARAM_STATIC_STRINGS));

	g_object_class_install_property (object_class, PROP_MENU,
	                                 g_param_spec_object ("menu",
	                                                      "Menu",
	                                                      "The zoom popup menu",
	                                                      G_TYPE_MENU,
	                                                      G_PARAM_WRITABLE |
	                                                      G_PARAM_CONSTRUCT_ONLY |
	                                                      G_PARAM_STATIC_STRINGS));
}
コード例 #14
0
ファイル: window.c プロジェクト: alexlarsson/gtk
static void
gtk_inspector_window_class_init (GtkInspectorWindowClass *klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  object_class->constructed = gtk_inspector_window_constructed;

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/inspector/window.ui");

  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, top_stack);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, button_stack);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, object_stack);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, object_tree);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, object_details);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, object_buttons);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, object_details_button);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, select_object);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, prop_list);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, child_prop_list);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, signals_list);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, classes_list);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, style_prop_list);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, widget_css_editor);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, widget_css_node_tree);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, object_hierarchy);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, selector);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, size_groups);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, data_list);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, actions);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, menu);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, misc_info);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, gestures);
  gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, magnifier);

  gtk_widget_class_bind_template_callback (widget_class, gtk_inspector_on_inspect);
  gtk_widget_class_bind_template_callback (widget_class, on_object_activated);
  gtk_widget_class_bind_template_callback (widget_class, on_object_selected);
  gtk_widget_class_bind_template_callback (widget_class, open_object_details);
  gtk_widget_class_bind_template_callback (widget_class, close_object_details);
}
コード例 #15
0
static void
cc_night_light_dialog_class_init (CcNightLightDialogClass *klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  object_class->finalize = cc_night_light_dialog_finalize;

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/display/cc-night-light-dialog.ui");

  gtk_widget_class_bind_template_child (widget_class, CcNightLightDialog, adjustment_from_hours);
  gtk_widget_class_bind_template_child (widget_class, CcNightLightDialog, adjustment_from_minutes);
  gtk_widget_class_bind_template_child (widget_class, CcNightLightDialog, adjustment_to_hours);
  gtk_widget_class_bind_template_child (widget_class, CcNightLightDialog, adjustment_to_minutes);
  gtk_widget_class_bind_template_child (widget_class, CcNightLightDialog, adjustment_color_temperature);
  gtk_widget_class_bind_template_child (widget_class, CcNightLightDialog, box_manual);
  gtk_widget_class_bind_template_child (widget_class, CcNightLightDialog, infobar_disabled);
  gtk_widget_class_bind_template_child (widget_class, CcNightLightDialog, scale_color_temperature);
  gtk_widget_class_bind_template_child (widget_class, CcNightLightDialog, spinbutton_from_hours);
  gtk_widget_class_bind_template_child (widget_class, CcNightLightDialog, spinbutton_from_minutes);
  gtk_widget_class_bind_template_child (widget_class, CcNightLightDialog, spinbutton_to_hours);
  gtk_widget_class_bind_template_child (widget_class, CcNightLightDialog, spinbutton_to_minutes);
  gtk_widget_class_bind_template_child (widget_class, CcNightLightDialog, stack_from);
  gtk_widget_class_bind_template_child (widget_class, CcNightLightDialog, stack_to);
  gtk_widget_class_bind_template_child (widget_class, CcNightLightDialog, togglebutton_box);
  gtk_widget_class_bind_template_child (widget_class, CcNightLightDialog, togglebutton_automatic);
  gtk_widget_class_bind_template_child (widget_class, CcNightLightDialog, togglebutton_manual);
  gtk_widget_class_bind_template_child (widget_class, CcNightLightDialog, togglebutton_off);

  gtk_widget_class_bind_template_callback (widget_class, dialog_am_pm_from_button_clicked_cb);
  gtk_widget_class_bind_template_callback (widget_class, dialog_am_pm_to_button_clicked_cb);
  gtk_widget_class_bind_template_callback (widget_class, dialog_enabled_notify_cb);
  gtk_widget_class_bind_template_callback (widget_class, dialog_format_hours_combobox);
  gtk_widget_class_bind_template_callback (widget_class, dialog_format_minutes_combobox);
  gtk_widget_class_bind_template_callback (widget_class, dialog_mode_changed_cb);
  gtk_widget_class_bind_template_callback (widget_class, dialog_time_from_value_changed_cb);
  gtk_widget_class_bind_template_callback (widget_class, dialog_time_to_value_changed_cb);
  gtk_widget_class_bind_template_callback (widget_class, dialog_color_temperature_value_changed_cb);
  gtk_widget_class_bind_template_callback (widget_class, dialog_undisable_clicked_cb);

}
コード例 #16
0
ファイル: playlist_dialog.c プロジェクト: GNOME/easytag
static void
et_playlist_dialog_class_init (EtPlaylistDialogClass *klass)
{
    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

    gtk_widget_class_set_template_from_resource (widget_class,
                                                 "/org/gnome/EasyTAG/playlist_dialog.ui");
    gtk_widget_class_bind_template_child_private (widget_class,
                                                  EtPlaylistDialog,
                                                  name_mask_radio);
    gtk_widget_class_bind_template_child_private (widget_class,
                                                  EtPlaylistDialog,
                                                  name_mask_entry);
    gtk_widget_class_bind_template_child_private (widget_class,
                                                  EtPlaylistDialog,
                                                  selected_files_check);
    gtk_widget_class_bind_template_child_private (widget_class,
                                                  EtPlaylistDialog,
                                                  path_relative_radio);
    gtk_widget_class_bind_template_child_private (widget_class,
                                                  EtPlaylistDialog,
                                                  playlist_parent_check);
    gtk_widget_class_bind_template_child_private (widget_class,
                                                  EtPlaylistDialog,
                                                  playlist_dos_check);
    gtk_widget_class_bind_template_child_private (widget_class,
                                                  EtPlaylistDialog,
                                                  content_filenames_radio);
    gtk_widget_class_bind_template_child_private (widget_class,
                                                  EtPlaylistDialog,
                                                  content_extended_radio);
    gtk_widget_class_bind_template_child_private (widget_class,
                                                  EtPlaylistDialog,
                                                  content_extended_mask_radio);
    gtk_widget_class_bind_template_child_private (widget_class,
                                                  EtPlaylistDialog,
                                                  content_mask_entry);
    gtk_widget_class_bind_template_callback (widget_class,
                                             entry_check_content_mask);
    gtk_widget_class_bind_template_callback (widget_class, on_response);
}
コード例 #17
0
static void
glade_window_editor_class_init (GladeWindowEditorClass * klass)
{
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  widget_class->grab_focus = glade_window_editor_grab_focus;

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/gladegtk/glade-window-editor.ui");
  gtk_widget_class_bind_template_child_internal_private (widget_class, GladeWindowEditor, extension_port);
  gtk_widget_class_bind_template_child_private (widget_class, GladeWindowEditor, embed);
  gtk_widget_class_bind_template_child_private (widget_class, GladeWindowEditor, icon_name_radio);
  gtk_widget_class_bind_template_child_private (widget_class, GladeWindowEditor, icon_file_radio);
  gtk_widget_class_bind_template_child_private (widget_class, GladeWindowEditor, use_csd_check);
  gtk_widget_class_bind_template_child_private (widget_class, GladeWindowEditor, title_editor);
  gtk_widget_class_bind_template_child_private (widget_class, GladeWindowEditor, decorated_editor);
  gtk_widget_class_bind_template_child_private (widget_class, GladeWindowEditor, hide_titlebar_editor);

  gtk_widget_class_bind_template_callback (widget_class, icon_name_toggled);
  gtk_widget_class_bind_template_callback (widget_class, icon_file_toggled);
  gtk_widget_class_bind_template_callback (widget_class, use_csd_toggled);
}
コード例 #18
0
/************************************************************************
 *                          GObjectClass                                *
 ************************************************************************/
static void
cursor_example_class_init (CursorExampleClass *klass)
{
	GObjectClass *object_class;
	GtkWidgetClass *widget_class;
	gint i;

	object_class = G_OBJECT_CLASS (klass);
	object_class->dispose = cursor_example_dispose;

	/* Bind to template */
	widget_class = GTK_WIDGET_CLASS (klass);
	gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/evolution/cursor-example/cursor-example.ui");
	gtk_widget_class_bind_template_child_private (widget_class, CursorExample, navigator);
	gtk_widget_class_bind_template_child_private (widget_class, CursorExample, browse_up_button);
	gtk_widget_class_bind_template_child_private (widget_class, CursorExample, browse_down_button);
	gtk_widget_class_bind_template_child_private (widget_class, CursorExample, alphabet_label);
	gtk_widget_class_bind_template_child_private (widget_class, CursorExample, progressbar);

	for (i = 0; i < N_SLOTS; i++) {
		gchar *name = g_strdup_printf ("contact_slot_%d", i + 1);

		gtk_widget_class_bind_template_child_full (widget_class, name, FALSE, 0);
		g_free (name);
	}

	gtk_widget_class_bind_template_callback (widget_class, cursor_example_navigator_changed);
	gtk_widget_class_bind_template_callback (widget_class, cursor_example_up_button_press);
	gtk_widget_class_bind_template_callback (widget_class, cursor_example_up_button_release);
	gtk_widget_class_bind_template_callback (widget_class, cursor_example_down_button_press);
	gtk_widget_class_bind_template_callback (widget_class, cursor_example_down_button_release);
	gtk_widget_class_bind_template_callback (widget_class, cursor_example_sexp_changed);
}
コード例 #19
0
ファイル: glade-widget-editor.c プロジェクト: kugel-/glade
static void
glade_widget_editor_class_init (GladeWidgetEditorClass * klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  object_class->finalize = glade_widget_editor_finalize;

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/gladegtk/glade-widget-editor.ui");

  gtk_widget_class_bind_template_child_private (widget_class, GladeWidgetEditor, custom_tooltip_check);
  gtk_widget_class_bind_template_child_private (widget_class, GladeWidgetEditor, tooltip_markup_check);
  gtk_widget_class_bind_template_child_private (widget_class, GladeWidgetEditor, tooltip_label_notebook);
  gtk_widget_class_bind_template_child_private (widget_class, GladeWidgetEditor, tooltip_editor_notebook);
  gtk_widget_class_bind_template_child_private (widget_class, GladeWidgetEditor, resize_mode_label);
  gtk_widget_class_bind_template_child_private (widget_class, GladeWidgetEditor, resize_mode_editor);
  gtk_widget_class_bind_template_child_private (widget_class, GladeWidgetEditor, border_width_label);
  gtk_widget_class_bind_template_child_private (widget_class, GladeWidgetEditor, border_width_editor);

  gtk_widget_class_bind_template_callback (widget_class, markup_toggled);
  gtk_widget_class_bind_template_callback (widget_class, custom_tooltip_toggled);
}
コード例 #20
0
ファイル: glade-action-bar-editor.c プロジェクト: GNOME/glade
static void
glade_action_bar_editor_class_init (GladeActionBarEditorClass * klass)
{
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  widget_class->grab_focus = glade_action_bar_editor_grab_focus;

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/gladegtk/glade-action-bar-editor.ui");
  gtk_widget_class_bind_template_child_private (widget_class, GladeActionBarEditor, embed);
  gtk_widget_class_bind_template_child_private (widget_class, GladeActionBarEditor, use_center_child);

  gtk_widget_class_bind_template_callback (widget_class, use_center_child_toggled);
}
コード例 #21
0
static void
gcal_time_selector_class_init (GcalTimeSelectorClass *klass)
{
  GObjectClass *object_class;

  object_class = G_OBJECT_CLASS (klass);
  object_class->constructed = gcal_time_selector_constructed;
  object_class->dispose = gcal_time_selector_dispose;
  object_class->finalize = gcal_time_selector_finalize;
  object_class->get_property = gcal_time_selector_get_property;
  object_class->set_property = gcal_time_selector_set_property;

  /**
   * GcalTimeSelector::time:
   *
   * The current time of the selector.
   */
  g_object_class_install_property (object_class,
                                   PROP_TIME,
                                   g_param_spec_boxed ("time",
                                                       "Time of the selector",
                                                       "The current time of the selector",
                                                       G_TYPE_DATE_TIME,
                                                       G_PARAM_READWRITE));

  gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/calendar/time-selector.ui");

  gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass), GcalTimeSelector, time_label);
  gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass), GcalTimeSelector, hour_adjustment);
  gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass), GcalTimeSelector, hour_spin);
  gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass), GcalTimeSelector, minute_adjustment);
  gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass), GcalTimeSelector, minute_spin);
  gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass), GcalTimeSelector, period_combo);
  gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass), GcalTimeSelector, grid);

  gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (klass), on_output);
  gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (klass), update_time);
}
コード例 #22
0
static void
gt_channels_container_child_class_init(GtChannelsContainerChildClass* klass)
{
    GObjectClass* object_class = G_OBJECT_CLASS(klass);

    object_class->finalize = finalize;
    object_class->get_property = get_property;
    object_class->set_property = set_property;
    object_class->constructed = constructed;

    gtk_widget_class_set_template_from_resource(GTK_WIDGET_CLASS(klass), 
                                                "/com/gnome-twitch/ui/gt-channels-container-child.ui");

    props[PROP_CHANNEL] = g_param_spec_object("channel",
                                              "Channel",
                                              "Associated channel",
                                              GT_TYPE_CHANNEL,
                                              G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);

    g_object_class_install_properties(object_class,
                                      NUM_PROPS,
                                      props);

    gtk_widget_class_bind_template_callback(GTK_WIDGET_CLASS(klass), motion_enter_cb);
    gtk_widget_class_bind_template_callback(GTK_WIDGET_CLASS(klass), motion_leave_cb);
    gtk_widget_class_bind_template_callback(GTK_WIDGET_CLASS(klass), favourite_button_cb);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsContainerChild, preview_image);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsContainerChild, name_label);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsContainerChild, game_label);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsContainerChild, event_box);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsContainerChild, middle_revealer);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsContainerChild, viewers_label);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsContainerChild, time_label);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsContainerChild, favourite_button);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsContainerChild, middle_stack);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsContainerChild, play_image);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsContainerChild, bottom_box);
}
コード例 #23
0
static void
gis_privacy_page_class_init (GisPrivacyPageClass *klass)
{
  GisPageClass *page_class = GIS_PAGE_CLASS (klass);
  GObjectClass *object_class = G_OBJECT_CLASS (klass);

  gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/initial-setup/gis-privacy-page.ui");
  gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisPrivacyPage, location_switch);
  gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisPrivacyPage, reporting_row);
  gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisPrivacyPage, reporting_switch);
  gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisPrivacyPage, reporting_label);
  gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisPrivacyPage, privacy_policy_label);
  gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (klass), activate_link);

  page_class->page_id = PAGE_ID;
  page_class->apply = gis_privacy_page_apply;
  object_class->constructed = gis_privacy_page_constructed;
  object_class->dispose = gis_privacy_page_dispose;
}
コード例 #24
0
ファイル: gt-games-view.c プロジェクト: pfent/gnome-twitch
static void
gt_games_view_class_init(GtGamesViewClass* klass)
{
    GObjectClass* object_class = G_OBJECT_CLASS(klass);

    GT_TYPE_GAMES_CONTAINER_TOP;
    GT_TYPE_GAMES_CONTAINER_SEARCH;
    GT_TYPE_CHANNELS_CONTAINER_GAME;

    object_class->finalize = finalize;
    object_class->get_property = get_property;
    object_class->set_property = set_property;

    props[PROP_SEARCH_ACTIVE] = g_param_spec_boolean("search-active",
                                                     "Search Active",
                                                     "Whether search is active",
                                                     FALSE,
                                                     G_PARAM_READWRITE);
    props[PROP_SHOWING_TOP_GAMES] = g_param_spec_boolean("showing-top-games",
                                                         "Showing Top Games",
                                                         "Whether showing top games",
                                                         FALSE,
                                                         G_PARAM_READABLE);
    props[PROP_SHOWING_GAME_CHANNELS] = g_param_spec_boolean("showing-game-channels",
                                                             "Showing Game Channels",
                                                             "Whether showing game channels",
                                                             FALSE,
                                                             G_PARAM_READABLE);
    g_object_class_install_properties(object_class,
                                      NUM_PROPS,
                                      props);

    gtk_widget_class_set_template_from_resource(GTK_WIDGET_CLASS(klass), "/com/gnome-twitch/ui/gt-games-view.ui");

    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtGamesView, games_stack);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtGamesView, search_bar);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtGamesView, top_container);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtGamesView, search_container);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtGamesView, game_container);

    gtk_widget_class_bind_template_callback(GTK_WIDGET_CLASS(klass), search_changed_cb);
}
コード例 #25
0
ファイル: gcal-year-view.c プロジェクト: C4jk/gnome-calendar
static void
gcal_year_view_class_init (GcalYearViewClass *klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  object_class->finalize = gcal_year_view_finalize;
  object_class->get_property = gcal_year_view_get_property;
  object_class->set_property = gcal_year_view_set_property;

  widget_class->get_preferred_width = gcal_year_view_get_preferred_width;
  widget_class->get_preferred_height_for_width = gcal_year_view_get_preferred_height_for_width;
  widget_class->size_allocate = gcal_year_view_size_allocate;
  widget_class->direction_changed = gcal_year_view_direction_changed;

  g_object_class_override_property (object_class, PROP_DATE, "active-date");

  /* FIXME: it will problably go back to GcalView */
  signals[EVENT_ACTIVATED] = g_signal_new ("event-activated", GCAL_TYPE_YEAR_VIEW, G_SIGNAL_RUN_LAST,
                                           G_STRUCT_OFFSET (GcalYearViewClass, event_activated),
                                           NULL, NULL, NULL,
                                           G_TYPE_NONE, 1, GCAL_TYPE_EVENT_WIDGET);

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/year-view.ui");

  gtk_widget_class_bind_template_child_private (widget_class, GcalYearView, navigator);
  gtk_widget_class_bind_template_child_private (widget_class, GcalYearView, sidebar);
  gtk_widget_class_bind_template_child_private (widget_class, GcalYearView, events_sidebar);
  gtk_widget_class_bind_template_child_private (widget_class, GcalYearView, navigator_stack);
  gtk_widget_class_bind_template_child_private (widget_class, GcalYearView, navigator_sidebar);
  gtk_widget_class_bind_template_child_private (widget_class, GcalYearView, no_events_title);
  gtk_widget_class_bind_template_child_private (widget_class, GcalYearView, popover);

  gtk_widget_class_bind_template_callback (widget_class, draw_navigator);
  gtk_widget_class_bind_template_callback (widget_class, navigator_button_press_cb);
  gtk_widget_class_bind_template_callback (widget_class, navigator_button_release_cb);
  gtk_widget_class_bind_template_callback (widget_class, navigator_motion_notify_cb);
  gtk_widget_class_bind_template_callback (widget_class, add_event_clicked_cb);
  gtk_widget_class_bind_template_callback (widget_class, popover_closed_cb);
}
コード例 #26
0
static void
glade_project_properties_class_init (GladeProjectPropertiesClass *klass)
{
  GObjectClass *gobject_class;
  GtkWidgetClass *widget_class;

  gobject_class = G_OBJECT_CLASS (klass);
  widget_class  = GTK_WIDGET_CLASS (klass);

  gobject_class->finalize = glade_project_properties_finalize;
  gobject_class->set_property = glade_project_properties_set_property;

  g_object_class_install_property
    (gobject_class, PROP_PROJECT,
     g_param_spec_object ("project", _("Project"),
			  _("The project this properties dialog was created for"),
			  GLADE_TYPE_PROJECT,
			  G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));

  /* Setup the template GtkBuilder xml for this class
   */
  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/gladeui/glade-project-properties.ui");

  /* Define the relationship of the private entry and the entry defined in the xml
   */
  gtk_widget_class_bind_template_child_private (widget_class, GladeProjectProperties, resource_default_radio);
  gtk_widget_class_bind_template_child_private (widget_class, GladeProjectProperties, resource_relative_radio);
  gtk_widget_class_bind_template_child_private (widget_class, GladeProjectProperties, resource_fullpath_radio);
  gtk_widget_class_bind_template_child_private (widget_class, GladeProjectProperties, relative_path_entry);
  gtk_widget_class_bind_template_child_private (widget_class, GladeProjectProperties, full_path_button);
  gtk_widget_class_bind_template_child_private (widget_class, GladeProjectProperties, domain_entry);
  gtk_widget_class_bind_template_child_private (widget_class, GladeProjectProperties, template_checkbutton);
  gtk_widget_class_bind_template_child_private (widget_class, GladeProjectProperties, template_combobox);
  gtk_widget_class_bind_template_child_private (widget_class, GladeProjectProperties, toolkit_box);
  gtk_widget_class_bind_template_child_private (widget_class, GladeProjectProperties, license_textbuffer);
  gtk_widget_class_bind_template_child_private (widget_class, GladeProjectProperties, css_filechooser);
  gtk_widget_class_bind_template_child_private (widget_class, GladeProjectProperties, css_checkbutton);

  /* Declare the callback ports that this widget class exposes, to bind with <signal>
   * connections defined in the GtkBuilder xml
   */
  gtk_widget_class_bind_template_callback (widget_class, on_template_combo_box_changed);
  gtk_widget_class_bind_template_callback (widget_class, on_template_checkbutton_toggled);
  gtk_widget_class_bind_template_callback (widget_class, resource_default_toggled);
  gtk_widget_class_bind_template_callback (widget_class, resource_relative_toggled);
  gtk_widget_class_bind_template_callback (widget_class, resource_fullpath_toggled);
  gtk_widget_class_bind_template_callback (widget_class, resource_full_path_set);
  gtk_widget_class_bind_template_callback (widget_class, verify_clicked);
  gtk_widget_class_bind_template_callback (widget_class, on_domain_entry_changed);
  gtk_widget_class_bind_template_callback (widget_class, on_relative_path_entry_insert_text);
  gtk_widget_class_bind_template_callback (widget_class, on_relative_path_entry_changed);
  gtk_widget_class_bind_template_callback (widget_class, on_license_textview_populate_popup);
  gtk_widget_class_bind_template_callback (widget_class, on_glade_project_properties_hide);  
  gtk_widget_class_bind_template_callback (widget_class, on_css_filechooser_file_set);
  gtk_widget_class_bind_template_callback (widget_class, on_css_checkbutton_toggled);
}
コード例 #27
0
static void
ag_chart_edit_class_init(AgChartEditClass *klass)
{
    GObjectClass   *gobject_class = (GObjectClass *)klass;
    GtkWidgetClass *widget_class  = GTK_WIDGET_CLASS(klass);

    gobject_class->dispose      = ag_chart_edit_dispose;
    gobject_class->finalize     = ag_chart_edit_finalize;
    gobject_class->set_property = ag_chart_edit_set_property;
    gobject_class->get_property = ag_chart_edit_get_property;

    signals[SIGNAL_NAME_CHANGED] = g_signal_new(
            "name-changed",
            G_TYPE_FROM_CLASS(klass),
            G_SIGNAL_RUN_FIRST,
            0, NULL, NULL,
            g_cclosure_marshal_generic, G_TYPE_NONE, 0
        );

    properties[PROP_NAME] = g_param_spec_string(
            "name",
            "Name",
            "The person's name",
            NULL,
            G_PARAM_STATIC_NICK
            | G_PARAM_STATIC_NAME
            | G_PARAM_STATIC_BLURB
            | G_PARAM_READABLE
            | G_PARAM_WRITABLE
        );
    g_object_class_install_property(
            gobject_class,
            PROP_NAME,
            properties[PROP_NAME]
        );

    properties[PROP_COUNTRY] = g_param_spec_string(
            "country",
            "Country",
            "Country of birth",
            NULL,
            G_PARAM_STATIC_NICK
            | G_PARAM_STATIC_NAME
            | G_PARAM_STATIC_BLURB
            | G_PARAM_READABLE
            | G_PARAM_WRITABLE
        );
    g_object_class_install_property(
            gobject_class,
            PROP_COUNTRY,
            properties[PROP_COUNTRY]
        );

    properties[PROP_CITY] = g_param_spec_string(
            "city",
            "City",
            "City of birth",
            NULL,
            G_PARAM_STATIC_NICK
            | G_PARAM_STATIC_NAME
            | G_PARAM_STATIC_BLURB
            | G_PARAM_READABLE
            | G_PARAM_WRITABLE
        );
    g_object_class_install_property(
            gobject_class,
            PROP_CITY,
            properties[PROP_CITY]
        );

    properties[PROP_LONGITUDE] = g_param_spec_double(
            "longitude",
            "Longitude",
            "Longitude of birth",
            -180.0, 180.0,
            0.0,
            G_PARAM_STATIC_NICK
            | G_PARAM_STATIC_NAME
            | G_PARAM_STATIC_BLURB
            | G_PARAM_READABLE
            | G_PARAM_WRITABLE
        );
    g_object_class_install_property(
            gobject_class,
            PROP_LONGITUDE,
            properties[PROP_LONGITUDE]
        );

    properties[PROP_LATITUDE] = g_param_spec_double(
            "latitude",
            "Latitude",
            "Latitude of birth",
            -90.0, 90.0,
            0.0,
            G_PARAM_STATIC_NICK
            | G_PARAM_STATIC_NAME
            | G_PARAM_STATIC_BLURB
            | G_PARAM_READABLE
            | G_PARAM_WRITABLE
        );
    g_object_class_install_property(
            gobject_class,
            PROP_LATITUDE,
            properties[PROP_LATITUDE]
        );

    properties[PROP_TIMESTAMP] = g_param_spec_object(
            "timestamp",
            "Timestamp",
            "Timestamp of birth",
            GSWE_TYPE_TIMESTAMP, 
            G_PARAM_STATIC_NICK
            | G_PARAM_STATIC_NAME
            | G_PARAM_STATIC_BLURB
            | G_PARAM_READABLE
            | G_PARAM_WRITABLE
        );
    g_object_class_install_property(
            gobject_class,
            PROP_TIMESTAMP,
            properties[PROP_TIMESTAMP]
        );

    properties[PROP_NOTE] = g_param_spec_string(
            "note",
            "Note",
            "Chart notes",
            NULL,
            G_PARAM_STATIC_NICK
            | G_PARAM_STATIC_NAME
            | G_PARAM_STATIC_BLURB
            | G_PARAM_READABLE
            | G_PARAM_WRITABLE
        );
    g_object_class_install_property(
            gobject_class,
            PROP_NOTE,
            properties[PROP_NOTE]
        );

    gtk_widget_class_set_template_from_resource(
            widget_class,
            "/eu/polonkai/gergely/Astrognome/ui/ag-chart-edit.ui"
        );

    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            name
        );
    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            country
        );
    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            country_comp
        );
    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            city
        );
    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            city_comp
        );
    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            year
        );
    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            month
        );
    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            day
        );
    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            hour
        );
    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            minute
        );
    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            second
        );
    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            timezone
        );
    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            north_lat
        );
    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            south_lat
        );
    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            east_long
        );
    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            west_long
        );
    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            latitude
        );
    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            longitude
        );
    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            year_adjust
        );
    gtk_widget_class_bind_template_child_private(
            widget_class,
            AgChartEdit,
            note_buffer
        );

    gtk_widget_class_bind_template_callback(
            widget_class,
            ag_chart_edit_country_changed_cb
        );
    gtk_widget_class_bind_template_callback(
            widget_class,
            ag_chart_edit_city_changed_cb
        );
    gtk_widget_class_bind_template_callback(
            widget_class,
            ag_chart_edit_name_changed_cb
        );
}
コード例 #28
0
static void
xviewer_properties_dialog_class_init (XviewerPropertiesDialogClass *klass)
{
	GObjectClass *g_object_class = (GObjectClass *) klass;

	g_object_class->dispose = xviewer_properties_dialog_dispose;
	g_object_class->set_property = xviewer_properties_dialog_set_property;
	g_object_class->get_property = xviewer_properties_dialog_get_property;

	g_object_class_install_property (g_object_class,
					 PROP_THUMBVIEW,
					 g_param_spec_object ("thumbview",
							      "Thumbview",
							      "Thumbview",
							      XVIEWER_TYPE_THUMB_VIEW,
							      G_PARAM_READWRITE |
							      G_PARAM_CONSTRUCT_ONLY |
							      G_PARAM_STATIC_NAME |
							      G_PARAM_STATIC_NICK |
							      G_PARAM_STATIC_BLURB));
	g_object_class_install_property (g_object_class, PROP_NETBOOK_MODE,
					 g_param_spec_boolean ("netbook-mode",
					 		      "Netbook Mode",
							      "Netbook Mode",
							      FALSE,
							      G_PARAM_READWRITE |
							      G_PARAM_STATIC_STRINGS));
	g_object_class_install_property (g_object_class,
					 PROP_NEXT_ACTION,
					 g_param_spec_object ("next-action",
							      "Next Action",
							      "Action for Next button",
							      GTK_TYPE_ACTION,
							      G_PARAM_READWRITE |
							      G_PARAM_CONSTRUCT_ONLY |
							      G_PARAM_STATIC_NAME |
							      G_PARAM_STATIC_NICK |
							      G_PARAM_STATIC_BLURB));
	g_object_class_install_property (g_object_class,
					 PROP_PREV_ACTION,
					 g_param_spec_object ("prev-action",
							      "Prev Action",
							      "Action for Prev button",
							      GTK_TYPE_ACTION,
							      G_PARAM_READWRITE |
							      G_PARAM_CONSTRUCT_ONLY |
							      G_PARAM_STATIC_NAME |
							      G_PARAM_STATIC_NICK |
							      G_PARAM_STATIC_BLURB));

	gtk_widget_class_set_template_from_resource ((GtkWidgetClass *) klass, "/org/x/viewer/ui/xviewer-image-properties-dialog.ui");

	GtkWidgetClass *wklass = (GtkWidgetClass*) klass;
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     notebook);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     previous_button);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     next_button);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     close_button);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     thumbnail_image);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     general_box);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     name_label);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     width_label);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     height_label);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     type_label);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     bytes_label);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     folder_button);

#if HAVE_EXIF
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     exif_aperture_label);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     exif_exposure_label);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     exif_focal_label);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     exif_flash_label);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     exif_iso_label);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     exif_metering_label);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     exif_model_label);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     exif_date_label);
#endif
#if HAVE_EXEMPI
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     xmp_location_label);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     xmp_description_label);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     xmp_keywords_label);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     xmp_creator_label);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     xmp_rights_label);
#else
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     xmp_box);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     xmp_box_label);
#endif
#ifdef HAVE_METADATA
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     metadata_box);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     metadata_details_expander);
	gtk_widget_class_bind_template_child_private(wklass,
						     XviewerPropertiesDialog,
						     metadata_details_box);

	gtk_widget_class_bind_template_callback(wklass,
						pd_exif_details_activated_cb);
#endif
	gtk_widget_class_bind_template_callback(wklass,
						xviewer_properties_dialog_page_switch);
	gtk_widget_class_bind_template_callback(wklass,
						pd_folder_button_clicked_cb);

}
コード例 #29
0
ファイル: gtkappchooserwidget.c プロジェクト: GNOME/gtk
static void
gtk_app_chooser_widget_class_init (GtkAppChooserWidgetClass *klass)
{
  GtkWidgetClass *widget_class;
  GObjectClass *gobject_class;
  GParamSpec *pspec;

  gobject_class = G_OBJECT_CLASS (klass);
  gobject_class->dispose = gtk_app_chooser_widget_dispose;
  gobject_class->finalize = gtk_app_chooser_widget_finalize;
  gobject_class->set_property = gtk_app_chooser_widget_set_property;
  gobject_class->get_property = gtk_app_chooser_widget_get_property;
  gobject_class->constructed = gtk_app_chooser_widget_constructed;

  widget_class = GTK_WIDGET_CLASS (klass);
  widget_class->measure = gtk_app_chooser_widget_measure;
  widget_class->size_allocate = gtk_app_chooser_widget_size_allocate;
  widget_class->snapshot = gtk_app_chooser_widget_snapshot;


  g_object_class_override_property (gobject_class, PROP_CONTENT_TYPE, "content-type");

  /**
   * GtkAppChooserWidget:show-default:
   *
   * The ::show-default property determines whether the app chooser
   * should show the default handler for the content type in a
   * separate section. If %FALSE, the default handler is listed
   * among the recommended applications.
   */
  pspec = g_param_spec_boolean ("show-default",
                                P_("Show default app"),
                                P_("Whether the widget should show the default application"),
                                FALSE,
                                G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
  g_object_class_install_property (gobject_class, PROP_SHOW_DEFAULT, pspec);

  /**
   * GtkAppChooserWidget:show-recommended:
   *
   * The #GtkAppChooserWidget:show-recommended property determines
   * whether the app chooser should show a section for recommended
   * applications. If %FALSE, the recommended applications are listed
   * among the other applications.
   */
  pspec = g_param_spec_boolean ("show-recommended",
                                P_("Show recommended apps"),
                                P_("Whether the widget should show recommended applications"),
                                TRUE,
                                G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
  g_object_class_install_property (gobject_class, PROP_SHOW_RECOMMENDED, pspec);

  /**
   * GtkAppChooserWidget:show-fallback:
   *
   * The #GtkAppChooserWidget:show-fallback property determines whether
   * the app chooser should show a section for fallback applications.
   * If %FALSE, the fallback applications are listed among the other
   * applications.
   */
  pspec = g_param_spec_boolean ("show-fallback",
                                P_("Show fallback apps"),
                                P_("Whether the widget should show fallback applications"),
                                FALSE,
                                G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
  g_object_class_install_property (gobject_class, PROP_SHOW_FALLBACK, pspec);

  /**
   * GtkAppChooserWidget:show-other:
   *
   * The #GtkAppChooserWidget:show-other property determines whether
   * the app chooser should show a section for other applications.
   */
  pspec = g_param_spec_boolean ("show-other",
                                P_("Show other apps"),
                                P_("Whether the widget should show other applications"),
                                FALSE,
                                G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
  g_object_class_install_property (gobject_class, PROP_SHOW_OTHER, pspec);

  /**
   * GtkAppChooserWidget:show-all:
   *
   * If the #GtkAppChooserWidget:show-all property is %TRUE, the app
   * chooser presents all applications in a single list, without
   * subsections for default, recommended or related applications.
   */
  pspec = g_param_spec_boolean ("show-all",
                                P_("Show all apps"),
                                P_("Whether the widget should show all applications"),
                                FALSE,
                                G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
  g_object_class_install_property (gobject_class, PROP_SHOW_ALL, pspec);

  /**
   * GtkAppChooserWidget:default-text:
   *
   * The #GtkAppChooserWidget:default-text property determines the text
   * that appears in the widget when there are no applications for the
   * given content type.
   * See also gtk_app_chooser_widget_set_default_text().
   */
  pspec = g_param_spec_string ("default-text",
                               P_("Widget’s default text"),
                               P_("The default text appearing when there are no applications"),
                               NULL,
                               G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
  g_object_class_install_property (gobject_class, PROP_DEFAULT_TEXT, pspec);

  /**
   * GtkAppChooserWidget::application-selected:
   * @self: the object which received the signal
   * @application: the selected #GAppInfo
   *
   * Emitted when an application item is selected from the widget's list.
   */
  signals[SIGNAL_APPLICATION_SELECTED] =
    g_signal_new (I_("application-selected"),
                  GTK_TYPE_APP_CHOOSER_WIDGET,
                  G_SIGNAL_RUN_FIRST,
                  G_STRUCT_OFFSET (GtkAppChooserWidgetClass, application_selected),
                  NULL, NULL,
                  NULL,
                  G_TYPE_NONE,
                  1, G_TYPE_APP_INFO);

  /**
   * GtkAppChooserWidget::application-activated:
   * @self: the object which received the signal
   * @application: the activated #GAppInfo
   *
   * Emitted when an application item is activated from the widget's list.
   *
   * This usually happens when the user double clicks an item, or an item
   * is selected and the user presses one of the keys Space, Shift+Space,
   * Return or Enter.
   */
  signals[SIGNAL_APPLICATION_ACTIVATED] =
    g_signal_new (I_("application-activated"),
                  GTK_TYPE_APP_CHOOSER_WIDGET,
                  G_SIGNAL_RUN_FIRST,
                  G_STRUCT_OFFSET (GtkAppChooserWidgetClass, application_activated),
                  NULL, NULL,
                  NULL,
                  G_TYPE_NONE,
                  1, G_TYPE_APP_INFO);

  /**
   * GtkAppChooserWidget::populate-popup:
   * @self: the object which received the signal
   * @menu: the #GtkMenu to populate
   * @application: the current #GAppInfo
   *
   * Emitted when a context menu is about to popup over an application item.
   * Clients can insert menu items into the provided #GtkMenu object in the
   * callback of this signal; the context menu will be shown over the item
   * if at least one item has been added to the menu.
   */
  signals[SIGNAL_POPULATE_POPUP] =
    g_signal_new (I_("populate-popup"),
                  GTK_TYPE_APP_CHOOSER_WIDGET,
                  G_SIGNAL_RUN_FIRST,
                  G_STRUCT_OFFSET (GtkAppChooserWidgetClass, populate_popup),
                  NULL, NULL,
                  _gtk_marshal_VOID__OBJECT_OBJECT,
                  G_TYPE_NONE,
                  2, GTK_TYPE_MENU, G_TYPE_APP_INFO);

  /* Bind class to template
   */
  gtk_widget_class_set_template_from_resource (widget_class,
					       "/org/gtk/libgtk/ui/gtkappchooserwidget.ui");
  gtk_widget_class_bind_template_child_private (widget_class, GtkAppChooserWidget, program_list);
  gtk_widget_class_bind_template_child_private (widget_class, GtkAppChooserWidget, program_list_store);
  gtk_widget_class_bind_template_child_private (widget_class, GtkAppChooserWidget, column);
  gtk_widget_class_bind_template_child_private (widget_class, GtkAppChooserWidget, padding_renderer);
  gtk_widget_class_bind_template_child_private (widget_class, GtkAppChooserWidget, secondary_padding);
  gtk_widget_class_bind_template_child_private (widget_class, GtkAppChooserWidget, no_apps_label);
  gtk_widget_class_bind_template_child_private (widget_class, GtkAppChooserWidget, no_apps);
  gtk_widget_class_bind_template_child_private (widget_class, GtkAppChooserWidget, overlay);
  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_set_css_name (widget_class, I_("appchooser"));
}
コード例 #30
0
ファイル: fsearch_window.c プロジェクト: cboxdoerfer/fsearch
static void
fsearch_application_window_class_init (FsearchApplicationWindowClass *klass)
{
    GObjectClass *object_class = G_OBJECT_CLASS (klass);
    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

    object_class->constructed = fsearch_application_window_constructed;
    object_class->finalize = fsearch_application_window_finalize;
    gtk_widget_class_set_template_from_resource (widget_class, "/org/fsearch/fsearch/fsearch.glade");
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, search_overlay);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, menubar);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, statusbar);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, search_in_path_revealer);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, match_case_revealer);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, search_mode_revealer);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, search_button);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, search_entry);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, filter_combobox);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, listview);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, listview_selection);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, selection_toggle_button);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, num_folders_label);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, num_files_label);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, database_toggle_button);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, database_spinner);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, database_icon);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, database_stack);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, database_box1);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, database_box2);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, database_label);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, database_label1);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, search_label);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, search_icon);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, revealer);
    gtk_widget_class_bind_template_child (widget_class, FsearchApplicationWindow, scrolledwindow1);

    gtk_widget_class_bind_template_callback (widget_class, on_search_entry_changed);
    gtk_widget_class_bind_template_callback (widget_class, on_listview_button_press_event);
    gtk_widget_class_bind_template_callback (widget_class, on_listview_key_press_event);
    gtk_widget_class_bind_template_callback (widget_class, on_listview_popup_menu);
    gtk_widget_class_bind_template_callback (widget_class, on_listview_selection_changed);
    gtk_widget_class_bind_template_callback (widget_class, on_listview_row_activated);
    gtk_widget_class_bind_template_callback (widget_class, on_selection_toggle_button_toggled);
    gtk_widget_class_bind_template_callback (widget_class, on_match_case_label_button_press_event);
    gtk_widget_class_bind_template_callback (widget_class, on_search_in_path_label_button_press_event);
    gtk_widget_class_bind_template_callback (widget_class, on_search_mode_label_button_press_event);
    gtk_widget_class_bind_template_callback (widget_class, on_database_toggle_button_toggled);
    gtk_widget_class_bind_template_callback (widget_class, on_filter_combobox_changed);
    gtk_widget_class_bind_template_callback (widget_class, on_search_entry_activate);
    gtk_widget_class_bind_template_callback (widget_class, on_listview_query_tooltip);
}