[polari] joinDialog: Move accel handling into template
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] joinDialog: Move accel handling into template
- Date: Sat, 21 Aug 2021 01:29:35 +0000 (UTC)
commit 5dbb0024e6be59a416696a68b96c0894de1565d0
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Aug 19 00:13:21 2021 +0200
joinDialog: Move accel handling into template
Now that the relevant controls are defined in the template, there's
no reason anymore for keeping the accel definitions in the code.
https://gitlab.gnome.org/GNOME/polari/-/merge_requests/215
data/resources/join-room-dialog.ui | 2 ++
src/joinDialog.js | 8 --------
2 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/data/resources/join-room-dialog.ui b/data/resources/join-room-dialog.ui
index ce8104a4..c1b583c0 100644
--- a/data/resources/join-room-dialog.ui
+++ b/data/resources/join-room-dialog.ui
@@ -13,6 +13,7 @@
<object class="GtkButton" id="backButton">
<property name="visible">True</property>
<property name="focus-on-click">False</property>
+ <accelerator key="Left" modifiers="GDK_MOD1_MASK" signal="clicked"/>
<child>
<object class="GtkImage">
<property name="visible">True</property>
@@ -79,6 +80,7 @@
<property name="visible">True</property>
<property name="receives-default">True</property>
<property name="focus-on-click">False</property>
+ <accelerator key="n" modifiers="GDK_CONTROL_MASK" signal="clicked"/>
<child>
<object class="GtkBox">
<property name="visible">True</property>
diff --git a/src/joinDialog.js b/src/joinDialog.js
index a22c6416..7e1953a7 100644
--- a/src/joinDialog.js
+++ b/src/joinDialog.js
@@ -1,4 +1,3 @@
-import Gdk from 'gi://Gdk';
import Gio from 'gi://Gio';
import GLib from 'gi://GLib';
import GObject from 'gi://GObject';
@@ -33,13 +32,6 @@ export default GObject.registerClass({
params['use-header-bar'] = 1;
super._init(params);
- let accelGroup = new Gtk.AccelGroup();
- this._connectionButton.add_accelerator('clicked',
- accelGroup, Gdk.KEY_n, Gdk.ModifierType.CONTROL_MASK, 0);
- this._backButton.add_accelerator('clicked',
- accelGroup, Gdk.KEY_Left, Gdk.ModifierType.MOD1_MASK, 0);
- this.add_accel_group(accelGroup);
-
this._setupMainPage();
this._setupConnectionPage();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]