All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Goldish <mgoldish@redhat.com>
To: kvm@vger.kernel.org
Cc: Michael Goldish <mgoldish@redhat.com>
Subject: [KVM-AUTOTEST PATCH] stepeditor.py: get rid of some annoying keyboard shortcuts
Date: Sun, 24 May 2009 18:46:39 +0300	[thread overview]
Message-ID: <6a70cb56a775fdb688da0231073abb0ce4baa7b1.1243179847.git.mgoldish@redhat.com> (raw)
In-Reply-To: <ba3aa2425bb0235dc60c2d81f1690e72df7a5140.1243179847.git.mgoldish@redhat.com>
In-Reply-To: <8e37a36c044c20259dcd8a34d72a651e85b37d5f.1243179847.git.mgoldish@redhat.com>

Disable a few keyboard shortcuts that were initially assumed to be useful,
but apparently override the default functionality of the involved keys (e.g.
'home', 'end', 'delete') regardless of the widget that has the keyboard focus.

Also make some indentation changes to the UI description.

Signed-off-by: Michael Goldish <mgoldish@redhat.com>
---
 client/tests/kvm_runtest_2/stepeditor.py |   59 ++++++++++++++----------------
 1 files changed, 28 insertions(+), 31 deletions(-)

diff --git a/client/tests/kvm_runtest_2/stepeditor.py b/client/tests/kvm_runtest_2/stepeditor.py
index de9a2b1..f21244b 100755
--- a/client/tests/kvm_runtest_2/stepeditor.py
+++ b/client/tests/kvm_runtest_2/stepeditor.py
@@ -790,27 +790,27 @@ class StepMakerWindow:
 class StepEditor(StepMakerWindow):
     ui = '''<ui>
     <menubar name="MenuBar">
-      <menu action="File">
-        <menuitem action="Open"/>
-        <separator/>
-        <menuitem action="Quit"/>
-      </menu>
-      <menu action="Edit">
-        <menuitem action="CopyStep"/>
-        <menuitem action="DeleteStep"/>
-      </menu>
-      <menu action="Insert">
-        <menuitem action="InsertNewBefore"/>
-        <menuitem action="InsertNewAfter"/>
-        <separator/>
-        <menuitem action="InsertStepsBefore"/>
-        <menuitem action="InsertStepsAfter"/>
-      </menu>
-      <menu action="Tools">
-        <menuitem action="CleanUp"/>
-      </menu>
+        <menu action="File">
+            <menuitem action="Open"/>
+            <separator/>
+            <menuitem action="Quit"/>
+        </menu>
+        <menu action="Edit">
+            <menuitem action="CopyStep"/>
+            <menuitem action="DeleteStep"/>
+        </menu>
+        <menu action="Insert">
+            <menuitem action="InsertNewBefore"/>
+            <menuitem action="InsertNewAfter"/>
+            <separator/>
+            <menuitem action="InsertStepsBefore"/>
+            <menuitem action="InsertStepsAfter"/>
+        </menu>
+        <menu action="Tools">
+            <menuitem action="CleanUp"/>
+        </menu>
     </menubar>
-    </ui>'''
+</ui>'''
 
     # Constructor
 
@@ -828,19 +828,19 @@ class StepEditor(StepMakerWindow):
         self.window.add_accel_group(accelgroup)
 
         # Create an ActionGroup
-        actiongroup = gtk.ActionGroup('UIManagerExample')
+        actiongroup = gtk.ActionGroup('StepEditor')
 
         # Create actions
         actiongroup.add_actions([
             ('Quit', gtk.STOCK_QUIT, '_Quit', None, 'Quit the Program', self.quit),
             ('Open', gtk.STOCK_OPEN, '_Open', None, 'Open steps file', self.open_steps_file),
-            ('CopyStep', gtk.STOCK_COPY, '_Copy current step...', None, 'Copy current step to user specified position', self.copy_step),
-            ('DeleteStep', gtk.STOCK_DELETE, '_Delete current step', None, 'Delete current step', self.event_remove_clicked),
-            ('InsertNewBefore', gtk.STOCK_ADD, '_New step before current', None, 'Insert new step before current step', self.insert_before),
-            ('InsertNewAfter', gtk.STOCK_ADD, 'N_ew step after current', None, 'Insert new step after current step', self.insert_after),
-            ('InsertStepsBefore', gtk.STOCK_ADD, '_Steps before current...', None, 'Insert steps (from file) before current step', self.insert_steps_before),
-            ('InsertStepsAfter', gtk.STOCK_ADD, 'Steps _after current...', None, 'Insert steps (from file) after current step', self.insert_steps_after),
-            ('CleanUp', gtk.STOCK_DELETE, '_Clean up data directory', None, 'Move unused PPM files to a backup directory', self.cleanup),
+            ('CopyStep', gtk.STOCK_COPY, '_Copy current step...', "", 'Copy current step to user specified position', self.copy_step),
+            ('DeleteStep', gtk.STOCK_DELETE, '_Delete current step', "", 'Delete current step', self.event_remove_clicked),
+            ('InsertNewBefore', gtk.STOCK_ADD, '_New step before current', "", 'Insert new step before current step', self.insert_before),
+            ('InsertNewAfter', gtk.STOCK_ADD, 'N_ew step after current', "", 'Insert new step after current step', self.insert_after),
+            ('InsertStepsBefore', gtk.STOCK_ADD, '_Steps before current...', "", 'Insert steps (from file) before current step', self.insert_steps_before),
+            ('InsertStepsAfter', gtk.STOCK_ADD, 'Steps _after current...', "", 'Insert steps (from file) after current step', self.insert_steps_after),
+            ('CleanUp', gtk.STOCK_DELETE, '_Clean up data directory', "", 'Move unused PPM files to a backup directory', self.cleanup),
             ('File', None, '_File'),
             ('Edit', None, '_Edit'),
             ('Insert', None, '_Insert'),
@@ -860,9 +860,6 @@ class StepEditor(StepMakerWindow):
 
         create_shortcut("Next", self.event_next_clicked, "Page_Down")
         create_shortcut("Previous", self.event_prev_clicked, "Page_Up")
-        create_shortcut("First", self.event_first_clicked, "Home")
-        create_shortcut("Last", self.event_last_clicked, "End")
-        create_shortcut("Delete", self.event_remove_clicked, "Delete")
 
         # Add the actiongroup to the uimanager
         uimanager.insert_action_group(actiongroup, 0)
-- 
1.5.4.1


  reply	other threads:[~2009-05-24 15:44 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-24 15:46 [KVM-AUTOTEST PATCH] RHEL-4.7 step files: fix the initial boot barriers Michael Goldish
2009-05-24 15:46 ` [KVM-AUTOTEST PATCH] RHEL-5.3 step files: fix initial boot barriers and an inconsistent dialog Michael Goldish
2009-05-24 15:46   ` [KVM-AUTOTEST PATCH] WinXP step files: add an optional barrier to deal with a closed start menu Michael Goldish
2009-05-24 15:46     ` Michael Goldish [this message]
2009-05-24 15:46       ` [KVM-AUTOTEST PATCH] Use new function VM.get_name() to get the VM's name, instead of VM.name Michael Goldish
2009-05-24 15:46         ` [KVM-AUTOTEST PATCH] VM.create(): always destroy() the VM before attempting to start it Michael Goldish
2009-05-24 15:46           ` [KVM-AUTOTEST PATCH] kvm_vm.py: choose a monitor filename in the constructor instead of VM.create() Michael Goldish
2009-05-24 15:46             ` [KVM-AUTOTEST PATCH] kvm_vm.py: make sure the bulk of VM.create() is not executed in parallel Michael Goldish
2009-05-24 15:46               ` [KVM-AUTOTEST PATCH] kvm_vm.py: add new function VM.clone() which returns a clone of the VM Michael Goldish
2009-05-24 15:46                 ` [KVM-AUTOTEST PATCH] kvm_utils.py: remote_login(): improve regular expression matching Michael Goldish
2009-05-24 15:46                   ` [KVM-AUTOTEST PATCH] kvm_vm.py: add new VM parameter 'x11_display' that controls $DISPLAY Michael Goldish
2009-05-24 15:46                     ` [KVM-AUTOTEST PATCH] kvm_runtest_2.py: use environment filename specified by the 'env' parameter Michael Goldish
2009-05-24 15:46                       ` [KVM-AUTOTEST PATCH] kvm_runtest_2.py: use pickle instead of shelve when loading/saving env Michael Goldish
2009-05-28 13:26                         ` Lucas Meneghel Rodrigues
2009-05-24 19:03                       ` [KVM-AUTOTEST PATCH] kvm_runtest_2.py: use environment filename specified by the 'env' parameter sudhir kumar
2009-05-28 13:26                       ` Lucas Meneghel Rodrigues
2009-05-28 13:26                     ` [KVM-AUTOTEST PATCH] kvm_vm.py: add new VM parameter 'x11_display' that controls $DISPLAY Lucas Meneghel Rodrigues
2009-05-24 18:59                   ` [KVM-AUTOTEST PATCH] kvm_utils.py: remote_login(): improve regular expression matching sudhir kumar
2009-05-29  6:12                   ` Lucas Meneghel Rodrigues
2009-05-25 12:01                 ` [KVM-AUTOTEST PATCH] kvm_vm.py: add new function VM.clone() which returns a clone of the VM Avi Kivity
2009-05-24 19:25               ` [KVM-AUTOTEST PATCH] kvm_vm.py: make sure the bulk of VM.create() is not executed in parallel sudhir kumar
2009-05-28 14:17           ` [KVM-AUTOTEST PATCH] VM.create(): always destroy() the VM before attempting to start it Lucas Meneghel Rodrigues
2009-05-28 13:06         ` [KVM-AUTOTEST PATCH] Use new function VM.get_name() to get the VM's name, instead of VM.name Lucas Meneghel Rodrigues
2009-06-03  5:01           ` Michael Goldish
2009-06-03 23:26             ` Lucas Meneghel Rodrigues
2009-05-24 19:31     ` [KVM-AUTOTEST PATCH] WinXP step files: add an optional barrier to deal with a closed start menu sudhir kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6a70cb56a775fdb688da0231073abb0ce4baa7b1.1243179847.git.mgoldish@redhat.com \
    --to=mgoldish@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.