mirror of https://github.com/GNOME/gimp.git
handle dockable drops where the drag source is a GimpDockable itself.
2003-10-05 Sven Neumann <sven@gimp.org> * app/widgets/gimpdock.c (gimp_dock_separator_drag_drop): handle dockable drops where the drag source is a GimpDockable itself. * etc/sessionrc: try a new default dialog setup.
This commit is contained in:
parent
73e9b1aafc
commit
1f17bf8767
|
@ -1,3 +1,10 @@
|
|||
2003-10-05 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/widgets/gimpdock.c (gimp_dock_separator_drag_drop): handle
|
||||
dockable drops where the drag source is a GimpDockable itself.
|
||||
|
||||
* etc/sessionrc: try a new default dialog setup.
|
||||
|
||||
2003-10-05 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/gui/tool-options-menu.c (tool_options_menu_update): removed
|
||||
|
|
|
@ -535,18 +535,21 @@ gimp_dock_separator_drag_drop (GtkWidget *widget,
|
|||
|
||||
if (source)
|
||||
{
|
||||
GimpDockable *src_dockable;
|
||||
GimpDockable *dockable;
|
||||
|
||||
src_dockable = (GimpDockable *) g_object_get_data (G_OBJECT (source),
|
||||
"gimp-dockable");
|
||||
if (GIMP_IS_DOCKABLE (source))
|
||||
dockable = GIMP_DOCKABLE (source);
|
||||
else
|
||||
dockable = (GimpDockable *) g_object_get_data (G_OBJECT (source),
|
||||
"gimp-dockable");
|
||||
|
||||
if (src_dockable)
|
||||
if (dockable)
|
||||
{
|
||||
GtkWidget *dockbook;
|
||||
GList *children;
|
||||
gint index;
|
||||
|
||||
g_object_set_data (G_OBJECT (src_dockable),
|
||||
g_object_set_data (G_OBJECT (dockable),
|
||||
"gimp-dock-drag-widget", NULL);
|
||||
|
||||
children = gtk_container_get_children (GTK_CONTAINER (widget->parent));
|
||||
|
@ -561,7 +564,7 @@ gimp_dock_separator_drag_drop (GtkWidget *widget,
|
|||
/* if dropping to the same dock, take care that we don't try
|
||||
* to reorder the *only* dockable in the dock
|
||||
*/
|
||||
if (src_dockable->dockbook->dock == dock)
|
||||
if (dockable->dockbook->dock == dock)
|
||||
{
|
||||
gint n_books;
|
||||
gint n_dockables;
|
||||
|
@ -569,7 +572,7 @@ gimp_dock_separator_drag_drop (GtkWidget *widget,
|
|||
n_books = g_list_length (dock->dockbooks);
|
||||
|
||||
children =
|
||||
gtk_container_get_children (GTK_CONTAINER (src_dockable->dockbook));
|
||||
gtk_container_get_children (GTK_CONTAINER (dockable->dockbook));
|
||||
n_dockables = g_list_length (children);
|
||||
g_list_free (children);
|
||||
|
||||
|
@ -577,16 +580,16 @@ gimp_dock_separator_drag_drop (GtkWidget *widget,
|
|||
return TRUE; /* successfully do nothing */
|
||||
}
|
||||
|
||||
g_object_ref (src_dockable);
|
||||
g_object_ref (dockable);
|
||||
|
||||
gimp_dockbook_remove (src_dockable->dockbook, src_dockable);
|
||||
gimp_dockbook_remove (dockable->dockbook, dockable);
|
||||
|
||||
dockbook = gimp_dockbook_new (dock->dialog_factory->menu_factory);
|
||||
gimp_dock_add_book (dock, GIMP_DOCKBOOK (dockbook), index);
|
||||
|
||||
gimp_dockbook_add (GIMP_DOCKBOOK (dockbook), src_dockable, -1);
|
||||
gimp_dockbook_add (GIMP_DOCKBOOK (dockbook), dockable, -1);
|
||||
|
||||
g_object_unref (src_dockable);
|
||||
g_object_unref (dockable);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -672,7 +675,7 @@ gimp_dock_tab_drag_end (GtkWidget *widget,
|
|||
dockable = GIMP_DOCKABLE (data);
|
||||
|
||||
drag_widget = g_object_get_data (G_OBJECT (dockable),
|
||||
"gimp-dock-drag-widget");
|
||||
"gimp-dock-drag-widget");
|
||||
|
||||
if (drag_widget)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# GIMP sessionrc
|
||||
#
|
||||
# This is a sample sessionrc that will be used on first startup after
|
||||
# user installation.
|
||||
#
|
||||
# This file takes session-specific info (that is info, you want to keep
|
||||
# between two GIMP sessions). You are not supposed to edit it manually, but
|
||||
# of course you can do. The sessionrc will be entirely rewritten every time
|
||||
# you quit The GIMP. If this file isn't found, defaults are used.
|
||||
|
||||
(session-info "toolbox" "dock"
|
||||
(position 48 48)
|
||||
|
@ -9,20 +11,22 @@
|
|||
(open-on-exit)
|
||||
(dock
|
||||
(book
|
||||
"gimp-tool-options@icon"
|
||||
"gimp-brush-grid@icon"
|
||||
"gimp-gradient-list@icon"
|
||||
"gimp-pattern-grid@icon")))
|
||||
"gimp-tool-options@preview")))
|
||||
(session-info "dock" "dock"
|
||||
(position 328 48)
|
||||
(size 250 440)
|
||||
(position 300 48)
|
||||
(size 240 660)
|
||||
(open-on-exit)
|
||||
(aux-info "menu-shown" "follow-active-image")
|
||||
(dock
|
||||
(book
|
||||
"gimp-layer-list@name"
|
||||
"gimp-channel-list@name"
|
||||
"gimp-vectors-list@name"
|
||||
"gimp-undo-history@name")))
|
||||
"gimp-layer-list@icon"
|
||||
"gimp-channel-list@icon"
|
||||
"gimp-vectors-list@icon"
|
||||
"gimp-undo-history@icon")
|
||||
(book
|
||||
"gimp-brush-grid@preview"
|
||||
"gimp-pattern-grid@preview"
|
||||
"gimp-gradient-list@preview"
|
||||
"gimp-font-list@preview")))
|
||||
|
||||
# end of sessionrc
|
||||
|
|
Loading…
Reference in New Issue