diff options
Diffstat (limited to 'rhimport')
-rwxr-xr-x | rhimport | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -236,23 +236,32 @@ sub clear_status_gui() $progressbar->set_fraction(0); } +sub dropbox_updated_gui() +{ + if(!$guixml) { + print STDERR "no GUI definition found!\n"; + exit 0; + } + + +} + if(!$FILE || !$DROPBOX) { Gtk2->init; $guixml = Gtk2::GladeXML->new('rhimport.glade'); $guixml or die "can't load glade xml file"; require gui_callbacks; - $guixml->signal_autoconnect_from_package('gui_callbacks'); - my $model = Gtk2::ListStore->new('Glib::String', 'Glib::String', 'Glib::String'); + my $model = Gtk2::ListStore->new('Glib::String', 'Glib::String', 'Glib::String', 'Glib::String'); for my $href ( @allowed_dbs ) { - $model->set ($model->append, 0, $href->{'PATH'}, 1, $href->{'GROUP'}, 2, $href->{'NAME'}); + $model->set ($model->append, 0, $href->{'PATH'}, 1, $href->{'GROUP'}, 2, $href->{'TO_CART'}, 3, $href->{'NAME'}); } my $co_dropbox = $guixml->get_widget('co_dropbox'); $co_dropbox->set_model($model); my $renderer = Gtk2::CellRendererText->new; $co_dropbox->pack_start($renderer, 1); - $co_dropbox->add_attribute($renderer, text => 2); + $co_dropbox->add_attribute($renderer, text => 3); $co_dropbox->set_active(0); my $cb_clear_carts = $guixml->get_widget('cb_clear_carts'); @@ -268,6 +277,7 @@ if(!$FILE || !$DROPBOX) { set_mode_file_gui(); } + $guixml->signal_autoconnect_from_package('gui_callbacks'); my $appwin = $guixml->get_widget('appwin'); $appwin or die "can't find Main Window"; $appwin->resize(800,600); |