[gimp/soc-2011-gimpunitentry] app: Call gimp_image_window_session_update() early
- From: Enrico Schröder <eschroeder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2011-gimpunitentry] app: Call gimp_image_window_session_update() early
- Date: Sat, 4 Jun 2011 14:50:45 +0000 (UTC)
commit e6169ae4dddf7d56ed4c859c9a910c767efdd5be
Author: Martin Nordholts <martinn src gnome org>
Date: Sat May 14 17:08:01 2011 +0200
app: Call gimp_image_window_session_update() early
Call gimp_image_window_session_update() at the end of
gimp_image_window_constructed() so that if GIMP is closed right after
being started, the image window session info has the widget
initialized (and also so that the correct size is setup initially).
app/display/gimpimagewindow.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c
index 30ff966..05b78e8 100644
--- a/app/display/gimpimagewindow.c
+++ b/app/display/gimpimagewindow.c
@@ -366,6 +366,10 @@ gimp_image_window_constructed (GObject *object)
window, G_CONNECT_SWAPPED);
private->entry_id = gimp_image_window_config_to_entry_id (config);
+
+ gimp_image_window_session_update (window,
+ NULL /*new_display*/,
+ FALSE /*from_switch_page*/);
}
static void
@@ -1381,14 +1385,15 @@ gimp_image_window_session_update (GimpImageWindow *window,
if (strcmp (private->entry_id, GIMP_EMPTY_IMAGE_WINDOW_ENTRY_ID) == 0)
{
- if (gimp_display_get_image (new_display))
+ if (new_display && gimp_display_get_image (new_display))
{
/* As soon as we have an image we should not affect the size of the
* empty image window
*/
gimp_image_window_session_clear (window);
}
- else if (! gimp_display_get_image (new_display) &&
+ else if (new_display &&
+ ! gimp_display_get_image (new_display) &&
g_list_length (private->shells) <= 1)
{
/* As soon as we have no image (and no other shells that may
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]