nautilus r14024 - in trunk: . libnautilus-private src src/file-manager



Author: cneumair
Date: Tue Apr  1 19:09:33 2008
New Revision: 14024
URL: http://svn.gnome.org/viewvc/nautilus?rev=14024&view=rev

Log:
2008-04-01  Christian Neumair  <cneumair gnome org>

	* libnautilus-private/nautilus-view-factory.h:
	* src/file-manager/fm-desktop-icon-view.c
	(fm_desktop_icon_view_register):
	* src/file-manager/fm-icon-view.c:
	* src/file-manager/fm-list-view.c (fm_list_view_register):
	* src/nautilus-navigation-window.c (load_view_as_menu):
	* src/nautilus-window-manage-views.c:
	* src/nautilus-window-manage-views.h:
	* src/nautilus-window.c (add_view_as_menu_item):
	Remove unused "label" field of NautilusViewInfo and
	nautilus_window_get_view_label().
	Rename two other fields of NautilusViewInfo and make their use
	more explicit. Remove redundand "View" from view menu label.


Modified:
   trunk/ChangeLog
   trunk/libnautilus-private/nautilus-view-factory.h
   trunk/src/file-manager/fm-desktop-icon-view.c
   trunk/src/file-manager/fm-icon-view.c
   trunk/src/file-manager/fm-list-view.c
   trunk/src/nautilus-navigation-window.c
   trunk/src/nautilus-window-manage-views.c
   trunk/src/nautilus-window-manage-views.h
   trunk/src/nautilus-window.c

