app: Make all GimpDialogFactory members private
Add necessary trivial API that allows us to make remaining GimpDialogFactory instance members private, and make them private.
This commit is contained in:
@ -144,7 +144,7 @@ windows_actions_setup (GimpActionGroup *group)
|
|||||||
G_CALLBACK (windows_actions_dock_window_removed),
|
G_CALLBACK (windows_actions_dock_window_removed),
|
||||||
group, 0);
|
group, 0);
|
||||||
|
|
||||||
for (list = global_dock_window_factory->open_dialogs;
|
for (list = gimp_dialog_factory_get_open_dialogs (global_dock_window_factory);
|
||||||
list;
|
list;
|
||||||
list = g_list_next (list))
|
list = g_list_next (list))
|
||||||
{
|
{
|
||||||
|
@ -49,7 +49,9 @@ windows_commands_get_toolbox (GimpDialogFactory *toolbox_factory)
|
|||||||
{
|
{
|
||||||
GList *list = NULL;
|
GList *list = NULL;
|
||||||
|
|
||||||
for (list = toolbox_factory->open_dialogs; list; list = list->next)
|
for (list = gimp_dialog_factory_get_open_dialogs (toolbox_factory);
|
||||||
|
list;
|
||||||
|
list = list->next)
|
||||||
{
|
{
|
||||||
/* The only toplevel widget in the toolbox factory is the
|
/* The only toplevel widget in the toolbox factory is the
|
||||||
* toolbox
|
* toolbox
|
||||||
@ -112,8 +114,7 @@ windows_open_recent_cmd_callback (GtkAction *action,
|
|||||||
g_object_ref (info);
|
g_object_ref (info);
|
||||||
gimp_container_remove (global_recent_docks, GIMP_OBJECT (info));
|
gimp_container_remove (global_recent_docks, GIMP_OBJECT (info));
|
||||||
|
|
||||||
global_dock_window_factory->session_infos =
|
gimp_dialog_factory_add_session_info (global_dock_window_factory, info);
|
||||||
g_list_append (global_dock_window_factory->session_infos, info);
|
|
||||||
|
|
||||||
gimp_session_info_restore (info, global_dock_window_factory);
|
gimp_session_info_restore (info, global_dock_window_factory);
|
||||||
gimp_session_info_clear_info (info);
|
gimp_session_info_clear_info (info);
|
||||||
@ -124,7 +125,7 @@ windows_show_toolbox (void)
|
|||||||
{
|
{
|
||||||
GtkWidget *toolbox = NULL;
|
GtkWidget *toolbox = NULL;
|
||||||
|
|
||||||
if (! global_toolbox_factory->open_dialogs)
|
if (! gimp_dialog_factory_get_open_dialogs (global_toolbox_factory))
|
||||||
{
|
{
|
||||||
toolbox = gimp_dialog_factory_dock_with_window_new (global_toolbox_factory,
|
toolbox = gimp_dialog_factory_dock_with_window_new (global_toolbox_factory,
|
||||||
gdk_screen_get_default ());
|
gdk_screen_get_default ());
|
||||||
|
@ -307,7 +307,7 @@ dialogs_tool_options_new (GimpDialogFactory *factory,
|
|||||||
gint view_size)
|
gint view_size)
|
||||||
{
|
{
|
||||||
return gimp_tool_options_editor_new (context->gimp,
|
return gimp_tool_options_editor_new (context->gimp,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -324,7 +324,7 @@ dialogs_error_console_new (GimpDialogFactory *factory,
|
|||||||
gint view_size)
|
gint view_size)
|
||||||
{
|
{
|
||||||
return gimp_error_console_new (context->gimp,
|
return gimp_error_console_new (context->gimp,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -332,7 +332,7 @@ dialogs_cursor_view_new (GimpDialogFactory *factory,
|
|||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint view_size)
|
gint view_size)
|
||||||
{
|
{
|
||||||
return gimp_cursor_view_new (factory->menu_factory);
|
return gimp_cursor_view_new (gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -347,7 +347,7 @@ dialogs_image_list_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->images,
|
context->gimp->images,
|
||||||
context,
|
context,
|
||||||
view_size, 1,
|
view_size, 1,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -360,7 +360,7 @@ dialogs_brush_list_view_new (GimpDialogFactory *factory,
|
|||||||
context,
|
context,
|
||||||
TRUE,
|
TRUE,
|
||||||
view_size, 1,
|
view_size, 1,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -372,7 +372,7 @@ dialogs_dynamics_list_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->dynamics_factory,
|
context->gimp->dynamics_factory,
|
||||||
context,
|
context,
|
||||||
view_size, 1,
|
view_size, 1,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -384,7 +384,7 @@ dialogs_pattern_list_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->pattern_factory,
|
context->gimp->pattern_factory,
|
||||||
context,
|
context,
|
||||||
view_size, 1,
|
view_size, 1,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -396,7 +396,7 @@ dialogs_gradient_list_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->gradient_factory,
|
context->gimp->gradient_factory,
|
||||||
context,
|
context,
|
||||||
view_size, 1,
|
view_size, 1,
|
||||||
factory->menu_factory, "<Gradients>",
|
gimp_dialog_factory_get_menu_factory (factory), "<Gradients>",
|
||||||
"/gradients-popup",
|
"/gradients-popup",
|
||||||
"gradients");
|
"gradients");
|
||||||
}
|
}
|
||||||
@ -410,7 +410,7 @@ dialogs_palette_list_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->palette_factory,
|
context->gimp->palette_factory,
|
||||||
context,
|
context,
|
||||||
view_size, 1,
|
view_size, 1,
|
||||||
factory->menu_factory, "<Palettes>",
|
gimp_dialog_factory_get_menu_factory (factory), "<Palettes>",
|
||||||
"/palettes-popup",
|
"/palettes-popup",
|
||||||
"palettes");
|
"palettes");
|
||||||
}
|
}
|
||||||
@ -424,7 +424,7 @@ dialogs_font_list_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->fonts,
|
context->gimp->fonts,
|
||||||
context,
|
context,
|
||||||
view_size, 1,
|
view_size, 1,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -436,7 +436,7 @@ dialogs_buffer_list_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->named_buffers,
|
context->gimp->named_buffers,
|
||||||
context,
|
context,
|
||||||
view_size, 1,
|
view_size, 1,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -448,7 +448,7 @@ dialogs_document_list_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->documents,
|
context->gimp->documents,
|
||||||
context,
|
context,
|
||||||
view_size, 0,
|
view_size, 0,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -460,7 +460,7 @@ dialogs_template_list_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->templates,
|
context->gimp->templates,
|
||||||
context,
|
context,
|
||||||
view_size, 0,
|
view_size, 0,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -475,7 +475,7 @@ dialogs_image_grid_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->images,
|
context->gimp->images,
|
||||||
context,
|
context,
|
||||||
view_size, 1,
|
view_size, 1,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -488,7 +488,7 @@ dialogs_brush_grid_view_new (GimpDialogFactory *factory,
|
|||||||
context,
|
context,
|
||||||
TRUE,
|
TRUE,
|
||||||
view_size, 1,
|
view_size, 1,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -500,7 +500,7 @@ dialogs_pattern_grid_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->pattern_factory,
|
context->gimp->pattern_factory,
|
||||||
context,
|
context,
|
||||||
view_size, 1,
|
view_size, 1,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -512,7 +512,7 @@ dialogs_gradient_grid_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->gradient_factory,
|
context->gimp->gradient_factory,
|
||||||
context,
|
context,
|
||||||
view_size, 1,
|
view_size, 1,
|
||||||
factory->menu_factory, "<Gradients>",
|
gimp_dialog_factory_get_menu_factory (factory), "<Gradients>",
|
||||||
"/gradients-popup",
|
"/gradients-popup",
|
||||||
"gradients");
|
"gradients");
|
||||||
}
|
}
|
||||||
@ -526,7 +526,7 @@ dialogs_palette_grid_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->palette_factory,
|
context->gimp->palette_factory,
|
||||||
context,
|
context,
|
||||||
view_size, 1,
|
view_size, 1,
|
||||||
factory->menu_factory, "<Palettes>",
|
gimp_dialog_factory_get_menu_factory (factory), "<Palettes>",
|
||||||
"/palettes-popup",
|
"/palettes-popup",
|
||||||
"palettes");
|
"palettes");
|
||||||
}
|
}
|
||||||
@ -540,7 +540,7 @@ dialogs_font_grid_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->fonts,
|
context->gimp->fonts,
|
||||||
context,
|
context,
|
||||||
view_size, 1,
|
view_size, 1,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -552,7 +552,7 @@ dialogs_buffer_grid_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->named_buffers,
|
context->gimp->named_buffers,
|
||||||
context,
|
context,
|
||||||
view_size, 1,
|
view_size, 1,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -564,7 +564,7 @@ dialogs_document_grid_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->documents,
|
context->gimp->documents,
|
||||||
context,
|
context,
|
||||||
view_size, 0,
|
view_size, 0,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -576,7 +576,7 @@ dialogs_template_grid_view_new (GimpDialogFactory *factory,
|
|||||||
context->gimp->templates,
|
context->gimp->templates,
|
||||||
context,
|
context,
|
||||||
view_size, 0,
|
view_size, 0,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -593,7 +593,7 @@ dialogs_layer_list_view_new (GimpDialogFactory *factory,
|
|||||||
return gimp_item_tree_view_new (GIMP_TYPE_LAYER_TREE_VIEW,
|
return gimp_item_tree_view_new (GIMP_TYPE_LAYER_TREE_VIEW,
|
||||||
view_size, 2,
|
view_size, 2,
|
||||||
gimp_context_get_image (context),
|
gimp_context_get_image (context),
|
||||||
factory->menu_factory, "<Layers>",
|
gimp_dialog_factory_get_menu_factory (factory), "<Layers>",
|
||||||
"/layers-popup");
|
"/layers-popup");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -608,7 +608,7 @@ dialogs_channel_list_view_new (GimpDialogFactory *factory,
|
|||||||
return gimp_item_tree_view_new (GIMP_TYPE_CHANNEL_TREE_VIEW,
|
return gimp_item_tree_view_new (GIMP_TYPE_CHANNEL_TREE_VIEW,
|
||||||
view_size, 1,
|
view_size, 1,
|
||||||
gimp_context_get_image (context),
|
gimp_context_get_image (context),
|
||||||
factory->menu_factory, "<Channels>",
|
gimp_dialog_factory_get_menu_factory (factory), "<Channels>",
|
||||||
"/channels-popup");
|
"/channels-popup");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -623,7 +623,7 @@ dialogs_vectors_list_view_new (GimpDialogFactory *factory,
|
|||||||
return gimp_item_tree_view_new (GIMP_TYPE_VECTORS_TREE_VIEW,
|
return gimp_item_tree_view_new (GIMP_TYPE_VECTORS_TREE_VIEW,
|
||||||
view_size, 1,
|
view_size, 1,
|
||||||
gimp_context_get_image (context),
|
gimp_context_get_image (context),
|
||||||
factory->menu_factory, "<Vectors>",
|
gimp_dialog_factory_get_menu_factory (factory), "<Vectors>",
|
||||||
"/vectors-popup");
|
"/vectors-popup");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -634,7 +634,7 @@ dialogs_colormap_editor_new (GimpDialogFactory *factory,
|
|||||||
{
|
{
|
||||||
GtkWidget *view;
|
GtkWidget *view;
|
||||||
|
|
||||||
view = gimp_colormap_editor_new (factory->menu_factory);
|
view = gimp_colormap_editor_new (gimp_dialog_factory_get_menu_factory (factory));
|
||||||
|
|
||||||
g_signal_connect (view, "selected",
|
g_signal_connect (view, "selected",
|
||||||
G_CALLBACK (dialogs_indexed_palette_selected),
|
G_CALLBACK (dialogs_indexed_palette_selected),
|
||||||
@ -656,7 +656,7 @@ dialogs_selection_editor_new (GimpDialogFactory *factory,
|
|||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint view_size)
|
gint view_size)
|
||||||
{
|
{
|
||||||
return gimp_selection_editor_new (factory->menu_factory);
|
return gimp_selection_editor_new (gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -665,7 +665,7 @@ dialogs_undo_editor_new (GimpDialogFactory *factory,
|
|||||||
gint view_size)
|
gint view_size)
|
||||||
{
|
{
|
||||||
return gimp_undo_editor_new (context->gimp->config,
|
return gimp_undo_editor_new (context->gimp->config,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -673,7 +673,7 @@ dialogs_sample_point_editor_new (GimpDialogFactory *factory,
|
|||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint view_size)
|
gint view_size)
|
||||||
{
|
{
|
||||||
return gimp_sample_point_editor_new (factory->menu_factory);
|
return gimp_sample_point_editor_new (gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -684,7 +684,7 @@ dialogs_navigation_editor_new (GimpDialogFactory *factory,
|
|||||||
GimpContext *context,
|
GimpContext *context,
|
||||||
gint view_size)
|
gint view_size)
|
||||||
{
|
{
|
||||||
return gimp_navigation_editor_new (factory->menu_factory);
|
return gimp_navigation_editor_new (gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -709,7 +709,7 @@ dialogs_brush_editor_get (GimpDialogFactory *factory,
|
|||||||
gint view_size)
|
gint view_size)
|
||||||
{
|
{
|
||||||
return gimp_brush_editor_new (context,
|
return gimp_brush_editor_new (context,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -718,7 +718,7 @@ dialogs_dynamics_editor_get (GimpDialogFactory *factory,
|
|||||||
gint view_size)
|
gint view_size)
|
||||||
{
|
{
|
||||||
return gimp_dynamics_editor_new (context,
|
return gimp_dynamics_editor_new (context,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -727,7 +727,7 @@ dialogs_gradient_editor_get (GimpDialogFactory *factory,
|
|||||||
gint view_size)
|
gint view_size)
|
||||||
{
|
{
|
||||||
return gimp_gradient_editor_new (context,
|
return gimp_gradient_editor_new (context,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@ -736,7 +736,7 @@ dialogs_palette_editor_get (GimpDialogFactory *factory,
|
|||||||
gint view_size)
|
gint view_size)
|
||||||
{
|
{
|
||||||
return gimp_palette_editor_new (context,
|
return gimp_palette_editor_new (context,
|
||||||
factory->menu_factory);
|
gimp_dialog_factory_get_menu_factory (factory));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -498,7 +498,7 @@ dialogs_get_toolbox (void)
|
|||||||
|
|
||||||
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (global_toolbox_factory), NULL);
|
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (global_toolbox_factory), NULL);
|
||||||
|
|
||||||
for (list = global_toolbox_factory->open_dialogs;
|
for (list = gimp_dialog_factory_get_open_dialogs (global_toolbox_factory);
|
||||||
list;
|
list;
|
||||||
list = g_list_next (list))
|
list = g_list_next (list))
|
||||||
{
|
{
|
||||||
|
@ -260,7 +260,7 @@ gimp_image_window_constructor (GType type,
|
|||||||
G_CALLBACK (gimp_image_window_hide_tooltip),
|
G_CALLBACK (gimp_image_window_hide_tooltip),
|
||||||
window);
|
window);
|
||||||
|
|
||||||
config = GIMP_GUI_CONFIG (private->display_factory->context->gimp->config);
|
config = GIMP_GUI_CONFIG (gimp_dialog_factory_get_context (private->display_factory)->gimp->config);
|
||||||
|
|
||||||
/* Create the window toplevel container */
|
/* Create the window toplevel container */
|
||||||
private->main_vbox = gtk_vbox_new (FALSE, 0);
|
private->main_vbox = gtk_vbox_new (FALSE, 0);
|
||||||
|
@ -157,7 +157,7 @@ gimp_ui_configurer_move_docks_to_columns (GimpUIConfigurer *ui_configurer,
|
|||||||
GimpDialogFactory *dialog_factory,
|
GimpDialogFactory *dialog_factory,
|
||||||
GimpDockColumns *dock_columns)
|
GimpDockColumns *dock_columns)
|
||||||
{
|
{
|
||||||
GList *dialogs = g_list_copy (dialog_factory->open_dialogs);
|
GList *dialogs = g_list_copy (gimp_dialog_factory_get_open_dialogs (dialog_factory));
|
||||||
GList *dialog_iter = NULL;
|
GList *dialog_iter = NULL;
|
||||||
|
|
||||||
for (dialog_iter = dialogs; dialog_iter; dialog_iter = dialog_iter->next)
|
for (dialog_iter = dialogs; dialog_iter; dialog_iter = dialog_iter->next)
|
||||||
|
@ -180,8 +180,7 @@ session_init (Gimp *gimp)
|
|||||||
"successfully parsed and added session info %p",
|
"successfully parsed and added session info %p",
|
||||||
info);
|
info);
|
||||||
|
|
||||||
factory->session_infos =
|
gimp_dialog_factory_add_session_info (factory, info);
|
||||||
g_list_append (factory->session_infos, info);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -111,7 +111,7 @@ windows_menu_setup (GimpUIManager *manager,
|
|||||||
G_CALLBACK (windows_menu_dock_window_removed),
|
G_CALLBACK (windows_menu_dock_window_removed),
|
||||||
manager, 0);
|
manager, 0);
|
||||||
|
|
||||||
for (list = global_dock_window_factory->open_dialogs;
|
for (list = gimp_dialog_factory_get_open_dialogs (global_dock_window_factory);
|
||||||
list;
|
list;
|
||||||
list = g_list_next (list))
|
list = g_list_next (list))
|
||||||
{
|
{
|
||||||
|
@ -952,7 +952,7 @@ gimp_text_tool_get_popup (GimpTool *tool,
|
|||||||
dialog_factory = gimp_dialog_factory_from_name ("toplevel");
|
dialog_factory = gimp_dialog_factory_from_name ("toplevel");
|
||||||
|
|
||||||
text_tool->ui_manager =
|
text_tool->ui_manager =
|
||||||
gimp_menu_factory_manager_new (dialog_factory->menu_factory,
|
gimp_menu_factory_manager_new (gimp_dialog_factory_get_menu_factory (dialog_factory),
|
||||||
"<TextTool>",
|
"<TextTool>",
|
||||||
text_tool, FALSE);
|
text_tool, FALSE);
|
||||||
|
|
||||||
@ -2246,7 +2246,7 @@ gimp_text_tool_editor (GimpTextTool *text_tool)
|
|||||||
}
|
}
|
||||||
|
|
||||||
text_tool->editor = gimp_text_options_editor_new (parent, options,
|
text_tool->editor = gimp_text_options_editor_new (parent, options,
|
||||||
dialog_factory->menu_factory,
|
gimp_dialog_factory_get_menu_factory (dialog_factory),
|
||||||
_("GIMP Text Editor"),
|
_("GIMP Text Editor"),
|
||||||
text_tool->text_buffer);
|
text_tool->text_buffer);
|
||||||
|
|
||||||
|
@ -62,6 +62,12 @@ enum
|
|||||||
|
|
||||||
struct _GimpDialogFactoryPrivate
|
struct _GimpDialogFactoryPrivate
|
||||||
{
|
{
|
||||||
|
GimpContext *context;
|
||||||
|
GimpMenuFactory *menu_factory;
|
||||||
|
|
||||||
|
GList *open_dialogs;
|
||||||
|
GList *session_infos;
|
||||||
|
|
||||||
GimpDialogNewFunc new_dock_window_func;
|
GimpDialogNewFunc new_dock_window_func;
|
||||||
GimpDialogNewDockFunc new_dock_func;
|
GimpDialogNewDockFunc new_dock_func;
|
||||||
GimpDialogConstructor constructor;
|
GimpDialogConstructor constructor;
|
||||||
@ -160,10 +166,6 @@ gimp_dialog_factory_init (GimpDialogFactory *factory)
|
|||||||
GIMP_TYPE_DIALOG_FACTORY,
|
GIMP_TYPE_DIALOG_FACTORY,
|
||||||
GimpDialogFactoryPrivate);
|
GimpDialogFactoryPrivate);
|
||||||
factory->p->constructor = gimp_dialog_factory_default_constructor;
|
factory->p->constructor = gimp_dialog_factory_default_constructor;
|
||||||
|
|
||||||
factory->menu_factory = NULL;
|
|
||||||
factory->session_infos = NULL;
|
|
||||||
factory->open_dialogs = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -175,11 +177,11 @@ gimp_dialog_factory_dispose (GObject *object)
|
|||||||
|
|
||||||
/* start iterating from the beginning each time we destroyed a
|
/* start iterating from the beginning each time we destroyed a
|
||||||
* toplevel because destroying a dock may cause lots of items
|
* toplevel because destroying a dock may cause lots of items
|
||||||
* to be removed from factory->open_dialogs
|
* to be removed from factory->p->open_dialogs
|
||||||
*/
|
*/
|
||||||
while (factory->open_dialogs)
|
while (factory->p->open_dialogs)
|
||||||
{
|
{
|
||||||
for (list = factory->open_dialogs; list; list = g_list_next (list))
|
for (list = factory->p->open_dialogs; list; list = g_list_next (list))
|
||||||
{
|
{
|
||||||
if (gtk_widget_is_toplevel (list->data))
|
if (gtk_widget_is_toplevel (list->data))
|
||||||
{
|
{
|
||||||
@ -193,23 +195,23 @@ gimp_dialog_factory_dispose (GObject *object)
|
|||||||
*/
|
*/
|
||||||
if (! list)
|
if (! list)
|
||||||
{
|
{
|
||||||
g_warning ("%s: stale non-toplevel entries in factory->open_dialogs",
|
g_warning ("%s: stale non-toplevel entries in factory->p->open_dialogs",
|
||||||
G_STRFUNC);
|
G_STRFUNC);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (factory->open_dialogs)
|
if (factory->p->open_dialogs)
|
||||||
{
|
{
|
||||||
g_list_free (factory->open_dialogs);
|
g_list_free (factory->p->open_dialogs);
|
||||||
factory->open_dialogs = NULL;
|
factory->p->open_dialogs = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (factory->session_infos)
|
if (factory->p->session_infos)
|
||||||
{
|
{
|
||||||
g_list_foreach (factory->session_infos, (GFunc) g_object_unref, NULL);
|
g_list_foreach (factory->p->session_infos, (GFunc) g_object_unref, NULL);
|
||||||
g_list_free (factory->session_infos);
|
g_list_free (factory->p->session_infos);
|
||||||
factory->session_infos = NULL;
|
factory->p->session_infos = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp (gimp_object_get_name (factory), "toolbox") == 0)
|
if (strcmp (gimp_object_get_name (factory), "toolbox") == 0)
|
||||||
@ -286,8 +288,8 @@ gimp_dialog_factory_new (const gchar *name,
|
|||||||
g_hash_table_insert (GIMP_DIALOG_FACTORY_GET_CLASS (factory)->factories,
|
g_hash_table_insert (GIMP_DIALOG_FACTORY_GET_CLASS (factory)->factories,
|
||||||
key, factory);
|
key, factory);
|
||||||
|
|
||||||
factory->context = context;
|
factory->p->context = context;
|
||||||
factory->menu_factory = menu_factory;
|
factory->p->menu_factory = menu_factory;
|
||||||
factory->p->new_dock_func = new_dock_func;
|
factory->p->new_dock_func = new_dock_func;
|
||||||
factory->p->toggle_visibility = toggle_visibility;
|
factory->p->toggle_visibility = toggle_visibility;
|
||||||
|
|
||||||
@ -404,7 +406,7 @@ gimp_dialog_factory_find_session_info (GimpDialogFactory *factory,
|
|||||||
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (factory), NULL);
|
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (factory), NULL);
|
||||||
g_return_val_if_fail (identifier != NULL, NULL);
|
g_return_val_if_fail (identifier != NULL, NULL);
|
||||||
|
|
||||||
for (list = factory->session_infos; list; list = g_list_next (list))
|
for (list = factory->p->session_infos; list; list = g_list_next (list))
|
||||||
{
|
{
|
||||||
GimpSessionInfo *info = list->data;
|
GimpSessionInfo *info = list->data;
|
||||||
|
|
||||||
@ -513,7 +515,7 @@ gimp_dialog_factory_dialog_new_internal (GimpDialogFactory *factory,
|
|||||||
GtkWidget *dockbook;
|
GtkWidget *dockbook;
|
||||||
|
|
||||||
dock = gimp_dialog_factory_dock_with_window_new (factory, screen);
|
dock = gimp_dialog_factory_dock_with_window_new (factory, screen);
|
||||||
dockbook = gimp_dockbook_new (factory->menu_factory);
|
dockbook = gimp_dockbook_new (factory->p->menu_factory);
|
||||||
|
|
||||||
gimp_dock_add_book (GIMP_DOCK (dock),
|
gimp_dock_add_book (GIMP_DOCK (dock),
|
||||||
GIMP_DOCKBOOK (dockbook),
|
GIMP_DOCKBOOK (dockbook),
|
||||||
@ -539,7 +541,7 @@ gimp_dialog_factory_dialog_new_internal (GimpDialogFactory *factory,
|
|||||||
view_size);
|
view_size);
|
||||||
else
|
else
|
||||||
dialog = factory->p->constructor (factory, entry,
|
dialog = factory->p->constructor (factory, entry,
|
||||||
factory->context,
|
factory->p->context,
|
||||||
view_size);
|
view_size);
|
||||||
|
|
||||||
if (dialog)
|
if (dialog)
|
||||||
@ -656,13 +658,54 @@ gimp_dialog_factory_dialog_new (GimpDialogFactory *factory,
|
|||||||
|
|
||||||
return gimp_dialog_factory_dialog_new_internal (factory,
|
return gimp_dialog_factory_dialog_new_internal (factory,
|
||||||
screen,
|
screen,
|
||||||
factory->context,
|
factory->p->context,
|
||||||
identifier,
|
identifier,
|
||||||
view_size,
|
view_size,
|
||||||
FALSE,
|
FALSE,
|
||||||
present);
|
present);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GimpContext *
|
||||||
|
gimp_dialog_factory_get_context (GimpDialogFactory *factory)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (factory), NULL);
|
||||||
|
|
||||||
|
return factory->p->context;
|
||||||
|
}
|
||||||
|
|
||||||
|
GimpMenuFactory *
|
||||||
|
gimp_dialog_factory_get_menu_factory (GimpDialogFactory *factory)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (factory), NULL);
|
||||||
|
|
||||||
|
return factory->p->menu_factory;
|
||||||
|
}
|
||||||
|
|
||||||
|
GList *
|
||||||
|
gimp_dialog_factory_get_open_dialogs (GimpDialogFactory *factory)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (factory), NULL);
|
||||||
|
|
||||||
|
return factory->p->open_dialogs;
|
||||||
|
}
|
||||||
|
|
||||||
|
GList *
|
||||||
|
gimp_dialog_factory_get_session_infos (GimpDialogFactory *factory)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GIMP_IS_DIALOG_FACTORY (factory), NULL);
|
||||||
|
|
||||||
|
return factory->p->session_infos;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_dialog_factory_add_session_info (GimpDialogFactory *factory,
|
||||||
|
GimpSessionInfo *info)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GIMP_IS_DIALOG_FACTORY (factory));
|
||||||
|
|
||||||
|
factory->p->session_infos = g_list_append (factory->p->session_infos, info);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gimp_dialog_factory_dialog_raise:
|
* gimp_dialog_factory_dialog_raise:
|
||||||
* @factory: a #GimpDialogFactory
|
* @factory: a #GimpDialogFactory
|
||||||
@ -834,7 +877,7 @@ gimp_dialog_factory_dock_window_new (GimpDialogFactory *factory,
|
|||||||
g_return_val_if_fail (factory->p->new_dock_window_func != NULL, NULL);
|
g_return_val_if_fail (factory->p->new_dock_window_func != NULL, NULL);
|
||||||
|
|
||||||
/* Create the dock window */
|
/* Create the dock window */
|
||||||
dock_window = factory->p->new_dock_window_func (factory, factory->context, 0);
|
dock_window = factory->p->new_dock_window_func (factory, factory->p->context, 0);
|
||||||
gtk_window_set_screen (GTK_WINDOW (dock_window), screen);
|
gtk_window_set_screen (GTK_WINDOW (dock_window), screen);
|
||||||
gimp_dialog_factory_set_widget_data (dock_window, factory, NULL);
|
gimp_dialog_factory_set_widget_data (dock_window, factory, NULL);
|
||||||
|
|
||||||
@ -856,7 +899,7 @@ gimp_dialog_factory_dock_new (GimpDialogFactory *factory,
|
|||||||
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
|
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
|
||||||
g_return_val_if_fail (ui_manager != NULL, NULL);
|
g_return_val_if_fail (ui_manager != NULL, NULL);
|
||||||
|
|
||||||
return factory->p->new_dock_func (factory, factory->context, ui_manager);
|
return factory->p->new_dock_func (factory, factory->p->context, ui_manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -872,7 +915,7 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
|
|||||||
g_return_if_fail (GIMP_IS_DIALOG_FACTORY (factory));
|
g_return_if_fail (GIMP_IS_DIALOG_FACTORY (factory));
|
||||||
g_return_if_fail (GTK_IS_WIDGET (dialog));
|
g_return_if_fail (GTK_IS_WIDGET (dialog));
|
||||||
|
|
||||||
if (g_list_find (factory->open_dialogs, dialog))
|
if (g_list_find (factory->p->open_dialogs, dialog))
|
||||||
{
|
{
|
||||||
g_warning ("%s: dialog already registered", G_STRFUNC);
|
g_warning ("%s: dialog already registered", G_STRFUNC);
|
||||||
return;
|
return;
|
||||||
@ -894,7 +937,7 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
|
|||||||
toplevel ? "toplevel" : "dockable",
|
toplevel ? "toplevel" : "dockable",
|
||||||
entry->identifier);
|
entry->identifier);
|
||||||
|
|
||||||
for (list = factory->session_infos; list; list = g_list_next (list))
|
for (list = factory->p->session_infos; list; list = g_list_next (list))
|
||||||
{
|
{
|
||||||
GimpSessionInfo *current_info = list->data;
|
GimpSessionInfo *current_info = list->data;
|
||||||
|
|
||||||
@ -962,14 +1005,14 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
|
|||||||
G_CALLBACK (gimp_dialog_factory_set_user_pos),
|
G_CALLBACK (gimp_dialog_factory_set_user_pos),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
factory->session_infos = g_list_append (factory->session_infos, info);
|
factory->p->session_infos = g_list_append (factory->p->session_infos, info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else /* dialog is a GimpDockWindow */
|
else /* dialog is a GimpDockWindow */
|
||||||
{
|
{
|
||||||
GIMP_LOG (DIALOG_FACTORY, "adding dock (dialog = %p)", dialog);
|
GIMP_LOG (DIALOG_FACTORY, "adding dock (dialog = %p)", dialog);
|
||||||
|
|
||||||
for (list = factory->session_infos; list; list = g_list_next (list))
|
for (list = factory->p->session_infos; list; list = g_list_next (list))
|
||||||
{
|
{
|
||||||
GimpSessionInfo *current_info = list->data;
|
GimpSessionInfo *current_info = list->data;
|
||||||
|
|
||||||
@ -1013,13 +1056,13 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
|
|||||||
G_CALLBACK (gimp_dialog_factory_set_user_pos),
|
G_CALLBACK (gimp_dialog_factory_set_user_pos),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
factory->session_infos = g_list_append (factory->session_infos, info);
|
factory->p->session_infos = g_list_append (factory->p->session_infos, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_signal_emit (factory, factory_signals[DOCK_WINDOW_ADDED], 0, dialog);
|
g_signal_emit (factory, factory_signals[DOCK_WINDOW_ADDED], 0, dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
factory->open_dialogs = g_list_prepend (factory->open_dialogs, dialog);
|
factory->p->open_dialogs = g_list_prepend (factory->p->open_dialogs, dialog);
|
||||||
|
|
||||||
g_signal_connect_object (dialog, "destroy",
|
g_signal_connect_object (dialog, "destroy",
|
||||||
G_CALLBACK (gimp_dialog_factory_remove_dialog),
|
G_CALLBACK (gimp_dialog_factory_remove_dialog),
|
||||||
@ -1087,13 +1130,13 @@ gimp_dialog_factory_remove_dialog (GimpDialogFactory *factory,
|
|||||||
g_return_if_fail (GIMP_IS_DIALOG_FACTORY (factory));
|
g_return_if_fail (GIMP_IS_DIALOG_FACTORY (factory));
|
||||||
g_return_if_fail (GTK_IS_WIDGET (dialog));
|
g_return_if_fail (GTK_IS_WIDGET (dialog));
|
||||||
|
|
||||||
if (! g_list_find (factory->open_dialogs, dialog))
|
if (! g_list_find (factory->p->open_dialogs, dialog))
|
||||||
{
|
{
|
||||||
g_warning ("%s: dialog not registered", G_STRFUNC);
|
g_warning ("%s: dialog not registered", G_STRFUNC);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
factory->open_dialogs = g_list_remove (factory->open_dialogs, dialog);
|
factory->p->open_dialogs = g_list_remove (factory->p->open_dialogs, dialog);
|
||||||
|
|
||||||
dialog_factory = gimp_dialog_factory_from_widget (dialog, &entry);
|
dialog_factory = gimp_dialog_factory_from_widget (dialog, &entry);
|
||||||
|
|
||||||
@ -1107,7 +1150,7 @@ gimp_dialog_factory_remove_dialog (GimpDialogFactory *factory,
|
|||||||
entry ? entry->identifier : "dock",
|
entry ? entry->identifier : "dock",
|
||||||
dialog);
|
dialog);
|
||||||
|
|
||||||
for (list = factory->session_infos; list; list = g_list_next (list))
|
for (list = factory->p->session_infos; list; list = g_list_next (list))
|
||||||
{
|
{
|
||||||
GimpSessionInfo *session_info = list->data;
|
GimpSessionInfo *session_info = list->data;
|
||||||
|
|
||||||
@ -1137,7 +1180,7 @@ gimp_dialog_factory_remove_dialog (GimpDialogFactory *factory,
|
|||||||
if (GIMP_IS_DOCK_WINDOW (dialog))
|
if (GIMP_IS_DOCK_WINDOW (dialog))
|
||||||
{
|
{
|
||||||
/* don't save session info for empty docks */
|
/* don't save session info for empty docks */
|
||||||
factory->session_infos = g_list_remove (factory->session_infos,
|
factory->p->session_infos = g_list_remove (factory->p->session_infos,
|
||||||
session_info);
|
session_info);
|
||||||
g_object_unref (session_info);
|
g_object_unref (session_info);
|
||||||
|
|
||||||
@ -1423,7 +1466,7 @@ gimp_dialog_factory_dialog_configure (GtkWidget *dialog,
|
|||||||
GimpDialogFactoryEntry *entry;
|
GimpDialogFactoryEntry *entry;
|
||||||
GList *list;
|
GList *list;
|
||||||
|
|
||||||
if (! g_list_find (factory->open_dialogs, dialog))
|
if (! g_list_find (factory->p->open_dialogs, dialog))
|
||||||
{
|
{
|
||||||
g_warning ("%s: dialog not registered", G_STRFUNC);
|
g_warning ("%s: dialog not registered", G_STRFUNC);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -1437,7 +1480,7 @@ gimp_dialog_factory_dialog_configure (GtkWidget *dialog,
|
|||||||
dialog))
|
dialog))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
for (list = factory->session_infos; list; list = g_list_next (list))
|
for (list = factory->p->session_infos; list; list = g_list_next (list))
|
||||||
{
|
{
|
||||||
GimpSessionInfo *session_info = list->data;
|
GimpSessionInfo *session_info = list->data;
|
||||||
|
|
||||||
@ -1468,7 +1511,7 @@ gimp_dialog_factories_save_foreach (gconstpointer key,
|
|||||||
{
|
{
|
||||||
GList *infos;
|
GList *infos;
|
||||||
|
|
||||||
for (infos = factory->session_infos; infos; infos = g_list_next (infos))
|
for (infos = factory->p->session_infos; infos; infos = g_list_next (infos))
|
||||||
{
|
{
|
||||||
GimpSessionInfo *info = infos->data;
|
GimpSessionInfo *info = infos->data;
|
||||||
|
|
||||||
@ -1508,7 +1551,7 @@ gimp_dialog_factories_restore_foreach (gconstpointer key,
|
|||||||
{
|
{
|
||||||
GList *infos;
|
GList *infos;
|
||||||
|
|
||||||
for (infos = factory->session_infos; infos; infos = g_list_next (infos))
|
for (infos = factory->p->session_infos; infos; infos = g_list_next (infos))
|
||||||
{
|
{
|
||||||
GimpSessionInfo *info = infos->data;
|
GimpSessionInfo *info = infos->data;
|
||||||
|
|
||||||
@ -1533,7 +1576,7 @@ gimp_dialog_factories_clear_foreach (gconstpointer key,
|
|||||||
{
|
{
|
||||||
GList *list;
|
GList *list;
|
||||||
|
|
||||||
for (list = factory->session_infos; list; list = g_list_next (list))
|
for (list = factory->p->session_infos; list; list = g_list_next (list))
|
||||||
{
|
{
|
||||||
GimpSessionInfo *info = list->data;
|
GimpSessionInfo *info = list->data;
|
||||||
|
|
||||||
@ -1554,7 +1597,7 @@ gimp_dialog_factories_hide_foreach (gconstpointer key,
|
|||||||
if (! factory->p->toggle_visibility)
|
if (! factory->p->toggle_visibility)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (list = factory->open_dialogs; list; list = g_list_next (list))
|
for (list = factory->p->open_dialogs; list; list = g_list_next (list))
|
||||||
{
|
{
|
||||||
GtkWidget *widget = list->data;
|
GtkWidget *widget = list->data;
|
||||||
|
|
||||||
@ -1591,7 +1634,7 @@ gimp_dialog_factories_show_foreach (gconstpointer key,
|
|||||||
{
|
{
|
||||||
GList *list;
|
GList *list;
|
||||||
|
|
||||||
for (list = factory->open_dialogs; list; list = g_list_next (list))
|
for (list = factory->p->open_dialogs; list; list = g_list_next (list))
|
||||||
{
|
{
|
||||||
GtkWidget *widget = list->data;
|
GtkWidget *widget = list->data;
|
||||||
|
|
||||||
@ -1631,7 +1674,7 @@ gimp_dialog_factories_set_busy_foreach (gconstpointer key,
|
|||||||
GdkCursor *cursor = NULL;
|
GdkCursor *cursor = NULL;
|
||||||
GList *list;
|
GList *list;
|
||||||
|
|
||||||
for (list = factory->open_dialogs; list; list = g_list_next (list))
|
for (list = factory->p->open_dialogs; list; list = g_list_next (list))
|
||||||
{
|
{
|
||||||
GtkWidget *widget = list->data;
|
GtkWidget *widget = list->data;
|
||||||
|
|
||||||
@ -1667,7 +1710,7 @@ gimp_dialog_factories_unset_busy_foreach (gconstpointer key,
|
|||||||
{
|
{
|
||||||
GList *list;
|
GList *list;
|
||||||
|
|
||||||
for (list = factory->open_dialogs; list; list = g_list_next (list))
|
for (list = factory->p->open_dialogs; list; list = g_list_next (list))
|
||||||
{
|
{
|
||||||
GtkWidget *widget = list->data;
|
GtkWidget *widget = list->data;
|
||||||
|
|
||||||
|
@ -91,12 +91,6 @@ struct _GimpDialogFactory
|
|||||||
{
|
{
|
||||||
GimpObject parent_instance;
|
GimpObject parent_instance;
|
||||||
|
|
||||||
GimpContext *context;
|
|
||||||
GimpMenuFactory *menu_factory;
|
|
||||||
|
|
||||||
GList *open_dialogs;
|
|
||||||
GList *session_infos;
|
|
||||||
|
|
||||||
GimpDialogFactoryPrivate *p;
|
GimpDialogFactoryPrivate *p;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -146,6 +140,12 @@ GtkWidget * gimp_dialog_factory_dialog_new (GimpDialogFactory
|
|||||||
const gchar *identifier,
|
const gchar *identifier,
|
||||||
gint view_size,
|
gint view_size,
|
||||||
gboolean present);
|
gboolean present);
|
||||||
|
GimpContext * gimp_dialog_factory_get_context (GimpDialogFactory *factory);
|
||||||
|
GimpMenuFactory * gimp_dialog_factory_get_menu_factory (GimpDialogFactory *factory);
|
||||||
|
GList * gimp_dialog_factory_get_open_dialogs (GimpDialogFactory *factory);
|
||||||
|
GList * gimp_dialog_factory_get_session_infos (GimpDialogFactory *factory);
|
||||||
|
void gimp_dialog_factory_add_session_info (GimpDialogFactory *factory,
|
||||||
|
GimpSessionInfo *info);
|
||||||
GtkWidget * gimp_dialog_factory_dialog_raise (GimpDialogFactory *factory,
|
GtkWidget * gimp_dialog_factory_dialog_raise (GimpDialogFactory *factory,
|
||||||
GdkScreen *screen,
|
GdkScreen *screen,
|
||||||
const gchar *identifiers,
|
const gchar *identifiers,
|
||||||
|
@ -368,23 +368,26 @@ gimp_dock_window_constructor (GType type,
|
|||||||
~(GIMP_CONTEXT_IMAGE_MASK |
|
~(GIMP_CONTEXT_IMAGE_MASK |
|
||||||
GIMP_CONTEXT_DISPLAY_MASK),
|
GIMP_CONTEXT_DISPLAY_MASK),
|
||||||
FALSE);
|
FALSE);
|
||||||
gimp_context_set_parent (dock_window->p->context, dock_window->p->dialog_factory->context);
|
gimp_context_set_parent (dock_window->p->context,
|
||||||
|
gimp_dialog_factory_get_context (dock_window->p->dialog_factory));
|
||||||
|
|
||||||
if (dock_window->p->auto_follow_active)
|
if (dock_window->p->auto_follow_active)
|
||||||
{
|
{
|
||||||
if (gimp_context_get_display (dock_window->p->dialog_factory->context))
|
if (gimp_context_get_display (gimp_dialog_factory_get_context (dock_window->p->dialog_factory)))
|
||||||
gimp_context_copy_property (dock_window->p->dialog_factory->context, dock_window->p->context,
|
gimp_context_copy_property (gimp_dialog_factory_get_context (dock_window->p->dialog_factory),
|
||||||
|
dock_window->p->context,
|
||||||
GIMP_CONTEXT_PROP_DISPLAY);
|
GIMP_CONTEXT_PROP_DISPLAY);
|
||||||
else
|
else
|
||||||
gimp_context_copy_property (dock_window->p->dialog_factory->context, dock_window->p->context,
|
gimp_context_copy_property (gimp_dialog_factory_get_context (dock_window->p->dialog_factory),
|
||||||
|
dock_window->p->context,
|
||||||
GIMP_CONTEXT_PROP_IMAGE);
|
GIMP_CONTEXT_PROP_IMAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_signal_connect_object (dock_window->p->dialog_factory->context, "display-changed",
|
g_signal_connect_object (gimp_dialog_factory_get_context (dock_window->p->dialog_factory), "display-changed",
|
||||||
G_CALLBACK (gimp_dock_window_factory_display_changed),
|
G_CALLBACK (gimp_dock_window_factory_display_changed),
|
||||||
dock_window,
|
dock_window,
|
||||||
0);
|
0);
|
||||||
g_signal_connect_object (dock_window->p->dialog_factory->context, "image-changed",
|
g_signal_connect_object (gimp_dialog_factory_get_context (dock_window->p->dialog_factory), "image-changed",
|
||||||
G_CALLBACK (gimp_dock_window_factory_image_changed),
|
G_CALLBACK (gimp_dock_window_factory_image_changed),
|
||||||
dock_window,
|
dock_window,
|
||||||
0);
|
0);
|
||||||
@ -826,7 +829,7 @@ gimp_dock_window_auto_clicked (GtkWidget *widget,
|
|||||||
|
|
||||||
if (dock_window->p->auto_follow_active)
|
if (dock_window->p->auto_follow_active)
|
||||||
{
|
{
|
||||||
gimp_context_copy_properties (dock_window->p->dialog_factory->context,
|
gimp_context_copy_properties (gimp_dialog_factory_get_context (dock_window->p->dialog_factory),
|
||||||
dock_window->p->context,
|
dock_window->p->context,
|
||||||
GIMP_CONTEXT_DISPLAY_MASK |
|
GIMP_CONTEXT_DISPLAY_MASK |
|
||||||
GIMP_CONTEXT_IMAGE_MASK);
|
GIMP_CONTEXT_IMAGE_MASK);
|
||||||
|
Reference in New Issue
Block a user