Commit 4bcb92e2 authored by John Sullivan's avatar John Sullivan
Browse files

reviewed by: Darin Adler <darin@eazel.com>

	Fixed bug 8024 (Default folder viewer chosen from "View As..."
	window is not reflected in Preferences dialog)

	* libnautilus-extensions/nautilus-global-preferences.h:
	Put iids for Icon and List view here since they must be accessed
	from multiple places now. Add NAUTILUS_DEFAULT_FOLDER_VIEWER_OTHER
	enum case. Add prototype for
	nautilus_global_preferences_set_default_folder_viewer.

	* libnautilus-extensions/nautilus-global-preferences.c:
	(get_default_folder_viewer_preference_from_iid): New helper function,
	returns appropriate NAUTILUS_DEFAULT_FOLDER_VIEWER preference value
	based on folder-viewing iid.
	(default_default_folder_viewer_callback): New function to determine
	default value of NAUTILUS_DEFAULT_FOLDER_VIEWER preference; uses
	gnome_vfs_mime (name is not a typo).
	(set_default_folder_viewer_in_gnome_vfs): New function,
	updates gnome-vfs mime database properly for new folder-viewing iid.
	(default_folder_viewer_changed_callback): New function, reacts
	to change in NAUTILUS_DEFAULT_FOLDER_VIEWER preference by updating
	gnome-vfs mime database (moved here from nautilus-application.c).
	(nautilus_global_preferences_set_default_folder_viewer): New public
	function to set the default folder viewer with an iid; handles setting
	both gnome-vfs and gconf's values.
	(nautilus_global_preferences_initialize): Add callback for when
	default folder viewer changes (moved here from nautilus-application.c).

	* libnautilus-extensions/nautilus-program-chooser.c:
	(set_default_for_type): Special-case folder viewer to call
	nautilus_global_preferences_set_default_folder_viewer.

	* src/file-manager/nautilus-directory-view-ui.xml: Changed
	"Reset to View Preferences" to "Reset View to Match Preferences".
	It's really long, but the former was very unclear. Improvements
	to wording are hereby solicited.

	* src/nautilus-application.c: (manufactures), (create_object),
	(default_folder_viewer_changed_callback): Updated for #define
	name changes.
	(nautilus_application_startup): Moved code that reacted to
	default folder viewer preference to nautilus-global-preferences.c.
