summaryrefslogtreecommitdiff
path: root/mate-screenshot/mate-screenshot.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-15 23:35:11 +0100
committerinfirit <[email protected]>2014-12-15 23:35:11 +0100
commit21c397d825cb06890efb0e847c13b9c3c6254db0 (patch)
treece4585dc99019a7cfaee5526eda2ed4f4af90b51 /mate-screenshot/mate-screenshot.c
parent4fbdbe250e0cee0c76ffb521b658c93f192539f8 (diff)
downloadmate-utils-21c397d825cb06890efb0e847c13b9c3c6254db0.tar.bz2
mate-utils-21c397d825cb06890efb0e847c13b9c3c6254db0.tar.xz
mate-screenshot: simplify get_desktop_dir()
Diffstat (limited to 'mate-screenshot/mate-screenshot.c')
-rw-r--r--mate-screenshot/mate-screenshot.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/mate-screenshot/mate-screenshot.c b/mate-screenshot/mate-screenshot.c
index 0e122b47..40d10d06 100644
--- a/mate-screenshot/mate-screenshot.c
+++ b/mate-screenshot/mate-screenshot.c
@@ -1120,34 +1120,8 @@ prepare_screenshot_timeout (gpointer data)
static gchar *
get_desktop_dir (void)
{
- gboolean desktop_is_home_dir = FALSE;
gchar *desktop_dir;
- const char * const *schemas;
- gboolean schema_exists = FALSE;
- gint i;
-
- /* Check if caja schema is installed before trying to read settings */
- schemas = g_settings_list_schemas ();
- for (i = 0; schemas[i] != NULL; i++) {
- if (g_strcmp0 (schemas[i], CAJA_PREFERENCES_SCHEMA) == 0) {
- schema_exists = TRUE;
- break;
- }
- }
-
- if (schema_exists) {
- GSettings *caja_prefs;
-
- caja_prefs = g_settings_new (CAJA_PREFERENCES_SCHEMA);
- desktop_is_home_dir = g_settings_get_boolean (caja_prefs, "desktop-is-home-dir");
-
- g_object_unref (caja_prefs);
- }
-
- if (desktop_is_home_dir)
- desktop_dir = g_strconcat ("file://", g_get_home_dir (), NULL);
- else
- desktop_dir = g_strconcat ("file://", g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP), NULL);
+ desktop_dir = g_strconcat ("file://", g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP), NULL);
return desktop_dir;
}