diff options
author | Alexander Larsson <alexl@redhat.com> | 2003-11-06 16:07:05 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2003-11-06 16:07:05 +0000 |
commit | e162b7dceb9596fa4a7d8a898d64b7c9031fd654 (patch) | |
tree | e7d763186488c9bb899f400f41ff8d41d2768573 /src/nautilus-main.c | |
parent | 3613a86b2039395b3ee229c901a00e35b85865b6 (diff) | |
download | nautilus-e162b7dceb9596fa4a7d8a898d64b7c9031fd654.tar.gz |
New desktop files
2003-11-06 Alexander Larsson <alexl@redhat.com>
* Makefile.am:
* nautilus-computer.desktop.in:
* nautilus-home.desktop.in:
New desktop files
* nautilus.desktop.in:
Make this one "browse filesystem"
* libnautilus-private/apps_nautilus_preferences.schemas.in:
* libnautilus-private/nautilus-global-preferences.c:
* libnautilus-private/nautilus-global-preferences.h:
computer desktop icon prefs
* libnautilus-private/nautilus-desktop-icon-file.c:
(update_info_from_link): Set permissions too
* libnautilus-private/nautilus-desktop-link-monitor.c:
* libnautilus-private/nautilus-desktop-link.[ch]:
Add computer icon
* src/Makefile.am:
* src/nautilus-connect-server-dialog.[ch]:
Connect server dialog
* src/file-manager/fm-directory-view.c:
Mount drives on activation.
* src/file-manager/fm-icon-container.c:
Sort computer first
* src/file-manager/fm-properties-window.c:
Put back NautilusDesktopLink handling for e.g. computer and home.
* src/nautilus-application.[ch]:
Reload dirs on mounts.
add browser_window argument on open window
* src/nautilus-main.c:
add browser_window argument on open window (--browser)
hack to register computer icon
* src/nautilus-shell-interface.idl:
* src/nautilus-shell.c:
add browser_window argument on open window
* src/nautilus-navigation-window-ui.xml:
* src/nautilus-spatial-window-ui.xml:
* src/nautilus-window-menus.c:
Add connect to server
Add computer
* src/nautilus-window.c:
Nice title for burn:///
Diffstat (limited to 'src/nautilus-main.c')
-rw-r--r-- | src/nautilus-main.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/nautilus-main.c b/src/nautilus-main.c index d451f7f4c..69c2d4a79 100644 --- a/src/nautilus-main.c +++ b/src/nautilus-main.c @@ -43,6 +43,7 @@ #include <eel/eel-self-checks.h> #include <gdk/gdkx.h> #include <gtk/gtkmain.h> +#include <gtk/gtkiconfactory.h> #include <gtk/gtksignal.h> #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-init.h> @@ -126,12 +127,49 @@ nautilus_main_event_loop_quit (void) } } +static void +register_icons (void) +{ + GnomeIconTheme *icon_theme; + char *icon; + GtkIconSource *source; + GtkIconSet *set; + GtkIconFactory *factory; + + icon_theme = nautilus_icon_factory_get_icon_theme (); + icon = gnome_icon_theme_lookup_icon (icon_theme, "gnome-fs-client", 48, + NULL, NULL); + if (icon != NULL) { + factory = gtk_icon_factory_new (); + gtk_icon_factory_add_default (factory); + + source = gtk_icon_source_new (); + gtk_icon_source_set_filename (source, icon); + g_free (icon); + + set = gtk_icon_set_new (); + gtk_icon_set_add_source (set, source); + + gtk_icon_factory_add (factory, "gnome-fs-client", set); + gtk_icon_set_unref (set); + + gtk_icon_source_free (source); + + g_object_unref (factory); + } + + g_object_unref (icon_theme); + + +} + int main (int argc, char *argv[]) { gboolean kill_shell; gboolean restart_shell; gboolean no_default_window; + gboolean browser_window; gboolean no_desktop; char *geometry; gboolean perform_self_check; @@ -154,6 +192,8 @@ main (int argc, char *argv[]) N_("Only create windows for explicitly specified URIs."), NULL }, { "no-desktop", '\0', POPT_ARG_NONE, NULL, 0, N_("Do not manage the desktop (ignore the preference set in the preferences dialog)."), NULL }, + { "browser", '\0', POPT_ARG_NONE, NULL, 0, + N_("open a browser window."), NULL }, { "quit", 'q', POPT_ARG_NONE, NULL, 0, N_("Quit Nautilus."), NULL }, { "restart", '\0', POPT_ARG_NONE | POPT_ARGFLAG_DOC_HIDDEN, NULL, 0, @@ -168,6 +208,7 @@ main (int argc, char *argv[]) options[i++].arg = &geometry; options[i++].arg = &no_default_window; options[i++].arg = &no_desktop; + options[i++].arg = &browser_window; options[i++].arg = &kill_shell; options[i++].arg = &restart_shell; @@ -187,6 +228,7 @@ main (int argc, char *argv[]) no_desktop = FALSE; perform_self_check = FALSE; restart_shell = FALSE; + browser_window = FALSE; g_set_application_name (_("File Manager")); @@ -196,6 +238,8 @@ main (int argc, char *argv[]) GNOME_PARAM_POPT_TABLE, options, GNOME_PARAM_HUMAN_READABLE_NAME, _("Nautilus"), NULL); + + register_icons (); /* Need to set this to the canonical DISPLAY value, since thats where we're registering per-display components */ @@ -276,6 +320,7 @@ main (int argc, char *argv[]) (application, kill_shell, restart_shell, no_default_window, no_desktop, !(kill_shell || restart_shell), + browser_window, geometry, args); if (is_event_loop_needed ()) { |