Re: Accessibility of Gnome panel / How to end session via keyboard



I have answered the questions I can. I  think that you need to ask the other on 
a gnome mailing list. See http://mail.gnome.org/mailman/listinfo. Perhaps 
gnome-list or desktop-devel
> 
> I've been meaning to send this mail for a couple of weeks... As usual I got
> involved in a couple of other projects and wasn't able to follow up with
> this email until now (when I should be in bed. <grin>)
> 
> After sending out the email saying it didn't work; I approached the problem
> again the next day after a nights sleep and some relaxation.
> 
> The patch worked! What I think happen is either I forgot to copy the new
> binary over when I was trying to figure out what was wrong... or there
> were/are TWO places in the code that needed to be changed. I may have made
> the change in one place and not the other.
> 
> I'm now able to initiate a logout via keyboard using Padraig's patch
> information. THANKS PADRAIG! <grin>
> 
> I'm trying to understand a few things in the code; maybe someone can shed
> some light:
> 
> 1) Can someone point me to a good set of documentation on:
> a) Applying Patches to source trees.

I just use the patch command.

> b) What are .spec files and how do I use them?
> c) docs on how to use CSV?
> 

Try http://www.cvshome.org

> 2) I've kind of been hacking around in the gnome panel source code trying to
> figure out how the events / functions are fired (in what order). I've put
> some debug messages when go out to a file in various places in the code; but
> haven't figured out the order or enough information to make heads or tails
> on how the events occur.
> 
> Basically, what I'm trying to do is:
> 1) Perform (application specific in my case) certain actions when the
> gnome-panel has been constructed and is loaded and ready for keyboard input.
> 2) Perform a certain action when the menu is brought up on screen. IE if the
> user hit ALT-F1 I wanted to do something after the menu is displayed.
> 3) Perform an action when the menu is dismissed / hidden.
> 4) Perform an action when the menu is destroyed ... ie when the gnome
> session has ended.
> 
> In my application specific case; I wanted to send strings to a file which
> are read at various intervals to determine how execution is progressing.
> Kind of like an automated testing environment. I have another app which
> wakes up and reads this file to see where the execution has occurred and
> will flag errors for examination later.
> 
> I have some of these working by placing messages in various events like:
> INIT_MENU and Create_menu_at_fr() ... as I recall; but I was hoping to get a
> little more detail and/or a more robust method.
> 
> Any ideas / brainstorms?
> John
> 
> ----- Original Message ----- 
> From: "John Zitterkopf" <zitt zittware com>
> To: "Padraig O'Briain" <Padraig Obriain sun com>
> Cc: <gnome-accessibility-list gnome org>
> Sent: Tuesday, July 08, 2003 10:17 PM
> Subject: Re: Accessibility of Gnome panel / How to end session via keyboard
> 
> 
> > Padraig / ALL,
> >
> > I attempted to apply this patch after some initial stumbling around with
> the
> > installation of sources and such (see my other thread); but even after I
> got
> > gnome-panel to compile on my system without errors; I can't seem to get
> the
> > patch to give the correct results.
> >
> > 1) I manually edited the menu.c file and
> > 2) added the underscore (_) in front of the Log Out string ;
> > 3) recompiled the source...
> > 4) copied the gnome-panel binary to my usr/bin directory and
> > 5) startx to run gnome.
> >
> > Everything loaded fine... but the main menu on gnome didn't accept the hot
> > key of an L..
> > I tried to use the mouse to open the menu... then hit L, SHIFT-L, ALT-L,
> > CTRL-L and all other SHIFT/ALT/CTRL combos... none worked.
> >
> > So, I exited gnome using the mouse and logout and recompiled... then did a
> > 6) make install
> >
> > and re-ran gnome.
> >
> > Now the main panel disappeared all together. However, I could still bring
> up
> > the panel using <ALT-F1>; but it still didn't accept the L hot key like I
> > expected.
> >
> > So, I exited and reinstalled the gnome-panel from Mandrake's RPM on CD.
> > Verified gnome-panel was back in proper working order.
> >
> > I went back into menu.c and edited that same line... this time trying
> > _("Zitt _Log Out"));
> >
> > and recompiled, copied, and re-ran gnome...
> >
> > The logout menu item did not change it's text... and the L hot key still
> did
> > not work.
> >
> > I'm fairly sure missing something obvious.
> > I assume PANEL_STOCK_LOGOUT is a template which is a image that has to be
> > manually modified to show any string changes?
> > If so; why didn't the hot key work?
> >
> > I'm running gnome-panel 2.2.0 not the latest (2.3.??)... is this hotkey
> > feature part of a later version of gnome?
> >
> > Any ideas?
> > John
> >
> > ----- Original Message ----- 
> > From: "Padraig O'Briain" <Padraig Obriain sun com>
> > Sent: Friday, June 27, 2003 12:46 AM
> > Subject: Re: Accessibility of Gnome panel / How to end session via
> keyboard
> >
> >
> > > Patch to achieve this hack attached.
> > >
> > > Padraig
> > >
> > > >
> > > >
> > > > > If we look at Microshaft's implementation... you can do the
> following:
> > > > > <CTRL><ESC> (brings up start menu)
> > > > > S <selects Shutdown>
> > > > > U <selects Shutdown> or R <selects Reboot>
> > > > > <ENTER> (confirms selection)
> > > > >
> > > > > Ideally, I'd like to see Gnome do simular things:
> > > > > <ALT><F1> (brings up foot menu>
> > > > > L <selects Log Off>
> > > > > etc.
> > > > >
> > > > > IF I wanted to hack in this capability; where in the source code
> would
> > I
> > > look?
> > > > Look in gnome-panel/menu.c.  I think just inserting underscores in
> > > > front of the characters you want to make shortcuts, in the menu item
> > labels,
> > > > may do the trick.  I am checking now (but have to rebuild things
> first).
> > > >
> > > > - Bill
> > > > > John
> >
> >
> >
> > --------------------------------------------------------------------------
> --
> > ----
> >
> >
> > > Index: menu.c
> > > ===================================================================
> > > RCS file: /cvs/gnome/gnome-panel/gnome-panel/menu.c,v
> > > retrieving revision 1.642.2.8
> > > diff -u -p -r1.642.2.8 menu.c
> > > --- menu.c 10 Mar 2003 02:01:41 -0000 1.642.2.8
> > > +++ menu.c 27 Jun 2003 07:44:52 -0000
> > > @@ -3567,7 +3567,7 @@ create_desktop_menu (GtkWidget *menu, gb
> > >
> > >   menuitem = gtk_image_menu_item_new ();
> > >   setup_stock_menu_item (
> > > - menuitem, panel_menu_icon_get_size (), PANEL_STOCK_LOGOUT, _("Log
> > Out"));
> > > + menuitem, panel_menu_icon_get_size (), PANEL_STOCK_LOGOUT, _("_Log
> > Out"));
> > >   gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
> > >   g_signal_connect (menuitem, "activate",
> > >     G_CALLBACK (panel_action_logout), 0);
> > >
> >
> 
> _______________________________________________
> gnome-accessibility-list mailing list
> gnome-accessibility-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-accessibility-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]