Ejemplo n.º 1
0
void
dialogs_init (Gimp            *gimp,
              GimpMenuFactory *menu_factory)
{
  gint i;

  g_return_if_fail (GIMP_IS_GIMP (gimp));
  g_return_if_fail (GIMP_IS_MENU_FACTORY (menu_factory));

  global_dialog_factory = gimp_dialog_factory_new ("toplevel",
                                                   gimp_get_user_context (gimp),
                                                   menu_factory,
                                                   NULL);

  global_toolbox_factory = gimp_dialog_factory_new ("toolbox",
                                                    gimp_get_user_context (gimp),
                                                    menu_factory,
                                                    dialogs_toolbox_get);
  gimp_dialog_factory_set_constructor (global_toolbox_factory,
                                       dialogs_dockable_constructor);

  global_dock_factory = gimp_dialog_factory_new ("dock",
                                                 gimp_get_user_context (gimp),
                                                 menu_factory,
                                                 dialogs_dock_new);
  gimp_dialog_factory_set_constructor (global_dock_factory,
                                       dialogs_dockable_constructor);

  for (i = 0; i < G_N_ELEMENTS (toplevel_entries); i++)
    gimp_dialog_factory_register_entry (global_dialog_factory,
                                        toplevel_entries[i].identifier,
                                        gettext (toplevel_entries[i].name),
                                        gettext (toplevel_entries[i].blurb),
                                        toplevel_entries[i].stock_id,
                                        toplevel_entries[i].help_id,
                                        toplevel_entries[i].new_func,
                                        toplevel_entries[i].view_size,
                                        toplevel_entries[i].singleton,
                                        toplevel_entries[i].session_managed,
                                        toplevel_entries[i].remember_size,
                                        toplevel_entries[i].remember_if_open);

  for (i = 0; i < G_N_ELEMENTS (dock_entries); i++)
    gimp_dialog_factory_register_entry (global_dock_factory,
                                        dock_entries[i].identifier,
                                        gettext (dock_entries[i].name),
                                        gettext (dock_entries[i].blurb),
                                        dock_entries[i].stock_id,
                                        dock_entries[i].help_id,
                                        dock_entries[i].new_func,
                                        dock_entries[i].view_size,
                                        dock_entries[i].singleton,
                                        dock_entries[i].session_managed,
                                        dock_entries[i].remember_size,
                                        dock_entries[i].remember_if_open);
}
Ejemplo n.º 2
0
void
dialogs_init (Gimp            *gimp,
              GimpMenuFactory *menu_factory)
{
  GimpDialogFactory *factory = NULL;
  gint               i       = 0;

  g_return_if_fail (GIMP_IS_GIMP (gimp));
  g_return_if_fail (GIMP_IS_MENU_FACTORY (menu_factory));

  factory = gimp_dialog_factory_new ("toplevel",
                                     gimp_get_user_context (gimp),
                                     menu_factory);
  gimp_dialog_factory_set_singleton (factory);

  for (i = 0; i < G_N_ELEMENTS (entries); i++)
    gimp_dialog_factory_register_entry (gimp_dialog_factory_get_singleton (),
                                        entries[i].identifier,
                                        gettext (entries[i].name),
                                        gettext (entries[i].blurb),
                                        entries[i].icon_name,
                                        entries[i].help_id,
                                        entries[i].new_func,
                                        entries[i].restore_func,
                                        entries[i].view_size,
                                        entries[i].singleton,
                                        entries[i].session_managed,
                                        entries[i].remember_size,
                                        entries[i].remember_if_open,
                                        entries[i].hideable,
                                        entries[i].image_window,
                                        entries[i].dockable);

  global_recent_docks = gimp_list_new (GIMP_TYPE_SESSION_INFO, FALSE);
}
Ejemplo n.º 3
0
void
dialogs_init (Gimp            *gimp,
              GimpMenuFactory *menu_factory)
{
  gint i;

  g_return_if_fail (GIMP_IS_GIMP (gimp));
  g_return_if_fail (GIMP_IS_MENU_FACTORY (menu_factory));

  global_dialog_factory = gimp_dialog_factory_new ("toplevel",
                                                   gimp_get_user_context (gimp),
                                                   menu_factory,
                                                   NULL,
                                                   TRUE);

  global_toolbox_factory = gimp_dialog_factory_new ("toolbox",
                                                    gimp_get_user_context (gimp),
                                                    menu_factory,
                                                    dialogs_toolbox_get,
                                                    TRUE);
  gimp_dialog_factory_set_constructor (global_toolbox_factory,
                                       dialogs_dockable_constructor);

  global_dock_factory = gimp_dialog_factory_new ("dock",
                                                 gimp_get_user_context (gimp),
                                                 menu_factory,
                                                 dialogs_dock_new,
                                                 TRUE);
  gimp_dialog_factory_set_constructor (global_dock_factory,
                                       dialogs_dockable_constructor);

  global_display_factory = gimp_dialog_factory_new ("display",
                                                    gimp_get_user_context (gimp),
                                                    menu_factory,
                                                    NULL,
                                                    FALSE);

  for (i = 0; i < G_N_ELEMENTS (toplevel_entries); i++)
    gimp_dialog_factory_register_entry (global_dialog_factory,
                                        toplevel_entries[i].identifier,
                                        gettext (toplevel_entries[i].name),
                                        gettext (toplevel_entries[i].blurb),
                                        toplevel_entries[i].stock_id,
                                        toplevel_entries[i].help_id,
                                        toplevel_entries[i].new_func,
                                        toplevel_entries[i].view_size,
                                        toplevel_entries[i].singleton,
                                        toplevel_entries[i].session_managed,
                                        toplevel_entries[i].remember_size,
                                        toplevel_entries[i].remember_if_open);

  for (i = 0; i < G_N_ELEMENTS (dock_entries); i++)
    gimp_dialog_factory_register_entry (global_dock_factory,
                                        dock_entries[i].identifier,
                                        gettext (dock_entries[i].name),
                                        gettext (dock_entries[i].blurb),
                                        dock_entries[i].stock_id,
                                        dock_entries[i].help_id,
                                        dock_entries[i].new_func,
                                        dock_entries[i].view_size,
                                        dock_entries[i].singleton,
                                        dock_entries[i].session_managed,
                                        dock_entries[i].remember_size,
                                        dock_entries[i].remember_if_open);

  gimp_dialog_factory_register_entry (global_display_factory,
                                      "gimp-empty-image-window",
                                      NULL, NULL,
                                      NULL, NULL,
                                      NULL,
                                      -1,
                                      TRUE,
                                      TRUE,
                                      TRUE,
                                      FALSE);

  global_recent_docks = gimp_list_new (GIMP_TYPE_SESSION_INFO, FALSE);
}