Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Librem5
pureos-store
Commits
0b02d38c
Commit
0b02d38c
authored
Sep 20, 2013
by
Matthias Clasen
Browse files
Replace the last notebook by a stack
The hidden tabs were causing accessibility heartburn.
parent
9643df30
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/gnome-software.ui
View file @
0b02d38c
...
...
@@ -256,11 +256,8 @@
</packing>
</child>
<child>
<object
class=
"Gtk
Notebook"
id=
"noteboo
k_main"
>
<object
class=
"Gtk
Stack"
id=
"stac
k_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>
...
...
src/gs-shell.c
View file @
0b02d38c
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment