gimp r25115 - in trunk: . app/display
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r25115 - in trunk: . app/display
- Date: Wed, 19 Mar 2008 09:11:04 +0000 (GMT)
Author: neo
Date: Wed Mar 19 09:11:04 2008
New Revision: 25115
URL: http://svn.gnome.org/viewvc/gimp?rev=25115&view=rev
Log:
2008-03-19 Sven Neumann <sven gimp org>
* app/display/gimpdisplayshell.c (gimp_display_shell_update_icon):
deal with NULL image and unset the icon.
* app/display/gimpdisplay.c (gimp_display_set_image): unset the
icon when no image is set.
* app/display/gimpdisplayshell-title.c
(gimp_display_shell_format_title): use GIMP_NAME as the window
title when no image is set. Append GIMP_ACRONYM otherwise.
Modified:
trunk/ChangeLog
trunk/app/display/gimpdisplay.c
trunk/app/display/gimpdisplayshell-title.c
trunk/app/display/gimpdisplayshell.c
Modified: trunk/app/display/gimpdisplay.c
==============================================================================
--- trunk/app/display/gimpdisplay.c (original)
+++ trunk/app/display/gimpdisplay.c Wed Mar 19 09:11:04 2008
@@ -490,6 +490,8 @@
if (image)
gimp_display_shell_reconnect (GIMP_DISPLAY_SHELL (display->shell));
+ else
+ gimp_display_shell_update_icon (GIMP_DISPLAY_SHELL (display->shell));
}
void
Modified: trunk/app/display/gimpdisplayshell-title.c
==============================================================================
--- trunk/app/display/gimpdisplayshell-title.c (original)
+++ trunk/app/display/gimpdisplayshell-title.c Wed Mar 19 09:11:04 2008
@@ -42,6 +42,8 @@
#include "gimpdisplayshell-title.h"
#include "gimpstatusbar.h"
+#include "about.h"
+
#include "gimp-intl.h"
@@ -162,7 +164,7 @@
if (! image)
{
- print (title, title_len, i, _("GIMP - Drop Files"));
+ print (title, title_len, i, GIMP_NAME);
return;
}
@@ -423,5 +425,8 @@
format++;
}
- title[MIN (i, title_len - 1)] = '\0';
+ if (i) /* U+2013 EN DASH */
+ i += g_strlcpy (title + i, " \342\200\223 ", title_len - i);
+
+ g_strlcpy (title + i, GIMP_ACRONYM, title_len - i);
}
Modified: trunk/app/display/gimpdisplayshell.c
==============================================================================
--- trunk/app/display/gimpdisplayshell.c (original)
+++ trunk/app/display/gimpdisplayshell.c Wed Mar 19 09:11:04 2008
@@ -1557,33 +1557,41 @@
gimp_display_shell_update_icon (GimpDisplayShell *shell)
{
GimpImage *image;
- GdkPixbuf *pixbuf;
- gint width, height;
- gdouble factor;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
image = shell->display->image;
- factor = ((gdouble) gimp_image_get_height (image) /
- (gdouble) gimp_image_get_width (image));
-
- if (factor >= 1)
+ if (image)
{
- height = MAX (shell->icon_size, 1);
- width = MAX (((gdouble) shell->icon_size) / factor, 1);
+ Gimp *gimp = shell->display->gimp;
+ GdkPixbuf *pixbuf;
+ gint width;
+ gint height;
+ gdouble factor = ((gdouble) gimp_image_get_height (image) /
+ (gdouble) gimp_image_get_width (image));
+
+ if (factor >= 1)
+ {
+ height = MAX (shell->icon_size, 1);
+ width = MAX (((gdouble) shell->icon_size) / factor, 1);
+ }
+ else
+ {
+ height = MAX (((gdouble) shell->icon_size) * factor, 1);
+ width = MAX (shell->icon_size, 1);
+ }
+
+ pixbuf = gimp_viewable_get_pixbuf (GIMP_VIEWABLE (image),
+ gimp_get_user_context (gimp),
+ width, height);
+
+ gtk_window_set_icon (GTK_WINDOW (shell), pixbuf);
}
else
{
- height = MAX (((gdouble) shell->icon_size) * factor, 1);
- width = MAX (shell->icon_size, 1);
+ gtk_window_set_icon (GTK_WINDOW (shell), NULL);
}
-
- pixbuf = gimp_viewable_get_pixbuf (GIMP_VIEWABLE (image),
- gimp_get_user_context (shell->display->gimp),
- width, height);
-
- gtk_window_set_icon (GTK_WINDOW (shell), pixbuf);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]