[nautilus/gnome-2-32: 37/283] Use display names for applications (#611378).
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-2-32: 37/283] Use display names for applications (#611378).
- Date: Thu, 12 Aug 2010 11:07:08 +0000 (UTC)
commit 1290b8ebed98ea55efba2770a09d04841014efdc
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Apr 15 21:25:13 2010 +0200
Use display names for applications (#611378).
Instead of using the simple GAppInfo name property.
libnautilus-private/nautilus-autorun.c | 2 +-
libnautilus-private/nautilus-mime-actions.c | 4 ++--
.../nautilus-mime-application-chooser.c | 2 +-
libnautilus-private/nautilus-open-with-dialog.c | 4 +---
libnautilus-private/nautilus-program-choosing.c | 8 ++++----
src/file-manager/fm-directory-view.c | 4 ++--
src/nautilus-information-panel.c | 2 +-
src/nautilus-x-content-bar.c | 2 +-
8 files changed, 13 insertions(+), 15 deletions(-)
---
diff --git a/libnautilus-private/nautilus-autorun.c b/libnautilus-private/nautilus-autorun.c
index 8bf6743..8d57e31 100644
--- a/libnautilus-private/nautilus-autorun.c
+++ b/libnautilus-private/nautilus-autorun.c
@@ -564,7 +564,7 @@ nautilus_autorun_prepare_combo_box (GtkWidget *combo_box,
pixbuf = nautilus_icon_info_get_pixbuf_at_size (icon_info, icon_size);
g_object_unref (icon_info);
- open_string = g_strdup_printf (_("Open %s"), g_app_info_get_name (app_info));
+ open_string = g_strdup_printf (_("Open %s"), g_app_info_get_display_name (app_info));
gtk_list_store_append (list_store, &iter);
gtk_list_store_set (list_store, &iter,
diff --git a/libnautilus-private/nautilus-mime-actions.c b/libnautilus-private/nautilus-mime-actions.c
index b97ca7c..97020f6 100644
--- a/libnautilus-private/nautilus-mime-actions.c
+++ b/libnautilus-private/nautilus-mime-actions.c
@@ -383,8 +383,8 @@ static int
application_compare_by_name (const GAppInfo *app_a,
const GAppInfo *app_b)
{
- return g_utf8_collate (g_app_info_get_name ((GAppInfo *)app_a),
- g_app_info_get_name ((GAppInfo *)app_b));
+ return g_utf8_collate (g_app_info_get_display_name ((GAppInfo *)app_a),
+ g_app_info_get_display_name ((GAppInfo *)app_b));
}
static int
diff --git a/libnautilus-private/nautilus-mime-application-chooser.c b/libnautilus-private/nautilus-mime-application-chooser.c
index 641b8f9..8ead2d7 100644
--- a/libnautilus-private/nautilus-mime-application-chooser.c
+++ b/libnautilus-private/nautilus-mime-application-chooser.c
@@ -507,7 +507,7 @@ refresh_model (NautilusMimeApplicationChooser *chooser)
is_default = default_app && g_app_info_equal (default_app, application);
- escaped = g_markup_escape_text (g_app_info_get_name (application), -1);
+ escaped = g_markup_escape_text (g_app_info_get_display_name (application), -1);
icon = g_app_info_get_icon (application);
diff --git a/libnautilus-private/nautilus-open-with-dialog.c b/libnautilus-private/nautilus-open-with-dialog.c
index aa5aefb..914d3f1 100644
--- a/libnautilus-private/nautilus-open-with-dialog.c
+++ b/libnautilus-private/nautilus-open-with-dialog.c
@@ -619,7 +619,6 @@ nautilus_open_with_dialog_add_items_idle (NautilusOpenWithDialog *dialog)
GtkTreeModel *sort;
GList *all_applications;
GList *l;
- const char *prev_name;
/* create list store */
dialog->details->program_list_store = gtk_list_store_new (NUM_COLUMNS,
@@ -632,7 +631,6 @@ nautilus_open_with_dialog_add_items_idle (NautilusOpenWithDialog *dialog)
sort = gtk_tree_model_sort_new_with_model (GTK_TREE_MODEL (dialog->details->program_list_store));
all_applications = g_app_info_get_all ();
- prev_name = NULL;
for (l = all_applications; l; l = l->next) {
GAppInfo *app = l->data;
GtkTreeIter iter;
@@ -647,7 +645,7 @@ nautilus_open_with_dialog_add_items_idle (NautilusOpenWithDialog *dialog)
COLUMN_APP_INFO, app,
COLUMN_ICON, NULL,
COLUMN_GICON, g_app_info_get_icon (app),
- COLUMN_NAME, g_app_info_get_name (app),
+ COLUMN_NAME, g_app_info_get_display_name (app),
COLUMN_COMMENT, g_app_info_get_description (app),
COLUMN_EXEC, g_app_info_get_executable,
-1);
diff --git a/libnautilus-private/nautilus-program-choosing.c b/libnautilus-private/nautilus-program-choosing.c
index 825bd14..2ac6d04 100644
--- a/libnautilus-private/nautilus-program-choosing.c
+++ b/libnautilus-private/nautilus-program-choosing.c
@@ -80,8 +80,8 @@ application_cannot_open_location (GAppInfo *application,
prompt = _("Open Failed, would you like to choose another application?");
message = g_strdup_printf (_("\"%s\" cannot open \"%s\" because \"%s\" cannot access files at \"%s\" "
"locations."),
- g_app_info_get_name (application), file_name,
- g_app_info_get_name (application), uri_scheme);
+ g_app_info_get_display_name (application), file_name,
+ g_app_info_get_display_name (application), uri_scheme);
} else {
prompt = _("Open Failed, would you like to choose another action?");
message = g_strdup_printf (_("The default action cannot open \"%s\" because it cannot access files at \"%s\" "
@@ -110,8 +110,8 @@ application_cannot_open_location (GAppInfo *application,
} else {
if (application != NULL) {
prompt = g_strdup_printf (_("\"%s\" cannot open \"%s\" because \"%s\" cannot access files at \"%s\" "
- "locations."), g_app_info_get_name (application), file_name,
- g_app_info_get_name (application), uri_scheme);
+ "locations."), g_app_info_get_display_name (application), file_name,
+ g_app_info_get_display_name (application), uri_scheme);
message = _("No other applications are available to view this file. "
"If you copy this file onto your computer, you may be able to open "
"it.");
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index 9416894..6096aed 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -4373,7 +4373,7 @@ add_application_to_open_with_menu (FMDirectoryView *view,
launch_parameters = application_launch_parameters_new
(application, files, view);
- escaped_app = eel_str_double_underscores (g_app_info_get_name (application));
+ escaped_app = eel_str_double_underscores (g_app_info_get_display_name (application));
if (submenu)
label = g_strdup_printf ("%s", escaped_app);
else
@@ -8774,7 +8774,7 @@ real_update_menus (FMDirectoryView *view)
if (app != NULL) {
char *escaped_app;
- escaped_app = eel_str_double_underscores (g_app_info_get_name (app));
+ escaped_app = eel_str_double_underscores (g_app_info_get_display_name (app));
label_with_underscore = g_strdup_printf (_("_Open with %s"),
escaped_app);
diff --git a/src/nautilus-information-panel.c b/src/nautilus-information-panel.c
index ce162ef..13b0809 100644
--- a/src/nautilus-information-panel.c
+++ b/src/nautilus-information-panel.c
@@ -825,7 +825,7 @@ add_command_button (NautilusInformationPanel *information_panel, GAppInfo *appli
/* There's always at least the "Open with..." button */
information_panel->details->has_buttons = TRUE;
- temp_str = g_strdup_printf (_("Open with %s"), g_app_info_get_name (application));
+ temp_str = g_strdup_printf (_("Open with %s"), g_app_info_get_display_name (application));
temp_button = gtk_button_new_with_label (temp_str);
label = GTK_BIN (temp_button)->child;
gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_START);
diff --git a/src/nautilus-x-content-bar.c b/src/nautilus-x-content-bar.c
index 25130e8..f70d818 100644
--- a/src/nautilus-x-content-bar.c
+++ b/src/nautilus-x-content-bar.c
@@ -118,7 +118,7 @@ nautilus_x_content_bar_set_x_content_type (NautilusXContentBar *bar, const char
image = NULL;
}
- name = g_app_info_get_name (default_app);
+ name = g_app_info_get_display_name (default_app);
button_text = g_strdup_printf (_("Open %s"), name);
gtk_button_set_image (GTK_BUTTON (bar->priv->button), image);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]