[gnome-control-center/wip/gbsneto/list-layout: 18/28] window: remove the previous button
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/gbsneto/list-layout: 18/28] window: remove the previous button
- Date: Thu, 26 May 2016 17:09:20 +0000 (UTC)
commit 25da164048e10ad23033a9849c095df51a1aff62
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sun May 22 14:01:52 2016 -0300
window: remove the previous button
The previous button is not present on the new sidelist
layout mockups, and doesn't really fit the current
behavior anymore.
This commit removes the previous button.
shell/cc-window.c | 16 ++--------------
shell/window.ui | 20 --------------------
2 files changed, 2 insertions(+), 34 deletions(-)
---
diff --git a/shell/cc-window.c b/shell/cc-window.c
index f838cae..c2faa71 100644
--- a/shell/cc-window.c
+++ b/shell/cc-window.c
@@ -56,7 +56,6 @@ struct _CcWindow
GtkWidget *header;
GtkWidget *main_vbox;
GtkWidget *search_scrolled;
- GtkWidget *previous_button;
GtkWidget *top_right_box;
GtkWidget *search_button;
GtkWidget *search_bar;
@@ -856,8 +855,7 @@ setup_model (CcWindow *shell)
}
static void
-previous_button_clicked_cb (GtkButton *button,
- CcWindow *shell)
+go_to_previous_panel (CcWindow *shell)
{
g_debug ("Num previous panels? %d", g_queue_get_length (shell->previous_panels));
if (g_queue_is_empty (shell->previous_panels)) {
@@ -885,13 +883,11 @@ stack_page_notify_cb (GtkStack *stack,
if (g_strcmp0 (id, OVERVIEW_PAGE) == 0 || g_strcmp0 (id, SEARCH_PAGE) == 0)
{
- gtk_widget_hide (self->previous_button);
gtk_widget_show (self->search_button);
gtk_widget_hide (self->lock_button);
}
else
{
- gtk_widget_show (self->previous_button);
gtk_widget_hide (self->search_button);
}
}
@@ -1182,14 +1178,12 @@ cc_window_class_init (CcWindowClass *klass)
gtk_widget_class_bind_template_child (widget_class, CcWindow, header_sizegroup);
gtk_widget_class_bind_template_child (widget_class, CcWindow, lock_button);
gtk_widget_class_bind_template_child (widget_class, CcWindow, main_vbox);
- gtk_widget_class_bind_template_child (widget_class, CcWindow, previous_button);
gtk_widget_class_bind_template_child (widget_class, CcWindow, search_bar);
gtk_widget_class_bind_template_child (widget_class, CcWindow, search_button);
gtk_widget_class_bind_template_child (widget_class, CcWindow, search_entry);
gtk_widget_class_bind_template_child (widget_class, CcWindow, stack);
gtk_widget_class_bind_template_child (widget_class, CcWindow, top_right_box);
- gtk_widget_class_bind_template_callback (widget_class, previous_button_clicked_cb);
gtk_widget_class_bind_template_callback (widget_class, gdk_window_set_cb);
gtk_widget_class_bind_template_callback (widget_class, search_entry_changed_cb);
gtk_widget_class_bind_template_callback (widget_class, search_entry_key_press_event_cb);
@@ -1275,7 +1269,7 @@ window_key_press_event (GtkWidget *win,
(is_rtl && state == GDK_MOD1_MASK && event->keyval == GDK_KEY_Right) ||
event->keyval == GDK_KEY_Back)
{
- previous_button_clicked_cb (NULL, self);
+ go_to_previous_panel (self);
retval = GDK_EVENT_STOP;
}
return retval;
@@ -1296,12 +1290,6 @@ create_search_page (CcWindow *self)
static void
create_window (CcWindow *self)
{
- AtkObject *accessible;
-
- /* previous button */
- accessible = gtk_widget_get_accessible (self->previous_button);
- atk_object_set_name (accessible, _("All Settings"));
-
gtk_window_set_titlebar (GTK_WINDOW (self), self->header);
gtk_header_bar_set_title (GTK_HEADER_BAR (self->header), _(DEFAULT_WINDOW_TITLE));
gtk_widget_show_all (self->header);
diff --git a/shell/window.ui b/shell/window.ui
index 2fc30e4..9c4608d 100644
--- a/shell/window.ui
+++ b/shell/window.ui
@@ -140,25 +140,6 @@
<property name="can_focus">False</property>
<property name="show_close_button">True</property>
<child>
- <object class="GtkButton" id="previous_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="no_show_all">True</property>
- <signal name="clicked" handler="previous_button_clicked_cb" object="CcWindow" swapped="no" />
- <child>
- <object class="GtkImage">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="icon_name">go-previous-symbolic</property>
- </object>
- </child>
- <style>
- <class name="image-button"/>
- </style>
- </object>
- </child>
- <child>
<object class="GtkToggleButton" id="search_button">
<property name="visible">True</property>
<property name="active" bind-source="search_bar" bind-property="search-mode-enabled"
bind-flags="bidirectional" />
@@ -209,7 +190,6 @@
<widgets>
<widget name="lock_button"/>
<widget name="search_button"/>
- <widget name="previous_button"/>
</widgets>
</object>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]