aboutsummaryrefslogtreecommitdiffstats
path: root/fi/community
Commit message (Expand)AuthorAgeFilesLines
* Revert "Updated Estonian translation"Thomas Backlund2014-10-121-0/+1
* Updated Estonian translationMarek Laane2014-10-121-1/+0
* new community section/pagesRomain d'Alverny2012-05-111-0/+1
ss='active' href='/software/drakx-backup-do-not-use/tree/perl-install/standalone/display_help_gtk3?id=479b93c2705a6e8ab24c513de890781cb070e688'>treecommitdiffstats
path: root/perl-install/standalone/display_help_gtk3
blob: cbecfa75e87ef00bb61ca7c9fa32ea5a4e308216 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/perl

# Display Help (gtk3 version)
# Funda Wang
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

use lib qw(/usr/lib/libDrakX);
use common;
use any;
use Encode qw/ encode decode /;
use Gtk3 -init;
use Gtk3::WebKit;
my $wm = any::running_window_manager();
my $is_firstime = to_bool($wm =~ /drakx-matchbox-window-manager/);

my $view = Gtk3::WebKit::WebView->new();
$view->load_uri($ARGV[0]);
my $settings = $view->get_settings ();
$settings->set_property('enable-default-context-menu',0);
$view->set_settings ($settings);
$view->signal_connect('close-web-view' => sub { Gtk3->main_quit() });

my $scrolls = Gtk3::ScrolledWindow->new();
$scrolls->add($view);

my $button = Gtk3::Button->new_from_stock('gtk-close');
$button->signal_connect(clicked => sub { Gtk3->main_quit() });

my $window = Gtk3::Window->new(GTK_WINDOW_TOPLEVEL);
$window->signal_connect(destroy => sub { Gtk3->main_quit() });
$window->set_title(decode("UTF8", N("Help")));
$window->set_border_width(5);
if (!$is_firstime) {
	$window->set_default_size(840, 600);
} else {
	$window->full_screen();
}

my $vbox = Gtk3::Box->new(GTK_ORIENTATION_VERTICAL, 3);
$vbox->pack_start(Gtk3::Separator->new(GTK_ORIENTATION_HORIZONTAL), 0, 0, 0);
if (!$is_firstime) {
	my $label = Gtk3::Label->new('Help');
	$label->set_markup ('<b><big>'.decode("UTF8", N("Help")).'</big></b>');
	my $hbox1 = Gtk3::Box->new(GTK_ORIENTATION_HORIZONTAL, 1);
	$hbox1->pack_start($label, 0, 0, 0);
	$vbox->pack_start($hbox1, 0, 0,0);
	$vbox->pack_start(Gtk3::Separator->new(GTK_ORIENTATION_HORIZONTAL), 0, 0, 0);
}
$vbox->pack_start($scrolls, TRUE, TURE, 5);
$vbox->pack_start(Gtk3::Separator->new(GTK_ORIENTATION_HORIZONTAL), 0, 0, 0);
if (!$is_firstime) {
	my $hbox2 = Gtk3::Box->new(GTK_ORIENTATION_HORIZONTAL, 1);
	$hbox2->pack_end($button, 0,0,5);
	$vbox->pack_end($hbox2, 0, 0, 0);
}

$window->add($vbox);
$window->show_all();
Gtk3->main();