summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakfloppy
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone/drakfloppy')
-rwxr-xr-xperl-install/standalone/drakfloppy47
1 files changed, 1 insertions, 46 deletions
diff --git a/perl-install/standalone/drakfloppy b/perl-install/standalone/drakfloppy
index 471beb475..9ed4243d3 100755
--- a/perl-install/standalone/drakfloppy
+++ b/perl-install/standalone/drakfloppy
@@ -81,7 +81,7 @@ my @menu_items = (
{ path => _("/_File"), type => '<Branch>' },
{ path => _("/File/_Quit"), accelerator => _("<control>Q"), callback => sub { $::isEmbedded ? kill('USR1', $::CCPID) : Gtk->exit(0) } },
);
-my $menubar = get_main_menu( $window );
+my $menubar = ugtk::create_factory_menu($window, @menu_items);
######### menus end
@@ -354,51 +354,6 @@ sub print_hello {
print "mcdtg !\n";
}
-sub get_main_menu {
- my ( $window ) = @_;
- my $accel_group = new Gtk::AccelGroup();
- my $item_factory = new Gtk::ItemFactory( 'Gtk::MenuBar', '<main>', $accel_group );
- $item_factory->create_items( @menu_items );
- $window->add_accel_group( $accel_group );
- return ( $item_factory->get_widget( '<main>' ) );
-}
-
-
-sub create_dialog {
- my ( $label, $c ) = @_;
- my $ret = 0;
- my $dialog = new Gtk::Dialog;
- $dialog->signal_connect ( delete_event => sub {Gtk->main_quit();});
- $dialog->set_title(_("drakfloppy"));
- $dialog->border_width(10);
- $dialog->vbox->pack_start(new Gtk::Label($label),1,1,0);
-
- my $button = new Gtk::Button _("OK");
- $button->can_default(1);
- $button->signal_connect(clicked => sub { $ret = 1; $dialog->destroy(); Gtk->main_quit(); });
- $dialog->action_area->pack_start($button, 1, 1, 0);
- $button->grab_default;
-
- if ($c) {
- my $button2 = new Gtk::Button _("Cancel");
- $button2->signal_connect(clicked => sub { $ret = 0; $dialog->destroy(); Gtk->main_quit(); });
- $button2->can_default(1);
- $dialog->action_area->pack_start($button2, 1, 1, 0);
- }
-
- $dialog->show_all;
- Gtk->main();
- $ret;
-}
-
-sub destroy_window {
- my($widget, $windowref, $w2) = @_;
- $$windowref = undef;
- $w2 = undef if defined $w2;
- 0;
-}
-
-
#-------------------------------------------------------------
# the function
#-------------------------------------------------------------