Commit 7c964523 authored by Martin Nordholts's avatar Martin Nordholts

Make instance members private.

* app/widgets/gimpdock.[ch]: Make instance members private.

(gimp_dock_get_context)
(gimp_dock_get_dialog_factory)
(gimp_dock_get_dockbooks)
(gimp_dock_get_main_vbox)
(gimp_dock_get_vbox)
(gimp_dock_get_id): New getters.

* app/actions/actions.c
* app/actions/dockable-actions.c
* app/actions/dockable-commands.c
* app/actions/windows-actions.c
* app/menus/windows-menu.c
* app/widgets/gimpdialogfactory.c
* app/widgets/gimpdock.c
* app/widgets/gimpdock.h
* app/widgets/gimpdockable.c
* app/widgets/gimpdockbook.c
* app/widgets/gimpdockseparator.c
* app/widgets/gimpimagedock.c
* app/widgets/gimpmenudock.c
* app/widgets/gimpsessioninfo-book.c
* app/widgets/gimpsessioninfo-dock.c
* app/widgets/gimpsessioninfo-dockable.c
* app/widgets/gimptoolbox-color-area.c
* app/widgets/gimptoolbox-dnd.c
* app/widgets/gimptoolbox-image-area.c
* app/widgets/gimptoolbox-indicator-area.c
* app/widgets/gimptoolbox.c: Use new getters.

