Re: Gtk2::Assistant: Access to Buttons



On Tue, 2007-07-03 at 18:21 +0200, Peter Daum wrote:

To make usage as convenient as possible, I would like the return key to always
do the next logical step (focus the next entry field or trigger the "forward"
button)

Indeed, there seems to be no convenient way to do this in the Perl
bindings.  The only way I see is:

  $e1->signal_connect(activate => sub {
    $assistant->set_current_page ($assistant->get_current_page + 1);
  });

Although they are not documented, the C header file does export struct
members corresponding to the buttons:

  struct _GtkAssistant
  {
    GtkWindow  parent;
  
    GtkWidget *cancel;
    GtkWidget *forward;
    GtkWidget *back;
    GtkWidget *apply;
    GtkWidget *close;
    GtkWidget *last;
  
    /*< private >*/
    GtkAssistantPrivate *priv;
  };

So you actually can access the buttons from C and I wonder if we should
provide accessors in the bindings?

-- 
Bye,
-Torsten




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