[gnome-boxes] display-page: More specific names for grab props
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] display-page: More specific names for grab props
- Date: Fri, 13 Feb 2015 17:24:32 +0000 (UTC)
commit 9028df049745db53f04486d0e0e72955eabe79ec
Author: Pavel Grunt <pgrunt redhat com>
Date: Sat Feb 7 11:19:56 2015 +0100
display-page: More specific names for grab props
We'll soon want properties/fields for keyboard grab too so this is to
keep the code more clear/readable.
Co-author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
https://bugzilla.gnome.org/show_bug.cgi?id=743319
src/display-page.vala | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/display-page.vala b/src/display-page.vala
index 3323a51..615cf19 100644
--- a/src/display-page.vala
+++ b/src/display-page.vala
@@ -33,13 +33,13 @@ private class Boxes.DisplayPage: Gtk.Box {
return display != null ? display.can_grab_mouse : false;
}
}
- private bool grabbed {
+ private bool mouse_grabbed {
get {
return display != null ? display.mouse_grabbed : false;
}
}
- private ulong display_can_grab_id;
- private ulong display_grabbed_id;
+ private ulong can_grab_mouse_id;
+ private ulong mouse_grabbed_id;
public void setup_ui (AppWindow window) {
this.window = window;
@@ -96,7 +96,7 @@ private class Boxes.DisplayPage: Gtk.Box {
return_if_fail (machine != null);
string? hint = null;
- if (grabbed)
+ if (mouse_grabbed)
hint = _("Press (left) Ctrl+Alt to ungrab");
toolbar.set_subtitle (hint);
@@ -116,7 +116,7 @@ private class Boxes.DisplayPage: Gtk.Box {
remove_display ();
this.display = display;
- display_grabbed_id = display.notify["mouse-grabbed"].connect(() => {
+ mouse_grabbed_id = display.notify["mouse-grabbed"].connect(() => {
// In some cases this is sent inside size_allocate (see bug #692465)
// which causes the label change queue_resize to be ignored
// So we delay the update_subtitle call to an idle to work around this.
@@ -126,7 +126,7 @@ private class Boxes.DisplayPage: Gtk.Box {
});
});
update_toolbar_visible ();
- display_can_grab_id = display.notify["can-grab-mouse"].connect(() => {
+ can_grab_mouse_id = display.notify["can-grab-mouse"].connect(() => {
update_toolbar_visible ();
});
@@ -156,14 +156,14 @@ private class Boxes.DisplayPage: Gtk.Box {
}
public Widget? remove_display () {
- if (display_grabbed_id != 0) {
- display.disconnect (display_grabbed_id);
- display_grabbed_id = 0;
+ if (mouse_grabbed_id != 0) {
+ display.disconnect (mouse_grabbed_id);
+ mouse_grabbed_id = 0;
}
- if (display_can_grab_id != 0) {
- display.disconnect (display_can_grab_id);
- display_can_grab_id = 0;
+ if (can_grab_mouse_id != 0) {
+ display.disconnect (can_grab_mouse_id);
+ can_grab_mouse_id = 0;
}
var widget = event_box.get_child ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]