Remove "gimp-" prefix from the shell's "icon" and "title" properties

The prefix was needed because GtkWindow also has "icon" and "title"
properties.
This commit is contained in:
Michael Natterer 2009-09-29 22:20:12 +02:00
parent d046da90e2
commit 35588efaa1
5 changed files with 15 additions and 26 deletions

View File

@ -40,6 +40,7 @@ void
gimp_display_shell_icon_update (GimpDisplayShell *shell)
{
GimpImage *image;
GdkPixbuf *pixbuf = NULL;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
@ -47,12 +48,11 @@ gimp_display_shell_icon_update (GimpDisplayShell *shell)
if (image)
{
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));
Gimp *gimp = shell->display->gimp;
gint width;
gint height;
gdouble factor = ((gdouble) gimp_image_get_height (image) /
(gdouble) gimp_image_get_width (image));
if (factor >= 1)
{
@ -68,13 +68,9 @@ gimp_display_shell_icon_update (GimpDisplayShell *shell)
pixbuf = gimp_viewable_get_pixbuf (GIMP_VIEWABLE (image),
gimp_get_user_context (gimp),
width, height);
}
g_object_set (shell, "gimp-icon", pixbuf, NULL);
}
else
{
g_object_set (shell, "gimp-icon", NULL, NULL);
}
g_object_set (shell, "icon", pixbuf, NULL);
}
void

View File

@ -109,16 +109,14 @@ gimp_display_shell_update_title_idle (gpointer data)
config->image_status_format);
g_object_set (shell,
/* FIXME: "title" later */
"gimp-title", title,
"title", title,
"status", status,
NULL);
}
else
{
g_object_set (shell,
/* FIXME: "title" later */
"gimp-title", GIMP_NAME,
"title", GIMP_NAME,
"status", " ",
NULL);
}

View File

@ -226,8 +226,7 @@ gimp_display_shell_class_init (GimpDisplayShellClass *klass)
GIMP_PARAM_READWRITE));
g_object_class_install_property (object_class, PROP_TITLE,
/* FIXME: "title" later */
g_param_spec_string ("gimp-title", NULL, NULL,
g_param_spec_string ("title", NULL, NULL,
NULL,
GIMP_PARAM_READWRITE));
@ -237,8 +236,7 @@ gimp_display_shell_class_init (GimpDisplayShellClass *klass)
GIMP_PARAM_READWRITE));
g_object_class_install_property (object_class, PROP_ICON,
/* FIXME: "icon" later */
g_param_spec_object ("gimp-icon", NULL, NULL,
g_param_spec_object ("icon", NULL, NULL,
GDK_TYPE_PIXBUF,
GIMP_PARAM_READWRITE));

View File

@ -896,15 +896,13 @@ gimp_image_window_switch_page (GtkNotebook *notebook,
g_signal_connect (private->active_shell, "scaled",
G_CALLBACK (gimp_image_window_shell_scaled),
window);
/* FIXME: "title" later */
g_signal_connect (private->active_shell, "notify::gimp-title",
g_signal_connect (private->active_shell, "notify::title",
G_CALLBACK (gimp_image_window_shell_title_notify),
window);
g_signal_connect (private->active_shell, "notify::status",
G_CALLBACK (gimp_image_window_shell_status_notify),
window);
/* FIXME: "icon" later */
g_signal_connect (private->active_shell, "notify::gimp-icon",
g_signal_connect (private->active_shell, "notify::icon",
G_CALLBACK (gimp_image_window_shell_icon_notify),
window);

View File

@ -766,8 +766,7 @@ gimp_statusbar_restore_window_title (GimpStatusbar *statusbar)
if (gimp_image_window_is_iconified (GIMP_IMAGE_WINDOW (toplevel)))
{
/* FIXME title later */
g_object_notify (G_OBJECT (statusbar->shell), "gimp-title");
g_object_notify (G_OBJECT (statusbar->shell), "title");
}
}