Modified: trunk/libnautilus-private/nautilus-view-factory.h
==============================================================================
--- trunk/libnautilus-private/nautilus-view-factory.h	(original)
+++ trunk/libnautilus-private/nautilus-view-factory.h	Tue Apr  1 19:09:33 2008
@@ -37,9 +37,8 @@
 
 struct _NautilusViewInfo {
 	char *id;
-	char *label;                       /* Foo View */
-	char *view_as_label;               /* View as Foo */
-	char *view_as_label_with_mnemonic; /* View as _Foo */
+	char *view_combo_label;               /* Foo View (used in preferences dialog and navigation combo) */
+	char *view_menu_label_with_mnemonic;  /* View -> _Foo (this is the "_Foo" part) */
 	char *error_label;                 /* The foo view encountered an error. */
 	char *startup_error_label;         /* The foo view encountered an error while starting up. */
 	char *display_location_label;      /* Display this location with the foo view. */

Modified: trunk/src/file-manager/fm-desktop-icon-view.c
==============================================================================
--- trunk/src/file-manager/fm-desktop-icon-view.c	(original)
+++ trunk/src/file-manager/fm-desktop-icon-view.c	Tue Apr  1 19:09:33 2008
@@ -795,9 +795,8 @@
 
 static NautilusViewInfo fm_desktop_icon_view = {
 	FM_DESKTOP_ICON_VIEW_ID,
-	N_("Desktop"),
 	"Desktop View",
-	"_Desktop View",
+	"_Desktop",
 	N_("The desktop view encountered an error."),
 	N_("The desktop view encountered an error while starting up."),
 	"Display this location with the desktop view.",
@@ -808,7 +807,6 @@
 void
 fm_desktop_icon_view_register (void)
 {
-	fm_desktop_icon_view.label = _(fm_desktop_icon_view.label);
 	fm_desktop_icon_view.error_label = _(fm_desktop_icon_view.error_label);
 	fm_desktop_icon_view.startup_error_label = _(fm_desktop_icon_view.startup_error_label);
 	

Modified: trunk/src/file-manager/fm-icon-view.c
==============================================================================
--- trunk/src/file-manager/fm-icon-view.c	(original)
+++ trunk/src/file-manager/fm-icon-view.c	Tue Apr  1 19:09:33 2008
@@ -2925,9 +2925,8 @@
 }
 
 #define TRANSLATE_VIEW_INFO(view_info) \
-	view_info.label = _(view_info.label); \
-	view_info.view_as_label = _(view_info.view_as_label); \
-	view_info.view_as_label_with_mnemonic = _(view_info.view_as_label_with_mnemonic); \
+	view_info.view_combo_label = _(view_info.view_combo_label); \
+	view_info.view_menu_label_with_mnemonic = _(view_info.view_menu_label_with_mnemonic); \
 	view_info.error_label = _(view_info.error_label); \
 	view_info.startup_error_label = _(view_info.startup_error_label); \
 	view_info.display_location_label = _(view_info.display_location_label); \
@@ -2935,9 +2934,11 @@
 
 static NautilusViewInfo fm_icon_view = {
 	FM_ICON_VIEW_ID,
-	N_("Icons"),
+	/* translators: this is used in the view selection dropdown
+	 * of navigation windows and in the preferences dialog */
 	N_("Icon View"),
-	N_("_Icon View"),
+	/* translators: this is used in the view menu */
+	N_("_Icons"),
 	N_("The icon view encountered an error."),
 	N_("The icon view encountered an error while starting up."),
 	N_("Display this location with the icon view."),
@@ -2947,9 +2948,11 @@
 
 static NautilusViewInfo fm_compact_view = {
 	FM_COMPACT_VIEW_ID,
-	N_("Compact"),
+	/* translators: this is used in the view selection dropdown
+	 * of navigation windows and in the preferences dialog */
 	N_("Compact View"),
-	N_("_Compact View"),
+	/* translators: this is used in the view menu */
+	N_("_Compact"),
 	N_("The compact view encountered an error."),
 	N_("The compact view encountered an error while starting up."),
 	N_("Display this location with the compact view."),

Modified: trunk/src/file-manager/fm-list-view.c
==============================================================================
--- trunk/src/file-manager/fm-list-view.c	(original)
+++ trunk/src/file-manager/fm-list-view.c	Tue Apr  1 19:09:33 2008
@@ -2834,9 +2834,11 @@
 
 static NautilusViewInfo fm_list_view = {
 	FM_LIST_VIEW_ID,
-	N_("List"),
+	/* translators: this is used in the view selection dropdown
+	 * of navigation windows and in the preferences dialog */
 	N_("List View"),
-	N_("_List View"),
+	/* translators: this is used in the view menu */
+	N_("_List"),
 	N_("The list view encountered an error."),
 	N_("The list view encountered an error while starting up."),
 	N_("Display this location with the list view."),
@@ -2847,9 +2849,8 @@
 void
 fm_list_view_register (void)
 {
-	fm_list_view.label = _(fm_list_view.label);
-	fm_list_view.view_as_label = _(fm_list_view.view_as_label);
-	fm_list_view.view_as_label_with_mnemonic = _(fm_list_view.view_as_label_with_mnemonic);
+	fm_list_view.view_combo_label = _(fm_list_view.view_combo_label);
+	fm_list_view.view_menu_label_with_mnemonic = _(fm_list_view.view_menu_label_with_mnemonic);
 	fm_list_view.error_label = _(fm_list_view.error_label);
 	fm_list_view.startup_error_label = _(fm_list_view.startup_error_label);
 	fm_list_view.display_location_label = _(fm_list_view.display_location_label);

Modified: trunk/src/nautilus-navigation-window.c
==============================================================================
--- trunk/src/nautilus-navigation-window.c	(original)
+++ trunk/src/nautilus-navigation-window.c	Tue Apr  1 19:09:33 2008
@@ -894,7 +894,7 @@
              node != NULL; 
              node = node->next, ++index) {
 		info = nautilus_view_factory_lookup (node->data);
-		gtk_combo_box_append_text (combo_box, _(info->view_as_label));
+		gtk_combo_box_append_text (combo_box, _(info->view_combo_label));
 
 		if (nautilus_window_content_view_matches_iid (NAUTILUS_WINDOW (window), (char *)node->data)) {
 			selected_index = index;
@@ -908,7 +908,7 @@
 		id = nautilus_window_get_content_view_id (window);
 		info = nautilus_view_factory_lookup (id);
 		gtk_combo_box_append_text (GTK_COMBO_BOX (NAUTILUS_NAVIGATION_WINDOW (window)->view_as_combo_box),
-					   _(info->view_as_label));
+					   _(info->view_combo_label));
 		selected_index = index;
 	}
 

Modified: trunk/src/nautilus-window-manage-views.c
==============================================================================
--- trunk/src/nautilus-window-manage-views.c	(original)
+++ trunk/src/nautilus-window-manage-views.c	Tue Apr  1 19:09:33 2008
@@ -626,16 +626,6 @@
 }					      
 
 char *
-nautilus_window_get_view_label (NautilusWindow *window)
-{
-	const NautilusViewInfo *info;
-
-	info = nautilus_view_factory_lookup (nautilus_window_get_content_view_id (window));
-
-	return g_strdup (info->label);
-}
-
-char *
 nautilus_window_get_view_error_label (NautilusWindow *window)
 {
 	const NautilusViewInfo *info;

Modified: trunk/src/nautilus-window-manage-views.h
==============================================================================
--- trunk/src/nautilus-window-manage-views.h	(original)
+++ trunk/src/nautilus-window-manage-views.h	Tue Apr  1 19:09:33 2008
@@ -50,7 +50,6 @@
 gboolean                nautilus_window_content_view_matches_iid      (NautilusWindow           *window,
                                                                        const char               *iid);
 const char             *nautilus_window_get_content_view_id           (NautilusWindow           *window);
-char                   *nautilus_window_get_view_label                (NautilusWindow           *window);
 char                   *nautilus_window_get_view_error_label          (NautilusWindow           *window);
 char                   *nautilus_window_get_view_startup_error_label  (NautilusWindow           *window);
 void                    nautilus_navigation_window_set_sidebar_panels (NautilusNavigationWindow *window,

Modified: trunk/src/nautilus-window.c
==============================================================================
--- trunk/src/nautilus-window.c	(original)
+++ trunk/src/nautilus-window.c	Tue Apr  1 19:09:33 2008
@@ -825,7 +825,7 @@
 	
 	g_snprintf (action_name, sizeof (action_name), "view_as_%d", index);
 	action = gtk_radio_action_new (action_name,
-				       _(info->view_as_label_with_mnemonic),
+				       _(info->view_menu_label_with_mnemonic),
 				       _(info->display_location_label),
 				       NULL,
 				       0);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]