Commit 6c0ad19a authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

regenerated.

2001-04-24  Michael Natterer  <mitch@gimp.org>

	* app/authors.h: regenerated.

	* app/gui/dialogs-constructors.c: call the drawable views's
	set_context() function once explicitly after creation.

	* app/gui/dialogs.c
	* app/widgets/gimpdialogfactory.[ch]: session management correctly
	remembers the dialogs' sizes again.

	* app/widgets/gimpcontainermenuimpl.c: set the options menu's
	history to "0" after removing a menu item (temp hack because
	GtkOptionMenu doesn't handle the removal of the currently active
	item correctly).

	* app/widgets/gimpimagedock.c: another try to get dock->context's
	signals handled correctly. Debugging output will disappear soon.
parent d97a3ba5
2001-04-24 Michael Natterer <mitch@gimp.org>
* app/authors.h: regenerated.
* app/gui/dialogs-constructors.c: call the drawable views's
set_context() function once explicitly after creation.
* app/gui/dialogs.c
* app/widgets/gimpdialogfactory.[ch]: session management correctly
remembers the dialogs' sizes again.
* app/widgets/gimpcontainermenuimpl.c: set the options menu's
history to "0" after removing a menu item (temp hack because
GtkOptionMenu doesn't handle the removal of the currently active
item correctly).
* app/widgets/gimpimagedock.c: another try to get dock->context's
signals handled correctly. Debugging output will disappear soon.
2001-04-23 David Neary <dneary@eircom.net>
* AUTHORS: Added my name here before being politely
......
......@@ -119,6 +119,7 @@ static gchar *authors[] =
"Shuji Narazaki",
"Felix Natter",
"Michael Natterer",
"David Neary",
"Sven Neumann",
"Stephen Robert Norris",
"Tim Newsome",
......
......@@ -524,6 +524,7 @@ dialogs_layer_list_view_new (GimpDialogFactory *factory,
{
GimpImage *gimage;
GtkWidget *view;
GtkWidget *dockable;
gimage = gimp_context_get_image (context);
......@@ -539,10 +540,14 @@ dialogs_layer_list_view_new (GimpDialogFactory *factory,
(GimpRemoveDrawableFunc) gimp_image_remove_layer,
(GimpCopyDrawableFunc) gimp_layer_copy);
return dialogs_dockable_new (view,
"Layer List", "Layers",
NULL,
dialogs_set_drawable_context_func);
dockable = dialogs_dockable_new (view,
"Layer List", "Layers",
NULL,
dialogs_set_drawable_context_func);
dialogs_set_drawable_context_func (GIMP_DOCKABLE (dockable), context);
return dockable;
}
GtkWidget *
......@@ -551,6 +556,7 @@ dialogs_channel_list_view_new (GimpDialogFactory *factory,
{
GimpImage *gimage;
GtkWidget *view;
GtkWidget *dockable;
gimage = gimp_context_get_image (context);
......@@ -566,10 +572,14 @@ dialogs_channel_list_view_new (GimpDialogFactory *factory,
(GimpRemoveDrawableFunc) gimp_image_remove_channel,
(GimpCopyDrawableFunc) gimp_channel_copy);
return dialogs_dockable_new (view,
"Channel List", "Channels",
NULL,
dialogs_set_drawable_context_func);
dockable = dialogs_dockable_new (view,
"Channel List", "Channels",
NULL,
dialogs_set_drawable_context_func);
dialogs_set_drawable_context_func (GIMP_DOCKABLE (dockable), context);
return dockable;
}
......@@ -876,5 +886,8 @@ dialogs_drawable_view_image_changed (GimpContext *context,
GimpImage *gimage,
GimpDrawableListView *view)
{
g_print ("%p: image changed %s\n",
context, gimage ? GIMP_OBJECT (gimage)->name : "NULL");
gimp_drawable_list_view_set_image (view, gimage);
}
......@@ -37,45 +37,45 @@ GimpDialogFactory *global_dock_factory = NULL;
static const GimpDialogFactoryEntry toplevel_entries[] =
{
{ "gimp:toolbox", dialogs_toolbox_get, TRUE, TRUE },
{ "gimp:lc-dialog", dialogs_lc_get, TRUE, TRUE },
{ "gimp:tool-options-dialog", dialogs_tool_options_get, TRUE, TRUE },
{ "gimp:device-status-dialog", dialogs_device_status_get, TRUE, TRUE },
{ "gimp:brush-select-dialog", dialogs_brush_select_get, TRUE, TRUE },
{ "gimp:pattern-select-dialog", dialogs_pattern_select_get, TRUE, TRUE },
{ "gimp:gradient-select-dialog", dialogs_gradient_select_get, TRUE, TRUE },
{ "gimp:palette-dialog", dialogs_palette_get, TRUE, TRUE },
{ "gimp:error-console-dialog", dialogs_error_console_get, TRUE, TRUE },
{ "gimp:document-index-dialog", dialogs_document_index_get, TRUE, TRUE },
{ "gimp:preferences-dialog", dialogs_preferences_get, TRUE, FALSE },
{ "gimp:input-devices-dialog", dialogs_input_devices_get, TRUE, FALSE },
{ "gimp:module-browser-dialog", dialogs_module_browser_get, TRUE, FALSE },
{ "gimp:indexed-palette-dialog", dialogs_indexed_palette_get, TRUE, FALSE },
{ "gimp:undo-history-dialog", dialogs_undo_history_get, FALSE, FALSE },
{ "gimp:display-filters-dialog", dialogs_display_filters_get, FALSE, FALSE },
{ "gimp:tips-dialog", dialogs_tips_get, TRUE, FALSE },
{ "gimp:about-dialog", dialogs_about_get, TRUE, FALSE }
{ "gimp:toolbox", dialogs_toolbox_get, TRUE, TRUE, TRUE },
{ "gimp:lc-dialog", dialogs_lc_get, TRUE, TRUE, TRUE },
{ "gimp:tool-options-dialog", dialogs_tool_options_get, TRUE, TRUE, FALSE },
{ "gimp:device-status-dialog", dialogs_device_status_get, TRUE, TRUE, FALSE },
{ "gimp:brush-select-dialog", dialogs_brush_select_get, TRUE, TRUE, FALSE },
{ "gimp:pattern-select-dialog", dialogs_pattern_select_get, TRUE, TRUE, FALSE },
{ "gimp:gradient-select-dialog", dialogs_gradient_select_get, TRUE, TRUE, FALSE },
{ "gimp:palette-dialog", dialogs_palette_get, TRUE, TRUE, FALSE },
{ "gimp:error-console-dialog", dialogs_error_console_get, TRUE, TRUE, TRUE },
{ "gimp:document-index-dialog", dialogs_document_index_get, TRUE, TRUE, TRUE },
{ "gimp:preferences-dialog", dialogs_preferences_get, TRUE, FALSE, FALSE },
{ "gimp:input-devices-dialog", dialogs_input_devices_get, TRUE, FALSE, FALSE },
{ "gimp:module-browser-dialog", dialogs_module_browser_get, TRUE, FALSE, FALSE },
{ "gimp:indexed-palette-dialog", dialogs_indexed_palette_get, TRUE, FALSE, FALSE },
{ "gimp:undo-history-dialog", dialogs_undo_history_get, FALSE, FALSE, FALSE },
{ "gimp:display-filters-dialog", dialogs_display_filters_get, FALSE, FALSE, FALSE },
{ "gimp:tips-dialog", dialogs_tips_get, TRUE, FALSE, FALSE },
{ "gimp:about-dialog", dialogs_about_get, TRUE, FALSE, FALSE }
};
static const gint n_toplevel_entries = (sizeof (toplevel_entries) /
sizeof (toplevel_entries[0]));
static const GimpDialogFactoryEntry dock_entries[] =
{
{ "gimp:image-list", dialogs_image_list_view_new, FALSE, FALSE },
{ "gimp:brush-list", dialogs_brush_list_view_new, FALSE, FALSE },
{ "gimp:pattern-list", dialogs_pattern_list_view_new, FALSE, FALSE },
{ "gimp:gradient-list", dialogs_gradient_list_view_new, FALSE, FALSE },
{ "gimp:palette-list", dialogs_palette_list_view_new, FALSE, FALSE },
{ "gimp:tool-list", dialogs_tool_list_view_new, FALSE, FALSE },
{ "gimp:image-grid", dialogs_image_grid_view_new, FALSE, FALSE },
{ "gimp:brush-grid", dialogs_brush_grid_view_new, FALSE, FALSE },
{ "gimp:pattern-grid", dialogs_pattern_grid_view_new, FALSE, FALSE },
{ "gimp:gradient-grid", dialogs_gradient_grid_view_new, FALSE, FALSE },
{ "gimp:palette-grid", dialogs_palette_grid_view_new, FALSE, FALSE },
{ "gimp:tool-grid", dialogs_tool_grid_view_new, FALSE, FALSE },
{ "gimp:layer-list", dialogs_layer_list_view_new, FALSE, FALSE },
{ "gimp:channel-list", dialogs_channel_list_view_new, FALSE, FALSE }
{ "gimp:image-list", dialogs_image_list_view_new, FALSE, FALSE, FALSE },
{ "gimp:brush-list", dialogs_brush_list_view_new, FALSE, FALSE, FALSE },
{ "gimp:pattern-list", dialogs_pattern_list_view_new, FALSE, FALSE, FALSE },
{ "gimp:gradient-list", dialogs_gradient_list_view_new, FALSE, FALSE, FALSE },
{ "gimp:palette-list", dialogs_palette_list_view_new, FALSE, FALSE, FALSE },
{ "gimp:tool-list", dialogs_tool_list_view_new, FALSE, FALSE, FALSE },
{ "gimp:image-grid", dialogs_image_grid_view_new, FALSE, FALSE, FALSE },
{ "gimp:brush-grid", dialogs_brush_grid_view_new, FALSE, FALSE, FALSE },
{ "gimp:pattern-grid", dialogs_pattern_grid_view_new, FALSE, FALSE, FALSE },
{ "gimp:gradient-grid", dialogs_gradient_grid_view_new, FALSE, FALSE, FALSE },
{ "gimp:palette-grid", dialogs_palette_grid_view_new, FALSE, FALSE, FALSE },
{ "gimp:tool-grid", dialogs_tool_grid_view_new, FALSE, FALSE, FALSE },
{ "gimp:layer-list", dialogs_layer_list_view_new, FALSE, FALSE, FALSE },
{ "gimp:channel-list", dialogs_channel_list_view_new, FALSE, FALSE, FALSE }
};
static const gint n_dock_entries = (sizeof (dock_entries) /
sizeof (dock_entries[0]));
......@@ -105,14 +105,16 @@ dialogs_init (void)
toplevel_entries[i].identifier,
toplevel_entries[i].new_func,
toplevel_entries[i].singleton,
toplevel_entries[i].session_managed);
toplevel_entries[i].session_managed,
toplevel_entries[i].remember_size);
for (i = 0; i < n_dock_entries; i++)
gimp_dialog_factory_register (global_dock_factory,
dock_entries[i].identifier,
dock_entries[i].new_func,
dock_entries[i].singleton,
dock_entries[i].session_managed);
dock_entries[i].session_managed,
dock_entries[i].remember_size);
}
void
......
......@@ -524,6 +524,7 @@ dialogs_layer_list_view_new (GimpDialogFactory *factory,
{
GimpImage *gimage;
GtkWidget *view;
GtkWidget *dockable;
gimage = gimp_context_get_image (context);
......@@ -539,10 +540,14 @@ dialogs_layer_list_view_new (GimpDialogFactory *factory,
(GimpRemoveDrawableFunc) gimp_image_remove_layer,
(GimpCopyDrawableFunc) gimp_layer_copy);
return dialogs_dockable_new (view,
"Layer List", "Layers",
NULL,
dialogs_set_drawable_context_func);
dockable = dialogs_dockable_new (view,
"Layer List", "Layers",
NULL,
dialogs_set_drawable_context_func);
dialogs_set_drawable_context_func (GIMP_DOCKABLE (dockable), context);
return dockable;
}
GtkWidget *
......@@ -551,6 +556,7 @@ dialogs_channel_list_view_new (GimpDialogFactory *factory,
{
GimpImage *gimage;
GtkWidget *view;
GtkWidget *dockable;
gimage = gimp_context_get_image (context);
......@@ -566,10 +572,14 @@ dialogs_channel_list_view_new (GimpDialogFactory *factory,
(GimpRemoveDrawableFunc) gimp_image_remove_channel,
(GimpCopyDrawableFunc) gimp_channel_copy);
return dialogs_dockable_new (view,
"Channel List", "Channels",
NULL,
dialogs_set_drawable_context_func);
dockable = dialogs_dockable_new (view,
"Channel List", "Channels",
NULL,
dialogs_set_drawable_context_func);
dialogs_set_drawable_context_func (GIMP_DOCKABLE (dockable), context);
return dockable;
}
......@@ -876,5 +886,8 @@ dialogs_drawable_view_image_changed (GimpContext *context,
GimpImage *gimage,
GimpDrawableListView *view)
{
g_print ("%p: image changed %s\n",
context, gimage ? GIMP_OBJECT (gimage)->name : "NULL");
gimp_drawable_list_view_set_image (view, gimage);
}
......@@ -37,45 +37,45 @@ GimpDialogFactory *global_dock_factory = NULL;
static const GimpDialogFactoryEntry toplevel_entries[] =
{
{ "gimp:toolbox", dialogs_toolbox_get, TRUE, TRUE },
{ "gimp:lc-dialog", dialogs_lc_get, TRUE, TRUE },
{ "gimp:tool-options-dialog", dialogs_tool_options_get, TRUE, TRUE },
{ "gimp:device-status-dialog", dialogs_device_status_get, TRUE, TRUE },
{ "gimp:brush-select-dialog", dialogs_brush_select_get, TRUE, TRUE },
{ "gimp:pattern-select-dialog", dialogs_pattern_select_get, TRUE, TRUE },
{ "gimp:gradient-select-dialog", dialogs_gradient_select_get, TRUE, TRUE },
{ "gimp:palette-dialog", dialogs_palette_get, TRUE, TRUE },
{ "gimp:error-console-dialog", dialogs_error_console_get, TRUE, TRUE },
{ "gimp:document-index-dialog", dialogs_document_index_get, TRUE, TRUE },
{ "gimp:preferences-dialog", dialogs_preferences_get, TRUE, FALSE },
{ "gimp:input-devices-dialog", dialogs_input_devices_get, TRUE, FALSE },
{ "gimp:module-browser-dialog", dialogs_module_browser_get, TRUE, FALSE },
{ "gimp:indexed-palette-dialog", dialogs_indexed_palette_get, TRUE, FALSE },
{ "gimp:undo-history-dialog", dialogs_undo_history_get, FALSE, FALSE },
{ "gimp:display-filters-dialog", dialogs_display_filters_get, FALSE, FALSE },
{ "gimp:tips-dialog", dialogs_tips_get, TRUE, FALSE },
{ "gimp:about-dialog", dialogs_about_get, TRUE, FALSE }
{ "gimp:toolbox", dialogs_toolbox_get, TRUE, TRUE, TRUE },
{ "gimp:lc-dialog", dialogs_lc_get, TRUE, TRUE, TRUE },
{ "gimp:tool-options-dialog", dialogs_tool_options_get, TRUE, TRUE, FALSE },
{ "gimp:device-status-dialog", dialogs_device_status_get, TRUE, TRUE, FALSE },
{ "gimp:brush-select-dialog", dialogs_brush_select_get, TRUE, TRUE, FALSE },
{ "gimp:pattern-select-dialog", dialogs_pattern_select_get, TRUE, TRUE, FALSE },
{ "gimp:gradient-select-dialog", dialogs_gradient_select_get, TRUE, TRUE, FALSE },
{ "gimp:palette-dialog", dialogs_palette_get, TRUE, TRUE, FALSE },
{ "gimp:error-console-dialog", dialogs_error_console_get, TRUE, TRUE, TRUE },
{ "gimp:document-index-dialog", dialogs_document_index_get, TRUE, TRUE, TRUE },
{ "gimp:preferences-dialog", dialogs_preferences_get, TRUE, FALSE, FALSE },
{ "gimp:input-devices-dialog", dialogs_input_devices_get, TRUE, FALSE, FALSE },
{ "gimp:module-browser-dialog", dialogs_module_browser_get, TRUE, FALSE, FALSE },
{ "gimp:indexed-palette-dialog", dialogs_indexed_palette_get, TRUE, FALSE, FALSE },
{ "gimp:undo-history-dialog", dialogs_undo_history_get, FALSE, FALSE, FALSE },
{ "gimp:display-filters-dialog", dialogs_display_filters_get, FALSE, FALSE, FALSE },
{ "gimp:tips-dialog", dialogs_tips_get, TRUE, FALSE, FALSE },
{ "gimp:about-dialog", dialogs_about_get, TRUE, FALSE, FALSE }
};
static const gint n_toplevel_entries = (sizeof (toplevel_entries) /
sizeof (toplevel_entries[0]));
static const GimpDialogFactoryEntry dock_entries[] =
{
{ "gimp:image-list", dialogs_image_list_view_new, FALSE, FALSE },
{ "gimp:brush-list", dialogs_brush_list_view_new, FALSE, FALSE },
{ "gimp:pattern-list", dialogs_pattern_list_view_new, FALSE, FALSE },
{ "gimp:gradient-list", dialogs_gradient_list_view_new, FALSE, FALSE },
{ "gimp:palette-list", dialogs_palette_list_view_new, FALSE, FALSE },
{ "gimp:tool-list", dialogs_tool_list_view_new, FALSE, FALSE },
{ "gimp:image-grid", dialogs_image_grid_view_new, FALSE, FALSE },
{ "gimp:brush-grid", dialogs_brush_grid_view_new, FALSE, FALSE },
{ "gimp:pattern-grid", dialogs_pattern_grid_view_new, FALSE, FALSE },
{ "gimp:gradient-grid", dialogs_gradient_grid_view_new, FALSE, FALSE },
{ "gimp:palette-grid", dialogs_palette_grid_view_new, FALSE, FALSE },
{ "gimp:tool-grid", dialogs_tool_grid_view_new, FALSE, FALSE },
{ "gimp:layer-list", dialogs_layer_list_view_new, FALSE, FALSE },
{ "gimp:channel-list", dialogs_channel_list_view_new, FALSE, FALSE }
{ "gimp:image-list", dialogs_image_list_view_new, FALSE, FALSE, FALSE },
{ "gimp:brush-list", dialogs_brush_list_view_new, FALSE, FALSE, FALSE },
{ "gimp:pattern-list", dialogs_pattern_list_view_new, FALSE, FALSE, FALSE },
{ "gimp:gradient-list", dialogs_gradient_list_view_new, FALSE, FALSE, FALSE },
{ "gimp:palette-list", dialogs_palette_list_view_new, FALSE, FALSE, FALSE },
{ "gimp:tool-list", dialogs_tool_list_view_new, FALSE, FALSE, FALSE },
{ "gimp:image-grid", dialogs_image_grid_view_new, FALSE, FALSE, FALSE },
{ "gimp:brush-grid", dialogs_brush_grid_view_new, FALSE, FALSE, FALSE },
{ "gimp:pattern-grid", dialogs_pattern_grid_view_new, FALSE, FALSE, FALSE },
{ "gimp:gradient-grid", dialogs_gradient_grid_view_new, FALSE, FALSE, FALSE },
{ "gimp:palette-grid", dialogs_palette_grid_view_new, FALSE, FALSE, FALSE },
{ "gimp:tool-grid", dialogs_tool_grid_view_new, FALSE, FALSE, FALSE },
{ "gimp:layer-list", dialogs_layer_list_view_new, FALSE, FALSE, FALSE },
{ "gimp:channel-list", dialogs_channel_list_view_new, FALSE, FALSE, FALSE }
};
static const gint n_dock_entries = (sizeof (dock_entries) /
sizeof (dock_entries[0]));
......@@ -105,14 +105,16 @@ dialogs_init (void)
toplevel_entries[i].identifier,
toplevel_entries[i].new_func,
toplevel_entries[i].singleton,
toplevel_entries[i].session_managed);
toplevel_entries[i].session_managed,
toplevel_entries[i].remember_size);
for (i = 0; i < n_dock_entries; i++)
gimp_dialog_factory_register (global_dock_factory,
dock_entries[i].identifier,
dock_entries[i].new_func,
dock_entries[i].singleton,
dock_entries[i].session_managed);
dock_entries[i].session_managed,
dock_entries[i].remember_size);
}
void
......
......@@ -217,9 +217,10 @@ gimp_container_menu_impl_remove_item (GimpContainerMenu *menu,
if (g_list_length (GTK_MENU_SHELL (menu)->children) == 1)
{
gtk_widget_show (GIMP_CONTAINER_MENU_IMPL (menu)->empty_item);
gimp_container_menu_impl_set_history (menu, 0);
}
/* FIXME: this is due to gtkoptionmenu brokenness */
gimp_container_menu_impl_set_history (menu, 0);
}
}
......
......@@ -43,8 +43,7 @@ static void gimp_dialog_factory_destroy (GtkObject *object);
static void gimp_dialog_factory_get_window_info (GtkWidget *window,
GimpSessionInfo *info);
static void gimp_dialog_factory_set_window_geometry (GtkWidget *window,
GimpSessionInfo *info,
gboolean set_size);
GimpSessionInfo *info);
static GimpObjectClass *parent_class = NULL;
......@@ -190,7 +189,8 @@ gimp_dialog_factory_register (GimpDialogFactory *factory,
const gchar *identifier,
GimpDialogNewFunc new_func,
gboolean singleton,
gboolean session_managed)
gboolean session_managed,
gboolean remember_size)
{
GimpDialogFactoryEntry *entry;
......@@ -204,6 +204,7 @@ gimp_dialog_factory_register (GimpDialogFactory *factory,
entry->new_func = new_func;
entry->singleton = singleton ? TRUE : FALSE;
entry->session_managed = session_managed ? TRUE : FALSE;
entry->remember_size = remember_size ? TRUE : FALSE;
factory->registered_dialogs = g_list_prepend (factory->registered_dialogs,
entry);
......@@ -437,8 +438,7 @@ gimp_dialog_factory_add_toplevel (GimpDialogFactory *factory,
if (entry->session_managed)
{
gimp_dialog_factory_set_window_geometry (info->widget,
info, FALSE);
gimp_dialog_factory_set_window_geometry (info->widget, info);
}
break;
......@@ -467,8 +467,7 @@ gimp_dialog_factory_add_toplevel (GimpDialogFactory *factory,
{
info->widget = toplevel;
gimp_dialog_factory_set_window_geometry (info->widget,
info, FALSE);
gimp_dialog_factory_set_window_geometry (info->widget, info);
break;
}
......@@ -561,7 +560,9 @@ gimp_dialog_factories_session_save_foreach (gchar *name,
name,
info->toplevel_entry ? info->toplevel_entry->identifier : "dock");
fprintf (fp, " (position %d %d)\n", info->x, info->y);
fprintf (fp, " (size %d %d)", info->width, info->height);
if (info->width > 0 && info->height > 0)
fprintf (fp, " (size %d %d)", info->width, info->height);
if (info->open)
fprintf (fp, "\n (open-on-exit)");
......@@ -721,7 +722,16 @@ gimp_dialog_factory_get_window_info (GtkWidget *window,
if (window->window)
{
gdk_window_get_root_origin (window->window, &info->x, &info->y);
gdk_window_get_size (window->window, &info->width, &info->height);
if (! info->toplevel_entry || info->toplevel_entry->remember_size)
{
gdk_window_get_size (window->window, &info->width, &info->height);
}
else
{
info->width = 0;
info->height = 0;
}
}
info->open = GTK_WIDGET_VISIBLE (window);
......@@ -729,8 +739,7 @@ gimp_dialog_factory_get_window_info (GtkWidget *window,
static void
gimp_dialog_factory_set_window_geometry (GtkWidget *window,
GimpSessionInfo *info,
gboolean set_size)
GimpSessionInfo *info)
{
static gint screen_width = 0;
static gint screen_height = 0;
......@@ -751,9 +760,10 @@ gimp_dialog_factory_set_window_geometry (GtkWidget *window,
gtk_widget_set_uposition (window, info->x, info->y);
if (set_size)
if (! info->toplevel_entry || info->toplevel_entry->remember_size)
{
gtk_window_set_default_size (GTK_WINDOW (window),
info->width, info->height);
if (info->width > 0 && info->height > 0)
gtk_window_set_default_size (GTK_WINDOW (window),
info->width, info->height);
}
}
......@@ -40,6 +40,7 @@ struct _GimpDialogFactoryEntry
GimpDialogNewFunc new_func;
gboolean singleton;
gboolean session_managed;
gboolean remember_size;
};
......@@ -113,7 +114,8 @@ void gimp_dialog_factory_register (GimpDialogFactory *factory,
const gchar *identifier,
GimpDialogNewFunc new_func,
gboolean singleton,
gboolean session_managed);
gboolean session_managed,
gboolean remember_size);
GtkWidget * gimp_dialog_factory_dialog_new (GimpDialogFactory *factory,
const gchar *identifier);
......
......@@ -163,7 +163,7 @@ gimp_image_dock_new (GimpDialogFactory *factory,
dock->factory = factory;
dock->context = gimp_context_new ("Dock Context", factory->context);
dock->context = gimp_context_new ("Dock Context", NULL);
gimp_context_define_args (dock->context,
GIMP_CONTEXT_ALL_ARGS_MASK &
~(GIMP_CONTEXT_IMAGE_MASK |
......@@ -216,10 +216,18 @@ gimp_image_dock_image_changed (GimpContext *context,
image_dock = GIMP_IMAGE_DOCK (dock);
g_print ("%p: got image %s\n",
context, gimage ? GIMP_OBJECT (gimage)->name : "NULL");
if (! gimage && image_dock->image_container->num_children)
{
gimage = GIMP_IMAGE (gimp_container_get_child_by_index (image_dock->image_container, 0));
gtk_signal_emit_stop_by_name (GTK_OBJECT (context), "image_changed");
g_print ("%p: set image %s\n",
context, gimage ? GIMP_OBJECT (gimage)->name : "NULL");
gimp_context_set_image (dock->context, gimage);
}
}
......
......@@ -163,7 +163,7 @@ gimp_image_dock_new (GimpDialogFactory *factory,
dock->factory = factory;
dock->context = gimp_context_new ("Dock Context", factory->context);
dock->context = gimp_context_new ("Dock Context", NULL);
gimp_context_define_args (dock->context,
GIMP_CONTEXT_ALL_ARGS_MASK &
~(GIMP_CONTEXT_IMAGE_MASK |
......@@ -216,10 +216,18 @@ gimp_image_dock_image_changed (GimpContext *context,
image_dock = GIMP_IMAGE_DOCK (dock);
g_print ("%p: got image %s\n",
context, gimage ? GIMP_OBJECT (gimage)->name : "NULL");
if (! gimage && image_dock->image_container->num_children)
{
gimage = GIMP_IMAGE (gimp_container_get_child_by_index (image_dock->image_container, 0));
gtk_signal_emit_stop_by_name (GTK_OBJECT (context), "image_changed");
g_print ("%p: set image %s\n",
context, gimage ? GIMP_OBJECT (gimage)->name : "NULL");
gimp_context_set_image (dock->context, gimage);
}
}
......
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