Esempio n. 1
0
static void
ide_workbench_init (IdeWorkbench *self)
{
  gtk_widget_init_template (GTK_WIDGET (self));

  ide_workbench_add_perspective (self,
                                 g_object_new (IDE_TYPE_GREETER_PERSPECTIVE,
                                               "visible", TRUE,
                                               NULL));
  ide_workbench_add_perspective (self,
                                 g_object_new (IDE_TYPE_GENESIS_PERSPECTIVE,
                                               "visible", TRUE,
                                               NULL));
  ide_workbench_add_perspective (self,
                                 g_object_new (IDE_TYPE_PREFERENCES_PERSPECTIVE,
                                               "visible", TRUE,
                                               NULL));

  ide_window_settings_register (GTK_WINDOW (self));

  g_signal_connect_object (self->perspectives_stack,
                           "notify::visible-child",
                           G_CALLBACK (ide_workbench_notify_visible_child),
                           self,
                           G_CONNECT_SWAPPED);

  ide_workbench_set_visible_perspective_name (self, "greeter");
}
Esempio n. 2
0
static void
ide_workbench_init (IdeWorkbench *self)
{
  g_autoptr(GtkWindowGroup) window_group = NULL;

  gtk_widget_init_template (GTK_WIDGET (self));

  self->perspectives = g_list_store_new (IDE_TYPE_PERSPECTIVE);

  ide_window_settings_register (GTK_WINDOW (self));

  g_signal_connect_object (self->perspectives_stack,
                           "notify::visible-child",
                           G_CALLBACK (ide_workbench_notify_visible_child),
                           self,
                           G_CONNECT_SWAPPED);

  window_group = gtk_window_group_new ();
  gtk_window_group_add_window (window_group, GTK_WINDOW (self));
}