[polari] roomList: Allow right-clicks to trigger header popover
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] roomList: Allow right-clicks to trigger header popover
- Date: Fri, 29 Jan 2016 14:42:34 +0000 (UTC)
commit fbb86b2e938e4488a95ac640d185b4fc89dcfe4b
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Jan 29 15:31:11 2016 +0100
roomList: Allow right-clicks to trigger header popover
Unlike rows, where we distinguish between primary (activating the room) and
secondary action (showing the context popover), room headers only have a
single possible action - triggering the popover. It isn't really useful to
restrict that to left clicks, so simply treat secondary button events as
primary ones.
https://bugzilla.gnome.org/show_bug.cgi?id=761288
src/roomList.js | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/roomList.js b/src/roomList.js
index 51e568c..587df33 100644
--- a/src/roomList.js
+++ b/src/roomList.js
@@ -218,6 +218,19 @@ const RoomListHeader = new Lang.Class({
this.get_accessible().set_name(accessibleName);
},
+ /* hack: Handle primary and secondary button interchangeably */
+ vfunc_button_press_event: function(event) {
+ if (event.button == Gdk.BUTTON_SECONDARY)
+ event.button = Gdk.BUTTON_PRIMARY;
+ return this.parent(event);
+ },
+
+ vfunc_button_release_event: function(event) {
+ if (event.button == Gdk.BUTTON_SECONDARY)
+ event.button = Gdk.BUTTON_PRIMARY;
+ return this.parent(event);
+ },
+
_onConnectionStatusChanged: function() {
let status = this._account.connection_status;
let reason = this._account.connection_status_reason;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]