Commit 8699511b authored by Martin Nordholts's avatar Martin Nordholts

app: global_dock_window_factory -> global_dock_factory

With GimpDock not being a toplevel any longer, it makes more sense to
name global_dock_factory global_dock_window_factory. Do that.
parent b8fe7278
......@@ -302,7 +302,7 @@ data_edit_cmd_callback (GtkAction *action,
GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (view));
GtkWidget *dockable;
dockable = gimp_dialog_factory_dialog_raise (global_dock_factory, screen,
dockable = gimp_dialog_factory_dialog_raise (global_dock_window_factory, screen,
value, -1);
gimp_data_editor_set_data (GIMP_DATA_EDITOR (gtk_bin_get_child (GTK_BIN (dockable))),
......
......@@ -56,7 +56,7 @@ dialogs_create_dockable_cmd_callback (GtkAction *action,
return_if_no_widget (widget, data);
if (value)
gimp_dialog_factory_dialog_raise (global_dock_factory,
gimp_dialog_factory_dialog_raise (global_dock_window_factory,
gtk_widget_get_screen (widget),
value, -1);
}
......@@ -448,7 +448,7 @@ edit_named_paste_cmd_callback (GtkAction *action,
GtkWidget *widget;
return_if_no_widget (widget, data);
gimp_dialog_factory_dialog_raise (global_dock_factory,
gimp_dialog_factory_dialog_raise (global_dock_window_factory,
gtk_widget_get_screen (widget),
"gimp-buffer-list|gimp-buffer-grid", -1);
}
......
......@@ -319,7 +319,7 @@ select_save_cmd_callback (GtkAction *action,
gimp_selection_save (GIMP_SELECTION (gimp_image_get_mask (image)));
gimp_image_flush (image);
gimp_dialog_factory_dialog_raise (global_dock_factory,
gimp_dialog_factory_dialog_raise (global_dock_window_factory,
gtk_widget_get_screen (widget),
"gimp-channel-list", -1);
}
......
......@@ -338,7 +338,7 @@ view_navigation_window_cmd_callback (GtkAction *action,
shell = gimp_display_get_shell (display);
gimp_dialog_factory_dialog_raise (global_dock_factory,
gimp_dialog_factory_dialog_raise (global_dock_window_factory,
gtk_widget_get_screen (GTK_WIDGET (shell)),
"gimp-navigation-view", -1);
}
......
......@@ -137,21 +137,23 @@ windows_actions_setup (GimpActionGroup *group)
windows_actions_display_add (group->gimp->displays, display, group);
}
g_signal_connect_object (global_dock_factory, "dock-window-added",
g_signal_connect_object (global_dock_window_factory, "dock-window-added",
G_CALLBACK (windows_actions_dock_window_added),
group, 0);
g_signal_connect_object (global_dock_factory, "dock-window-removed",
g_signal_connect_object (global_dock_window_factory, "dock-window-removed",
G_CALLBACK (windows_actions_dock_window_removed),
group, 0);
for (list = global_dock_factory->open_dialogs;
for (list = global_dock_window_factory->open_dialogs;
list;
list = g_list_next (list))
{
GimpDockWindow *dock_window = list->data;
if (GIMP_IS_DOCK_WINDOW (dock_window))
windows_actions_dock_window_added (global_dock_factory, dock_window, group);
windows_actions_dock_window_added (global_dock_window_factory,
dock_window,
group);
}
g_signal_connect_object (global_recent_docks, "add",
......
......@@ -112,10 +112,10 @@ windows_open_recent_cmd_callback (GtkAction *action,
g_object_ref (info);
gimp_container_remove (global_recent_docks, GIMP_OBJECT (info));
global_dock_factory->session_infos =
g_list_append (global_dock_factory->session_infos, info);
global_dock_window_factory->session_infos =
g_list_append (global_dock_window_factory->session_infos, info);
gimp_session_info_restore (info, global_dock_factory);
gimp_session_info_restore (info, global_dock_window_factory);
gimp_session_info_clear_info (info);
}
......
......@@ -220,11 +220,11 @@ dialogs_toolbox_new (GimpDialogFactory *factory,
GimpContext *context,
GimpUIManager *ui_manager)
{
/* we pass "global_dock_factory", _not_ "global_toolbox_factory" to
* the toolbox constructor, because the global_toolbox_factory has no
* dockables registered
/* we pass "global_dock_window_factory", _not_
* "global_toolbox_factory" to the toolbox constructor, because the
* global_toolbox_factory has no dockables registered
*/
return gimp_toolbox_new (global_dock_factory,
return gimp_toolbox_new (global_dock_window_factory,
context,
ui_manager);
}
......
......@@ -40,12 +40,12 @@
#include "gimp-intl.h"
GimpDialogFactory *global_dialog_factory = NULL;
GimpDialogFactory *global_dock_factory = NULL;
GimpDialogFactory *global_toolbox_factory = NULL;
GimpDialogFactory *global_display_factory = NULL;
GimpDialogFactory *global_dialog_factory = NULL;
GimpDialogFactory *global_dock_window_factory = NULL;
GimpDialogFactory *global_toolbox_factory = NULL;
GimpDialogFactory *global_display_factory = NULL;
GimpContainer *global_recent_docks = NULL;
GimpContainer *global_recent_docks = NULL;
#define FOREIGN(id, singleton, remember_size) \
......@@ -334,14 +334,14 @@ dialogs_init (Gimp *gimp,
dialogs_toolbox_dock_window_new);
/* Dock */
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,
global_dock_window_factory = gimp_dialog_factory_new ("dock",
gimp_get_user_context (gimp),
menu_factory,
dialogs_dock_new,
TRUE);
gimp_dialog_factory_set_constructor (global_dock_window_factory,
dialogs_dockable_constructor);
gimp_dialog_factory_set_dock_window_func (global_dock_factory,
gimp_dialog_factory_set_dock_window_func (global_dock_window_factory,
dialogs_dock_window_new);
/* Display */
......@@ -367,7 +367,7 @@ dialogs_init (Gimp *gimp,
toplevel_entries[i].remember_if_open);
for (i = 0; i < G_N_ELEMENTS (dock_entries); i++)
gimp_dialog_factory_register_entry (global_dock_factory,
gimp_dialog_factory_register_entry (global_dock_window_factory,
dock_entries[i].identifier,
gettext (dock_entries[i].name),
gettext (dock_entries[i].blurb),
......@@ -406,10 +406,11 @@ dialogs_exit (Gimp *gimp)
}
/* destroy the "global_toolbox_factory" _before_ destroying the
* "global_dock_factory" because the "global_toolbox_factory" owns
* dockables which were created by the "global_dock_factory". This
* way they are properly removed from the "global_dock_factory", which
* would complain about stale entries otherwise.
* "global_dock_window_factory" because the
* "global_toolbox_factory" owns dockables which were created by
* the "global_dock_window_factory". This way they are properly
* removed from the "global_dock_window_factory", which would
* complain about stale entries otherwise.
*/
if (global_toolbox_factory)
{
......@@ -417,10 +418,10 @@ dialogs_exit (Gimp *gimp)
global_toolbox_factory = NULL;
}
if (global_dock_factory)
if (global_dock_window_factory)
{
g_object_unref (global_dock_factory);
global_dock_factory = NULL;
g_object_unref (global_dock_window_factory);
global_dock_window_factory = NULL;
}
if (global_display_factory)
......
......@@ -20,7 +20,7 @@
extern GimpDialogFactory *global_dialog_factory;
extern GimpDialogFactory *global_dock_factory;
extern GimpDialogFactory *global_dock_window_factory;
extern GimpDialogFactory *global_toolbox_factory;
extern GimpDialogFactory *global_display_factory;
......
......@@ -271,7 +271,7 @@ gimp_ui_configurer_move_docks_to_window (GimpUIConfigurer *ui_configurer,
*/
dialog_factory = (GIMP_IS_TOOLBOX (dock) ?
global_toolbox_factory :
global_dock_factory);
global_dock_window_factory);
/* Create a dock window to put the dock in */
dock_window = gimp_dialog_factory_dock_window_new (dialog_factory,
......@@ -312,7 +312,7 @@ gimp_ui_configurer_separate_shells (GimpUIConfigurer *ui_configurer,
NULL,
global_menu_factory,
global_display_factory,
global_dock_factory);
global_dock_window_factory);
/* Move the shell there */
shell = gimp_image_window_get_shell (source_image_window, 1);
......@@ -365,7 +365,7 @@ gimp_ui_configurer_configure_for_single_window (GimpUIConfigurer *ui_configurer)
* window
*/
gimp_ui_configurer_move_docks_to_columns (ui_configurer,
global_dock_factory,
global_dock_window_factory,
right_docks);
/* Show the docks in the window */
......
......@@ -102,7 +102,7 @@ gui_message_error_console (GimpMessageSeverity severity,
{
GimpSessionInfo *info;
info = gimp_dialog_factory_find_session_info (global_dock_factory,
info = gimp_dialog_factory_find_session_info (global_dock_window_factory,
"gimp-error-console");
if (info && GIMP_IS_DOCKABLE (gimp_session_info_get_widget (info)))
......@@ -110,7 +110,7 @@ gui_message_error_console (GimpMessageSeverity severity,
}
if (! dockable)
dockable = gimp_dialog_factory_dialog_raise (global_dock_factory,
dockable = gimp_dialog_factory_dialog_raise (global_dock_window_factory,
gdk_screen_get_default (),
"gimp-error-console", -1);
......
......@@ -352,7 +352,7 @@ gui_display_create (Gimp *gimp,
global_menu_factory,
image_managers->data,
global_display_factory,
global_dock_factory);
global_dock_window_factory);
}
if (gimp_context_get_display (context) == display)
......
......@@ -695,7 +695,7 @@ gui_device_change_notify (Gimp *gimp)
{
GimpSessionInfo *session_info;
session_info = gimp_dialog_factory_find_session_info (global_dock_factory,
session_info = gimp_dialog_factory_find_session_info (global_dock_window_factory,
"gimp-device-status");
if (session_info && gimp_session_info_get_widget (session_info))
......
......@@ -104,21 +104,23 @@ windows_menu_setup (GimpUIManager *manager,
windows_menu_display_add (manager->gimp->displays, display, manager);
}
g_signal_connect_object (global_dock_factory, "dock-window-added",
g_signal_connect_object (global_dock_window_factory, "dock-window-added",
G_CALLBACK (windows_menu_dock_window_added),
manager, 0);
g_signal_connect_object (global_dock_factory, "dock-window-removed",
g_signal_connect_object (global_dock_window_factory, "dock-window-removed",
G_CALLBACK (windows_menu_dock_window_removed),
manager, 0);
for (list = global_dock_factory->open_dialogs;
for (list = global_dock_window_factory->open_dialogs;
list;
list = g_list_next (list))
{
GimpDockWindow *dock_window = list->data;
if (GIMP_IS_DOCK_WINDOW (dock_window))
windows_menu_dock_window_added (global_dock_factory, dock_window, manager);
windows_menu_dock_window_added (global_dock_window_factory,
dock_window,
manager);
}
g_signal_connect_object (global_recent_docks, "add",
......
......@@ -92,7 +92,7 @@ gimp_test_window_roles (GimpTestFixture *fixture,
GimpDockWindow *dock_window = NULL;
GimpDockWindow *toolbox_window = NULL;
dock = gimp_dialog_factory_dock_with_window_new (global_dock_factory,
dock = gimp_dialog_factory_dock_with_window_new (global_dock_window_factory,
gdk_screen_get_default ());
toolbox = gimp_dialog_factory_dock_with_window_new (global_toolbox_factory,
gdk_screen_get_default ());
......
......@@ -1091,7 +1091,7 @@ gimp_dockable_detach (GimpDockable *dockable)
src_dock = gimp_dockbook_get_dock (dockable->dockbook);
src_dock_window = gimp_dock_window_from_dock (src_dock);
dock = gimp_dialog_factory_dock_with_window_new (global_dock_factory,
dock = gimp_dialog_factory_dock_with_window_new (global_dock_window_factory,
gtk_widget_get_screen (GTK_WIDGET (dockable)));
dock_window = gimp_dock_window_from_dock (GIMP_DOCK (dock));
gtk_window_set_position (GTK_WINDOW (dock_window), GTK_WIN_POS_MOUSE);
......
......@@ -282,7 +282,7 @@ gimp_session_info_dockable_restore (GimpSessionInfoDockable *info,
info->view_size > GIMP_VIEW_SIZE_GIGANTIC)
info->view_size = -1;
/* FIXME: Merge global_dock_factory and global_toolbox_factory
/* FIXME: Merge global_dock_window_factory and global_toolbox_factory
* somehow so we don't need this hack
*/
dockable = gimp_dialog_factory_dockable_new ((GIMP_IS_TOOLBOX (dock) ?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment