Use preferences-desktop-wallpaper as the icon name per the Icon Naming
2006-08-18 Rodney Dawes <dobey@novell.com> * background.desktop.in.in: Use preferences-desktop-wallpaper as the icon name per the Icon Naming Specification * gnome-background-properties.glade: Set the icon name for the window to be preferences-desktop-wallpaper as per the naming spec * gnome-wp-capplet.[ch]: Remove GtkIconTheme instance from structure (gnome_wp_icon_theme_changed): Don't need this method any longer (wallpaper_properties_init): Remove unused variables Don't need to get the icon_info to load a pixbuf and set an icon, from the theme any longer, as we can just specify the icon with one call Don't need the extra _ensure_style call here
This commit is contained in:
parent
7942069236
commit
a853fff02c
5 changed files with 16 additions and 37 deletions
|
@ -1,3 +1,16 @@
|
||||||
|
2006-08-18 Rodney Dawes <dobey@novell.com>
|
||||||
|
|
||||||
|
* background.desktop.in.in: Use preferences-desktop-wallpaper as the
|
||||||
|
icon name per the Icon Naming Specification
|
||||||
|
* gnome-background-properties.glade: Set the icon name for the window
|
||||||
|
to be preferences-desktop-wallpaper as per the naming spec
|
||||||
|
* gnome-wp-capplet.[ch]: Remove GtkIconTheme instance from structure
|
||||||
|
(gnome_wp_icon_theme_changed): Don't need this method any longer
|
||||||
|
(wallpaper_properties_init): Remove unused variables
|
||||||
|
Don't need to get the icon_info to load a pixbuf and set an icon, from
|
||||||
|
the theme any longer, as we can just specify the icon with one call
|
||||||
|
Don't need the extra _ensure_style call here
|
||||||
|
|
||||||
2006-08-18 Rodney Dawes <dobey@novell.com>
|
2006-08-18 Rodney Dawes <dobey@novell.com>
|
||||||
|
|
||||||
* gnome-wp-capplet.c (wallpaper_properties_init): Set the content area
|
* gnome-wp-capplet.c (wallpaper_properties_init): Set the content area
|
||||||
|
|
|
@ -3,7 +3,7 @@ Encoding=UTF-8
|
||||||
_Name=Desktop Background
|
_Name=Desktop Background
|
||||||
_Comment=Change your Desktop Background settings
|
_Comment=Change your Desktop Background settings
|
||||||
Exec=gnome-background-properties %F
|
Exec=gnome-background-properties %F
|
||||||
Icon=gnome-settings-background
|
Icon=preferences-desktop-wallpaper
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
<property name="default_height">418</property>
|
<property name="default_height">418</property>
|
||||||
<property name="resizable">True</property>
|
<property name="resizable">True</property>
|
||||||
<property name="destroy_with_parent">False</property>
|
<property name="destroy_with_parent">False</property>
|
||||||
|
<property name="icon_name">preferences-desktop-wallpaper</property>
|
||||||
<property name="decorated">True</property>
|
<property name="decorated">True</property>
|
||||||
<property name="skip_taskbar_hint">False</property>
|
<property name="skip_taskbar_hint">False</property>
|
||||||
<property name="skip_pager_hint">False</property>
|
<property name="skip_pager_hint">False</property>
|
||||||
|
|
|
@ -786,23 +786,6 @@ static void gnome_wp_color2_changed (GConfClient * client, guint id,
|
||||||
gnome_wp_color_changed (capplet, FALSE);
|
gnome_wp_color_changed (capplet, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gnome_wp_icon_theme_changed (GtkIconTheme * theme,
|
|
||||||
GnomeWPCapplet * capplet) {
|
|
||||||
GdkPixbuf * pixbuf;
|
|
||||||
GtkIconInfo * icon_info = NULL;
|
|
||||||
|
|
||||||
icon_info = gtk_icon_theme_lookup_icon (capplet->theme,
|
|
||||||
"gnome-settings-background",
|
|
||||||
48, 0);
|
|
||||||
if (icon_info != NULL) {
|
|
||||||
pixbuf = gtk_icon_info_load_icon (icon_info, NULL);
|
|
||||||
gtk_icon_info_free (icon_info);
|
|
||||||
gtk_window_set_icon (GTK_WINDOW (capplet->window), NULL);
|
|
||||||
gtk_window_set_default_icon (pixbuf);
|
|
||||||
g_object_unref (pixbuf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static GladeXML * gnome_wp_create_dialog (void) {
|
static GladeXML * gnome_wp_create_dialog (void) {
|
||||||
GladeXML * new;
|
GladeXML * new;
|
||||||
gchar * gladefile;
|
gchar * gladefile;
|
||||||
|
@ -860,10 +843,8 @@ static void wallpaper_properties_init (poptContext ctx) {
|
||||||
GtkCellRenderer * renderer;
|
GtkCellRenderer * renderer;
|
||||||
GtkTreeViewColumn * column;
|
GtkTreeViewColumn * column;
|
||||||
GtkTreeSelection * selection;
|
GtkTreeSelection * selection;
|
||||||
GdkPixbuf * pixbuf;
|
|
||||||
GdkCursor * cursor;
|
GdkCursor * cursor;
|
||||||
const gchar ** args;
|
const gchar ** args;
|
||||||
GtkIconInfo * icon_info = NULL;
|
|
||||||
GtkFileFilter *filter;
|
GtkFileFilter *filter;
|
||||||
|
|
||||||
gtk_rc_parse_string ("style \"wp-tree-defaults\" {\n"
|
gtk_rc_parse_string ("style \"wp-tree-defaults\" {\n"
|
||||||
|
@ -914,29 +895,14 @@ static void wallpaper_properties_init (poptContext ctx) {
|
||||||
gnome_wp_item_free);
|
gnome_wp_item_free);
|
||||||
|
|
||||||
capplet->thumbs = gnome_thumbnail_factory_new (GNOME_THUMBNAIL_SIZE_NORMAL);
|
capplet->thumbs = gnome_thumbnail_factory_new (GNOME_THUMBNAIL_SIZE_NORMAL);
|
||||||
capplet->theme = gtk_icon_theme_get_default ();
|
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (capplet->theme), "changed",
|
|
||||||
G_CALLBACK (gnome_wp_icon_theme_changed), capplet);
|
|
||||||
|
|
||||||
dialog = gnome_wp_create_dialog ();
|
dialog = gnome_wp_create_dialog ();
|
||||||
capplet->window = glade_xml_get_widget (dialog, "gnome_wp_properties");
|
capplet->window = glade_xml_get_widget (dialog, "gnome_wp_properties");
|
||||||
|
|
||||||
icon_info = gtk_icon_theme_lookup_icon (capplet->theme,
|
gtk_window_set_default_icon_name ("preferences-desktop-wallpaper");
|
||||||
"gnome-settings-background",
|
|
||||||
48, 0);
|
|
||||||
if (icon_info != NULL) {
|
|
||||||
pixbuf = gtk_icon_info_load_icon (icon_info, NULL);
|
|
||||||
gtk_icon_info_free (icon_info);
|
|
||||||
gtk_window_set_default_icon (pixbuf);
|
|
||||||
gtk_window_set_icon (GTK_WINDOW (capplet->window), pixbuf);
|
|
||||||
g_object_unref (pixbuf);
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_widget_realize (capplet->window);
|
gtk_widget_realize (capplet->window);
|
||||||
|
|
||||||
gtk_widget_ensure_style (capplet->window);
|
|
||||||
|
|
||||||
/* Drag and Drop Support */
|
/* Drag and Drop Support */
|
||||||
gtk_drag_dest_unset (capplet->window);
|
gtk_drag_dest_unset (capplet->window);
|
||||||
gtk_drag_dest_set (capplet->window, GTK_DEST_DEFAULT_ALL, drop_types,
|
gtk_drag_dest_set (capplet->window, GTK_DEST_DEFAULT_ALL, drop_types,
|
||||||
|
|
|
@ -63,7 +63,6 @@ struct _GnomeWPCapplet {
|
||||||
|
|
||||||
/* Thumbnailing and Icon Theme stuff */
|
/* Thumbnailing and Icon Theme stuff */
|
||||||
GnomeThumbnailFactory * thumbs;
|
GnomeThumbnailFactory * thumbs;
|
||||||
GtkIconTheme * theme;
|
|
||||||
|
|
||||||
/* Hash Table of Wallpapers */
|
/* Hash Table of Wallpapers */
|
||||||
GHashTable * wphash;
|
GHashTable * wphash;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue