From 5ba8d09d85b3a0f90aef17495204a2eca3412a3e Mon Sep 17 00:00:00 2001 From: dakkar Date: Thu, 24 Nov 2005 09:53:36 +0000 Subject: r796@narval2: dakkar | 2005-11-19 16:29:11 +0100 file Glade e suo caricamento git-svn-id: svn://luxion/repos/GtkPerlFileManager/trunk@41 fcb26f47-9200-0410-b104-b98ab5b095f3 --- Build.PL | 2 +- lib/LDFM/MainController.pm | 8 ++ resources/ldfm-main.glade | 295 +++++++++++++++++++++++++++++++++++++++++++++ scripts/ldfm | 13 +- 4 files changed, 316 insertions(+), 2 deletions(-) create mode 100644 resources/ldfm-main.glade diff --git a/Build.PL b/Build.PL index 9a8573c..03675a6 100644 --- a/Build.PL +++ b/Build.PL @@ -10,7 +10,7 @@ my $builder = Module::Build->new( dist_version_from => 'lib/LDFM/MainController.pm', requires => { 'perl' => '5.8.3', - 'Gtk2' => '2.4.0', + 'Gtk2' => '1.1.0', 'Gtk2::GladeXML::Simple' => 0, 'Readonly' => 0, }, diff --git a/lib/LDFM/MainController.pm b/lib/LDFM/MainController.pm index a9534e0..780a282 100644 --- a/lib/LDFM/MainController.pm +++ b/lib/LDFM/MainController.pm @@ -7,4 +7,12 @@ use Readonly; our $VERSION = '0.01'; +sub new { + my ($class,%params)=@_; + + my $self=$class->SUPER::new($params{glade_file}); + + return $self; +} + 1; diff --git a/resources/ldfm-main.glade b/resources/ldfm-main.glade new file mode 100644 index 0000000..8647ae8 --- /dev/null +++ b/resources/ldfm-main.glade @@ -0,0 +1,295 @@ + + + + + + + True + LDFM + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + + + + + True + False + 0 + + + + True + False + 0 + + + + True + False + 0 + + + + True + True + True + True + 0 + + True + * + False + + + + 0 + False + False + + + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + True + GTK_BUTTONBOX_SPREAD + 0 + + + + True + True + True + move -> + True + GTK_RELIEF_NORMAL + False + + + + + + + True + True + True + <- move + True + GTK_RELIEF_NORMAL + False + + + + + + + True + True + True + copy -> + True + GTK_RELIEF_NORMAL + False + + + + + + + True + True + True + <- copy + True + GTK_RELIEF_NORMAL + False + + + + + + 0 + False + False + + + + + + True + False + 0 + + + + True + True + True + True + 0 + + True + * + False + + + + 0 + False + False + + + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + + + + + + 0 + True + True + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + True + GTK_BUTTONBOX_SPREAD + 0 + + + + True + True + True + mkdir + True + GTK_RELIEF_NORMAL + False + + + + + + + True + True + True + delete + True + GTK_RELIEF_NORMAL + False + + + + + + + True + True + True + rename + True + GTK_RELIEF_NORMAL + False + + + + + + + True + True + True + quit + True + GTK_RELIEF_NORMAL + False + + + + + + 0 + False + True + + + + + + + diff --git a/scripts/ldfm b/scripts/ldfm index c611a8b..62e6246 100644 --- a/scripts/ldfm +++ b/scripts/ldfm @@ -3,6 +3,17 @@ use utf8; use strict; use warnings; use Gtk2 '-init'; +use Path::Class; use LDFM::MainController; -print "buh!\n"; +my $glade_file=file(__FILE__) + ->parent + ->parent + ->subdir('resources') + ->file('ldfm-main.glade'); + +my $main_controller=LDFM::MainController->new( + glade_file => $glade_file +); + +$main_controller->run(); -- cgit v1.2.3