Commit 2966e3f4 authored by Christian Neumair's avatar Christian Neumair Committed by Christian Neumair

Remove unused "label" field of NautilusViewInfo and

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.

svn path=/trunk/; revision=14024
parent e5085870
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.
2008-04-01 Michael J. Chudobiak <mjc@svn.gnome.org>
* libnautilus-private/nautilus-file.c: (nautilus_file_get_icon):
......
......@@ -37,9 +37,8 @@ typedef struct _NautilusViewInfo NautilusViewInfo;
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. */
......
......@@ -795,9 +795,8 @@ fm_desktop_icon_view_supports_uri (const char *uri,
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 @@ static NautilusViewInfo fm_desktop_icon_view = {
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);
......
......@@ -2925,9 +2925,8 @@ fm_icon_view_supports_uri (const char *uri,
}
#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 @@ fm_icon_view_supports_uri (const char *uri,
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_icon_view = {
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."),
......
......@@ -2834,9 +2834,11 @@ fm_list_view_supports_uri (const char *uri,
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 @@ static NautilusViewInfo fm_list_view = {
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);
......
......@@ -894,7 +894,7 @@ load_view_as_menu (NautilusWindow *window)
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 @@ load_view_as_menu (NautilusWindow *window)
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;
}
......
......@@ -625,16 +625,6 @@ nautilus_window_open_location_with_selection (NautilusWindow *window,
flags, selection);
}
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)
{
......
......@@ -50,7 +50,6 @@ void nautilus_window_set_content_view (NautilusW
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,
......
......@@ -825,7 +825,7 @@ add_view_as_menu_item (NautilusWindow *window,
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);
......
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