From patchwork Sun May 24 15:46:39 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 25594 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4OFiXVs012408 for ; Sun, 24 May 2009 15:44:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754757AbZEXPo2 (ORCPT ); Sun, 24 May 2009 11:44:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754573AbZEXPo1 (ORCPT ); Sun, 24 May 2009 11:44:27 -0400 Received: from mx2.redhat.com ([66.187.237.31]:49711 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754703AbZEXPo0 (ORCPT ); Sun, 24 May 2009 11:44:26 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4OFiS32029829 for ; Sun, 24 May 2009 11:44:28 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4OFiSVx019923; Sun, 24 May 2009 11:44:28 -0400 Received: from localhost.localdomain (dhcp-1-188.tlv.redhat.com [10.35.1.188]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4OFiMTv009023; Sun, 24 May 2009 11:44:27 -0400 From: Michael Goldish To: kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH] stepeditor.py: get rid of some annoying keyboard shortcuts Date: Sun, 24 May 2009 18:46:39 +0300 Message-Id: <6a70cb56a775fdb688da0231073abb0ce4baa7b1.1243179847.git.mgoldish@redhat.com> In-Reply-To: References: <8e37a36c044c20259dcd8a34d72a651e85b37d5f.1243179847.git.mgoldish@redhat.com> <838bcae1b49be011e2cde1294a391a296059464a.1243179847.git.mgoldish@redhat.com> In-Reply-To: <8e37a36c044c20259dcd8a34d72a651e85b37d5f.1243179847.git.mgoldish@redhat.com> References: <8e37a36c044c20259dcd8a34d72a651e85b37d5f.1243179847.git.mgoldish@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 --- 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 = ''' - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - ''' +''' # 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)