Commit 0b02d38c authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Replace the last notebook by a stack

The hidden tabs were causing accessibility heartburn.
parent 9643df30
......@@ -256,11 +256,8 @@
</packing>
</child>
<child>
<object class="GtkNotebook" id="notebook_main">
<object class="GtkStack" id="stack_main">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="show_border">False</property>
<property name="show_tabs">False</property>
<child>
<object class="GtkStack" id="stack_overview">
<property name="visible">True</property>
......@@ -462,15 +459,8 @@
</packing>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">All</property>
</object>
<packing>
<property name="tab_fill">False</property>
<property name="name">overview</property>
</packing>
</child>
<child>
......@@ -513,13 +503,9 @@
</packing>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">Installed</property>
</object>
<packing>
<property name="name">installed</property>
</packing>
</child>
<child>
<object class="GtkStack" id="stack_search">
......@@ -603,13 +589,9 @@
</packing>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel" id="label_tab_search">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">Search</property>
</object>
<packing>
<property name="name">search</property>
</packing>
</child>
<child>
<object class="GtkStack" id="stack_updates">
......@@ -687,13 +669,9 @@
</packing>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">Updates</property>
</object>
<packing>
<property name="name">updates</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow_details">
......@@ -834,13 +812,9 @@
</object>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Application</property>
</object>
<packing>
<property name="name">details</property>
</packing>
</child>
<child>
<object class="GsBox" id="box_category">
......@@ -919,13 +893,9 @@
</packing>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel" id="label11">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Category</property>
</object>
<packing>
<property name="name">category</property>
</packing>
</child>
</object>
<packing>
......
......@@ -33,6 +33,16 @@
#include "gs-shell-updates.h"
#include "gs-shell-category.h"
static const gchar *page_name[] = {
"overview",
"installed",
"search",
"updates",
"details",
"category",
"updates"
};
static void gs_shell_finalize (GObject *object);
#define GS_SHELL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GS_TYPE_SHELL, GsShellPrivate))
......@@ -130,9 +140,8 @@ gs_shell_change_mode (GsShell *shell, GsShellMode mode, GsApp *app, GsCategory *
priv->ignore_primary_buttons = FALSE;
/* switch page */
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "notebook_main"));
gtk_notebook_set_current_page (GTK_NOTEBOOK (widget),
mode == GS_SHELL_MODE_UPDATED ? GS_SHELL_MODE_UPDATES : mode);
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "stack_main"));
gtk_stack_set_visible_child_name (GTK_STACK (widget), page_name[mode]);
/* do action for mode */
priv->mode = mode;
......
Supports Markdown
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