gimp r25141 - in trunk: . app/display app/gui
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r25141 - in trunk: . app/display app/gui
- Date: Thu, 20 Mar 2008 13:27:49 +0000 (GMT)
Author: mitch
Date: Thu Mar 20 13:27:49 2008
New Revision: 25141
URL: http://svn.gnome.org/viewvc/gimp?rev=25141&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/app/display/gimpdisplayshell.c
trunk/app/gui/gui.c
Modified: trunk/app/display/gimpdisplayshell.c
==============================================================================
--- trunk/app/display/gimpdisplayshell.c (original)
+++ trunk/app/display/gimpdisplayshell.c Thu Mar 20 13:27:49 2008
@@ -674,8 +674,16 @@
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 @@
}
/* 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 @@
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_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));
Modified: trunk/app/gui/gui.c
==============================================================================
--- trunk/app/gui/gui.c (original)
+++ trunk/app/gui/gui.c Thu Mar 20 13:27:49 2008
@@ -531,6 +531,9 @@
dialogs_show_toolbox ();
gui_dbus_service_init (gimp);
+
+ /* create the empty display */
+ gimp_create_display (gimp, NULL, GIMP_UNIT_PIXEL, 1.0);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]