[gnome-boxes] app-window: Reset selection mode if appropriate
- From: Lasse Schuirmann <lschuirma src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] app-window: Reset selection mode if appropriate
- Date: Sat, 21 Feb 2015 19:29:27 +0000 (UTC)
commit c58b99441d2336877218fdf9d27230313db46521
Author: Adrien Plazas <kekun plazas laposte net>
Date: Sat Feb 21 12:49:21 2015 +0100
app-window: Reset selection mode if appropriate
This checks if the UIState is COLLECTION before setting the
selection_mode property. It fixes a runtime warning.
https://bugzilla.gnome.org/show_bug.cgi?id=744887
src/app-window.vala | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/app-window.vala b/src/app-window.vala
index 57c3f80..5a278e7 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -221,7 +221,8 @@ private class Boxes.AppWindow: Gtk.ApplicationWindow, Boxes.UI {
public void show_properties () {
if (current_item != null) {
- selection_mode = false;
+ if (ui_state == UIState.COLLECTION && selection_mode)
+ selection_mode = false;
set_state (UIState.PROPERTIES);
return;
@@ -229,7 +230,8 @@ private class Boxes.AppWindow: Gtk.ApplicationWindow, Boxes.UI {
var selected_items = view.get_selected_items ();
- selection_mode = false;
+ if (ui_state == UIState.COLLECTION && selection_mode)
+ selection_mode = false;
// Show for the first selected item
foreach (var item in selected_items) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]