parent e8ea90d2
2001-04-23 John Sullivan <sullivan@eazel.com>
reviewed by: Darin Adler <darin@eazel.com>
Fixed bug 8024 (Default folder viewer chosen from "View As..."
window is not reflected in Preferences dialog)
* libnautilus-extensions/nautilus-global-preferences.h:
Put iids for Icon and List view here since they must be accessed
from multiple places now. Add NAUTILUS_DEFAULT_FOLDER_VIEWER_OTHER
enum case. Add prototype for
nautilus_global_preferences_set_default_folder_viewer.
* libnautilus-extensions/nautilus-global-preferences.c:
(get_default_folder_viewer_preference_from_iid): New helper function,
returns appropriate NAUTILUS_DEFAULT_FOLDER_VIEWER preference value
based on folder-viewing iid.
(default_default_folder_viewer_callback): New function to determine
default value of NAUTILUS_DEFAULT_FOLDER_VIEWER preference; uses
gnome_vfs_mime (name is not a typo).
(set_default_folder_viewer_in_gnome_vfs): New function,
updates gnome-vfs mime database properly for new folder-viewing iid.
(default_folder_viewer_changed_callback): New function, reacts
to change in NAUTILUS_DEFAULT_FOLDER_VIEWER preference by updating
gnome-vfs mime database (moved here from nautilus-application.c).
(nautilus_global_preferences_set_default_folder_viewer): New public
function to set the default folder viewer with an iid; handles setting
both gnome-vfs and gconf's values.
(nautilus_global_preferences_initialize): Add callback for when
default folder viewer changes (moved here from nautilus-application.c).
* libnautilus-extensions/nautilus-program-chooser.c:
(set_default_for_type): Special-case folder viewer to call
nautilus_global_preferences_set_default_folder_viewer.
* src/file-manager/nautilus-directory-view-ui.xml: Changed
"Reset to View Preferences" to "Reset View to Match Preferences".
It's really long, but the former was very unclear. Improvements
to wording are hereby solicited.
* src/nautilus-application.c: (manufactures), (create_object),
(default_folder_viewer_changed_callback): Updated for #define
name changes.
(nautilus_application_startup): Moved code that reacted to
default folder viewer preference to nautilus-global-preferences.c.
2001-04-23 John Harper <jsh@eazel.com>
* nautilus-clean.sh: added `nautilus-news' to list of auxiliary
......
......@@ -39,6 +39,7 @@
#include <eel/eel-string.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-util.h>
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
#include <libgnomevfs/gnome-vfs-utils.h>
/* Constants */
......@@ -53,6 +54,7 @@ static void global_preferences_register_enumerations (void);
static gpointer default_font_callback (int user_level);
static gpointer default_smooth_font_callback (int user_level);
static gpointer default_home_location_callback (int user_level);
static gpointer default_default_folder_viewer_callback (int user_level);
static const char *default_smooth_font_auto_value;
static const char *icon_view_smooth_font_auto_value;
......@@ -545,7 +547,7 @@ static const PreferenceDefault preference_defaults[] = {
{ NAUTILUS_PREFERENCES_DEFAULT_FOLDER_VIEWER,
PREFERENCE_INTEGER,
NAUTILUS_USER_LEVEL_NOVICE,
{ NAUTILUS_USER_LEVEL_NOVICE, GINT_TO_POINTER (NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW) },
{ NAUTILUS_USER_LEVEL_NOVICE, NULL, default_default_folder_viewer_callback, NULL },
{ USER_LEVEL_NONE },
"default_folder_viewer"
},
......@@ -801,6 +803,38 @@ default_smooth_font_callback (int user_level)
return eel_font_manager_get_default_font ();
}
static int
get_default_folder_viewer_preference_from_iid (const char *iid)
{
g_return_val_if_fail (iid != NULL, NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW);
if (strcmp (iid, NAUTILUS_LIST_VIEW_IID) == 0) {
return NAUTILUS_DEFAULT_FOLDER_VIEWER_LIST_VIEW;
} else if (strcmp (iid, NAUTILUS_ICON_VIEW_IID) == 0) {
return NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW;
}
return NAUTILUS_DEFAULT_FOLDER_VIEWER_OTHER;
}
static gpointer
default_default_folder_viewer_callback (int user_level)
{
OAF_ServerInfo *oaf_info;
int result;
oaf_info = gnome_vfs_mime_get_default_component ("x-directory/normal");
g_return_val_if_fail (oaf_info != NULL, NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW);
result = get_default_folder_viewer_preference_from_iid (oaf_info->iid);
if (result == NAUTILUS_DEFAULT_FOLDER_VIEWER_OTHER) {
result = NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW;
}
CORBA_free (oaf_info);
return GINT_TO_POINTER (result);
}
static gpointer
default_home_location_callback (int user_level)
{
......@@ -909,6 +943,55 @@ smooth_graphics_mode_changed_callback (gpointer callback_data)
eel_smooth_widget_global_set_is_smooth (is_smooth);
}
static void
set_default_folder_viewer_in_gnome_vfs (const char *iid)
{
gnome_vfs_mime_set_default_action_type ("x-directory/normal", GNOME_VFS_MIME_ACTION_TYPE_COMPONENT);
gnome_vfs_mime_set_default_component ("x-directory/normal", iid);
}
/* Convert between gnome-vfs and gconf ways of storing this information. */
static void
default_folder_viewer_changed_callback (gpointer callback_data)
{
int preference_value;
const char *viewer_iid;
g_assert (callback_data == NULL);
preference_value =
nautilus_preferences_get_integer (NAUTILUS_PREFERENCES_DEFAULT_FOLDER_VIEWER);
if (preference_value == NAUTILUS_DEFAULT_FOLDER_VIEWER_LIST_VIEW) {
viewer_iid = NAUTILUS_LIST_VIEW_IID;
} else {
g_return_if_fail (preference_value == NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW);
viewer_iid = NAUTILUS_ICON_VIEW_IID;
}
set_default_folder_viewer_in_gnome_vfs (viewer_iid);
}
void
nautilus_global_preferences_set_default_folder_viewer (const char *iid)
{
int viewer_preference;
set_default_folder_viewer_in_gnome_vfs (iid);
viewer_preference = get_default_folder_viewer_preference_from_iid (iid);
/* If viewer is set to one that the Preferences dialog doesn't know about,
* just change the underlying gnome-vfs setting but leave the Preferences dialog alone.
*/
if (viewer_preference == NAUTILUS_DEFAULT_FOLDER_VIEWER_OTHER) {
return;
}
nautilus_preferences_set_integer (NAUTILUS_PREFERENCES_DEFAULT_FOLDER_VIEWER,
viewer_preference);
}
void
nautilus_global_preferences_initialize (void)
{
......@@ -940,6 +1023,10 @@ nautilus_global_preferences_initialize (void)
smooth_graphics_mode_changed_callback,
NULL);
nautilus_preferences_add_callback (NAUTILUS_PREFERENCES_DEFAULT_FOLDER_VIEWER,
default_folder_viewer_changed_callback,
NULL);
/* Keep track of smooth graphics mode changes in order to notify the smooth
* widget machinery.
*/
......
......@@ -103,9 +103,15 @@ BEGIN_GNOME_DECLS
enum
{
NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW,
NAUTILUS_DEFAULT_FOLDER_VIEWER_LIST_VIEW
NAUTILUS_DEFAULT_FOLDER_VIEWER_LIST_VIEW,
NAUTILUS_DEFAULT_FOLDER_VIEWER_OTHER
};
/* These IIDs are used by the preferences code and in nautilus-application.c */
#define NAUTILUS_ICON_VIEW_IID "OAFIID:nautilus_file_manager_icon_view:42681b21-d5ca-4837-87d2-394d88ecc058"
#define NAUTILUS_LIST_VIEW_IID "OAFIID:nautilus_file_manager_list_view:521e489d-0662-4ad7-ac3a-832deabe111c"
/* Icon View */
#define NAUTILUS_PREFERENCES_ICON_VIEW_DEFAULT_SORT_IN_REVERSE_ORDER "icon-view/default_sort_in_reverse_order"
#define NAUTILUS_PREFERENCES_ICON_VIEW_DEFAULT_SORT_ORDER "icon-view/default_sort_order"
......@@ -174,6 +180,9 @@ struct EelScalableFont *nautilus_global_preferences_get_icon_view_smooth_font
struct EelScalableFont *nautilus_global_preferences_get_default_smooth_font (void);
struct EelScalableFont *nautilus_global_preferences_get_default_smooth_bold_font (void);
void nautilus_global_preferences_set_default_folder_viewer (const char *iid);
END_GNOME_DECLS
#endif /* NAUTILUS_PREFS_GLOBAL_H */
......@@ -28,6 +28,7 @@
#include <eel/eel-gnome-extensions.h>
#include <eel/eel-gtk-extensions.h>
#include "nautilus-global-preferences.h"
#include "nautilus-mime-actions.h"
#include "nautilus-program-choosing.h"
#include <eel/eel-stock-dialogs.h>
......@@ -897,7 +898,11 @@ set_default_for_type (ProgramFilePair *pair)
if (pair->action_type == GNOME_VFS_MIME_ACTION_TYPE_APPLICATION) {
gnome_vfs_mime_set_default_application (mime_type, pair->application->id);
} else {
gnome_vfs_mime_set_default_component (mime_type, pair->view_identifier->iid);
if (g_strcasecmp (mime_type, "x-directory/normal") == 0) {
nautilus_global_preferences_set_default_folder_viewer (pair->view_identifier->iid);
} else {
gnome_vfs_mime_set_default_component (mime_type, pair->view_identifier->iid);
}
}
gnome_vfs_mime_set_default_action_type (mime_type, pair->action_type);
......
......@@ -39,6 +39,7 @@
#include <eel/eel-string.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-util.h>
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
#include <libgnomevfs/gnome-vfs-utils.h>
/* Constants */
......@@ -53,6 +54,7 @@ static void global_preferences_register_enumerations (void);
static gpointer default_font_callback (int user_level);
static gpointer default_smooth_font_callback (int user_level);
static gpointer default_home_location_callback (int user_level);
static gpointer default_default_folder_viewer_callback (int user_level);
static const char *default_smooth_font_auto_value;
static const char *icon_view_smooth_font_auto_value;
......@@ -545,7 +547,7 @@ static const PreferenceDefault preference_defaults[] = {
{ NAUTILUS_PREFERENCES_DEFAULT_FOLDER_VIEWER,
PREFERENCE_INTEGER,
NAUTILUS_USER_LEVEL_NOVICE,
{ NAUTILUS_USER_LEVEL_NOVICE, GINT_TO_POINTER (NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW) },
{ NAUTILUS_USER_LEVEL_NOVICE, NULL, default_default_folder_viewer_callback, NULL },
{ USER_LEVEL_NONE },
"default_folder_viewer"
},
......@@ -801,6 +803,38 @@ default_smooth_font_callback (int user_level)
return eel_font_manager_get_default_font ();
}
static int
get_default_folder_viewer_preference_from_iid (const char *iid)
{
g_return_val_if_fail (iid != NULL, NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW);
if (strcmp (iid, NAUTILUS_LIST_VIEW_IID) == 0) {
return NAUTILUS_DEFAULT_FOLDER_VIEWER_LIST_VIEW;
} else if (strcmp (iid, NAUTILUS_ICON_VIEW_IID) == 0) {
return NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW;
}
return NAUTILUS_DEFAULT_FOLDER_VIEWER_OTHER;
}
static gpointer
default_default_folder_viewer_callback (int user_level)
{
OAF_ServerInfo *oaf_info;
int result;
oaf_info = gnome_vfs_mime_get_default_component ("x-directory/normal");
g_return_val_if_fail (oaf_info != NULL, NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW);
result = get_default_folder_viewer_preference_from_iid (oaf_info->iid);
if (result == NAUTILUS_DEFAULT_FOLDER_VIEWER_OTHER) {
result = NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW;
}
CORBA_free (oaf_info);
return GINT_TO_POINTER (result);
}
static gpointer
default_home_location_callback (int user_level)
{
......@@ -909,6 +943,55 @@ smooth_graphics_mode_changed_callback (gpointer callback_data)
eel_smooth_widget_global_set_is_smooth (is_smooth);
}
static void
set_default_folder_viewer_in_gnome_vfs (const char *iid)
{
gnome_vfs_mime_set_default_action_type ("x-directory/normal", GNOME_VFS_MIME_ACTION_TYPE_COMPONENT);
gnome_vfs_mime_set_default_component ("x-directory/normal", iid);
}
/* Convert between gnome-vfs and gconf ways of storing this information. */
static void
default_folder_viewer_changed_callback (gpointer callback_data)
{
int preference_value;
const char *viewer_iid;
g_assert (callback_data == NULL);
preference_value =
nautilus_preferences_get_integer (NAUTILUS_PREFERENCES_DEFAULT_FOLDER_VIEWER);
if (preference_value == NAUTILUS_DEFAULT_FOLDER_VIEWER_LIST_VIEW) {
viewer_iid = NAUTILUS_LIST_VIEW_IID;
} else {
g_return_if_fail (preference_value == NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW);
viewer_iid = NAUTILUS_ICON_VIEW_IID;
}
set_default_folder_viewer_in_gnome_vfs (viewer_iid);
}
void
nautilus_global_preferences_set_default_folder_viewer (const char *iid)
{
int viewer_preference;
set_default_folder_viewer_in_gnome_vfs (iid);
viewer_preference = get_default_folder_viewer_preference_from_iid (iid);
/* If viewer is set to one that the Preferences dialog doesn't know about,
* just change the underlying gnome-vfs setting but leave the Preferences dialog alone.
*/
if (viewer_preference == NAUTILUS_DEFAULT_FOLDER_VIEWER_OTHER) {
return;
}
nautilus_preferences_set_integer (NAUTILUS_PREFERENCES_DEFAULT_FOLDER_VIEWER,
viewer_preference);
}
void
nautilus_global_preferences_initialize (void)
{
......@@ -940,6 +1023,10 @@ nautilus_global_preferences_initialize (void)
smooth_graphics_mode_changed_callback,
NULL);
nautilus_preferences_add_callback (NAUTILUS_PREFERENCES_DEFAULT_FOLDER_VIEWER,
default_folder_viewer_changed_callback,
NULL);
/* Keep track of smooth graphics mode changes in order to notify the smooth
* widget machinery.
*/
......
......@@ -103,9 +103,15 @@ BEGIN_GNOME_DECLS
enum
{
NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW,
NAUTILUS_DEFAULT_FOLDER_VIEWER_LIST_VIEW
NAUTILUS_DEFAULT_FOLDER_VIEWER_LIST_VIEW,
NAUTILUS_DEFAULT_FOLDER_VIEWER_OTHER
};
/* These IIDs are used by the preferences code and in nautilus-application.c */
#define NAUTILUS_ICON_VIEW_IID "OAFIID:nautilus_file_manager_icon_view:42681b21-d5ca-4837-87d2-394d88ecc058"
#define NAUTILUS_LIST_VIEW_IID "OAFIID:nautilus_file_manager_list_view:521e489d-0662-4ad7-ac3a-832deabe111c"
/* Icon View */
#define NAUTILUS_PREFERENCES_ICON_VIEW_DEFAULT_SORT_IN_REVERSE_ORDER "icon-view/default_sort_in_reverse_order"
#define NAUTILUS_PREFERENCES_ICON_VIEW_DEFAULT_SORT_ORDER "icon-view/default_sort_order"
......@@ -174,6 +180,9 @@ struct EelScalableFont *nautilus_global_preferences_get_icon_view_smooth_font
struct EelScalableFont *nautilus_global_preferences_get_default_smooth_font (void);
struct EelScalableFont *nautilus_global_preferences_get_default_smooth_bold_font (void);
void nautilus_global_preferences_set_default_folder_viewer (const char *iid);
END_GNOME_DECLS
#endif /* NAUTILUS_PREFS_GLOBAL_H */
......@@ -28,6 +28,7 @@
#include <eel/eel-gnome-extensions.h>
#include <eel/eel-gtk-extensions.h>
#include "nautilus-global-preferences.h"
#include "nautilus-mime-actions.h"
#include "nautilus-program-choosing.h"
#include <eel/eel-stock-dialogs.h>
......@@ -897,7 +898,11 @@ set_default_for_type (ProgramFilePair *pair)
if (pair->action_type == GNOME_VFS_MIME_ACTION_TYPE_APPLICATION) {
gnome_vfs_mime_set_default_application (mime_type, pair->application->id);
} else {
gnome_vfs_mime_set_default_component (mime_type, pair->view_identifier->iid);
if (g_strcasecmp (mime_type, "x-directory/normal") == 0) {
nautilus_global_preferences_set_default_folder_viewer (pair->view_identifier->iid);
} else {
gnome_vfs_mime_set_default_component (mime_type, pair->view_identifier->iid);
}
}
gnome_vfs_mime_set_default_action_type (mime_type, pair->action_type);
......
......@@ -34,7 +34,7 @@
_label="Remove Custom Images"
_tip="Remove any custom images from selected icons"/>
<cmd name="Reset to Defaults"
_label="Reset to View Preferences"
_label="Reset View to Match Preferences"
_tip="Reset sorting order and zoom level to match preferences for this view"/>
<cmd name="Reset Background"
_label="Reset Background"
......@@ -166,7 +166,7 @@
<submenu name="View">
<placeholder name="View Preferences Placeholder">
<menuitem name="Reset to Defaults"
_label="Reset to View _Preferences"
_label="Reset View to Match _Preferences"
verb="Reset to Defaults"/>
</placeholder>
</submenu>
......
......@@ -64,8 +64,6 @@
#include <liboaf/liboaf.h>
#define FACTORY_IID "OAFIID:nautilus_factory:bd1e1862-92d7-4391-963e-37583f0daef3"
#define ICON_VIEW_IID "OAFIID:nautilus_file_manager_icon_view:42681b21-d5ca-4837-87d2-394d88ecc058"
#define LIST_VIEW_IID "OAFIID:nautilus_file_manager_list_view:521e489d-0662-4ad7-ac3a-832deabe111c"
#define SEARCH_LIST_VIEW_IID "OAFIID:nautilus_file_manager_search_list_view:b186e381-198e-43cf-9c46-60b6bb35db0b"
#define SHELL_IID "OAFIID:nautilus_shell:cd5183b2-3913-4b74-9b8e-10528b0de08d"
......@@ -115,9 +113,9 @@ manufactures (PortableServer_Servant servant,
const CORBA_char *iid,
CORBA_Environment *ev)
{
return strcmp (iid, ICON_VIEW_IID) == 0
return strcmp (iid, NAUTILUS_ICON_VIEW_IID) == 0
|| strcmp (iid, NAUTILUS_DESKTOP_ICON_VIEW_IID) == 0
|| strcmp (iid, LIST_VIEW_IID) == 0
|| strcmp (iid, NAUTILUS_LIST_VIEW_IID) == 0
|| strcmp (iid, SEARCH_LIST_VIEW_IID) == 0
|| strcmp (iid, SHELL_IID) == 0
|| strcmp (iid, METAFILE_FACTORY_IID) == 0;
......@@ -133,13 +131,13 @@ create_object (PortableServer_Servant servant,
FMDirectoryView *directory_view;
NautilusApplication *application;
if (strcmp (iid, ICON_VIEW_IID) == 0) {
if (strcmp (iid, NAUTILUS_ICON_VIEW_IID) == 0) {
directory_view = FM_DIRECTORY_VIEW (gtk_object_new (fm_icon_view_get_type (), NULL));
object = BONOBO_OBJECT (fm_directory_view_get_nautilus_view (directory_view));
} else if (strcmp (iid, NAUTILUS_DESKTOP_ICON_VIEW_IID) == 0) {
directory_view = FM_DIRECTORY_VIEW (gtk_object_new (fm_desktop_icon_view_get_type (), NULL));
object = BONOBO_OBJECT (fm_directory_view_get_nautilus_view (directory_view));
} else if (strcmp (iid, LIST_VIEW_IID) == 0) {
} else if (strcmp (iid, NAUTILUS_LIST_VIEW_IID) == 0) {
directory_view = FM_DIRECTORY_VIEW (gtk_object_new (fm_list_view_get_type (), NULL));
object = BONOBO_OBJECT (fm_directory_view_get_nautilus_view (directory_view));
} else if (strcmp (iid, SEARCH_LIST_VIEW_IID) == 0) {
......@@ -336,37 +334,6 @@ nautilus_make_uri_list_from_shell_strv (const char * const *strv)
return uri_list;
}
/* This is a bit of a hack to make the Preferences dialog version of the List View/Icon View
* default choice work with the gnome-vfs-based mechanism for choosing a handler for a MIME type.
*/
static void
default_folder_viewer_changed_callback (gpointer callback_data)
{
int preference_value;
const char *viewer_iid;
g_assert (callback_data == NULL);
preference_value =
nautilus_preferences_get_integer (NAUTILUS_PREFERENCES_DEFAULT_FOLDER_VIEWER);
if (preference_value == NAUTILUS_DEFAULT_FOLDER_VIEWER_LIST_VIEW) {
viewer_iid = LIST_VIEW_IID;
} else {
g_return_if_fail (preference_value == NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW);
viewer_iid = ICON_VIEW_IID;
}
gnome_vfs_mime_set_default_action_type ("x-directory/normal", GNOME_VFS_MIME_ACTION_TYPE_COMPONENT);
gnome_vfs_mime_set_default_component ("x-directory/normal", viewer_iid);
/* FIXME bugzilla.eazel.com 8024:
* when preference changes, we tell gnome-vfs. But if gnome-vfs value changes
* some other way, preferences mechanism isn't told, so value displayed in
* preferences dialog might be incorrect.
*/
}
void
nautilus_application_startup (NautilusApplication *application,
gboolean kill_shell,
......@@ -539,11 +506,6 @@ nautilus_application_startup (NautilusApplication *application,
NULL,
GTK_OBJECT (application));
nautilus_preferences_add_callback_while_alive (NAUTILUS_PREFERENCES_DEFAULT_FOLDER_VIEWER,
default_folder_viewer_changed_callback,
NULL,
GTK_OBJECT (application));
/* CORBA C mapping doesn't allow NULL to be passed
for string parameters */
corba_geometry = (geometry != NULL) ? geometry : "";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment