Re: GQview 1.5.7 - intermittent off-by-one error in external editor shortcuts

John Ellis <[email protected]> Tue, 08 Feb 2005 18:17:29 -0500
Newsgroups gmane.comp.gnome.apps.gqview.devel
Message-ID <[email protected]>
Steven Mueller wrote:
> 
> Hello again,
> 
> I've been using GQview as a persistent file open dialog for Gimp for
> the past couple days; so I just recently noticed that sometimes when I
> hit ctrl-1 expecting to open a remote gimp window via external_1, I
> get the output of external_2 executing on my terminal instead.  When
> this first happened, I thought I just had a brain fade and the external
> commands' shortcuts were supposed to be numbered from 0.  I
> complacently switched to using ctrl-0 to bring up images in the gimp.
> 
> This morning I continued my project from the night before in the still
> running GQview; I hit ctrl-0 but it rotated my image instead!  And so,
> for a while ctrl-1 was back to running the Gimp, the way I had
> remembered it before (and the way it's documented, iirc).  Just now,
> it switched back to being ctrl-0.  Before digging in for some time
> consuming attempts at reproducing the flipflop, I thought I'd run the
> issue by you, John, (and the whole list, of course) to see if you or
> anyone else might know off-hand what might be causing this.

Confirmed, I guess I had a 'thinko' converting to the new menu system of GTK 2.4
for GQview 1.5.7, the attached patch will fix it, and the fix will be in 1.5.9.

Using any menu to start an editor slot should work fine, it is just that the
keyboard shortcuts are off in the main window and go from 0 to 9 when they
should be 1 to 0. Any window that is not a main window should be ok.

> I also have a related cosmetic usability enhancement suggestion:
> Perhaps the pop-up context menu of external editors could list the
> number or keyboard shortcut next to each editor.  I have all 10
> defined, and it's a minor inconvenience to have to count out the
> entries to derive the shortcut number.  (Though I suppose it does
> probably help me remember which number is which, since it takes a bit
> of extra thought to determine.  :)

The edit menu in the menu bar will list them, but I guess you never use it?

Greetings,
John

-- 
John Ellis <[email protected]>

http://gqview.sourceforge.net <GQview> | http://hideseek.sourceforge.net
http://gqmpeg.sourceforge.net <GQmpeg> |     <Preferences Hide and Seek>
gqview-editor-accel-fix.patch (text/plain, 2.4 KB)
Index: layout_util.c
===================================================================
RCS file: /devel/cvs/gqview/src/layout_util.c,v
retrieving revision 1.51
diff -u -r1.51 layout_util.c
--- layout_util.c	8 Feb 2005 13:11:07 -0000	1.51
+++ layout_util.c	8 Feb 2005 22:59:26 -0000
@@ -766,16 +766,16 @@
   { "CloseWindow",	GTK_STOCK_CLOSE,N_("C_lose window"),	"<control>W",	NULL,	CB(layout_menu_close_cb) },
   { "Quit",		GTK_STOCK_QUIT, N_("_Quit"),		"<control>Q",	NULL,	CB(layout_menu_exit_cb) },
 
-  { "Editor0",		NULL,		"editor0",		"<control>0",	NULL,	CB(layout_menu_edit_cb) },
-  { "Editor1",		NULL,		"editor1",		"<control>1",	NULL,	CB(layout_menu_edit_cb) },
-  { "Editor2",		NULL,		"editor2",		"<control>2",	NULL,	CB(layout_menu_edit_cb) },
-  { "Editor3",		NULL,		"editor3",		"<control>3",	NULL,	CB(layout_menu_edit_cb) },
-  { "Editor4",		NULL,		"editor4",		"<control>4",	NULL,	CB(layout_menu_edit_cb) },
-  { "Editor5",		NULL,		"editor5",		"<control>5",	NULL,	CB(layout_menu_edit_cb) },
-  { "Editor6",		NULL,		"editor6",		"<control>6",	NULL,	CB(layout_menu_edit_cb) },
-  { "Editor7",		NULL,		"editor7",		"<control>7",	NULL,	CB(layout_menu_edit_cb) },
-  { "Editor8",		NULL,		"editor8",		"<control>8",	NULL,	CB(layout_menu_edit_cb) },
-  { "Editor9",		NULL,		"editor9",		"<control>9",	NULL,	CB(layout_menu_edit_cb) },
+  { "Editor0",		NULL,		"editor0",		"<control>1",	NULL,	CB(layout_menu_edit_cb) },
+  { "Editor1",		NULL,		"editor1",		"<control>2",	NULL,	CB(layout_menu_edit_cb) },
+  { "Editor2",		NULL,		"editor2",		"<control>3",	NULL,	CB(layout_menu_edit_cb) },
+  { "Editor3",		NULL,		"editor3",		"<control>4",	NULL,	CB(layout_menu_edit_cb) },
+  { "Editor4",		NULL,		"editor4",		"<control>5",	NULL,	CB(layout_menu_edit_cb) },
+  { "Editor5",		NULL,		"editor5",		"<control>6",	NULL,	CB(layout_menu_edit_cb) },
+  { "Editor6",		NULL,		"editor6",		"<control>7",	NULL,	CB(layout_menu_edit_cb) },
+  { "Editor7",		NULL,		"editor7",		"<control>8",	NULL,	CB(layout_menu_edit_cb) },
+  { "Editor8",		NULL,		"editor8",		"<control>9",	NULL,	CB(layout_menu_edit_cb) },
+  { "Editor9",		NULL,		"editor9",		"<control>0",	NULL,	CB(layout_menu_edit_cb) },
   { "RotateCW",		NULL,	N_("_Rotate clockwise"),	"bracketright",	NULL,	CB(layout_menu_alter_90_cb) },
   { "RotateCCW",	NULL,	N_("Rotate _counterclockwise"),	"bracketleft",	NULL,	CB(layout_menu_alter_90cc_cb) },
   { "Rotate180",	NULL,		N_("Rotate 1_80"),	"<shift>R",	NULL,	CB(layout_menu_alter_180_cb) },