diff options
author | Seth Nickell <snickell@stanford.edu> | 2001-04-20 00:59:00 +0000 |
---|---|---|
committer | Seth Nickell <seth@src.gnome.org> | 2001-04-20 00:59:00 +0000 |
commit | 7245763900b5b466e93fd4accd1d59ef19120048 (patch) | |
tree | 6edbbe715d6e08333bddc6d9708b733156f533b0 /libnautilus-private/nautilus-file-utilities.c | |
parent | 03814a9e963be35e3a248a81824b676095c95952 (diff) | |
download | nautilus-7245763900b5b466e93fd4accd1d59ef19120048.tar.gz |
reviewed by: Darin Adler <darin@eazel.com>
2001-04-19 Seth Nickell <snickell@stanford.edu>
reviewed by: Darin Adler <darin@eazel.com>
* libnautilus-extensions/nautilus-global-preferences.c:
* libnautilus-extensions/nautilus-global-preferences.h:
Add a preference for having the desktop directory point at the
Unix homedir rather than the default Nautilus desktop directory.
* libnautilus-extensions/nautilus-file-utilities.c:
(nautilus_get_desktop_directory):
Check the preference and return the appropriate directory.
* src/nautilus-application.c: (nautilus_application_startup),
(confirm_ok_to_run_as_root), (desktop_location_changed_callback):
Add a callback for updating the desktop when the preference
changes.
* src/nautilus-desktop-window.h:
* src/nautilus-desktop-window.c:
(nautilus_desktop_window_update_directory),
(nautilus_desktop_window_new):
Add boolean variable affect_desktop_on_next_location_change to
allow reloading of the desktop dir (rather than loading on open
in to a new/toplevel window). Add a function for telling the
desktop window to point to the updated destkop location.
* src/nautilus-window-manage-views.c: (open_location):
Check whether this open should be done in the desktop itself or
if we should open a new window (/ recycle an existing window).
Diffstat (limited to 'libnautilus-private/nautilus-file-utilities.c')
-rw-r--r-- | libnautilus-private/nautilus-file-utilities.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libnautilus-private/nautilus-file-utilities.c b/libnautilus-private/nautilus-file-utilities.c index d015879cd..74102bb57 100644 --- a/libnautilus-private/nautilus-file-utilities.c +++ b/libnautilus-private/nautilus-file-utilities.c @@ -25,6 +25,7 @@ #include <config.h> #include "nautilus-file-utilities.h" +#include "nautilus-global-preferences.h" #include "nautilus-lib-self-check-functions.h" #include "nautilus-link-set.h" #include "nautilus-metadata.h" @@ -138,9 +139,13 @@ nautilus_get_desktop_directory (void) { char *desktop_directory, *user_directory; - user_directory = nautilus_get_user_directory (); - desktop_directory = nautilus_make_path (user_directory, DESKTOP_DIRECTORY_NAME); - g_free (user_directory); + if (nautilus_preferences_get_boolean (NAUTILUS_PREFERENCES_DESKTOP_IS_HOME_DIR)) { + desktop_directory = strdup (g_get_home_dir()); + } else { + user_directory = nautilus_get_user_directory (); + desktop_directory = nautilus_make_path (user_directory, DESKTOP_DIRECTORY_NAME); + g_free (user_directory); + } if (!g_file_exists (desktop_directory)) { mkdir (desktop_directory, DEFAULT_DESKTOP_DIRECTORY_MODE); |