From: michael Date: Mon, 22 May 2006 11:06:48 +0000 (+0000) Subject: use ComboBox->new_text instead of ->new, much easier to use. X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/snom-frontend/commitdiff_plain/a9852b0b29e1783ca0e95c5b2a3cd71c2872f930 use ComboBox->new_text instead of ->new, much easier to use. --- diff --git a/snom.pl b/snom.pl index 9cbbbba..03abbb7 100755 --- a/snom.pl +++ b/snom.pl @@ -1,5 +1,5 @@ #!/bin/sh -#$Id: snom.pl,v 1.25 2006-05-21 23:13:35 michael Exp $ +#$Id: snom.pl,v 1.26 2006-05-22 11:06:48 michael Exp $ # http://developer.gnome.org/doc/API/2.2/gtk/gtk-migrating-GtkComboBox.html @@ -134,9 +134,11 @@ $display->signal_connect(enter_notify_event => \&DisplayMouseOver, TRUE); $display->signal_connect(leave_notify_event => \&DisplayMouseOver, FALSE); $display->show(); -my $host = Gtk2::ComboBox->new(); -# my $combobox = Gtk2::Ex::ComboBox->new($host); -# $combobox->set_list(\@sections); +my $host = Gtk2::ComboBox->new_text(); +foreach my $phone (@sections) { + $host->append_text($phone); +} +$host->set_active(0); $host->show(); my $dispbox = Gtk2::VBox->new(0, 5);