summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgecko.pm28
1 files changed, 14 insertions, 14 deletions
diff --git a/gecko.pm b/gecko.pm
index b6959bc7..eb444d10 100755
--- a/gecko.pm
+++ b/gecko.pm
@@ -1,18 +1,19 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
# $Id$
# TITLE: Mozilla embedding
# REQUIRES: Gtk Mozilla
+use strict;
+use lib qw(/usr/lib/libDrakX);
use POSIX qw(getenv);
+use my_gtk;
use Gtk::MozEmbed;
use MDK::Common;
-use lib qw(/usr/lib/libDrakX);
use interactive;
use standalone;
-
# unless you use a threaded perl, you need to run this app with:
# LD_PRELOAD=libpthread-0.9.so or something like that to make use of networking
init Gtk;
@@ -23,15 +24,15 @@ system("LD_PRELOAD=libpthread.so ; export LD_PRELOAD");
#my $in = vnew interactive('su');
my $window = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel;
$window->set_default_size(600, 400);
-$window->signal_connect('destroy', sub {Gtk->main_quit});
+$window->signal_connect('destroy', sub { my_gtk->exit(0) });
-my $box1= new Gtk::VBox($false,0);
+my $box1 = new Gtk::VBox($false, 0);
my $event_box = new Gtk::EventBox();
$box1->add($event_box);
$event_box->show();
-my $embed_moz= new Gtk::MozEmbed;
+my $embed_moz = new Gtk::MozEmbed;
#$embed_moz->load_url(shift || "https://www.mandrake.com");
$embed_moz->render_data("hello world","/","text/html");
$embed_moz->open_stream("/","text/html");
@@ -40,32 +41,31 @@ $embed_moz->close_stream();
$event_box->add($embed_moz);
$embed_moz->show();
-my $separator= new Gtk::HSeparator();
+my $separator = new Gtk::HSeparator();
$box1->pack_start($separator,$false,$false,0);
$separator->show();
-my $box2=new Gtk::HBox($false,0);
+my $box2 = new Gtk::HBox($false,0);
$box1->pack_start($box2,$false,$false,0);
$box2->show();
-my $button_next= new Gtk::Button("Next");
+my $button_next = new Gtk::Button("Next");
$box2->pack_end($button_next,$false,$false,0);
$button_next->show();
-my $button_prev= new Gtk::Button("Previous");
+my $button_prev = new Gtk::Button("Previous");
$box2->pack_end($button_prev,$false,$false,0);
$button_prev->show();
-my $button_skipwiz= new Gtk::Button("Skip Wizard");
-$button_skipwiz->signal_connect ( clicked => sub { Gtk->main_quit();});
+my $button_skipwiz = new Gtk::Button("Skip Wizard");
+$button_skipwiz->signal_connect (clicked => sub { my_gtk->exit(0) });
$box2->pack_start($button_skipwiz,$false,$false,0);
$button_skipwiz->show();
-
$window->add($box1);
$box1->show;
$window->show;
-main Gtk;
+Gtk->main;
exit (0);