[gnome-boxes] Add pause button to selection toolbar
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Add pause button to selection toolbar
- Date: Fri, 26 Oct 2012 15:00:03 +0000 (UTC)
commit a27bc03844f0b67b097b040d3e32060d61cd5bde
Author: Alexander Larsson <alexl redhat com>
Date: Thu Oct 25 18:57:52 2012 +0200
Add pause button to selection toolbar
https://bugzilla.gnome.org/show_bug.cgi?id=686777
src/selectionbar.vala | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/src/selectionbar.vala b/src/selectionbar.vala
index 05a22ec..d9f5f7f 100644
--- a/src/selectionbar.vala
+++ b/src/selectionbar.vala
@@ -9,6 +9,7 @@ private class Boxes.Selectionbar: GLib.Object {
private GtkClutter.Actor gtk_actor;
private Gtk.Toolbar toolbar;
private Gtk.ToggleToolButton favorite_btn;
+ private Gtk.ToolButton pause_btn;
private Gtk.ToggleToolButton remove_btn;
public Selectionbar () {
@@ -39,6 +40,24 @@ private class Boxes.Selectionbar: GLib.Object {
}
});
+ pause_btn = new Gtk.ToolButton (null, null);
+ toolbar.insert (pause_btn, -1);
+ pause_btn.icon_name = "media-playback-pause-symbolic";
+ pause_btn.clicked.connect (() => {
+ foreach (var item in App.app.selected_items) {
+ var machine = item as Machine;
+ if (machine == null)
+ continue;
+ machine.save.begin ( (obj, result) => {
+ try {
+ machine.save.end (result);
+ } catch (GLib.Error e) {
+ App.app.notificationbar.display_error (_("Pausing '%s' failed").printf (machine.name));
+ }
+ });
+ }
+ });
+
var separator = new Gtk.SeparatorToolItem();
toolbar.insert(separator, -1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]