app: global_dock_window_factory -> global_dock_factory

Rename back global_dock_window_factory to
global_dock_factory. Renaming to global_dock_window_factory was done
under the assumption that there would be a separate factory that would
create non-toplevel dockables, but I don't expect this to happen in
the forseeable future.
This commit is contained in:
Martin Nordholts 2010-01-19 22:40:06 +01:00
parent 56a8cb68a8
commit 66197c5d11
20 changed files with 50 additions and 61 deletions

View File

@ -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_window_factory, screen,
dockable = gimp_dialog_factory_dialog_raise (global_dock_factory, screen,
value, -1);
gimp_data_editor_set_data (GIMP_DATA_EDITOR (gtk_bin_get_child (GTK_BIN (dockable))),

View File

@ -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_window_factory,
gimp_dialog_factory_dialog_raise (global_dock_factory,
gtk_widget_get_screen (widget),
value, -1);
}

View File

@ -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_window_factory,
gimp_dialog_factory_dialog_raise (global_dock_factory,
gtk_widget_get_screen (widget),
"gimp-buffer-list|gimp-buffer-grid", -1);
}

View File

@ -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_window_factory,
gimp_dialog_factory_dialog_raise (global_dock_factory,
gtk_widget_get_screen (widget),
"gimp-channel-list", -1);
}

View File

@ -338,7 +338,7 @@ view_navigation_window_cmd_callback (GtkAction *action,
shell = gimp_display_get_shell (display);
gimp_dialog_factory_dialog_raise (global_dock_window_factory,
gimp_dialog_factory_dialog_raise (global_dock_factory,
gtk_widget_get_screen (GTK_WIDGET (shell)),
"gimp-navigation-view", -1);
}

View File

@ -137,21 +137,21 @@ windows_actions_setup (GimpActionGroup *group)
windows_actions_display_add (group->gimp->displays, display, group);
}
g_signal_connect_object (global_dock_window_factory, "dock-window-added",
g_signal_connect_object (global_dock_factory, "dock-window-added",
G_CALLBACK (windows_actions_dock_window_added),
group, 0);
g_signal_connect_object (global_dock_window_factory, "dock-window-removed",
g_signal_connect_object (global_dock_factory, "dock-window-removed",
G_CALLBACK (windows_actions_dock_window_removed),
group, 0);
for (list = gimp_dialog_factory_get_open_dialogs (global_dock_window_factory);
for (list = gimp_dialog_factory_get_open_dialogs (global_dock_factory);
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_window_factory,
windows_actions_dock_window_added (global_dock_factory,
dock_window,
group);
}

View File

@ -114,9 +114,9 @@ windows_open_recent_cmd_callback (GtkAction *action,
g_object_ref (info);
gimp_container_remove (global_recent_docks, GIMP_OBJECT (info));
gimp_dialog_factory_add_session_info (global_dock_window_factory, info);
gimp_dialog_factory_add_session_info (global_dock_factory, info);
gimp_session_info_restore (info, global_dock_window_factory);
gimp_session_info_restore (info, global_dock_factory);
gimp_session_info_clear_info (info);
}

View File

@ -235,11 +235,11 @@ dialogs_toolbox_new (GimpDialogFactory *factory,
GimpUIManager *ui_manager,
gint view_size)
{
/* we pass "global_dock_window_factory", _not_
* "global_toolbox_factory" to the toolbox constructor, because the
* global_toolbox_factory has no dockables registered
/* we pass "global_dock_factory", _not_ "global_toolbox_factory" to
* the toolbox constructor, because the global_toolbox_factory has
* no dockables registered
*/
return gimp_toolbox_new (global_dock_window_factory,
return gimp_toolbox_new (global_dock_factory,
context,
ui_manager);
}

View File

@ -40,12 +40,12 @@
#include "gimp-intl.h"
GimpDialogFactory *global_dialog_factory = NULL;
GimpDialogFactory *global_dock_window_factory = NULL;
GimpDialogFactory *global_toolbox_factory = NULL;
GimpDialogFactory *global_display_factory = NULL;
GimpDialogFactory *global_dialog_factory = NULL;
GimpDialogFactory *global_dock_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) \
@ -224,7 +224,7 @@ static const GimpDialogFactoryEntry toplevel_entries[] =
static const GimpDialogFactoryEntry dock_entries[] =
{
/* docks */
/* docks */
DOCK ("gimp-dock",
dialogs_dock_new),
DOCK ("gimp-toolbox",
@ -378,11 +378,11 @@ dialogs_init (Gimp *gimp,
menu_factory,
TRUE);
/* Dock window */
global_dock_window_factory = gimp_dialog_factory_new ("dock",
gimp_get_user_context (gimp),
menu_factory,
TRUE);
/* Dock windows and docks */
global_dock_factory = gimp_dialog_factory_new ("dock",
gimp_get_user_context (gimp),
menu_factory,
TRUE);
/* Display */
global_display_factory = gimp_dialog_factory_new ("display",
@ -407,7 +407,7 @@ dialogs_init (Gimp *gimp,
toplevel_entries[i].dockable);
for (i = 0; i < G_N_ELEMENTS (dock_entries); i++)
gimp_dialog_factory_register_entry (global_dock_window_factory,
gimp_dialog_factory_register_entry (global_dock_factory,
dock_entries[i].identifier,
gettext (dock_entries[i].name),
gettext (dock_entries[i].blurb),
@ -463,11 +463,10 @@ dialogs_exit (Gimp *gimp)
}
/* destroy the "global_toolbox_factory" _before_ destroying the
* "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.
* "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.
*/
if (global_toolbox_factory)
{
@ -475,10 +474,10 @@ dialogs_exit (Gimp *gimp)
global_toolbox_factory = NULL;
}
if (global_dock_window_factory)
if (global_dock_factory)
{
g_object_unref (global_dock_window_factory);
global_dock_window_factory = NULL;
g_object_unref (global_dock_factory);
global_dock_factory = NULL;
}
if (global_display_factory)

View File

@ -20,7 +20,7 @@
extern GimpDialogFactory *global_dialog_factory;
extern GimpDialogFactory *global_dock_window_factory;
extern GimpDialogFactory *global_dock_factory;
extern GimpDialogFactory *global_toolbox_factory;
extern GimpDialogFactory *global_display_factory;

View File

@ -187,7 +187,7 @@ gimp_ui_configurer_move_docks_to_columns (GimpUIConfigurer *ui_configurer,
g_list_free (docks);
/* Kill the window if removing the dock didn't destroy it
* already. This will be the case forthe toolbox dock window
* already. This will be the case for the toolbox dock window
*/
if (GTK_IS_WIDGET (dock_window))
{
@ -273,7 +273,7 @@ gimp_ui_configurer_move_docks_to_window (GimpUIConfigurer *ui_configurer,
dock_window =
gimp_dialog_factory_dialog_new ((GIMP_IS_TOOLBOX (dock) ?
global_toolbox_factory :
global_dock_window_factory),
global_dock_factory),
screen,
(GIMP_IS_TOOLBOX (dock) ?
"gimp-toolbox-window" :
@ -316,7 +316,7 @@ gimp_ui_configurer_separate_shells (GimpUIConfigurer *ui_configurer,
NULL,
global_menu_factory,
global_display_factory,
global_dock_window_factory);
global_dock_factory);
/* Move the shell there */
shell = gimp_image_window_get_shell (source_image_window, 1);
@ -369,7 +369,7 @@ gimp_ui_configurer_configure_for_single_window (GimpUIConfigurer *ui_configurer)
* window
*/
gimp_ui_configurer_move_docks_to_columns (ui_configurer,
global_dock_window_factory,
global_dock_factory,
right_docks);
/* Show the docks in the window */

View File

@ -102,7 +102,7 @@ gui_message_error_console (GimpMessageSeverity severity,
{
GimpSessionInfo *info;
info = gimp_dialog_factory_find_session_info (global_dock_window_factory,
info = gimp_dialog_factory_find_session_info (global_dock_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_window_factory,
dockable = gimp_dialog_factory_dialog_raise (global_dock_factory,
gdk_screen_get_default (),
"gimp-error-console", -1);

View File

@ -352,7 +352,7 @@ gui_display_create (Gimp *gimp,
global_menu_factory,
image_managers->data,
global_display_factory,
global_dock_window_factory);
global_dock_factory);
}
if (gimp_context_get_display (context) == display)

View File

@ -704,7 +704,7 @@ gui_device_change_notify (Gimp *gimp)
{
GimpSessionInfo *session_info;
session_info = gimp_dialog_factory_find_session_info (global_dock_window_factory,
session_info = gimp_dialog_factory_find_session_info (global_dock_factory,
"gimp-device-status");
if (session_info && gimp_session_info_get_widget (session_info))

View File

@ -104,21 +104,21 @@ windows_menu_setup (GimpUIManager *manager,
windows_menu_display_add (manager->gimp->displays, display, manager);
}
g_signal_connect_object (global_dock_window_factory, "dock-window-added",
g_signal_connect_object (global_dock_factory, "dock-window-added",
G_CALLBACK (windows_menu_dock_window_added),
manager, 0);
g_signal_connect_object (global_dock_window_factory, "dock-window-removed",
g_signal_connect_object (global_dock_factory, "dock-window-removed",
G_CALLBACK (windows_menu_dock_window_removed),
manager, 0);
for (list = gimp_dialog_factory_get_open_dialogs (global_dock_window_factory);
for (list = gimp_dialog_factory_get_open_dialogs (global_dock_factory);
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_window_factory,
windows_menu_dock_window_added (global_dock_factory,
dock_window,
manager);
}

View File

@ -93,7 +93,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_window_factory,
dock = gimp_dialog_factory_dock_with_window_new (global_dock_factory,
gdk_screen_get_default ());
toolbox = gimp_dialog_factory_dock_with_window_new (global_toolbox_factory,
gdk_screen_get_default ());

View File

@ -30,11 +30,6 @@
#include "widgets-types.h"
/* FIXME: Remove when the toolbox and dock window factories have been
* merged
*/
#include "dialogs/dialogs.h"
#include "core/gimpcontext.h"
#include "core/gimpmarshal.h"

View File

@ -1205,7 +1205,7 @@ gimp_dockable_detach (GimpDockable *dockable)
src_dock = gimp_dockbook_get_dock (dockable->p->dockbook);
src_dock_window = gimp_dock_window_from_dock (src_dock);
dock = gimp_dialog_factory_dock_with_window_new (global_dock_window_factory,
dock = gimp_dialog_factory_dock_with_window_new (global_dock_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);

View File

@ -26,11 +26,6 @@
#include "widgets-types.h"
/* FIXME: Remove when the toolbox and dock window factories have been
* merged
*/
#include "dialogs/dialogs.h"
#include "gimpdialogfactory.h"
#include "gimpdock.h"
#include "gimpdockwindow.h"

View File

@ -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_window_factory and global_toolbox_factory
/* FIXME: Merge global_dock_factory and global_toolbox_factory
* somehow so we don't need this hack
*/
dockable = gimp_dialog_factory_dockable_new ((GIMP_IS_TOOLBOX (dock) ?