[gnome-boxes] Make spinner spin
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Make spinner spin
- Date: Wed, 26 Sep 2012 10:16:50 +0000 (UTC)
commit f1edb6c31841a7b66103cc34ddb8a770d0c7da3c
Author: Alexander Larsson <alexl redhat com>
Date: Wed Sep 26 12:05:05 2012 +0200
Make spinner spin
This makes the spinner spin (by starting it) and uses the
new GdMainToolbar.add_widget() method to avoid putting the
spinner in a button, as that makes the spinning animation
look weird (themed as in a depressed button).
https://bugzilla.gnome.org/show_bug.cgi?id=684858
src/topbar.vala | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/topbar.vala b/src/topbar.vala
index 665bf61..402ac26 100644
--- a/src/topbar.vala
+++ b/src/topbar.vala
@@ -19,7 +19,6 @@ private class Boxes.Topbar: Boxes.UI {
private Gtk.ToggleButton search_btn;
private Gtk.Button select_btn;
private Gtk.Button cancel_btn;
- private Gtk.Button spinner_btn;
private Gtk.Button back_btn;
private Gtk.Button new_btn;
private Gd.MainToolbar selection_toolbar;
@@ -55,10 +54,10 @@ private class Boxes.Topbar: Boxes.UI {
back_btn.clicked.connect ((button) => { App.app.ui_state = UIState.COLLECTION; });
spinner = new Gtk.Spinner ();
- spinner.vexpand = true;
+ spinner.start ();
spinner.hexpand = true;
- spinner_btn = toolbar.add_button (null, null, false) as Gtk.Button;
- spinner_btn.add (spinner);
+ spinner.vexpand = true;
+ toolbar.add_widget (spinner, false);
search_btn = toolbar.add_toggle ("edit-find-symbolic", null, false) as Gtk.ToggleButton;
search_btn.bind_property ("active", App.app.searchbar, "visible", BindingFlags.BIDIRECTIONAL);
@@ -133,7 +132,7 @@ private class Boxes.Topbar: Boxes.UI {
set_status (null);
notebook.page = TopbarPage.COLLECTION;
back_btn.hide ();
- spinner_btn.hide ();
+ spinner.hide ();
select_btn.show ();
search_btn.show ();
new_btn.show ();
@@ -142,7 +141,7 @@ private class Boxes.Topbar: Boxes.UI {
case UIState.CREDS:
new_btn.hide ();
back_btn.show ();
- spinner_btn.show ();
+ spinner.show ();
select_btn.hide ();
search_btn.hide ();
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]