[gnome-software] Do not show all categories on the overview page by default
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Do not show all categories on the overview page by default
- Date: Tue, 31 May 2016 16:37:30 +0000 (UTC)
commit f47c423dca0c774e485960ccd9db53e382cb8f55
Author: Richard Hughes <richard hughsie com>
Date: Tue May 31 15:08:51 2016 +0100
Do not show all categories on the overview page by default
Also, use various parts of the new design for the overview.
Fixes most of https://bugzilla.gnome.org/show_bug.cgi?id=766942
src/gs-category-tile.c | 4 +-
src/gs-category-tile.ui | 11 +-
src/gs-category.c | 32 +++++
src/gs-category.h | 3 +
src/gs-feature-tile.ui | 2 +-
src/gs-plugin-loader.c | 7 +
src/gs-shell-overview.c | 40 +++++-
src/gs-shell-overview.ui | 194 ++++++++++++++++++--------
src/gtk-style.css | 4 +
src/plugins/gs-plugin-menu-spec-categories.c | 1 +
src/plugins/menu-spec-common.c | 46 +++----
src/plugins/menu-spec-common.h | 9 +-
12 files changed, 252 insertions(+), 101 deletions(-)
---
diff --git a/src/gs-category-tile.c b/src/gs-category-tile.c
index 85ff8fd..ce628d6 100644
--- a/src/gs-category-tile.c
+++ b/src/gs-category-tile.c
@@ -62,9 +62,9 @@ gs_category_tile_set_category (GsCategoryTile *tile, GsCategory *cat)
gs_category_get_icon (cat),
GTK_ICON_SIZE_MENU);
- /* set custom CSS */
+ /* set custom CSS for important tiles */
key_colors = gs_category_get_key_colors (cat);
- if (key_colors->len > 0) {
+ if (gs_category_get_important (cat) && key_colors->len > 0) {
GdkRGBA *tmp = g_ptr_array_index (key_colors, 0);
g_autofree gchar *css = NULL;
css = g_strdup_printf ("border-bottom: 3px solid "
diff --git a/src/gs-category-tile.ui b/src/gs-category-tile.ui
index f696f21..8cf9d58 100644
--- a/src/gs-category-tile.ui
+++ b/src/gs-category-tile.ui
@@ -13,10 +13,10 @@
<property name="can_focus">False</property>
<property name="orientation">horizontal</property>
<property name="spacing">12</property>
- <property name="margin_top">12</property>
- <property name="margin_bottom">12</property>
- <property name="margin_start">12</property>
- <property name="margin_end">12</property>
+ <property name="margin_top">9</property>
+ <property name="margin_bottom">9</property>
+ <property name="margin_start">9</property>
+ <property name="margin_end">9</property>
<child>
<object class="GtkImage" id="image">
<property name="visible">True</property>
@@ -32,6 +32,9 @@
<object class="GtkLabel" id="label">
<property name="visible">True</property>
<property name="xalign">0</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
</child>
</object>
diff --git a/src/gs-category.c b/src/gs-category.c
index e1069fd..b2efabf 100644
--- a/src/gs-category.c
+++ b/src/gs-category.c
@@ -41,6 +41,7 @@ struct _GsCategory
gchar *id;
gchar *name;
gchar *icon;
+ gboolean important;
GPtrArray *key_colors;
GsCategory *parent;
guint size;
@@ -205,6 +206,37 @@ gs_category_set_icon (GsCategory *category, const gchar *icon)
}
/**
+ * gs_category_get_important:
+ * @category: a #GsCategory
+ *
+ * Gets if the category is important.
+ * Important categories may be shown before other categories, or tagged in a
+ * different way, for example with color or in a different section.
+ *
+ * Returns: the string, or %NULL
+ **/
+gboolean
+gs_category_get_important (GsCategory *category)
+{
+ g_return_val_if_fail (GS_IS_CATEGORY (category), FALSE);
+ return category->important;
+}
+
+/**
+ * gs_category_set_important:
+ * @category: a #GsCategory
+ * @important: a category important, or %NULL
+ *
+ * Sets if the category is important.
+ **/
+void
+gs_category_set_important (GsCategory *category, gboolean important)
+{
+ g_return_if_fail (GS_IS_CATEGORY (category));
+ category->important = important;
+}
+
+/**
* gs_category_get_key_colors:
* @category: a #GsCategory
*
diff --git a/src/gs-category.h b/src/gs-category.h
index 2a1ea23..bd41e69 100644
--- a/src/gs-category.h
+++ b/src/gs-category.h
@@ -42,6 +42,9 @@ void gs_category_set_name (GsCategory *category,
const gchar *gs_category_get_icon (GsCategory *category);
void gs_category_set_icon (GsCategory *category,
const gchar *icon);
+gboolean gs_category_get_important (GsCategory *category);
+void gs_category_set_important (GsCategory *category,
+ gboolean important);
GPtrArray *gs_category_get_key_colors (GsCategory *category);
void gs_category_add_key_color (GsCategory *category,
const GdkRGBA *key_color);
diff --git a/src/gs-feature-tile.ui b/src/gs-feature-tile.ui
index c534035..1d77f4d 100644
--- a/src/gs-feature-tile.ui
+++ b/src/gs-feature-tile.ui
@@ -36,7 +36,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="visible_window">True</property>
- <property name="height_request">240</property>
+ <property name="height_request">160</property>
<style>
<class name="featured-image"/>
</style>
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 8d41517..2c3a6e3 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -2139,6 +2139,13 @@ gs_plugin_loader_category_sort_cb (gconstpointer a, gconstpointer b)
{
GsCategory *cata = GS_CATEGORY (*(GsCategory **) a);
GsCategory *catb = GS_CATEGORY (*(GsCategory **) b);
+
+ /* addons always go last */
+ if (g_strcmp0 (gs_category_get_id (cata), "Addons") == 0)
+ return 1;
+ if (g_strcmp0 (gs_category_get_id (catb), "Addons") == 0)
+ return -1;
+
return g_strcmp0 (gs_category_get_name (cata),
gs_category_get_name (catb));
}
diff --git a/src/gs-shell-overview.c b/src/gs-shell-overview.c
index 55898bd..9025f39 100644
--- a/src/gs-shell-overview.c
+++ b/src/gs-shell-overview.c
@@ -33,7 +33,7 @@
#include "gs-category-tile.h"
#include "gs-common.h"
-#define N_TILES 8
+#define N_TILES 9
typedef struct
{
@@ -55,12 +55,15 @@ typedef struct
GtkWidget *box_popular;
GtkWidget *box_popular_rotating;
GtkWidget *category_heading;
- GtkWidget *featured_heading;
GtkWidget *flowbox_categories;
+ GtkWidget *flowbox_categories2;
GtkWidget *popular_heading;
GtkWidget *popular_rotating_heading;
GtkWidget *scrolledwindow_overview;
GtkWidget *stack_overview;
+ GtkWidget *categories_expander_button;
+ GtkWidget *categories_expander;
+ GtkWidget *categories_more;
} GsShellOverviewPrivate;
G_DEFINE_TYPE_WITH_PRIVATE (GsShellOverview, gs_shell_overview, GS_TYPE_PAGE)
@@ -261,7 +264,6 @@ gs_shell_overview_get_featured_cb (GObject *source_object,
}
gs_container_remove_all (GTK_CONTAINER (priv->bin_featured));
- gtk_widget_set_visible (priv->featured_heading, list != NULL);
if (list == NULL) {
g_warning ("failed to get featured apps: %s",
error->message);
@@ -318,6 +320,7 @@ gs_shell_overview_get_categories_cb (GObject *source_object,
GsCategory *cat;
GtkWidget *tile;
gboolean has_category = FALSE;
+ gboolean use_expander = FALSE;
g_autoptr(GError) error = NULL;
g_autoptr(GPtrArray) list = NULL;
@@ -328,18 +331,29 @@ gs_shell_overview_get_categories_cb (GObject *source_object,
goto out;
}
gs_container_remove_all (GTK_CONTAINER (priv->flowbox_categories));
+ gs_container_remove_all (GTK_CONTAINER (priv->flowbox_categories2));
for (i = 0; i < list->len; i++) {
+ GtkFlowBox *flowbox;
cat = GS_CATEGORY (g_ptr_array_index (list, i));
if (gs_category_get_size (cat) == 0)
continue;
tile = gs_category_tile_new (cat);
g_signal_connect (tile, "clicked",
G_CALLBACK (category_tile_clicked), self);
- gtk_flow_box_insert (GTK_FLOW_BOX (priv->flowbox_categories), tile, -1);
+ if (gs_category_get_important (cat)) {
+ flowbox = GTK_FLOW_BOX (priv->flowbox_categories);
+ } else {
+ flowbox = GTK_FLOW_BOX (priv->flowbox_categories2);
+ use_expander = TRUE;
+ }
+ gtk_flow_box_insert (flowbox, tile, -1);
gtk_widget_set_can_focus (gtk_widget_get_parent (tile), FALSE);
has_category = TRUE;
}
+
+ /* show the expander if we have too many children */
+ gtk_widget_set_visible (priv->categories_expander, use_expander);
out:
if (has_category) {
priv->empty = FALSE;
@@ -495,6 +509,14 @@ gs_shell_overview_switch_to (GsPage *page, gboolean scroll_up)
gs_shell_overview_load (self);
}
+static void
+gs_shell_overview_categories_expander_cb (GtkButton *button, GsShellOverview *self)
+{
+ GsShellOverviewPrivate *priv = gs_shell_overview_get_instance_private (self);
+ gtk_revealer_set_reveal_child (GTK_REVEALER (priv->categories_expander), FALSE);
+ gtk_revealer_set_reveal_child (GTK_REVEALER (priv->categories_more), TRUE);
+}
+
void
gs_shell_overview_setup (GsShellOverview *self,
GsShell *shell,
@@ -530,6 +552,11 @@ gs_shell_overview_setup (GsShellOverview *self,
gtk_container_add (GTK_CONTAINER (priv->box_popular_rotating), tile);
}
+ /* handle category expander */
+ g_signal_connect (priv->categories_expander_button, "clicked",
+ G_CALLBACK (gs_shell_overview_categories_expander_cb), self);
+
+
/* chain up */
gs_page_setup (GS_PAGE (self),
shell,
@@ -597,12 +624,15 @@ gs_shell_overview_class_init (GsShellOverviewClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, GsShellOverview, box_popular);
gtk_widget_class_bind_template_child_private (widget_class, GsShellOverview, box_popular_rotating);
gtk_widget_class_bind_template_child_private (widget_class, GsShellOverview, category_heading);
- gtk_widget_class_bind_template_child_private (widget_class, GsShellOverview, featured_heading);
gtk_widget_class_bind_template_child_private (widget_class, GsShellOverview, flowbox_categories);
+ gtk_widget_class_bind_template_child_private (widget_class, GsShellOverview, flowbox_categories2);
gtk_widget_class_bind_template_child_private (widget_class, GsShellOverview, popular_heading);
gtk_widget_class_bind_template_child_private (widget_class, GsShellOverview,
popular_rotating_heading);
gtk_widget_class_bind_template_child_private (widget_class, GsShellOverview, scrolledwindow_overview);
gtk_widget_class_bind_template_child_private (widget_class, GsShellOverview, stack_overview);
+ gtk_widget_class_bind_template_child_private (widget_class, GsShellOverview,
categories_expander_button);
+ gtk_widget_class_bind_template_child_private (widget_class, GsShellOverview, categories_expander);
+ gtk_widget_class_bind_template_child_private (widget_class, GsShellOverview, categories_more);
}
/**
diff --git a/src/gs-shell-overview.ui b/src/gs-shell-overview.ui
index f6cabf5..62ce9b8 100644
--- a/src/gs-shell-overview.ui
+++ b/src/gs-shell-overview.ui
@@ -29,17 +29,32 @@
<property name="hexpand">False</property>
<property name="orientation">vertical</property>
<child>
- <object class="GtkLabel" id="featured_heading">
+ <object class="GtkAlignment" id="bin_featured">
+ <property name="visible">True</property>
+ <property name="halign">fill</property>
+ <property name="margin_start">12</property>
+ <property name="margin_end">12</property>
+ <property name="margin-top">6</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+
+ <child>
+ <object class="GtkLabel" id="category_heading">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
+ <property name="label" translatable="yes">Categories</property>
<property name="margin-top">24</property>
- <property name="margin-bottom">12</property>
+ <property name="margin-bottom">6</property>
<property name="margin-start">12</property>
<property name="margin-end">24</property>
- <property name="label" translatable="yes">Featured Application</property>
<accessibility>
- <relation target="bin_featured" type="label-for"/>
+ <relation target="flowbox_categories" type="label-for"/>
</accessibility>
<style>
<class name="index-title-alignment-software"/>
@@ -48,78 +63,143 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">0</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkAlignment" id="bin_featured">
+ <object class="GtkFlowBox" id="flowbox_categories">
<property name="visible">True</property>
- <property name="halign">fill</property>
- <property name="margin_start">12</property>
- <property name="margin_end">12</property>
+ <property name="can_focus">False</property>
+ <property name="margin_start">9</property>
+ <property name="margin_end">9</property>
+ <property name="margin-bottom">9</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+ <property name="homogeneous">True</property>
+ <property name="max_children_per_line">3</property>
+ <property name="selection_mode">none</property>
<accessibility>
- <relation target="featured_heading" type="labelled-by"/>
+ <relation target="category_heading" type="labelled-by"/>
</accessibility>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="popular_heading">
+ <object class="GtkRevealer" id="categories_more">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes" comments="Translators: This is a heading
for software which has been featured ('picked') by the distribution.">Editor's Picks</property>
- <property name="margin-top">24</property>
- <property name="margin-bottom">12</property>
- <property name="margin-start">12</property>
- <property name="margin-end">24</property>
- <accessibility>
- <relation target="box_popular" type="label-for"/>
- </accessibility>
- <style>
- <class name="index-title-alignment-software"/>
- </style>
+ <property name="transition-type">slide-up</property>
+ <child>
+ <object class="GtkFlowBox" id="flowbox_categories2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_start">12</property>
+ <property name="margin_end">12</property>
+ <property name="margin-bottom">24</property>
+ <property name="row_spacing">8</property>
+ <property name="column_spacing">8</property>
+ <property name="homogeneous">True</property>
+ <property name="max_children_per_line">3</property>
+ <property name="selection_mode">none</property>
+ <accessibility>
+ <relation target="category_heading" type="labelled-by"/>
+ </accessibility>
+ </object>
+ </child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
- <object class="GsHidingBox" id="box_popular">
+ <object class="GtkRevealer" id="categories_expander">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_start">12</property>
- <property name="margin_end">12</property>
- <property name="spacing">14</property>
- <property name="valign">start</property>
- <accessibility>
- <relation target="popular_heading" type="labelled-by"/>
- </accessibility>
+ <property name="transition-type">slide-up</property>
+ <property name="reveal-child">True</property>
+ <child>
+ <object class="GtkBox" id="categories_expander_box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="vexpand">False</property>
+ <property name="orientation">horizontal</property>
+ <property name="margin_start">24</property>
+ <property name="margin_end">24</property>
+ <property name="margin-bottom">12</property>
+ <child>
+ <object class="GtkSeparator" id="categories_expander_lsep">
+ <property name="visible">True</property>
+ <property name="orientation">horizontal</property>
+ <property name="expand">True</property>
+ <property name="valign">center</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="categories_expander_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="margin-start">9</property>
+ <property name="margin-end">9</property>
+ <property name="valign">center</property>
+ <style>
+ <class name="round-button"/>
+ </style>
+ <child>
+ <object class="GtkImage" id="categories_expander_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon_name">view-more-symbolic</property>
+ <property name="icon_size">1</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSeparator" id="categories_expander_rsep">
+ <property name="visible">True</property>
+ <property name="orientation">horizontal</property>
+ <property name="expand">True</property>
+ <property name="valign">center</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">4</property>
</packing>
</child>
+
<child>
- <object class="GtkLabel" id="popular_rotating_heading">
+ <object class="GtkLabel" id="popular_heading">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" comments="Don't translate, this is just a
placeholder">Recommended Games</property>
- <property name="margin-top">24</property>
- <property name="margin-bottom">12</property>
+ <property name="label" translatable="yes" comments="Translators: This is a heading
for software which has been featured ('picked') by the distribution.">Editor's Picks</property>
+ <property name="margin-top">0</property>
+ <property name="margin-bottom">6</property>
<property name="margin-start">12</property>
<property name="margin-end">24</property>
<accessibility>
- <relation target="box_popular_rotating" type="label-for"/>
+ <relation target="box_popular" type="label-for"/>
</accessibility>
<style>
<class name="index-title-alignment-software"/>
@@ -128,11 +208,11 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">4</property>
+ <property name="position">5</property>
</packing>
</child>
<child>
- <object class="GsHidingBox" id="box_popular_rotating">
+ <object class="GsHidingBox" id="box_popular">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">12</property>
@@ -140,27 +220,27 @@
<property name="spacing">14</property>
<property name="valign">start</property>
<accessibility>
- <relation target="popular_rotating_heading" type="labelled-by"/>
+ <relation target="popular_heading" type="labelled-by"/>
</accessibility>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">5</property>
+ <property name="position">6</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="category_heading">
+ <object class="GtkLabel" id="popular_rotating_heading">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Categories</property>
+ <property name="label" comments="Don't translate, this is just a
placeholder">Recommended Games</property>
<property name="margin-top">24</property>
- <property name="margin-bottom">12</property>
+ <property name="margin-bottom">6</property>
<property name="margin-start">12</property>
<property name="margin-end">24</property>
<accessibility>
- <relation target="flowbox_categories" type="label-for"/>
+ <relation target="box_popular_rotating" type="label-for"/>
</accessibility>
<style>
<class name="index-title-alignment-software"/>
@@ -169,29 +249,25 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">6</property>
+ <property name="position">7</property>
</packing>
</child>
<child>
- <object class="GtkFlowBox" id="flowbox_categories">
+ <object class="GsHidingBox" id="box_popular_rotating">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
- <property name="margin-bottom">24</property>
- <property name="row_spacing">8</property>
- <property name="column_spacing">8</property>
- <property name="homogeneous">True</property>
- <property name="max_children_per_line">4</property>
- <property name="selection_mode">none</property>
+ <property name="spacing">14</property>
+ <property name="valign">start</property>
<accessibility>
- <relation target="category_heading" type="labelled-by"/>
+ <relation target="popular_rotating_heading" type="labelled-by"/>
</accessibility>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">7</property>
+ <property name="position">8</property>
</packing>
</child>
</object>
diff --git a/src/gtk-style.css b/src/gtk-style.css
index 42c3d1b..0a34985 100644
--- a/src/gtk-style.css
+++ b/src/gtk-style.css
@@ -25,6 +25,10 @@
border-radius: 1px;
}
+.round-button {
+ border-radius: 16px;
+}
+
.kudo-pill {
color: @theme_selected_fg_color;
background-color: shade(@theme_selected_bg_color, 1.1);
diff --git a/src/plugins/gs-plugin-menu-spec-categories.c b/src/plugins/gs-plugin-menu-spec-categories.c
index 0e2bd06..665574f 100644
--- a/src/plugins/gs-plugin-menu-spec-categories.c
+++ b/src/plugins/gs-plugin-menu-spec-categories.c
@@ -52,6 +52,7 @@ gs_plugin_add_categories (GsPlugin *plugin,
category = gs_category_new (msdata[i].path);
gs_category_set_icon (category, msdata[i].icon);
gs_category_set_name (category, gettext (msdata[i].name));
+ gs_category_set_important (category, msdata[i].important);
if (gdk_rgba_parse (&key_color, msdata[i].key_colors))
gs_category_add_key_color (category, &key_color);
g_ptr_array_add (list, category);
diff --git a/src/plugins/menu-spec-common.c b/src/plugins/menu-spec-common.c
index 3b3f774..d3e45ae 100644
--- a/src/plugins/menu-spec-common.c
+++ b/src/plugins/menu-spec-common.c
@@ -26,19 +26,21 @@
#include "menu-spec-common.h"
static const MenuSpecData msdata[] = {
- /* TRANSLATORS: this is the menu spec main category for Audio */
- { "Audio", N_("Audio"), "folder-music-symbolic", "#cc29ae" },
- { "Audio::AudioVideoEditing", NC_("Menu subcategory of Audio", "Editing") },
- { "Audio::Database", NC_("Menu subcategory of Audio", "Databases") },
- { "Audio::DiscBurning", NC_("Menu subcategory of Audio", "Disc Burning") },
- { "Audio::HamRadio", NC_("Menu subcategory of Audio", "Ham Radio") },
- { "Audio::Midi", NC_("Menu subcategory of Audio", "MIDI") },
- { "Audio::Mixer", NC_("Menu subcategory of Audio", "Mixer") },
- { "Audio::Music", NC_("Menu subcategory of Audio", "Music") },
- { "Audio::Player", NC_("Menu subcategory of Audio", "Players") },
- { "Audio::Recorder", NC_("Menu subcategory of Audio", "Recorders") },
- { "Audio::Sequencer", NC_("Menu subcategory of Audio", "Sequencers") },
- { "Audio::Tuner", NC_("Menu subcategory of Audio", "Tuners") },
+ /* TRANSLATORS: this is the menu spec main category for Audio & Video */
+ { "AudioVideo", N_("Audio & Video"), "folder-music-symbolic", "#215d9c", TRUE
},
+ { "AudioVideo::AudioVideoEditing", NC_("Menu subcategory of AudioVideo", "Editing") },
+ { "AudioVideo::Database", NC_("Menu subcategory of AudioVideo", "Databases") },
+ { "AudioVideo::DiscBurning", NC_("Menu subcategory of AudioVideo", "Disc Burning") },
+ { "AudioVideo::HamRadio", NC_("Menu subcategory of AudioVideo", "Ham Radio") },
+ { "AudioVideo::Midi", NC_("Menu subcategory of AudioVideo", "MIDI") },
+ { "AudioVideo::Mixer", NC_("Menu subcategory of AudioVideo", "Mixer") },
+ { "AudioVideo::Music", NC_("Menu subcategory of AudioVideo", "Music") },
+ { "AudioVideo::Player", NC_("Menu subcategory of AudioVideo", "Players") },
+ { "AudioVideo::Player", NC_("Menu subcategory of AudioVideo", "Players") },
+ { "AudioVideo::Recorder", NC_("Menu subcategory of AudioVideo", "Recorders") },
+ { "AudioVideo::Sequencer", NC_("Menu subcategory of AudioVideo", "Sequencers") },
+ { "AudioVideo::Tuner", NC_("Menu subcategory of AudioVideo", "Tuners") },
+ { "AudioVideo::TV", NC_("Menu subcategory of AudioVideo", "TV") },
/* TRANSLATORS: this is the menu spec main category for Development */
{ "Development", N_("Development Tools"), "applications-engineering-symbolic",
"#297bcc" },
{ "Development::Building", NC_("Menu subcategory of Development Tools", "Building") },
@@ -84,7 +86,7 @@ static const MenuSpecData msdata[] = {
{ "Education::Spirituality", NC_("Menu subcategory of Education", "Spirituality") },
{ "Education::Sports", NC_("Menu subcategory of Education", "Sports") },
/* TRANSLATORS: this is the menu spec main category for Games */
- { "Game", N_("Games"), "applications-games-symbolic", "#cc8529" },
+ { "Game", N_("Games"), "applications-games-symbolic", "#c4a000", TRUE },
{ "Game::ActionGame", NC_("Menu subcategory of Games", "Action") },
{ "Game::AdventureGame", NC_("Menu subcategory of Games", "Adventure") },
{ "Game::ArcadeGame", NC_("Menu subcategory of Games", "Arcade") },
@@ -100,7 +102,7 @@ static const MenuSpecData msdata[] = {
{ "Game::SportsGame", NC_("Menu subcategory of Games", "Sports") },
{ "Game::StrategyGame", NC_("Menu subcategory of Games", "Strategy") },
/* TRANSLATORS: this is the menu spec main category for Graphics */
- { "Graphics", N_("Graphics"), "applications-graphics-symbolic", "#ccbe29" },
+ { "Graphics", N_("Graphics & Photography"),
"applications-graphics-symbolic", "#75507b", TRUE },
{ "Graphics::2DGraphics", NC_("Menu subcategory of Graphics", "2D Graphics") },
{ "Graphics::3DGraphics", NC_("Menu subcategory of Graphics", "3D Graphics") },
{ "Graphics::OCR", NC_("Menu subcategory of Graphics", "OCR") },
@@ -111,7 +113,7 @@ static const MenuSpecData msdata[] = {
{ "Graphics::VectorGraphics", NC_("Menu subcategory of Graphics", "Vector Graphics") },
{ "Graphics::Viewer", NC_("Menu subcategory of Graphics", "Viewer") },
/* TRANSLATORS: this is the menu spec main category for Network */
- { "Network", N_("Internet"), "network-wireless-symbolic", "#cc2929" },
+ { "Network", N_("Communication"), "user-available-symbolic", "#729fcf",
TRUE },
{ "Network::Chat", NC_("Menu subcategory of Internet", "Chat") },
{ "Network::Dialup", NC_("Menu subcategory of Internet", "Dialup") },
{ "Network::Email", NC_("Menu subcategory of Internet", "Email") },
@@ -129,7 +131,7 @@ static const MenuSpecData msdata[] = {
{ "Network::WebBrowser", NC_("Menu subcategory of Internet", "Web Browser") },
{ "Network::WebDevelopment", NC_("Menu subcategory of Internet", "Web Development") },
/* TRANSLATORS: this is the menu spec main category for Office */
- { "Office", N_("Office"), "text-editor-symbolic", "#5d29cc" },
+ { "Office", N_("Productivity"), "text-editor-symbolic", "#cc0000", TRUE },
{ "Office::Calendar", NC_("Menu subcategory of Office", "Calendar") },
{ "Office::Chart", NC_("Menu subcategory of Office", "Chart") },
{ "Office::ContactManagement", NC_("Menu subcategory of Office", "Contact Management") },
@@ -198,16 +200,8 @@ static const MenuSpecData msdata[] = {
{ "Utility::Spirituality", NC_("Menu subcategory of Utilities", "Spirituality") },
{ "Utility::TelephonyTools", NC_("Menu subcategory of Utilities", "Telephony Tools") },
{ "Utility::TextEditor", NC_("Menu subcategory of Utilities", "Text Editor") },
- /* TRANSLATORS: this is the menu spec main category for Video */
- { "Video", N_("Video"), "folder-videos-symbolic", "#cc29ae" },
- { "Video::AudioVideoEditing", NC_("Menu subcategory of Video", "Editing") },
- { "Video::Database", NC_("Menu subcategory of Video", "Database") },
- { "Video::DiscBurning", NC_("Menu subcategory of Video", "Disc Burning") },
- { "Video::Player", NC_("Menu subcategory of Video", "Players") },
- { "Video::Recorder", NC_("Menu subcategory of Video", "Recorders") },
- { "Video::TV", NC_("Menu subcategory of Video", "TV") },
/* TRANSLATORS: this is the main category for Add-ons */
- { "Addons", N_("Add-ons"), "list-add-symbolic", "#cc5a29" },
+ { "Addons", N_("Add-ons"), "application-x-addon-symbolic", "#4e9a06",
TRUE },
{ "Addons::Fonts", NC_("Menu subcategory of Add-ons", "Fonts") },
{ "Addons::Codecs", NC_("Menu subcategory of Add-ons", "Codecs") },
{ "Addons::InputSources", NC_("Menu subcategory of Add-ons", "Input Sources") },
diff --git a/src/plugins/menu-spec-common.h b/src/plugins/menu-spec-common.h
index b5477e4..f1c5b2f 100644
--- a/src/plugins/menu-spec-common.h
+++ b/src/plugins/menu-spec-common.h
@@ -28,10 +28,11 @@ G_BEGIN_DECLS
typedef struct {
- const gchar *path;
- const gchar *name;
- const gchar *icon;
- const gchar *key_colors;
+ const gchar *path;
+ const gchar *name;
+ const gchar *icon;
+ const gchar *key_colors;
+ gboolean important;
} MenuSpecData;
const MenuSpecData *menu_spec_get_data (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]