r53350 - in /desktop/unstable/gnome-power-manager/debian: changelog patches/ctrl-q-quit.patch patches/series
jbicha at users.alioth.debian.org
jbicha at users.alioth.debian.org
Fri Sep 1 23:36:11 UTC 2017
Author: jbicha
Date: Fri Sep 1 23:36:11 2017
New Revision: 53350
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=53350
Log:
Add ctrl-q-quit.patch from Ubuntu
Added:
desktop/unstable/gnome-power-manager/debian/patches/ctrl-q-quit.patch
Modified:
desktop/unstable/gnome-power-manager/debian/changelog
desktop/unstable/gnome-power-manager/debian/patches/series
Modified: desktop/unstable/gnome-power-manager/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-power-manager/debian/changelog?rev=53350&op=diff
==============================================================================
--- desktop/unstable/gnome-power-manager/debian/changelog [utf-8] (original)
+++ desktop/unstable/gnome-power-manager/debian/changelog [utf-8] Fri Sep 1 23:36:11 2017
@@ -2,6 +2,8 @@
* New upstream release
* Switch to meson
+ * Add ctrl-q-quit.patch from Ubuntu
+ - Make Ctrl+q close the application
-- Jeremy Bicha <jbicha at debian.org> Fri, 01 Sep 2017 19:29:16 -0400
Added: desktop/unstable/gnome-power-manager/debian/patches/ctrl-q-quit.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-power-manager/debian/patches/ctrl-q-quit.patch?rev=53350&op=file
==============================================================================
--- desktop/unstable/gnome-power-manager/debian/patches/ctrl-q-quit.patch (added)
+++ desktop/unstable/gnome-power-manager/debian/patches/ctrl-q-quit.patch [utf-8] Fri Sep 1 23:36:11 2017
@@ -0,0 +1,59 @@
+Description: Make Ctrl+q close the application
+Author: Dedunu Dhananjaya <admin at dedunu.info>
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=678115
+Bug-Ubuntu: https://launchpad.net/bugs/923292
+---
+ src/gpm-statistics.c | 35 +++++++++++++++++++++++++++++++++++
+ 1 file changed, 35 insertions(+)
+
+--- a/src/gpm-statistics.c
++++ b/src/gpm-statistics.c
+@@ -1627,6 +1627,37 @@ out:
+ return found;
+ }
+
++static gboolean
++window_key_press_event (GtkWidget *win,
++ GdkEventKey *event,
++ GApplication *self)
++{
++ GdkKeymap *keymap;
++ gboolean retval;
++ GdkModifierType state;
++
++ if (event->state == 0)
++ return FALSE;
++
++ retval = FALSE;
++ state = event->state;
++ keymap = gdk_keymap_get_default ();
++ gdk_keymap_add_virtual_modifiers (keymap, &state);
++ state = state & gtk_accelerator_get_default_mod_mask ();
++
++ if (state == GDK_CONTROL_MASK) {
++ switch (event->keyval) {
++ case GDK_KEY_Q:
++ case GDK_KEY_q:
++ g_application_quit(self);
++ retval = TRUE;
++ break;
++ }
++ }
++ return retval;
++}
++
++
+ static int
+ gpm_stats_commandline_cb (GApplication *application,
+ GApplicationCommandLine *cmdline,
+@@ -1760,6 +1791,10 @@ gpm_stats_startup_cb (GApplication *appl
+ g_signal_connect (widget, "switch-page",
+ G_CALLBACK (gpm_stats_notebook_changed_cb), NULL);
+
++ /* listen to signal of keys */
++ g_signal_connect_after (window, "key_press_event",
++ G_CALLBACK (window_key_press_event), application);
++
+ /* create list stores */
+ list_store_info = gtk_list_store_new (GPM_INFO_COLUMN_LAST, G_TYPE_STRING, G_TYPE_STRING);
+ list_store_devices = gtk_list_store_new (GPM_DEVICES_COLUMN_LAST, G_TYPE_ICON,
Modified: desktop/unstable/gnome-power-manager/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-power-manager/debian/patches/series?rev=53350&op=diff
==============================================================================
--- desktop/unstable/gnome-power-manager/debian/patches/series [utf-8] (original)
+++ desktop/unstable/gnome-power-manager/debian/patches/series [utf-8] Fri Sep 1 23:36:11 2017
@@ -1 +1,2 @@
0001-Rename-the-application-id-passed-to-the-gtk_applicat.patch
+ctrl-q-quit.patch
More information about the pkg-gnome-commits
mailing list