Пример #1
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");
}
Пример #2
0
static void
ephy_encoding_row_class_init (EphyEncodingRowClass *klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  /* class creation */
  object_class->set_property = ephy_encoding_row_set_property;
  object_class->get_property = ephy_encoding_row_get_property;

  obj_properties[PROP_ENCODING] =
    g_param_spec_object ("encoding",
                         "encoding",
                         "encoding",
                         EPHY_TYPE_ENCODING,
                         G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);

  g_object_class_install_properties (object_class, LAST_PROP, obj_properties);

  /* load from UI file */
  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/epiphany/encoding-row.ui");

  gtk_widget_class_bind_template_child (widget_class, EphyEncodingRow, encoding_label);
  gtk_widget_class_bind_template_child (widget_class, EphyEncodingRow, selected_image);
}
static void
ide_git_clone_widget_class_init (IdeGitCloneWidgetClass *klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  object_class->finalize = ide_git_clone_widget_finalize;
  object_class->get_property = ide_git_clone_widget_get_property;

  g_object_class_install_property (object_class,
                                   PROP_IS_READY,
                                   g_param_spec_boolean ("is-ready",
                                                         "Is Ready",
                                                         "If the widget is ready to continue.",
                                                         FALSE,
                                                         (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));

  gtk_widget_class_set_css_name (widget_class, "gitclonewidget");
  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/builder/plugins/git-plugin/ide-git-clone-widget.ui");
  gtk_widget_class_bind_template_child (widget_class, IdeGitCloneWidget, clone_error_label);
  gtk_widget_class_bind_template_child (widget_class, IdeGitCloneWidget, clone_location_button);
  gtk_widget_class_bind_template_child (widget_class, IdeGitCloneWidget, clone_location_entry);
  gtk_widget_class_bind_template_child (widget_class, IdeGitCloneWidget, clone_progress);
  gtk_widget_class_bind_template_child (widget_class, IdeGitCloneWidget, clone_uri_entry);
}
Пример #4
0
static void
edosu_close_label_class_init(EdosuCloseLabelClass *klass)
{
    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
    gtk_widget_class_set_template_from_resource(
        widget_class, "/org/osux/edosu/ui/EdosuCloseLabel.glade");
    gtk_widget_class_bind_template_child(widget_class, EdosuCloseLabel, label);
    gtk_widget_class_bind_template_child(widget_class, EdosuCloseLabel, close_button);
}
Пример #5
0
static void
gb_terminal_view_class_init (GbTerminalViewClass *klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
  IdeLayoutViewClass *view_class = IDE_LAYOUT_VIEW_CLASS (klass);

  object_class->finalize = gb_terminal_view_finalize;
  object_class->get_property = gb_terminal_view_get_property;
  object_class->set_property = gb_terminal_view_set_property;

  widget_class->realize = gb_terminal_realize;
  widget_class->get_preferred_width = gb_terminal_get_preferred_width;
  widget_class->get_preferred_height = gb_terminal_get_preferred_height;
  widget_class->grab_focus = gb_terminal_grab_focus;

  view_class->get_title = gb_terminal_get_title;
  view_class->create_split = gb_terminal_create_split;
  view_class->get_split_view =  gb_terminal_get_split_view;
  view_class->set_split_view =  gb_terminal_set_split_view;

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/builder/plugins/terminal/gb-terminal-view.ui");
  gtk_widget_class_bind_template_child (widget_class, GbTerminalView, terminal_top);
  gtk_widget_class_bind_template_child (widget_class, GbTerminalView, bottom_container);
  gtk_widget_class_bind_template_child (widget_class, GbTerminalView, top_scrollbar);
  gtk_widget_class_bind_template_child (widget_class, GbTerminalView, bottom_scrollbar);

  g_type_ensure (VTE_TYPE_TERMINAL);

  properties [PROP_FONT_NAME] =
    g_param_spec_string ("font-name",
                         "Font Name",
                         "Font Name",
                         NULL,
                         (G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));

  properties [PROP_MANAGE_SPAWN] =
    g_param_spec_boolean ("manage-spawn",
                          "Manage Spawn",
                          "Manage Spawn",
                          TRUE,
                          (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));

  properties [PROP_PTY] =
    g_param_spec_object ("pty",
                         "Pty",
                         "The psuedo terminal to use",
                         VTE_TYPE_PTY,
                         (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));

  g_object_class_install_properties (object_class, LAST_PROP, properties);

  g_type_ensure (GB_TYPE_TERMINAL);
}
Пример #6
0
static void
edosu_view_class_init(EdosuViewClass *klass)
{
    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
    gtk_widget_class_set_template_from_resource(
        widget_class, "/org/osux/edosu/ui/EdosuView.glade");
    gtk_widget_class_bind_template_child(widget_class, EdosuView, time_adjust);
    gtk_widget_class_bind_template_child(widget_class, EdosuView, time_range);
    gtk_widget_class_bind_template_child(widget_class, EdosuView, drawing_area);
    gtk_widget_class_bind_template_child(widget_class, EdosuView, play_button);
    gtk_widget_class_bind_template_child(widget_class, EdosuView, pause_button);
}
static void
ide_preferences_spin_button_class_init (IdePreferencesSpinButtonClass *klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
  IdePreferencesBinClass *bin_class = IDE_PREFERENCES_BIN_CLASS (klass);

  object_class->finalize = ide_preferences_spin_button_finalize;
  object_class->get_property = ide_preferences_spin_button_get_property;
  object_class->set_property = ide_preferences_spin_button_set_property;

  bin_class->connect = ide_preferences_spin_button_connect;
  bin_class->disconnect = ide_preferences_spin_button_disconnect;
  bin_class->matches = ide_preferences_spin_button_matches;

  signals [ACTIVATE] =
    g_signal_new_class_handler ("activate",
                                G_TYPE_FROM_CLASS (klass),
                                G_SIGNAL_RUN_LAST,
                                G_CALLBACK (ide_preferences_spin_button_activate),
                                NULL, NULL, NULL, G_TYPE_NONE, 0);

  widget_class->activate_signal = signals [ACTIVATE];

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/builder/ui/ide-preferences-spin-button.ui");
  gtk_widget_class_bind_template_child (widget_class, IdePreferencesSpinButton, spin_button);
  gtk_widget_class_bind_template_child (widget_class, IdePreferencesSpinButton, subtitle);
  gtk_widget_class_bind_template_child (widget_class, IdePreferencesSpinButton, title);

  properties [PROP_KEY] =
    g_param_spec_string ("key",
                         "Key",
                         "Key",
                         NULL,
                         (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));

  properties [PROP_SUBTITLE] =
    g_param_spec_string ("subtitle",
                         "subtitle",
                         "subtitle",
                         NULL,
                         (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));

  properties [PROP_TITLE] =
    g_param_spec_string ("title",
                         "title",
                         "title",
                         NULL,
                         (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));

  g_object_class_install_properties (object_class, LAST_PROP, properties);
}
Пример #8
0
static void
gs_feature_tile_class_init (GsFeatureTileClass *klass)
{
	GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

	widget_class->destroy = gs_feature_tile_destroy;

	gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/Software/feature-tile.ui");

	gtk_widget_class_bind_template_child (widget_class, GsFeatureTile, image);
	gtk_widget_class_bind_template_child (widget_class, GsFeatureTile, stack);
	gtk_widget_class_bind_template_child (widget_class, GsFeatureTile, title);
	gtk_widget_class_bind_template_child (widget_class, GsFeatureTile, subtitle);
}
Пример #9
0
static void
hello_application_window_class_init (HelloApplicationWindowClass *klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);

  gobject_class->dispose = hello_application_window_dispose;

  gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
                                               UI_PATH);
  gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass),
                                        HelloApplicationWindow, label2);
  gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass),
                                        HelloApplicationWindow, button);
}
Пример #10
0
static void
gs_popular_tile_class_init (GsPopularTileClass *klass)
{
	GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

	widget_class->destroy = gs_popular_tile_destroy;

	gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/Software/gs-popular-tile.ui");

	gtk_widget_class_bind_template_child (widget_class, GsPopularTile, label);
	gtk_widget_class_bind_template_child (widget_class, GsPopularTile, image);
	gtk_widget_class_bind_template_child (widget_class, GsPopularTile, eventbox);
	gtk_widget_class_bind_template_child (widget_class, GsPopularTile, stack);
	gtk_widget_class_bind_template_child (widget_class, GsPopularTile, stars);
}
Пример #11
0
static void
ide_editor_utilities_class_init (IdeEditorUtilitiesClass *klass)
{
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
  GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);

  widget_class->destroy = ide_editor_utilities_destroy;

  container_class->add = ide_editor_utilities_add;

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/builder/ui/ide-editor-utilities.ui");
  gtk_widget_class_bind_template_child (widget_class, IdeEditorUtilities, stack_switcher);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorUtilities, stack);
  gtk_widget_class_set_css_name (widget_class, "ideeditorutilities");
}
Пример #12
0
static void
gs_screenshot_image_class_init (GsScreenshotImageClass *klass)
{
	GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

	widget_class->destroy = gs_screenshot_image_destroy;
	widget_class->draw = gs_screenshot_image_draw;

	gtk_widget_class_set_template_from_resource (widget_class,
						     "/org/gnome/Software/gs-screenshot-image.ui");

	gtk_widget_class_bind_template_child (widget_class, GsScreenshotImage, stack);
	gtk_widget_class_bind_template_child (widget_class, GsScreenshotImage, image1);
	gtk_widget_class_bind_template_child (widget_class, GsScreenshotImage, image2);
	gtk_widget_class_bind_template_child (widget_class, GsScreenshotImage, box_error);
	gtk_widget_class_bind_template_child (widget_class, GsScreenshotImage, label_error);
}
Пример #13
0
static void
gb_terminal_view_class_init (GbTerminalViewClass *klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
  GbViewClass *view_class = GB_VIEW_CLASS (klass);

  object_class->finalize = gb_terminal_view_finalize;
  object_class->get_property = gb_terminal_view_get_property;
  object_class->set_property = gb_terminal_view_set_property;

  widget_class->realize = gb_terminal_realize;
  widget_class->get_preferred_width = gb_terminal_get_preferred_width;
  widget_class->get_preferred_height = gb_terminal_get_preferred_height;
  widget_class->grab_focus = gb_terminal_grab_focus;

  view_class->get_title = gb_terminal_get_title;
  view_class->get_document = gb_terminal_view_get_document;
  view_class->create_split = gb_terminal_create_split;
  view_class->set_split_view =  gb_terminal_set_split_view;

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/builder/plugins/terminal/gb-terminal-view.ui");
  gtk_widget_class_bind_template_child (widget_class, GbTerminalView, terminal_top);
  gtk_widget_class_bind_template_child (widget_class, GbTerminalView, scrolled_window_bottom);

  g_type_ensure (VTE_TYPE_TERMINAL);

  properties [PROP_DOCUMENT] =
    g_param_spec_object ("document",
                         "Document",
                         "The document for the VTE terminal view.",
                         GB_TYPE_TERMINAL_DOCUMENT,
                         (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  properties [PROP_FONT_NAME] =
    g_param_spec_string ("font-name",
                         "Font Name",
                         "Font Name",
                         NULL,
                         (G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_properties (object_class, LAST_PROP, properties);
}
Пример #14
0
static void
gt_win_class_init(GtWinClass* klass)
{
    GObjectClass* object_class = G_OBJECT_CLASS(klass);

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

    props[PROP_CHANNELS_VIEW] = g_param_spec_object("channels-view",
                                                    "Channels View",
                                                    "Channels View",
                                                    GT_TYPE_CHANNELS_VIEW,
                                                    G_PARAM_READABLE);
    props[PROP_GAMES_VIEW] = g_param_spec_object("games-view",
                                                 "Games View",
                                                 "Games View",
                                                 GT_TYPE_GAMES_VIEW,
                                                 G_PARAM_READABLE);
    props[PROP_VISIBLE_VIEW] = g_param_spec_object("visible-view",
                                                   "Visible View",
                                                   "Visible View",
                                                   GTK_TYPE_WIDGET,
                                                   G_PARAM_READWRITE);
    props[PROP_FULLSCREEN] = g_param_spec_boolean("fullscreen",
                                                  "Fullscreen",
                                                  "Whether window is fullscreen",
                                                  FALSE,
                                                  G_PARAM_READWRITE | G_PARAM_CONSTRUCT);

    g_object_class_install_properties(object_class,
                                      NUM_PROPS,
                                      props);

    gtk_widget_class_set_template_from_resource(GTK_WIDGET_CLASS(klass),
                                                "/com/vinszent/GnomeTwitch/ui/gt-win.ui");
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtWin, main_stack);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtWin, channels_view);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtWin, games_view);
    gtk_widget_class_bind_template_child(GTK_WIDGET_CLASS(klass), GtWin, player);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtWin, header_stack);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtWin, player_header_bar);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtWin, browse_header_bar);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtWin, browse_stack);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtWin, browse_stack_switcher);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtWin, follows_view);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtWin, info_revealer);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtWin, info_label);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtWin, info_bar);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtWin, info_bar_yes_button);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtWin, info_bar_no_button);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtWin, info_bar_ok_button);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtWin, info_bar_details_button);
    gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtWin, info_bar_close_button);
}
Пример #15
0
static void
gs_category_tile_class_init (GsCategoryTileClass *klass)
{
	GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

	widget_class->destroy = gs_category_tile_destroy;

	gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/Software/category-tile.ui");

	gtk_widget_class_bind_template_child (widget_class, GsCategoryTile, label);
}
Пример #16
0
static void
editor_application_window_class_init (EditorApplicationWindowClass *klass)
{
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
  gtk_widget_class_set_template_from_resource (widget_class,
					       "/org/du_a/Editor/editor.ui");
  gtk_widget_class_bind_template_child (widget_class,
					EditorApplicationWindow,
					view);
  widget_class->key_press_event = editor_application_window_key_press_event;
}
Пример #17
0
static void
ide_editor_perspective_class_init (IdeEditorPerspectiveClass *klass)
{
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
  GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
  DzlDockBinClass *dock_bin_class = DZL_DOCK_BIN_CLASS (klass);

  widget_class->destroy = ide_editor_perspective_destroy;
  widget_class->hierarchy_changed = ide_editor_perspective_hierarchy_changed;
  widget_class->grab_focus = ide_editor_perspective_grab_focus;

  container_class->add = ide_editor_perspective_add;

  dock_bin_class->create_edge = ide_editor_perspective_create_edge;

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/builder/ui/ide-editor-perspective.ui");
  gtk_widget_class_bind_template_child (widget_class, IdeEditorPerspective, grid);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorPerspective, overlay);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorPerspective, properties);

  g_type_ensure (IDE_TYPE_EDITOR_PROPERTIES);
  g_type_ensure (IDE_TYPE_EDITOR_SIDEBAR);
  g_type_ensure (IDE_TYPE_LAYOUT_GRID);
}
Пример #18
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);
}
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);

}
Пример #20
0
static void
ide_editor_frame_class_init (IdeEditorFrameClass *klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  object_class->constructed = ide_editor_frame_constructed;
  object_class->dispose = ide_editor_frame_dispose;
  object_class->get_property = ide_editor_frame_get_property;
  object_class->set_property = ide_editor_frame_set_property;

  widget_class->destroy = ide_editor_frame_destroy;
  widget_class->grab_focus = ide_editor_frame_grab_focus;

  properties [PROP_AUTO_HIDE_MAP] =
    g_param_spec_boolean ("auto-hide-map",
                          "Auto Hide Map",
                          "Auto Hide Map",
                          FALSE,
                          (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  properties [PROP_BACK_FORWARD_LIST] =
    g_param_spec_object ("back-forward-list",
                         "Back Forward List",
                         "The back forward list.",
                         IDE_TYPE_BACK_FORWARD_LIST,
                         (G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));

  properties [PROP_DOCUMENT] =
    g_param_spec_object ("document",
                         "Document",
                         "The editor document.",
                         IDE_TYPE_BUFFER,
                         (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  properties [PROP_SHOW_MAP] =
    g_param_spec_boolean ("show-map",
                          "Show Map",
                          "If the overview map should be shown.",
                          FALSE,
                          (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  properties [PROP_SHOW_RULER] =
    g_param_spec_boolean ("show-ruler",
                          "Show Ruler",
                          "If the ruler should always be shown.",
                          FALSE,
                          (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_properties (object_class, LAST_PROP, properties);

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/builder/ui/ide-editor-frame.ui");

  gtk_widget_class_bind_template_child (widget_class, IdeEditorFrame, floating_bar);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorFrame, map_revealer);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorFrame, mode_name_label);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorFrame, overwrite_label);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorFrame, scrolled_window);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorFrame, search_frame);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorFrame, search_entry);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorFrame, replace_entry);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorFrame, replace_button);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorFrame, replace_all_button);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorFrame, search_options);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorFrame, search_revealer);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorFrame, source_map_container);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorFrame, source_overlay);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorFrame, source_view);

  g_type_ensure (NAUTILUS_TYPE_FLOATING_BAR);
  g_type_ensure (GD_TYPE_TAGGED_ENTRY);
}
Пример #21
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);
}
Пример #22
0
static void
gb_color_picker_prefs_palette_row_class_init (GbColorPickerPrefsPaletteRowClass *klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
  IdePreferencesBinClass *bin_class = IDE_PREFERENCES_BIN_CLASS (klass);

  object_class->finalize = gb_color_picker_prefs_palette_row_finalize;
  object_class->get_property = gb_color_picker_prefs_palette_row_get_property;
  object_class->set_property = gb_color_picker_prefs_palette_row_set_property;

  bin_class->connect = gb_color_picker_prefs_palette_row_connect;
  bin_class->disconnect = gb_color_picker_prefs_palette_row_disconnect;

  properties [PROP_IS_EDITING] =
    g_param_spec_boolean ("is-editing",
                          "is-editing",
                          "Whether the row is currently in edit mode or not",
                          FALSE,
                          (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  properties [PROP_TARGET] =
    g_param_spec_variant ("target",
                          "Target",
                          "Target",
                          G_VARIANT_TYPE_STRING,
                          NULL,
                          (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));

  properties [PROP_KEY] =
    g_param_spec_string ("key",
                         "Key",
                         "Key",
                         NULL,
                         (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));

  properties[PROP_NEEDS_ATTENTION] =
    g_param_spec_boolean ("needs-attention",
                          "Needs Attention",
                          "Whether this row needs attention",
                         FALSE,
                         (G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS));

  properties [PROP_PALETTE_NAME] =
    g_param_spec_string ("palette-name",
                         "Palette name",
                         "Palette name",
                         NULL,
                         (G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS));

  signals [ACTIVATED] =
    g_signal_new_class_handler ("activated",
                                G_TYPE_FROM_CLASS (klass),
                                G_SIGNAL_RUN_LAST,
                                G_CALLBACK (gb_color_picker_prefs_palette_row_activate),
                                NULL, NULL, NULL, G_TYPE_NONE, 0);
  signals [CLOSED] =
    g_signal_new ("closed",
                  G_TYPE_FROM_CLASS (klass),
                  G_SIGNAL_RUN_LAST,
                  0,
                  NULL, NULL, NULL,
                  G_TYPE_NONE,
                  1,
                  G_TYPE_POINTER);

  signals [NAME_CHANGED] =
    g_signal_new ("name-changed",
                  G_TYPE_FROM_CLASS (klass),
                  G_SIGNAL_RUN_LAST,
                  0,
                  NULL, NULL, NULL,
                  G_TYPE_NONE,
                  2,
                  G_TYPE_POINTER,
                  G_TYPE_POINTER);

  signals [EDIT] =
    g_signal_new_class_handler ("edit",
                                G_TYPE_FROM_CLASS (klass),
                                G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
                                G_CALLBACK (gb_color_picker_prefs_palette_row_edit),
                                NULL, NULL, NULL, G_TYPE_NONE, 0);

  widget_class->activate_signal = signals [ACTIVATED];

  g_object_class_install_properties (object_class, N_PROPS, properties);

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/builder/plugins/color-picker-plugin/gtk/color-picker-palette-row.ui");
  gtk_widget_class_bind_template_child (widget_class, GbColorPickerPrefsPaletteRow, image);
  gtk_widget_class_bind_template_child (widget_class, GbColorPickerPrefsPaletteRow, event_box);
  gtk_widget_class_bind_template_child (widget_class, GbColorPickerPrefsPaletteRow, palette_name);

  gtk_widget_class_set_css_name (widget_class, "colorpickerpaletterow");
}
Пример #23
0
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);
}
Пример #24
0
static void
ide_workbench_class_init (IdeWorkbenchClass *klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  object_class->constructed = ide_workbench_constructed;
  object_class->finalize = ide_workbench_finalize;
  object_class->get_property = ide_workbench_get_property;
  object_class->set_property = ide_workbench_set_property;

  widget_class->delete_event = ide_workbench_delete_event;

  /**
   * IdeWorkbench:context:
   *
   * The #IdeWorkbench:context property contains the #IdeContext for the loaded
   * project. Loading a project consists of creating an #IdeContext, so there
   * is a 1:1 mapping between "loaded project" and an #IdeContext.
   *
   * The #IdeContext contains many of the important components of a project.
   * For example, it contains the #IdeVcs representing the active version
   * control system and an #IdeBuildSystem representing the current build
   * system.
   *
   * The creation of #IdeWorkbenchAddin addins are deferred until this property
   * has been set.
   */
  properties [PROP_CONTEXT] =
    g_param_spec_object ("context",
                         "Context",
                         "Context",
                         IDE_TYPE_CONTEXT,
                         (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));

  /**
   * IdeWorkbench:visible-perspective:
   *
   * This property contains the #IdePerspective that is currently selected.
   * Connect to the "notify::visible-perspective" signal to be notified when
   * the perspective has been changed.
   */
  properties [PROP_VISIBLE_PERSPECTIVE] =
    g_param_spec_object ("visible-perspective",
                         "visible-Perspective",
                         "visible-Perspective",
                         IDE_TYPE_PERSPECTIVE,
                         (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * IdeWorkbench:disable-greeter:
   *
   * This property is used internally by Builder to avoid creating the
   * greeter when opening a new workspace that is only for loading a
   * project.
   *
   * This should not be used by application plugins.
   */
  properties [PROP_DISABLE_GREETER] =
    g_param_spec_boolean ("disable-greeter",
                          "Disable Greeter",
                          "If the greeter should be disabled when creating the workbench",
                          FALSE,
                          (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));

  /**
   * IdeWorkbench:visible-perspective-name:
   *
   * This property is just like #IdeWorkbench:visible-perspective except that
   * it contains the name of the perspective as a string.
   */
  properties [PROP_VISIBLE_PERSPECTIVE_NAME] =
    g_param_spec_string ("visible-perspective-name",
                         "visible-Perspective-name",
                         "visible-Perspective-name",
                         NULL,
                         (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_properties (object_class, LAST_PROP, properties);

  signals [ACTION] =
    g_signal_new_class_handler ("action",
                                G_TYPE_FROM_CLASS (klass),
                                G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
                                G_CALLBACK (ide_widget_action_with_string),
                                NULL, NULL, NULL,
                                G_TYPE_NONE,
                                3,
                                G_TYPE_STRING,
                                G_TYPE_STRING,
                                G_TYPE_STRING);

  /**
   * IdeWorkbench::set-perspective:
   * @self: An #IdeWorkbench
   * @name: the name of the perspective
   *
   * This signal is meant for keybindings to change the current perspective.
   */
  signals [SET_PERSPECTIVE] =
    g_signal_new_class_handler ("set-perspective",
                                G_TYPE_FROM_CLASS (klass),
                                G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
                                G_CALLBACK (ide_workbench_set_visible_perspective_name),
                                NULL, NULL, NULL,
                                G_TYPE_NONE, 1, G_TYPE_STRING);

  signals [UNLOAD] =
    g_signal_new ("unload",
                  G_TYPE_FROM_CLASS (klass),
                  G_SIGNAL_RUN_LAST,
                  0,
                  NULL, NULL,
                  NULL,
                  G_TYPE_NONE,
                  1, IDE_TYPE_CONTEXT);

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/builder/ui/ide-workbench.ui");
  gtk_widget_class_bind_template_child (widget_class, IdeWorkbench, header_bar);
  gtk_widget_class_bind_template_child (widget_class, IdeWorkbench, header_size_group);
  gtk_widget_class_bind_template_child (widget_class, IdeWorkbench, header_stack);
  gtk_widget_class_bind_template_child (widget_class, IdeWorkbench, perspective_menu_button);
  gtk_widget_class_bind_template_child (widget_class, IdeWorkbench, perspectives_stack);
}
Пример #25
0
static void
ide_omni_bar_class_init (IdeOmniBarClass *klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  object_class->constructed = ide_omni_bar_constructed;

  widget_class->destroy = ide_omni_bar_destroy;

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/builder/ui/ide-omni-bar.ui");
  gtk_widget_class_set_css_name (widget_class, "omnibar");
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, branch_box);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, branch_label);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, build_button);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, build_button_shortcut);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, build_result_diagnostics_image);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, build_result_mode_label);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, cancel_button);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, config_name_label);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, event_box);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, message_stack);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, pausables);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_branch_label);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_build_message);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_build_result_label);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_config_label);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_details_revealer);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_errors_label);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_last_build_time_label);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_project_label);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_runtime_label);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_warnings_label);
  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, project_label);

  g_type_ensure (IDE_TYPE_OMNI_PAUSABLE_ROW);
  g_type_ensure (DZL_TYPE_LIST_BOX);
}
Пример #26
0
static void
ide_editor_spell_widget_class_init (IdeEditorSpellWidgetClass *klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  object_class->constructed = ide_editor_spell_widget_constructed;
  object_class->finalize = ide_editor_spell_widget_finalize;
  object_class->get_property = ide_editor_spell_widget_get_property;
  object_class->set_property = ide_editor_spell_widget_set_property;

  properties [PROP_VIEW] =
    g_param_spec_object ("view",
                         "View",
                         "The source view.",
                         IDE_TYPE_SOURCE_VIEW,
                         (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));

  g_object_class_install_properties (object_class, N_PROPS, properties);

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/builder/ui/ide-editor-spell-widget.ui");

  gtk_widget_class_bind_template_child (widget_class, IdeEditorSpellWidget, word_label);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorSpellWidget, count_label);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorSpellWidget, word_entry);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorSpellWidget, ignore_button);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorSpellWidget, ignore_all_button);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorSpellWidget, change_button);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorSpellWidget, change_all_button);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorSpellWidget, highlight_switch);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorSpellWidget, language_chooser_button);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorSpellWidget, suggestions_box);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorSpellWidget, dict_word_entry);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorSpellWidget, dict_add_button);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorSpellWidget, dict_words_list);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorSpellWidget, count_box);
}
Пример #27
0
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);
}
Пример #28
0
static void
soli_print_preview_class_init (SoliPrintPreviewClass *klass)
{
	GObjectClass *object_class = G_OBJECT_CLASS (klass);
	GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

	object_class->dispose = soli_print_preview_dispose;

	widget_class->grab_focus = soli_print_preview_grab_focus;

	/* Bind class to template */
	gtk_widget_class_set_template_from_resource (widget_class,
	                                             "/ca/dluco/soli/ui/soli-print-preview.ui");
	gtk_widget_class_bind_template_child (widget_class, SoliPrintPreview, prev_button);
	gtk_widget_class_bind_template_child (widget_class, SoliPrintPreview, next_button);
	gtk_widget_class_bind_template_child (widget_class, SoliPrintPreview, page_entry);
	gtk_widget_class_bind_template_child (widget_class, SoliPrintPreview, last_page_label);
	gtk_widget_class_bind_template_child (widget_class, SoliPrintPreview, multi_pages_button);
	gtk_widget_class_bind_template_child (widget_class, SoliPrintPreview, zoom_one_button);
	gtk_widget_class_bind_template_child (widget_class, SoliPrintPreview, zoom_fit_button);
	gtk_widget_class_bind_template_child (widget_class, SoliPrintPreview, zoom_in_button);
	gtk_widget_class_bind_template_child (widget_class, SoliPrintPreview, zoom_out_button);
	gtk_widget_class_bind_template_child (widget_class, SoliPrintPreview, close_button);
	gtk_widget_class_bind_template_child (widget_class, SoliPrintPreview, layout);
}
Пример #29
0
static void
gtk_places_view_row_class_init (GtkPlacesViewRowClass *klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  object_class->finalize = gtk_places_view_row_finalize;
  object_class->get_property = gtk_places_view_row_get_property;
  object_class->set_property = gtk_places_view_row_set_property;

  properties[PROP_ICON] =
          g_param_spec_object ("icon",
                               P_("Icon of the row"),
                               P_("The icon representing the volume"),
                               G_TYPE_ICON,
                               G_PARAM_READWRITE);

  properties[PROP_NAME] =
          g_param_spec_string ("name",
                               P_("Name of the volume"),
                               P_("The name of the volume"),
                               "",
                               G_PARAM_READWRITE);

  properties[PROP_PATH] =
          g_param_spec_string ("path",
                               P_("Path of the volume"),
                               P_("The path of the volume"),
                               "",
                               G_PARAM_READWRITE);

  properties[PROP_VOLUME] =
          g_param_spec_object ("volume",
                               P_("Volume represented by the row"),
                               P_("The volume represented by the row"),
                               G_TYPE_VOLUME,
                               G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);

  properties[PROP_MOUNT] =
          g_param_spec_object ("mount",
                               P_("Mount represented by the row"),
                               P_("The mount point represented by the row, if any"),
                               G_TYPE_MOUNT,
                               G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);

  properties[PROP_FILE] =
          g_param_spec_object ("file",
                               P_("File represented by the row"),
                               P_("The file represented by the row, if any"),
                               G_TYPE_FILE,
                               G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);

  properties[PROP_IS_NETWORK] =
          g_param_spec_boolean ("is-network",
                                P_("Whether the row represents a network location"),
                                P_("Whether the row represents a network location"),
                                FALSE,
                                G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);

  g_object_class_install_properties (object_class, LAST_PROP, properties);

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

  gtk_widget_class_bind_template_child (widget_class, GtkPlacesViewRow, busy_spinner);
  gtk_widget_class_bind_template_child (widget_class, GtkPlacesViewRow, eject_button);
  gtk_widget_class_bind_template_child (widget_class, GtkPlacesViewRow, eject_icon);
  gtk_widget_class_bind_template_child (widget_class, GtkPlacesViewRow, event_box);
  gtk_widget_class_bind_template_child (widget_class, GtkPlacesViewRow, icon_image);
  gtk_widget_class_bind_template_child (widget_class, GtkPlacesViewRow, name_label);
  gtk_widget_class_bind_template_child (widget_class, GtkPlacesViewRow, path_label);
}
Пример #30
0
static void
ide_editor_view_class_init (IdeEditorViewClass *klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
  IdeLayoutViewClass *view_class = IDE_LAYOUT_VIEW_CLASS (klass);

  object_class->finalize = ide_editor_view_finalize;
  object_class->get_property = ide_editor_view_get_property;
  object_class->set_property = ide_editor_view_set_property;

  widget_class->destroy = ide_editor_view_destroy;
  widget_class->grab_focus = ide_editor_view_grab_focus;
  widget_class->get_request_mode = ide_editor_view_get_request_mode;
  widget_class->get_preferred_height = ide_editor_view_get_preferred_height;
  widget_class->hierarchy_changed = ide_editor_view_hierarchy_changed;

  view_class->create_split = ide_editor_view_create_split;
  view_class->get_special_title = ide_editor_view_get_special_title;
  view_class->get_modified = ide_editor_view_get_modified;
  view_class->set_split_view = ide_editor_view_set_split_view;
  view_class->set_back_forward_list = ide_editor_view_set_back_forward_list;
  view_class->navigate_to = ide_editor_view_navigate_to;
  view_class->get_title = ide_editor_view_get_title;

  properties [PROP_DOCUMENT] =
    g_param_spec_object ("document",
                         "Document",
                         "The editor document.",
                         IDE_TYPE_BUFFER,
                         (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));

  g_object_class_install_properties (object_class, LAST_PROP, properties);

  signals [REQUEST_DOCUMENTATION] =
    g_signal_new ("request-documentation",
                  G_TYPE_FROM_CLASS (klass),
                  G_SIGNAL_RUN_LAST,
                  0, NULL, NULL, NULL,
                  G_TYPE_NONE,
                  1,
                  G_TYPE_STRING);

  gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/builder/ui/ide-editor-view.ui");

  gtk_widget_class_bind_template_child (widget_class, IdeEditorView, cursor_label);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorView, frame1);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorView, modified_cancel_button);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorView, modified_revealer);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorView, paned);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorView, progress_bar);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorView, tweak_button);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorView, tweak_widget);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorView, goto_line_button);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorView, goto_line_popover);
  gtk_widget_class_bind_template_child (widget_class, IdeEditorView, warning_button);

  g_type_ensure (IDE_TYPE_EDITOR_FRAME);
  g_type_ensure (IDE_TYPE_EDITOR_TWEAK_WIDGET);
}