Commit 3f34ea89 authored by Scott Reeves's avatar Scott Reeves

fix for BNC#185957

svn path=/trunk/; revision=154
parent f8c8a448
2007-01-30 Scott Reeves <sreeves@novell.com>
* application-browser/src/application-browser.c
* control-center/src/control-center.c
* libslab/application-tile.c
* libslab/application-tile.h
* libslab/app-shell.c
* libslab/app-shell.h:
Fix for BNC#185957 - inconsistent GenericName display
2007-01-25 Scott Reeves <sreeves@novell.com>
* control-center/src/control-center.c: - stop CC common tasks from
launching twic
......
......@@ -83,8 +83,8 @@ main (int argc, char *argv[])
NewAppConfig *config = g_new0 (NewAppConfig, 1);
config->max_items = get_slab_gconf_int (NEW_APPS_MAX_ITEMS);
config->name = _("New Applications");
AppShellData *app_data = appshelldata_new (
"applications.menu", config, APPLICATION_BROWSER_PREFIX, GTK_ICON_SIZE_DND, FALSE);
AppShellData *app_data = appshelldata_new ("applications.menu", config,
APPLICATION_BROWSER_PREFIX, GTK_ICON_SIZE_DND, TRUE, FALSE);
generate_categories (app_data);
layout_shell (app_data, _("Filter"), _("Groups"), _("Application Actions"), NULL, NULL);
......
......@@ -152,8 +152,8 @@ main (int argc, char *argv[])
exit (1);
}
app_data = appshelldata_new (
"preferences.menu", NULL, CONTROL_CENTER_PREFIX, GTK_ICON_SIZE_DIALOG, TRUE);
app_data = appshelldata_new ("preferences.menu", NULL, CONTROL_CENTER_PREFIX,
GTK_ICON_SIZE_DIALOG, FALSE, TRUE);
generate_categories (app_data);
actions = get_actions_list ();
......
......@@ -822,7 +822,7 @@ gmenu_tree_changed_callback (GMenuTree * old_tree, gpointer user_data)
AppShellData *
appshelldata_new (const gchar * menu_name, NewAppConfig * new_apps, const gchar * gconf_keys_prefix,
GtkIconSize icon_size, gboolean exit_on_close)
GtkIconSize icon_size, gboolean show_tile_generic_name, gboolean exit_on_close)
{
AppShellData *app_data = g_new0 (AppShellData, 1);
app_data->gconf_prefix = gconf_keys_prefix;
......@@ -830,6 +830,7 @@ appshelldata_new (const gchar * menu_name, NewAppConfig * new_apps, const gchar
app_data->menu_name = menu_name;
app_data->icon_size = icon_size;
app_data->stop_incremental_relayout = TRUE;
app_data->show_tile_generic_name = show_tile_generic_name;
app_data->exit_on_close = exit_on_close;
return app_data;
}
......@@ -1216,7 +1217,7 @@ insert_launcher_into_category (CategoryData * cat_data, GnomeDesktopItem * deskt
launcher =
application_tile_new_full (gnome_desktop_item_get_location (desktop_item),
app_data->icon_size);
app_data->icon_size, app_data->show_tile_generic_name);
gtk_widget_set_size_request (launcher, SIZING_TILE_WIDTH, -1);
filepath =
......
......@@ -93,6 +93,7 @@ typedef struct _AppShellData
GtkWidget *filtered_out_everything_widget;
GtkLabel *filtered_out_everything_widget_label;
gboolean show_tile_generic_name;
gboolean exit_on_close;
} AppShellData;
......@@ -122,7 +123,8 @@ void generate_categories (AppShellData * app_data);
/* If new_apps is NULL then the new applications category is not created */
AppShellData *appshelldata_new (const gchar * menu_name, NewAppConfig * new_apps,
const gchar * gconf_keys_prefix, GtkIconSize icon_size, gboolean exit_on_close);
const gchar * gconf_keys_prefix, GtkIconSize icon_size,
gboolean show_tile_generic_name, gboolean exit_on_close);
void layout_shell (AppShellData * app_data, const gchar * filter_title, const gchar * groups_title,
const gchar * actions_title, GSList * actions,
......
......@@ -82,6 +82,7 @@ typedef struct {
gboolean image_is_broken;
GtkIconSize image_size;
gboolean show_generic_name;
gboolean is_in_user_list;
StartupStatus startup_status;
......@@ -126,11 +127,12 @@ application_tile_class_init (ApplicationTileClass *app_tile_class)
GtkWidget *
application_tile_new (const gchar *desktop_item_id)
{
return application_tile_new_full (desktop_item_id, GTK_ICON_SIZE_DND);
return application_tile_new_full (desktop_item_id, GTK_ICON_SIZE_DND, TRUE);
}
GtkWidget *
application_tile_new_full (const gchar *desktop_item_id, GtkIconSize image_size)
application_tile_new_full (const gchar *desktop_item_id,
GtkIconSize image_size, gboolean show_generic_name)
{
ApplicationTile *this;
ApplicationTilePrivate *priv;
......@@ -153,6 +155,7 @@ application_tile_new_full (const gchar *desktop_item_id, GtkIconSize image_size)
priv->image_size = image_size;
priv->desktop_item = desktop_item;
priv->show_generic_name = show_generic_name;
application_tile_setup (this);
......@@ -280,7 +283,7 @@ application_tile_setup (ApplicationTile *this)
atk_object_set_description (accessible, desc);
header = create_header (name);
if (desc) /*if no GenericName then just show and center the Name */
if (desc && priv->show_generic_name) /*if no GenericName then just show and center the Name */
subheader = create_subheader (desc);
else
subheader = NULL;
......
......@@ -56,7 +56,8 @@ typedef struct
GType application_tile_get_type (void);
GtkWidget *application_tile_new (const gchar * desktop_item_id);
GtkWidget *application_tile_new_full (const gchar * desktop_item_id, GtkIconSize icon_size);
GtkWidget *application_tile_new_full (const gchar * desktop_item_id,
GtkIconSize icon_size, gboolean show_generic_name);
GnomeDesktopItem *application_tile_get_desktop_item (ApplicationTile * tile);
......
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