summaryrefslogtreecommitdiff
path: root/capplets
diff options
context:
space:
mode:
authorRodney Dawes <dobey@ximian.com>2004-02-04 22:04:14 +0000
committerRodney Dawes <dobey@src.gnome.org>2004-02-04 22:04:14 +0000
commit28010e25e8e32c6fc097469684ebe3ad68b24cc6 (patch)
treef0c041992a43d2cc1ad10a813c841c26a76406af /capplets
parent5601029af792b264e1b967dcaf2aabcd501b4cd4 (diff)
downloadgnome-control-center-28010e25e8e32c6fc097469684ebe3ad68b24cc6.tar.gz
Use "Desktop Background" as name and change the Comment line to a verb
2004-02-04 Rodney Dawes <dobey@ximian.com> * background.desktop.in: Use "Desktop Background" as name and change the Comment line to a verb phrase as per the HIG * gnome-wp-capplet.c (gnome_wp_load_stuffs): Fix a little bug so that opening the capplet with "No Wallpaper" set, actually works (wallpaper_properties_init): "Desktop Background Preferences"
Diffstat (limited to 'capplets')
-rw-r--r--capplets/background/ChangeLog8
-rw-r--r--capplets/background/background.desktop.in4
-rw-r--r--capplets/background/gnome-wp-capplet.c25
3 files changed, 30 insertions, 7 deletions
diff --git a/capplets/background/ChangeLog b/capplets/background/ChangeLog
index f9ecdb42c..1fdb67e25 100644
--- a/capplets/background/ChangeLog
+++ b/capplets/background/ChangeLog
@@ -1,3 +1,11 @@
+2004-02-04 Rodney Dawes <dobey@ximian.com>
+
+ * background.desktop.in: Use "Desktop Background" as name and change
+ the Comment line to a verb phrase as per the HIG
+ * gnome-wp-capplet.c (gnome_wp_load_stuffs): Fix a little bug so that
+ opening the capplet with "No Wallpaper" set, actually works
+ (wallpaper_properties_init): "Desktop Background Preferences"
+
2004-02-01 Rodney Dawes <dobey@ximian.com>
* Makefile.am: Switch the binary name to gnome-background-properties,
diff --git a/capplets/background/background.desktop.in b/capplets/background/background.desktop.in
index f00619d1c..49be17aba 100644
--- a/capplets/background/background.desktop.in
+++ b/capplets/background/background.desktop.in
@@ -1,7 +1,7 @@
[Desktop Entry]
Encoding=UTF-8
-_Name=Desktop Wallpaper
-_Comment=Desktop Wallpaper Preferences
+_Name=Desktop Background
+_Comment=Change your Desktop Background settings
Exec=gnome-background-properties
Icon=gnome-settings-background
Terminal=false
diff --git a/capplets/background/gnome-wp-capplet.c b/capplets/background/gnome-wp-capplet.c
index 16a0d6ea9..7db7f1035 100644
--- a/capplets/background/gnome-wp-capplet.c
+++ b/capplets/background/gnome-wp-capplet.c
@@ -697,10 +697,14 @@ static void gnome_wp_remove_wallpaper (GtkWidget * widget,
static gboolean gnome_wp_load_stuffs (void * data) {
GnomeWPCapplet * capplet = (GnomeWPCapplet *) data;
- gchar * imagepath;
+ gchar * imagepath, * style;
GnomeWPItem * item;
GtkTreePath * path;
+ style = gconf_client_get_string (capplet->client,
+ WP_OPTIONS_KEY,
+ NULL);
+
gnome_wp_xml_load_list (capplet);
g_hash_table_foreach (capplet->wphash, (GHFunc) wp_props_load_wallpaper,
capplet);
@@ -710,8 +714,9 @@ static gboolean gnome_wp_load_stuffs (void * data) {
imagepath = gconf_client_get_string (capplet->client,
WP_FILE_KEY,
NULL);
+
item = g_hash_table_lookup (capplet->wphash, imagepath);
- if (item != NULL) {
+ if (item != NULL && strcmp (style, "none") != 0) {
if (item->deleted == TRUE) {
item->deleted = FALSE;
wp_props_load_wallpaper (item->filename, item, capplet);
@@ -735,7 +740,7 @@ static gboolean gnome_wp_load_stuffs (void * data) {
item->scolor->red,
item->scolor->green,
item->scolor->blue, 65535);
- } else {
+ } else if (strcmp (style, "none") != 0) {
GdkColor color1, color2;
item = g_new0 (GnomeWPItem, 1);
@@ -790,7 +795,6 @@ static gboolean gnome_wp_load_stuffs (void * data) {
gnome_wp_item_free (item);
}
}
- g_free (imagepath);
item = g_hash_table_lookup (capplet->wphash, "(none)");
if (item == NULL) {
@@ -829,7 +833,18 @@ static gboolean gnome_wp_load_stuffs (void * data) {
item->deleted = FALSE;
wp_props_load_wallpaper (item->filename, item, capplet);
}
+
+ if (!strcmp (style, "none")) {
+ path = gtk_tree_row_reference_get_path (item->rowref);
+ gtk_tree_view_set_cursor (GTK_TREE_VIEW (capplet->treeview), path,
+ NULL, FALSE);
+ gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (capplet->treeview),
+ path, NULL, TRUE, 0.5, 0.0);
+ gtk_tree_path_free (path);
+ }
}
+ g_free (imagepath);
+ g_free (style);
return FALSE;
}
@@ -1150,7 +1165,7 @@ static void wallpaper_properties_init (void) {
capplet->window = gtk_dialog_new ();
gtk_window_set_title (GTK_WINDOW (capplet->window),
- _("Desktop Wallpaper Preferences"));
+ _("Desktop Background Preferences"));
gtk_dialog_set_has_separator (GTK_DIALOG (capplet->window), FALSE);
gtk_window_set_default_size (GTK_WINDOW (capplet->window), 360, 418);