svn path=/trunk/; revision=27881
parent dff24a3d
2009-01-04 Martin Nordholts <martinn@svn.gnome.org>
* app/widgets/gimpdock.[ch]: Make instance members private.
(gimp_dock_get_context)
(gimp_dock_get_dialog_factory)
(gimp_dock_get_dockbooks)
(gimp_dock_get_main_vbox)
(gimp_dock_get_vbox)
(gimp_dock_get_id): New getters.
* app/actions/actions.c
* app/actions/dockable-actions.c
* app/actions/dockable-commands.c
* app/actions/windows-actions.c
* app/menus/windows-menu.c
* app/widgets/gimpdialogfactory.c
* app/widgets/gimpdock.c
* app/widgets/gimpdock.h
* app/widgets/gimpdockable.c
* app/widgets/gimpdockbook.c
* app/widgets/gimpdockseparator.c
* app/widgets/gimpimagedock.c
* app/widgets/gimpmenudock.c
* app/widgets/gimpsessioninfo-book.c
* app/widgets/gimpsessioninfo-dock.c
* app/widgets/gimpsessioninfo-dockable.c
* app/widgets/gimptoolbox-color-area.c
* app/widgets/gimptoolbox-dnd.c
* app/widgets/gimptoolbox-image-area.c
* app/widgets/gimptoolbox-indicator-area.c
* app/widgets/gimptoolbox.c: Use new getters.
2009-01-03 Martin Nordholts <martinn@svn.gnome.org>
* app/widgets/gimpcontainertreeview.c: Format static function
......
......@@ -269,7 +269,7 @@ action_data_get_gimp (gpointer data)
else if (GIMP_IS_GIMP (data))
return data;
else if (GIMP_IS_DOCK (data))
context = ((GimpDock *) data)->context;
context = gimp_dock_get_context (((GimpDock *) data));
else if (GIMP_IS_CONTAINER_VIEW (data))
context = gimp_container_view_get_context ((GimpContainerView *) data);
else if (GIMP_IS_CONTAINER_EDITOR (data))
......@@ -296,7 +296,7 @@ action_data_get_context (gpointer data)
else if (GIMP_IS_GIMP (data))
return gimp_get_user_context (data);
else if (GIMP_IS_DOCK (data))
return ((GimpDock *) data)->context;
return gimp_dock_get_context ((GimpDock *) data);
else if (GIMP_IS_CONTAINER_VIEW (data))
return gimp_container_view_get_context ((GimpContainerView *) data);
else if (GIMP_IS_CONTAINER_EDITOR (data))
......@@ -322,7 +322,7 @@ action_data_get_image (gpointer data)
else if (GIMP_IS_GIMP (data))
context = gimp_get_user_context (data);
else if (GIMP_IS_DOCK (data))
context = ((GimpDock *) data)->context;
context = gimp_dock_get_context ((GimpDock *) data);
else if (GIMP_IS_ITEM_TREE_VIEW (data))
return gimp_item_tree_view_get_image ((GimpItemTreeView *) data);
else if (GIMP_IS_IMAGE_EDITOR (data))
......@@ -349,7 +349,7 @@ action_data_get_display (gpointer data)
else if (GIMP_IS_GIMP (data))
context = gimp_get_user_context (data);
else if (GIMP_IS_DOCK (data))
context = ((GimpDock *) data)->context;
context = gimp_dock_get_context ((GimpDock *) data);
else if (GIMP_IS_NAVIGATION_EDITOR (data))
context = ((GimpNavigationEditor *) data)->context;
......
......@@ -246,12 +246,12 @@ dockable_actions_update (GimpActionGroup *group,
if (substring)
{
memcpy (substring, "list", 4);
if (gimp_dialog_factory_find_entry (dockbook->dock->dialog_factory,
if (gimp_dialog_factory_find_entry (gimp_dock_get_dialog_factory (dockbook->dock),
identifier))
list_view_available = TRUE;
memcpy (substring, "grid", 4);
if (gimp_dialog_factory_find_entry (dockbook->dock->dialog_factory,
if (gimp_dialog_factory_find_entry (gimp_dock_get_dialog_factory (dockbook->dock),
identifier))
grid_view_available = TRUE;
}
......@@ -267,7 +267,7 @@ dockable_actions_update (GimpActionGroup *group,
tab_style = dockable->tab_style;
n_pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (dockbook));
n_books = g_list_length (dockbook->dock->dockbooks);
n_books = g_list_length (gimp_dock_get_dockbooks (dockbook->dock));
#define SET_ACTIVE(action,active) \
gimp_action_group_set_action_active (group, action, (active) != 0)
......
......@@ -66,7 +66,7 @@ dockable_add_tab_cmd_callback (GtkAction *action,
*p = '\0';
dockable =
gimp_dialog_factory_dockable_new (dockbook->dock->dialog_factory,
gimp_dialog_factory_dockable_new (gimp_dock_get_dialog_factory (dockbook->dock),
dockbook->dock,
identifier, -1);
......@@ -180,7 +180,7 @@ dockable_toggle_view_cmd_callback (GtkAction *action,
new_dockable =
gimp_dialog_factory_dockable_new (dockbook->dock->dialog_factory,
gimp_dialog_factory_dockable_new (gimp_dock_get_dialog_factory (dockbook->dock),
dockbook->dock,
identifier,
view_size);
......
......@@ -273,7 +273,7 @@ windows_actions_dock_added (GimpDialogFactory *factory,
GtkAction *action;
GimpActionEntry entry;
gchar *action_name = g_strdup_printf ("windows-dock-%04d",
dock->ID);
gimp_dock_get_id (dock));
entry.name = action_name;
entry.stock_id = NULL;
......@@ -310,7 +310,7 @@ windows_actions_dock_removed (GimpDialogFactory *factory,
GimpActionGroup *group)
{
GtkAction *action;
gchar *action_name = g_strdup_printf ("windows-dock-%04d", dock->ID);
gchar *action_name = g_strdup_printf ("windows-dock-%04d", gimp_dock_get_id (dock));
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), action_name);
......@@ -328,7 +328,7 @@ windows_actions_dock_notify (GimpDock *dock,
GtkAction *action;
gchar *action_name;
action_name = g_strdup_printf ("windows-dock-%04d", dock->ID);
action_name = g_strdup_printf ("windows-dock-%04d", gimp_dock_get_id (dock));
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), action_name);
g_free (action_name);
......
......@@ -256,10 +256,10 @@ windows_menu_dock_added (GimpDialogFactory *factory,
ui_path = g_object_get_data (G_OBJECT (manager), "image-menu-ui-path");
action_name = g_strdup_printf ("windows-dock-%04d", dock->ID);
action_name = g_strdup_printf ("windows-dock-%04d", gimp_dock_get_id (dock));
action_path = g_strdup_printf ("%s/Windows/Docks", ui_path);
merge_key = g_strdup_printf ("windows-dock-%04d-merge-id", dock->ID);
merge_key = g_strdup_printf ("windows-dock-%04d-merge-id", gimp_dock_get_id (dock));
merge_id = gtk_ui_manager_new_merge_id (GTK_UI_MANAGER (manager));
g_object_set_data (G_OBJECT (manager), merge_key,
......@@ -280,7 +280,7 @@ windows_menu_dock_removed (GimpDialogFactory *factory,
GimpDock *dock,
GimpUIManager *manager)
{
gchar *merge_key = g_strdup_printf ("windows-dock-%04d-merge-id", dock->ID);
gchar *merge_key = g_strdup_printf ("windows-dock-%04d-merge-id", gimp_dock_get_id (dock));
guint merge_id;
merge_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (manager),
......
......@@ -480,7 +480,7 @@ gimp_dialog_factory_dialog_new_internal (GimpDialogFactory *factory,
view_size);
else if (dock)
dialog = factory->constructor (factory, entry,
GIMP_DOCK (dock)->context,
gimp_dock_get_context (GIMP_DOCK (dock)),
view_size);
else
dialog = factory->constructor (factory, entry,
......@@ -706,7 +706,7 @@ gimp_dialog_factory_dockable_new (GimpDialogFactory *factory,
return gimp_dialog_factory_dialog_new_internal (factory,
gtk_widget_get_screen (GTK_WIDGET (dock)),
dock->context,
gimp_dock_get_context (dock),
identifier,
view_size,
FALSE,
......
......@@ -65,6 +65,20 @@ enum
};
struct _GimpDockPriv
{
GimpDialogFactory *dialog_factory;
GimpContext *context;
GtkWidget *main_vbox;
GtkWidget *vbox;
GList *dockbooks;
gint ID; /* for themeing */
};
static GObject * gimp_dock_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
......@@ -163,6 +177,8 @@ gimp_dock_class_init (GimpDockClass *klass)
G_MAXDOUBLE,
DEFAULT_DOCK_FONT_SCALE,
GIMP_PARAM_READABLE));
g_type_class_add_private (klass, sizeof (GimpDockPriv));
}
static void
......@@ -172,12 +188,15 @@ gimp_dock_init (GimpDock *dock)
GtkWidget *separator;
gchar *name;
dock->context = NULL;
dock->dialog_factory = NULL;
dock->dockbooks = NULL;
dock->ID = dock_ID++;
dock->priv = G_TYPE_INSTANCE_GET_PRIVATE (dock,
GIMP_TYPE_DOCK,
GimpDockPriv);
dock->priv->context = NULL;
dock->priv->dialog_factory = NULL;
dock->priv->dockbooks = NULL;
dock->priv->ID = dock_ID++;
name = g_strdup_printf ("gimp-dock-%d", dock->ID);
name = g_strdup_printf ("gimp-dock-%d", dock->priv->ID);
gtk_widget_set_name (GTK_WIDGET (dock), name);
g_free (name);
......@@ -185,16 +204,16 @@ gimp_dock_init (GimpDock *dock)
gtk_window_set_resizable (GTK_WINDOW (dock), TRUE);
gtk_window_set_focus_on_map (GTK_WINDOW (dock), FALSE);
dock->main_vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (dock), dock->main_vbox);
gtk_widget_show (dock->main_vbox);
dock->priv->main_vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (dock), dock->priv->main_vbox);
gtk_widget_show (dock->priv->main_vbox);
dock->vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (dock->main_vbox), dock->vbox);
gtk_widget_show (dock->vbox);
dock->priv->vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (dock->priv->main_vbox), dock->priv->vbox);
gtk_widget_show (dock->priv->vbox);
separator = gimp_dock_separator_new (dock, GTK_ANCHOR_NORTH);
gtk_box_pack_start (GTK_BOX (dock->vbox), separator, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (dock->priv->vbox), separator, FALSE, FALSE, 0);
gtk_widget_show (separator);
}
......@@ -211,10 +230,10 @@ gimp_dock_constructor (GType type,
dock = GIMP_DOCK (object);
g_assert (GIMP_IS_CONTEXT (dock->context));
g_assert (GIMP_IS_DIALOG_FACTORY (dock->dialog_factory));
g_assert (GIMP_IS_CONTEXT (dock->priv->context));
g_assert (GIMP_IS_DIALOG_FACTORY (dock->priv->dialog_factory));
config = GIMP_GUI_CONFIG (dock->context->gimp->config);
config = GIMP_GUI_CONFIG (dock->priv->context->gimp->config);
gimp_window_set_hint (GTK_WINDOW (dock), config->dock_window_hint);
......@@ -232,11 +251,11 @@ gimp_dock_set_property (GObject *object,
switch (property_id)
{
case PROP_CONTEXT:
dock->context = g_value_dup_object (value);
dock->priv->context = g_value_dup_object (value);
break;
case PROP_DIALOG_FACTORY:
dock->dialog_factory = g_value_get_object (value);
dock->priv->dialog_factory = g_value_get_object (value);
break;
default:
......@@ -256,11 +275,11 @@ gimp_dock_get_property (GObject *object,
switch (property_id)
{
case PROP_CONTEXT:
g_value_set_object (value, dock->context);
g_value_set_object (value, dock->priv->context);
break;
case PROP_DIALOG_FACTORY:
g_value_set_object (value, dock->dialog_factory);
g_value_set_object (value, dock->priv->dialog_factory);
break;
default:
......@@ -274,13 +293,13 @@ gimp_dock_destroy (GtkObject *object)
{
GimpDock *dock = GIMP_DOCK (object);
while (dock->dockbooks)
gimp_dock_remove_book (dock, GIMP_DOCKBOOK (dock->dockbooks->data));
while (dock->priv->dockbooks)
gimp_dock_remove_book (dock, GIMP_DOCKBOOK (dock->priv->dockbooks->data));
if (dock->context)
if (dock->priv->context)
{
g_object_unref (dock->context);
dock->context = NULL;
g_object_unref (dock->priv->context);
dock->priv->context = NULL;
}
GTK_OBJECT_CLASS (parent_class)->destroy (object);
......@@ -294,7 +313,7 @@ gimp_dock_delete_event (GtkWidget *widget,
GList *list;
gint n;
for (list = dock->dockbooks, n = 0; list; list = list->next)
for (list = dock->priv->dockbooks, n = 0; list; list = list->next)
n += gtk_notebook_get_n_pages (GTK_NOTEBOOK (list->data));
if (n > 1)
......@@ -357,7 +376,7 @@ gimp_dock_style_set (GtkWidget *widget,
"}"
"widget \"gimp-dock-%d.*\" style \"gimp-dock-style\"",
font_str,
GIMP_DOCK (widget)->ID);
GIMP_DOCK (widget)->priv->ID);
g_free (font_str);
gtk_rc_parse_string (rc_string);
......@@ -378,7 +397,7 @@ static void
gimp_dock_real_book_removed (GimpDock *dock,
GimpDockbook *dockbook)
{
if (dock->dockbooks == NULL)
if (dock->priv->dockbooks == NULL)
gtk_widget_destroy (GTK_WIDGET (dock));
}
......@@ -417,6 +436,54 @@ gimp_dock_get_aux_info (GimpDock *dock)
return NULL;
}
GimpContext *
gimp_dock_get_context (GimpDock *dock)
{
g_return_val_if_fail (GIMP_IS_DOCK (dock), NULL);
return dock->priv->context;
}
GimpDialogFactory *
gimp_dock_get_dialog_factory (GimpDock *dock)
{
g_return_val_if_fail (GIMP_IS_DOCK (dock), NULL);
return dock->priv->dialog_factory;
}
GList *
gimp_dock_get_dockbooks (GimpDock *dock)
{
g_return_val_if_fail (GIMP_IS_DOCK (dock), NULL);
return dock->priv->dockbooks;
}
GtkWidget *
gimp_dock_get_main_vbox (GimpDock *dock)
{
g_return_val_if_fail (GIMP_IS_DOCK (dock), NULL);
return dock->priv->main_vbox;
}
GtkWidget *
gimp_dock_get_vbox (GimpDock *dock)
{
g_return_val_if_fail (GIMP_IS_DOCK (dock), NULL);
return dock->priv->vbox;
}
gint
gimp_dock_get_id (GimpDock *dock)
{
g_return_val_if_fail (GIMP_IS_DOCK (dock), 0);
return dock->priv->ID;
}
void
gimp_dock_add (GimpDock *dock,
GimpDockable *dockable,
......@@ -429,7 +496,7 @@ gimp_dock_add (GimpDock *dock,
g_return_if_fail (GIMP_IS_DOCKABLE (dockable));
g_return_if_fail (dockable->dockbook == NULL);
dockbook = GIMP_DOCKBOOK (dock->dockbooks->data);
dockbook = GIMP_DOCKBOOK (dock->priv->dockbooks->data);
gimp_dockbook_add (dockbook, dockable, position);
}
......@@ -457,23 +524,23 @@ gimp_dock_add_book (GimpDock *dock,
g_return_if_fail (GIMP_IS_DOCKBOOK (dockbook));
g_return_if_fail (dockbook->dock == NULL);
old_length = g_list_length (dock->dockbooks);
old_length = g_list_length (dock->priv->dockbooks);
if (index >= old_length || index < 0)
index = old_length;
dockbook->dock = dock;
dock->dockbooks = g_list_insert (dock->dockbooks, dockbook, index);
dock->priv->dockbooks = g_list_insert (dock->priv->dockbooks, dockbook, index);
if (old_length == 0)
{
GtkWidget *separator;
gtk_box_pack_start (GTK_BOX (dock->vbox), GTK_WIDGET (dockbook),
gtk_box_pack_start (GTK_BOX (dock->priv->vbox), GTK_WIDGET (dockbook),
TRUE, TRUE, 0);
separator = gimp_dock_separator_new (dock, GTK_ANCHOR_SOUTH);
gtk_box_pack_end (GTK_BOX (dock->vbox), separator, FALSE, FALSE, 0);
gtk_box_pack_end (GTK_BOX (dock->priv->vbox), separator, FALSE, FALSE, 0);
gtk_widget_show (separator);
}
else
......@@ -483,9 +550,9 @@ gimp_dock_add_book (GimpDock *dock,
GtkWidget *paned;
if (index == 0)
old_book = g_list_nth_data (dock->dockbooks, index + 1);
old_book = g_list_nth_data (dock->priv->dockbooks, index + 1);
else
old_book = g_list_nth_data (dock->dockbooks, index - 1);
old_book = g_list_nth_data (dock->priv->dockbooks, index - 1);
parent = gtk_widget_get_parent (old_book);
......@@ -547,11 +614,11 @@ gimp_dock_remove_book (GimpDock *dock,
g_return_if_fail (dockbook->dock == dock);
old_length = g_list_length (dock->dockbooks);
index = g_list_index (dock->dockbooks, dockbook);
old_length = g_list_length (dock->priv->dockbooks);
index = g_list_index (dock->priv->dockbooks, dockbook);
dockbook->dock = NULL;
dock->dockbooks = g_list_remove (dock->dockbooks, dockbook);
dock->priv->dockbooks = g_list_remove (dock->priv->dockbooks, dockbook);
g_object_ref (dockbook);
......@@ -560,12 +627,12 @@ gimp_dock_remove_book (GimpDock *dock,
GtkWidget *separator;
GList *children;
children = gtk_container_get_children (GTK_CONTAINER (dock->vbox));
children = gtk_container_get_children (GTK_CONTAINER (dock->priv->vbox));
separator = g_list_nth_data (children, 2);
gtk_container_remove (GTK_CONTAINER (dock->vbox), separator);
gtk_container_remove (GTK_CONTAINER (dock->vbox), GTK_WIDGET (dockbook));
gtk_container_remove (GTK_CONTAINER (dock->priv->vbox), separator);
gtk_container_remove (GTK_CONTAINER (dock->priv->vbox), GTK_WIDGET (dockbook));
g_list_free (children);
}
......@@ -593,7 +660,7 @@ gimp_dock_remove_book (GimpDock *dock,
if (GTK_IS_VPANED (grandparent))
gtk_paned_pack1 (GTK_PANED (grandparent), other_book, TRUE, FALSE);
else
gtk_box_pack_start (GTK_BOX (dock->vbox), other_book, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (dock->priv->vbox), other_book, TRUE, TRUE, 0);
g_object_unref (other_book);
}
......
......@@ -35,20 +35,13 @@
typedef struct _GimpDockClass GimpDockClass;
typedef struct _GimpDockPriv GimpDockPriv;
struct _GimpDock
{
GimpWindow parent_instance;
GimpWindow parent_instance;
GimpDialogFactory *dialog_factory;
GimpContext *context;
GtkWidget *main_vbox;
GtkWidget *vbox;
GList *dockbooks;
gint ID; /* for themeing */
GimpDockPriv *priv;
};
struct _GimpDockClass
......@@ -70,26 +63,32 @@ struct _GimpDockClass
};
GType gimp_dock_get_type (void) G_GNUC_CONST;
void gimp_dock_setup (GimpDock *dock,
const GimpDock *template);
void gimp_dock_set_aux_info (GimpDock *dock,
GList *aux_info);
GList * gimp_dock_get_aux_info (GimpDock *dock);
void gimp_dock_add (GimpDock *dock,
GimpDockable *dockable,
gint book,
gint index);
void gimp_dock_remove (GimpDock *dock,
GimpDockable *dockable);
void gimp_dock_add_book (GimpDock *dock,
GimpDockbook *dockbook,
gint index);
void gimp_dock_remove_book (GimpDock *dock,
GimpDockbook *dockbook);
GType gimp_dock_get_type (void) G_GNUC_CONST;
void gimp_dock_setup (GimpDock *dock,
const GimpDock *template);
void gimp_dock_set_aux_info (GimpDock *dock,
GList *aux_info);
GList * gimp_dock_get_aux_info (GimpDock *dock);
GimpContext * gimp_dock_get_context (GimpDock *dock);
GimpDialogFactory * gimp_dock_get_dialog_factory (GimpDock *dock);
GList * gimp_dock_get_dockbooks (GimpDock *dock);
GtkWidget * gimp_dock_get_main_vbox (GimpDock *dock);
GtkWidget * gimp_dock_get_vbox (GimpDock *dock);
gint gimp_dock_get_id (GimpDock *dock);
void gimp_dock_add (GimpDock *dock,
GimpDockable *dockable,
gint book,
gint index);
void gimp_dock_remove (GimpDock *dock,
GimpDockable *dockable);
void gimp_dock_add_book (GimpDock *dock,
GimpDockbook *dockbook,
gint index);
void gimp_dock_remove_book (GimpDock *dock,
GimpDockbook *dockbook);
#endif /* __GIMP_DOCK_H__ */
......@@ -1001,12 +1001,12 @@ gimp_dockable_detach (GimpDockable *dockable)
src_dock = dockable->dockbook->dock;
dock = gimp_dialog_factory_dock_new (src_dock->dialog_factory,
dock = gimp_dialog_factory_dock_new (gimp_dock_get_dialog_factory (src_dock),
gtk_widget_get_screen (GTK_WIDGET (dockable)));
gtk_window_set_position (GTK_WINDOW (dock), GTK_WIN_POS_MOUSE);
gimp_dock_setup (GIMP_DOCK (dock), src_dock);
dockbook = gimp_dockbook_new (GIMP_DOCK (dock)->dialog_factory->menu_factory);
dockbook = gimp_dockbook_new (gimp_dock_get_dialog_factory (GIMP_DOCK (dock))->menu_factory);
gimp_dock_add_book (GIMP_DOCK (dock), GIMP_DOCKBOOK (dockbook), 0);
......
......@@ -348,7 +348,7 @@ gimp_dockbook_add (GimpDockbook *dockbook,
g_return_if_fail (GTK_IS_WIDGET (tab_widget));
menu_widget = gimp_dockable_get_tab_widget (dockable,
dockbook->dock->context,
gimp_dock_get_context (dockbook->dock),
GIMP_TAB_STYLE_ICON_BLURB,
MENU_WIDGET_ICON_SIZE);
......@@ -374,7 +374,7 @@ gimp_dockbook_add (GimpDockbook *dockbook,
dockable->dockbook = dockbook;
gimp_dockable_set_context (dockable, dockbook->dock->context);
gimp_dockable_set_context (dockable, gimp_dock_get_context (dockbook->dock));
g_signal_connect (dockable, "notify::locked",
G_CALLBACK (gimp_dockbook_tab_locked_notify),
......@@ -433,7 +433,7 @@ gimp_dockbook_create_tab_widget (GimpDockbook *dockbook,
NULL);
tab_widget = gimp_dockable_get_tab_widget (dockable,
dockbook->dock->context,
gimp_dock_get_context (dockbook->dock),
dockable->tab_style,
tab_size);
......
......@@ -215,7 +215,7 @@ gimp_dock_separator_drag_drop (GtkWidget *widget,
gint n_books;
gint n_dockables;
n_books = g_list_length (dock->dockbooks);
n_books = g_list_length (gimp_dock_get_dockbooks (dock));
children =
gtk_container_get_children (GTK_CONTAINER (dockable->dockbook));
......@@ -230,7 +230,7 @@ gimp_dock_separator_drag_drop (GtkWidget *widget,
gimp_dockbook_remove (dockable->dockbook, dockable);
dockbook = gimp_dockbook_new (dock->dialog_factory->menu_factory);
dockbook = gimp_dockbook_new (gimp_dock_get_dialog_factory (dock)->menu_factory);
gimp_dock_add_book (dock, GIMP_DOCKBOOK (dockbook), index);
gimp_dockbook_add (GIMP_DOCKBOOK (dockbook), dockable, -1);
......
......@@ -94,10 +94,10 @@ gimp_image_dock_constructor (GType type,
dock = GIMP_IMAGE_DOCK (object);
config = GIMP_GUI_CONFIG (GIMP_DOCK (dock)->context->gimp->config);
config = GIMP_GUI_CONFIG (gimp_dock_get_context (GIMP_DOCK (dock))->gimp->config);
dock->ui_manager =
gimp_menu_factory_manager_new (GIMP_DOCK (dock)->dialog_factory->menu_factory,
gimp_menu_factory_manager_new (gimp_dock_get_dialog_factory (GIMP_DOCK (dock))->menu_factory,
GIMP_IMAGE_DOCK_GET_CLASS (dock)->ui_manager_name,