diff options
author | Bastien Nocera <hadess@hadess.net> | 2012-04-26 11:07:08 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2012-04-26 11:07:08 +0100 |
commit | a3055b3202ca4446f15fa7941c25811a7b4e2f7c (patch) | |
tree | 2386ddfe7f1032207372f7a33bb5fabd78afae68 | |
parent | f102ca7363651cb2b815198018b3d389257e7610 (diff) | |
download | gnome-control-center-a3055b3202ca4446f15fa7941c25811a7b4e2f7c.tar.gz |
background: Ignore screenshots
Don't list screenshots coming from gnome-screenshot in our
Pictures source.
https://bugzilla.gnome.org/show_bug.cgi?id=672925
-rw-r--r-- | panels/background/bg-pictures-source.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/panels/background/bg-pictures-source.c b/panels/background/bg-pictures-source.c index 228803a41..80ffce7b1 100644 --- a/panels/background/bg-pictures-source.c +++ b/panels/background/bg-pictures-source.c @@ -138,6 +138,7 @@ picture_scaled (GObject *source_object, GError *error = NULL; GdkPixbuf *pixbuf; const char *source_url; + const char *software; GtkTreeIter iter; GtkListStore *store; @@ -154,6 +155,18 @@ picture_scaled (GObject *source_object, return; } + /* Ignore screenshots */ + software = gdk_pixbuf_get_option (pixbuf, "tEXt::Software"); + if (software != NULL && + g_str_equal (software, "gnome-screenshot")) + { + g_debug ("Ignored URL '%s' as it's a screenshot from gnome-screenshot", + cc_background_item_get_uri (item)); + g_object_unref (pixbuf); + g_object_unref (item); + return; + } + /* insert the item into the liststore */ gtk_list_store_insert_with_values (store, &iter, 0, 0, pixbuf, |