[gtk+] Use actual app name in app choosers



commit 120e289f56aad67b1db15801d1b7ef61c8b0c2cc
Author: William Jon McCann <jmccann redhat com>
Date:   Thu Jan 20 16:40:29 2011 -0500

    Use actual app name in app choosers
    
    Instead of using a strange composite of name and generic name.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=640005

 gtk/gtkappchooserbutton.c |    2 +-
 gtk/gtkappchooserwidget.c |   22 +++++++++-------------
 2 files changed, 10 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtkappchooserbutton.c b/gtk/gtkappchooserbutton.c
index 4448899..408b09e 100644
--- a/gtk/gtkappchooserbutton.c
+++ b/gtk/gtkappchooserbutton.c
@@ -299,7 +299,7 @@ gtk_app_chooser_button_populate (GtkAppChooserButton *self)
 
       gtk_list_store_set (self->priv->store, &iter,
                           COLUMN_APP_INFO, app,
-                          COLUMN_LABEL, g_app_info_get_display_name (app),
+                          COLUMN_LABEL, g_app_info_get_name (app),
                           COLUMN_ICON, icon,
                           COLUMN_CUSTOM, FALSE,
                           -1);
diff --git a/gtk/gtkappchooserwidget.c b/gtk/gtkappchooserwidget.c
index 6d0c3fa..2b276e7 100644
--- a/gtk/gtkappchooserwidget.c
+++ b/gtk/gtkappchooserwidget.c
@@ -541,11 +541,9 @@ gtk_app_chooser_widget_add_section (GtkAppChooserWidget *self,
           heading_added = TRUE;
         }
 
-      app_string = g_markup_printf_escaped ("<b>%s</b>\n%s",
-                                            g_app_info_get_display_name (app) != NULL ?
-                                            g_app_info_get_display_name (app) : "",
-                                            g_app_info_get_description (app) != NULL ?
-                                            g_app_info_get_description (app) : "");
+      app_string = g_markup_printf_escaped ("%s",
+                                            g_app_info_get_name (app) != NULL ?
+                                            g_app_info_get_name (app) : "");
 
       icon = g_app_info_get_icon (app);
       unref_icon = FALSE;
@@ -559,7 +557,7 @@ gtk_app_chooser_widget_add_section (GtkAppChooserWidget *self,
       gtk_list_store_set (self->priv->program_list_store, &iter,
                           COLUMN_APP_INFO, app,
                           COLUMN_GICON, icon,
-                          COLUMN_NAME, g_app_info_get_display_name (app),
+                          COLUMN_NAME, g_app_info_get_name (app),
                           COLUMN_DESC, app_string,
                           COLUMN_EXEC, g_app_info_get_executable (app),
                           COLUMN_HEADING, FALSE,
@@ -601,11 +599,9 @@ gtk_app_chooser_add_default (GtkAppChooserWidget *self,
 
   g_free (string);
 
-  string = g_markup_printf_escaped ("<b>%s</b>\n%s",
-                                    g_app_info_get_display_name (app) != NULL ?
-                                    g_app_info_get_display_name (app) : "",
-                                    g_app_info_get_description (app) != NULL ?
-                                    g_app_info_get_description (app) : "");
+  string = g_markup_printf_escaped ("%s",
+                                    g_app_info_get_name (app) != NULL ?
+                                    g_app_info_get_name (app) : "");
 
   icon = g_app_info_get_icon (app);
   if (icon == NULL)
@@ -618,7 +614,7 @@ gtk_app_chooser_add_default (GtkAppChooserWidget *self,
   gtk_list_store_set (self->priv->program_list_store, &iter,
                       COLUMN_APP_INFO, app,
                       COLUMN_GICON, icon,
-                      COLUMN_NAME, g_app_info_get_display_name (app),
+                      COLUMN_NAME, g_app_info_get_name (app),
                       COLUMN_DESC, string,
                       COLUMN_EXEC, g_app_info_get_executable (app),
                       COLUMN_HEADING, FALSE,
@@ -857,7 +853,7 @@ gtk_app_chooser_widget_add_items (GtkAppChooserWidget *self)
                                        "gicon", COLUMN_GICON,
                                        NULL);
   g_object_set (renderer,
-                "stock-size", GTK_ICON_SIZE_DIALOG,
+                "stock-size", GTK_ICON_SIZE_MENU,
                 NULL);
 
   /* app name renderer */



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