~ubuntu-branches/ubuntu/wily/scim/wily-proposed

« back to all changes in this revision

Viewing changes to debian/patches/21_scim-1.4.7-fix-capslock.patch

  • Committer: Bazaar Package Importer
  • Author(s): Rolf Leggewie
  • Date: 2010-08-11 18:28:44 UTC
  • mfrom: (3.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100811182844-rnn95k63cwehtm75
Tags: 1.4.9-5
* debian/copyright: add my copyright
* debian/control: update to standard 3.9.1, no further changes necessary

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Ignore caps lock to enable switcing input methods with it on
 
2
Status: committed upstream in r254, can be dropped past 1.4.9
 
3
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=431222
 
4
Author: Ikuya Awashiro <ikuya@fruitsbasket.info>
 
5
--- a/utils/scimkeyselection.cpp
 
6
+++ b/utils/scimkeyselection.cpp
 
7
@@ -267,6 +267,11 @@
 
8
     gtk_widget_show (keyselection->toggle_hyper);
 
9
     gtk_box_pack_start (GTK_BOX (hbox), keyselection->toggle_hyper, TRUE, TRUE, 2);
 
10
 
 
11
+
 
12
+    keyselection->toggle_capslock = gtk_check_button_new_with_mnemonic (_("Ca_psLock")); 
 
13
+    gtk_widget_show (keyselection->toggle_capslock);
 
14
+    gtk_box_pack_start (GTK_BOX (hbox), keyselection->toggle_capslock, TRUE, TRUE, 2);
 
15
+    
 
16
     hbox = gtk_hbox_new (TRUE, 0);
 
17
     gtk_widget_show (hbox);
 
18
     gtk_box_pack_start (GTK_BOX (keyselection), hbox, FALSE, FALSE, 4);
 
19
@@ -319,6 +324,8 @@
 
20
         key += String ("Super+");
 
21
     if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (keyselection->toggle_hyper)))
 
22
         key += String ("Hyper+");
 
23
+    if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (keyselection->toggle_capslock)))
 
24
+        key += String ("CapsLock+");
 
25
 
 
26
     key_code = String (gtk_entry_get_text (GTK_ENTRY (keyselection->key_code)));
 
27
     if (!key_code.length ()){
 
28
@@ -572,6 +579,9 @@
 
29
         GTK_TOGGLE_BUTTON (keyselection->toggle_hyper),
 
30
         event.is_hyper_down ());
 
31
     gtk_toggle_button_set_active (
 
32
+        GTK_TOGGLE_BUTTON (keyselection->toggle_capslock),
 
33
+        event.is_caps_lock_down ());
 
34
+    gtk_toggle_button_set_active (
 
35
         GTK_TOGGLE_BUTTON (keyselection->toggle_release),
 
36
         event.is_key_release ());
 
37
 
 
38
--- a/utils/scimkeyselection.h
 
39
+++ b/utils/scimkeyselection.h
 
40
@@ -36,6 +36,7 @@
 
41
     GtkWidget *toggle_meta;
 
42
     GtkWidget *toggle_super;
 
43
     GtkWidget *toggle_hyper;
 
44
+    GtkWidget *toggle_capslock;
 
45
     GtkWidget *toggle_release;
 
46
     GtkWidget *key_code;
 
47