mirror of https://github.com/GNOME/gimp.git
make it work when called with display->image == NULL. Use a randomly
2008-03-20 Michael Natterer <mitch@gimp.org> * app/display/gimpdisplayshell.c (gimp_display_shell_new): make it work when called with display->image == NULL. Use a randomly picked canvas size for now, more later. (gimp_display_shell_fill): add missing call to gimp_display_shell_scale_changed(). * app/gui/gui.c (gui_restore_after_callback): create an empty display. svn path=/trunk/; revision=25141
This commit is contained in:
parent
4c50318b73
commit
b0bcb37eb8
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2008-03-20 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/display/gimpdisplayshell.c (gimp_display_shell_new): make it
|
||||
work when called with display->image == NULL. Use a randomly
|
||||
picked canvas size for now, more later.
|
||||
|
||||
(gimp_display_shell_fill): add missing call to
|
||||
gimp_display_shell_scale_changed().
|
||||
|
||||
* app/gui/gui.c (gui_restore_after_callback): create an empty
|
||||
display.
|
||||
|
||||
2008-03-20 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/uri/uri-backend-gio.c (get_protocols): guard against
|
||||
|
|
|
@ -674,8 +674,16 @@ gimp_display_shell_new (GimpDisplay *display,
|
|||
|
||||
shell->display = display;
|
||||
|
||||
image_width = gimp_image_get_width (shell->display->image);
|
||||
image_height = gimp_image_get_height (shell->display->image);
|
||||
if (shell->display->image)
|
||||
{
|
||||
image_width = gimp_image_get_width (shell->display->image);
|
||||
image_height = gimp_image_get_height (shell->display->image);
|
||||
}
|
||||
else
|
||||
{
|
||||
image_width = 640;
|
||||
image_height = 480;
|
||||
}
|
||||
|
||||
shell->dot_for_dot = shell->display->config->default_dot_for_dot;
|
||||
|
||||
|
@ -698,8 +706,16 @@ gimp_display_shell_new (GimpDisplay *display,
|
|||
}
|
||||
|
||||
/* adjust the initial scale -- so that window fits on screen. */
|
||||
gimp_display_shell_set_initial_scale (shell, scale,
|
||||
&shell_width, &shell_height);
|
||||
if (shell->display->image)
|
||||
{
|
||||
gimp_display_shell_set_initial_scale (shell, scale,
|
||||
&shell_width, &shell_height);
|
||||
}
|
||||
else
|
||||
{
|
||||
shell_width = -1;
|
||||
shell_height = image_height;
|
||||
}
|
||||
|
||||
shell->menubar_manager = gimp_menu_factory_manager_new (menu_factory,
|
||||
"<Image>",
|
||||
|
@ -1085,7 +1101,10 @@ gimp_display_shell_new (GimpDisplay *display,
|
|||
g_object_unref (filter);
|
||||
}
|
||||
|
||||
gimp_display_shell_connect (shell);
|
||||
if (shell->display->image)
|
||||
gimp_display_shell_connect (shell);
|
||||
else
|
||||
gimp_statusbar_empty (GIMP_STATUSBAR (shell->statusbar));
|
||||
|
||||
gimp_display_shell_title_init (shell);
|
||||
|
||||
|
@ -1175,6 +1194,7 @@ gimp_display_shell_fill (GimpDisplayShell *shell,
|
|||
gimp_display_shell_set_unit (shell, unit);
|
||||
gimp_display_shell_set_initial_scale (shell, scale,
|
||||
&display_width, &display_height);
|
||||
gimp_display_shell_scale_changed (shell);
|
||||
|
||||
gimp_statusbar_fill (GIMP_STATUSBAR (shell->statusbar));
|
||||
|
||||
|
|
|
@ -531,6 +531,9 @@ gui_restore_after_callback (Gimp *gimp,
|
|||
dialogs_show_toolbox ();
|
||||
|
||||
gui_dbus_service_init (gimp);
|
||||
|
||||
/* create the empty display */
|
||||
gimp_create_display (gimp, NULL, GIMP_UNIT_PIXEL, 1.0);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in New Issue