Re: Cannot catch signals from buttons of a gnome-dialog


Without seeing the code it is difficult to tell what might have gone
wrong.  My first guess is that the signals are not connected to the
handlers.  Does your code have lines like:





$gladexml->signal_connect_full (
      sub {

There are no such lines in my file. But, in the glade file, signal handlers are declared :

          <last_modification_time>Wed, 28 Aug 2002 08:22:13 GMT</last_modification_time>


Here is a piece of code generated by glade (new function to create dialog) :

sub new {
# This sub will create the UI window
    my $that  = shift;
    my $class = ref($that) || $that;
    my $self  = {
        $permitted_fields   => \%fields, %fields,
        _permitted_stubs    => \%stubs,  %stubs,
    my ($forms, $widgets, $data, $work);
    my $instance = 1;
    # Get a unique toplevel widget structure
    while (defined $__PACKAGE__::all_forms->{"dialog_appel-$instance"}) {$instance++;}
    # Construct a GnomeDialog 'dialog_appel'
    $widgets->{'dialog_appel'} = new Gnome::Dialog(_(''));
    $widgets->{'dialog_appel'}->close_hides(0 );
    $widgets->{'dialog_appel'}->set_close(0 );
    $widgets->{'dialog_appel'}->position('none' );
    $widgets->{'dialog_appel'}->set_policy(0, 0, 0 );
    $widgets->{'dialog_appel'}->set_modal(0 );
    $forms->{'dialog_appel'}{'tooltips'} = new Gtk::Tooltips;
    $forms->{'dialog_appel'}{'accelgroup'} = new Gtk::AccelGroup;
    $forms->{'dialog_appel'}{'accelgroup'}->attach($widgets->{'dialog_appel'} );
    $forms->{'dialog_appel'}{'dialog_appel'} = $widgets->{'dialog_appel'};
        # Construct a GtkVBox 'dialog-vbox2'
        $widgets->{'dialog-vbox2'} = $forms->{'dialog_appel'}{'dialog_appel'}->vbox;
        $forms->{'dialog_appel'}{'dialog-vbox2'} = $widgets->{'dialog-vbox2'};
            # Construct a GtkHButtonBox 'dialog-action_area2'
            $widgets->{'dialog-action_area2'} = $forms->{'dialog_appel'}{'dialog_appel'}->action_area;


In the code, buttons are appended to dialog but no signals are connected.

So, i've a signal handler in my glade file. And when i generate my perl code, no signal is conected on 
button. I think there's a bug or there's something i don't understand (sure).


Pour mieux recevoir vos emails, utilisez un PC plus performant !
Découvrez la nouvelle gamme DELL en exclusivité sur i (france)

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