Select the added image, and change the scaling type to "wallpaper" if it

2004-03-04  Rodney Dawes  <dobey@ximian.com>

	* gnome-wp-capplet.c (gnome_wp_add_image): Select the added image, and
	change the scaling type to "wallpaper" if it is "none" (#136228)

	Fixes #136228
This commit is contained in:
Rodney Dawes 2004-03-05 04:27:57 +00:00 committed by Rodney Dawes
parent dfd64c7e44
commit 98fa7158e5
2 changed files with 23 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2004-03-04 Rodney Dawes <dobey@ximian.com>
* gnome-wp-capplet.c (gnome_wp_add_image): Select the added image, and
change the scaling type to "wallpaper" if it is "none" (#136228)
Fixes #136228
2004-02-29 Rodney Dawes <dobey@ximian.com>
* gnome-wp-capplet.c (gnome_wp_add_image): Split out real image adding

View file

@ -77,6 +77,7 @@ static void wp_properties_help (GtkWindow * parent, char const * helpfile,
static void gnome_wp_add_image (GnomeWPCapplet * capplet,
const gchar * filename) {
GnomeWPItem * item;
GtkTreePath * path;
GdkColor color1, color2;
item = g_hash_table_lookup (capplet->wphash, filename);
@ -124,11 +125,25 @@ static void gnome_wp_add_image (GnomeWPCapplet * capplet,
item->options = gconf_client_get_string (capplet->client,
WP_OPTIONS_KEY,
NULL);
if (!strcmp (item->options, "none")) {
item->options = g_strdup ("wallpaper");
}
gnome_wp_item_update_description (item);
g_hash_table_insert (capplet->wphash, g_strdup (item->filename), item);
wp_props_load_wallpaper (item->filename, item, capplet);
gconf_client_set_string (capplet->client, WP_FILE_KEY,
item->filename, NULL);
gconf_client_set_string (capplet->client, WP_OPTIONS_KEY,
item->options, NULL);
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);
} else {
gnome_wp_item_free (item);
}