diff options
author | Dave Camp <dave@ximian.com> | 2003-01-14 18:29:45 +0000 |
---|---|---|
committer | Dave Camp <campd@src.gnome.org> | 2003-01-14 18:29:45 +0000 |
commit | 5cdaef8c83c81c657d2c511214e5c3d0ca69f6f8 (patch) | |
tree | 6e4e0bc76d27a9ff834cd0d617d5fe869c9472dd /libnautilus-private/nautilus-view-identifier.c | |
parent | 9aaabc1472eb0bdf889b49d6212ff1bd7c17e93a (diff) | |
download | nautilus-5cdaef8c83c81c657d2c511214e5c3d0ca69f6f8.tar.gz |
Add a view_as_label_with_mnemonic field to the server file and
2003-01-14 Dave Camp <dave@ximian.com>
* libnautilus-private/nautilus-view-identifier.c:
(nautilus_view_identifier_new), (nautilus_view_identifier_copy),
(nautilus_view_identifier_new_from_bonobo_server_info),
(nautilus_view_identifier_free):
* libnautilus-private/nautilus-view-identifier.h: Add a
view_as_label_with_mnemonic field to the server file and
NautilusViewIdentifier.
* src/nautilus-window.c: (add_view_as_bonobo_menu_item): Use
the mnemonics in the view menu.
* src/Nautilus_shell.server.in: Add view_as_label_with_mnemonic
fields to the Icon and List views.
Diffstat (limited to 'libnautilus-private/nautilus-view-identifier.c')
-rw-r--r-- | libnautilus-private/nautilus-view-identifier.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/libnautilus-private/nautilus-view-identifier.c b/libnautilus-private/nautilus-view-identifier.c index 4528189f4..04919c3f4 100644 --- a/libnautilus-private/nautilus-view-identifier.c +++ b/libnautilus-private/nautilus-view-identifier.c @@ -37,6 +37,7 @@ static NautilusViewIdentifier * nautilus_view_identifier_new (const char *iid, const char *name, const char *view_as_label, + const char *view_as_label_with_mnemonic, const char *label_viewer); @@ -45,6 +46,7 @@ NautilusViewIdentifier * nautilus_view_identifier_new (const char *iid, const char *name, const char *view_as_label, + const char *view_as_label_with_mnemonic, const char *viewer_label) { NautilusViewIdentifier *new_identifier; @@ -59,6 +61,9 @@ nautilus_view_identifier_new (const char *iid, new_identifier->view_as_label = view_as_label ? g_strdup (view_as_label) : g_strdup_printf (_("View as %s"), name); + new_identifier->view_as_label_with_mnemonic = view_as_label_with_mnemonic ? g_strdup (view_as_label_with_mnemonic) + : g_strdup (new_identifier->view_as_label); + new_identifier->viewer_label = view_as_label ? g_strdup (viewer_label) : g_strdup_printf (_("%s Viewer"), name); @@ -75,6 +80,7 @@ nautilus_view_identifier_copy (const NautilusViewIdentifier *identifier) return nautilus_view_identifier_new (identifier->iid, identifier->name, identifier->view_as_label, + identifier->view_as_label_with_mnemonic, identifier->viewer_label); } @@ -111,6 +117,7 @@ nautilus_view_identifier_new_from_bonobo_server_info (Bonobo_ServerInfo *server, { const char *view_as_name; const char *view_as_label; + const char *view_as_label_with_mnemonic; const char *viewer_label; GSList *langs; @@ -118,6 +125,7 @@ nautilus_view_identifier_new_from_bonobo_server_info (Bonobo_ServerInfo *server, view_as_name = bonobo_server_info_prop_lookup (server, name_attribute, langs); view_as_label = bonobo_server_info_prop_lookup (server, "nautilus:view_as_label", langs); + view_as_label_with_mnemonic = bonobo_server_info_prop_lookup (server, "nautilus:view_as_label_with_mnemonic", langs); viewer_label = bonobo_server_info_prop_lookup (server, "nautilus:viewer_label", langs); if (view_as_name == NULL) { @@ -141,13 +149,17 @@ nautilus_view_identifier_new_from_bonobo_server_info (Bonobo_ServerInfo *server, } new_identifier = nautilus_view_identifier_new (server->iid, display_name, - view_as_label, viewer_label); + view_as_label, + view_as_label_with_mnemonic, + viewer_label); g_free(display_name); return new_identifier; } return nautilus_view_identifier_new (server->iid, view_as_name, - view_as_label, viewer_label); + view_as_label, + view_as_label_with_mnemonic, + viewer_label); } NautilusViewIdentifier * @@ -178,6 +190,7 @@ nautilus_view_identifier_free (NautilusViewIdentifier *identifier) g_free (identifier->iid); g_free (identifier->name); g_free (identifier->view_as_label); + g_free (identifier->view_as_label_with_mnemonic); g_free (identifier->viewer_label); g_free (identifier); } |