Re: one function to go...

2012-12-28 Thread Stefan Sauer
On 12/23/2012 10:39 PM, Gary Kline wrote:

   guys,

   I need one 'quit' button in a small widget that says via the label
   = gtk_label_new(File does not exist);, and displays OK with 
   the Enter key icon.   Instead of having the user click  on a
   Quit or Close button, just hitting Enter would return control
   to the calling function.  I already have the Close  code roughed 
   out.  I want the GTK_BUTTON_OK in there to let hitting Enter
   work.

   thanks for any clues.
gtk_window_set_default()

Stefan
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


one function to go...

2012-12-23 Thread Gary Kline


guys,

I need one 'quit' button in a small widget that says via the label
= gtk_label_new(File does not exist);, and displays OK with 
the Enter key icon.   Instead of having the user click  on a
Quit or Close button, just hitting Enter would return control
to the calling function.  I already have the Close  code roughed 
out.  I want the GTK_BUTTON_OK in there to let hitting Enter
work.

thanks for any clues.
-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
  Twenty-six years of service to the Unix community.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: one function to go...

2012-12-23 Thread Andreas Rönnquist
On Sun, 23 Dec 2012 13:39:46 -0800,
Gary Klinekl...@thought.org wrote:



   guys,

   I need one 'quit' button in a small widget that says via the
   label = gtk_label_new(File does not exist);, and displays
   OK with the Enter key icon.   Instead of having the user
   click  on a Quit or Close button, just hitting Enter
   would return control to the calling function.  I already have
   the Close  code roughed out.  I want the GTK_BUTTON_OK in
   there to let hitting Enter work.

   thanks for any clues.

Do you mean that you have a OK button, and that button should be
activated when pressing enter?

In that case, the function gtk_widget_grab_focus might help:

http://developer.gnome.org/gtk3/3.6/GtkWidget.html#gtk-widget-grab-focus


-- Andreas Rönnquist
mailingli...@gusnan.se
gus...@gusnan.se
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: one function to go...

2012-12-23 Thread Gary Kline
On Sun, Dec 23, 2012 at 10:57:47PM +0100, Andreas Rönnquist wrote:
 On Sun, 23 Dec 2012 13:39:46 -0800,
 Gary Klinekl...@thought.org wrote:
 
 
 
  guys,
 
  I need one 'quit' button in a small widget that says via the
  label = gtk_label_new(File does not exist);, and displays
  OK with the Enter key icon.   Instead of having the user
  click  on a Quit or Close button, just hitting Enter
  would return control to the calling function.  I already have
  the Close  code roughed out.  I want the GTK_BUTTON_OK in
  there to let hitting Enter work.
 
  thanks for any clues.
 
 Do you mean that you have a OK button, and that button should be
 activated when pressing enter?


in this popup dialog I would have a few words that the
file does not exist and want a button WITH the Enter-key
icon that gives an iconic clue that all the user need do is
hit the enter key.  I suppose if the users could, if they wished,
mouse-click on the button.

 
 In that case, the function gtk_widget_grab_focus might help:
 
 http://developer.gnome.org/gtk3/3.6/GtkWidget.html#gtk-widget-grab-focus


thanks for the URL; I'Ll give it a look!

 
 -- Andreas Rönnquist
 mailingli...@gusnan.se
 gus...@gusnan.se


 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
  Twenty-six years of service to the Unix community.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: one function to go...

2012-12-23 Thread David Nečas
On Sun, Dec 23, 2012 at 02:35:31PM -0800, Gary Kline wrote:
 in this popup dialog I would have a few words that the
 file does not exist and want a button WITH the Enter-key
 icon that gives an iconic clue that all the user need do is
 hit the enter key.  I suppose if the users could, if they wished,
 mouse-click on the button.

I cannot speak for your target audience but according to my experience
(a) if people see a message box with a single button (probably with some
visual clue that it has focus) they will just press Enter or Esc to
make it go away, or
(b) if people see a button they will always use the pointer to click on
the button no matter what other, possibly much simpler, means may be
available to activate it.
This is a strict division with little between.  There is no way to
migrate people from (b) to (a), you can try for years with no effect.
So targetting those between you may find you are targetting a group of
size zero.

Just my 2 eurocents...

Yeti

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: one function to go...

2012-12-23 Thread Gary Kline
On Mon, Dec 24, 2012 at 12:37:07AM +0100, David Nečas wrote:
 On Sun, Dec 23, 2012 at 02:35:31PM -0800, Gary Kline wrote:
  in this popup dialog I would have a few words that the
  file does not exist and want a button WITH the Enter-key
  icon that gives an iconic clue that all the user need do is
  hit the enter key.  I suppose if the users could, if they wished,
  mouse-click on the button.
 
 I cannot speak for your target audience but according to my experience
 (a) if people see a message box with a single button (probably with some
 visual clue that it has focus) they will just press Enter or Esc to
 make it go away, or
 (b) if people see a button they will always use the pointer to click on
 the button no matter what other, possibly much simpler, means may be
 available to activate it.
 This is a strict division with little between.  There is no way to
 migrate people from (b) to (a), you can try for years with no effect.
 So targetting those between you may find you are targetting a group of
 size zero.
 
 Just my 2 eurocents...
 
 Yeti
 

point well taken.

gary



-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
  Twenty-six years of service to the Unix community.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list