summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2009-05-23 16:30:33 +0200
committerdakkar <dakkar@thenautilus.net>2009-05-23 16:30:33 +0200
commita4cd46c6eed61b9db3df6cd91c5a0cc98fe83d87 (patch)
tree73cce98bc840eec5b61cdb190125227ece662c64
parentscheletro (diff)
downloadGtkPerlFileManager-a4cd46c6eed61b9db3df6cd91c5a0cc98fe83d87.tar.gz
GtkPerlFileManager-a4cd46c6eed61b9db3df6cd91c5a0cc98fe83d87.tar.bz2
GtkPerlFileManager-a4cd46c6eed61b9db3df6cd91c5a0cc98fe83d87.zip
glade
-rw-r--r--Build.PL1
-rw-r--r--lib/LDFM/MainController.pm10
-rw-r--r--resources/ldfm-main.glade295
-rw-r--r--scripts/ldfm12
4 files changed, 317 insertions, 1 deletions
diff --git a/Build.PL b/Build.PL
index 03675a6..6bb9bd6 100644
--- a/Build.PL
+++ b/Build.PL
@@ -13,6 +13,7 @@ my $builder = Module::Build->new(
'Gtk2' => '1.1.0',
'Gtk2::GladeXML::Simple' => 0,
'Readonly' => 0,
+ 'Path::Class' => 0,
},
build_requires => {
'Test::More' => 0,
diff --git a/lib/LDFM/MainController.pm b/lib/LDFM/MainController.pm
index a9534e0..9508ced 100644
--- a/lib/LDFM/MainController.pm
+++ b/lib/LDFM/MainController.pm
@@ -4,7 +4,17 @@ use warnings;
use strict;
use base 'Gtk2::GladeXML::Simple';
use Readonly;
+use Path::Class;
our $VERSION = '0.01';
+sub new {
+ my ($class,%params)=@_;
+
+ my $glade_file=dir($params{glade_dir})->file('ldfm-main.glade');
+ my $self=$class->SUPER::new($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 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="main_window">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">LDFM</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <signal name="destroy" handler="quit" last_modification_time="Sat, 19 Nov 2005 15:20:03 GMT"/>
+
+ <child>
+ <widget class="GtkVBox" id="main_box">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="panes_box">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkVBox" id="left_box">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkEntry" id="left_path">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ <signal name="activate" handler="set_left_path" last_modification_time="Sat, 19 Nov 2005 15:27:21 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="left_scroll">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="left_list">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">True</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <signal name="row_activated" handler="use_left_row" last_modification_time="Sat, 19 Nov 2005 15:21:53 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVButtonBox" id="center_box">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkButton" id="move_lr">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">move -&gt;</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">False</property>
+ <signal name="clicked" handler="move_lr" last_modification_time="Sat, 19 Nov 2005 15:22:13 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="move_rl">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">&lt;- move</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">False</property>
+ <signal name="clicked" handler="move_rl" last_modification_time="Sat, 19 Nov 2005 15:22:23 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="copy_lr">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">copy -&gt;</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">False</property>
+ <signal name="clicked" handler="copy_lr" last_modification_time="Sat, 19 Nov 2005 15:22:42 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="copy_rl">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">&lt;- copy</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">False</property>
+ <signal name="clicked" handler="copy_rl" last_modification_time="Sat, 19 Nov 2005 15:22:52 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="right_box">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkEntry" id="right_path">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">False</property>
+ <signal name="activate" handler="set_right_path" last_modification_time="Sat, 19 Nov 2005 15:27:52 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="right_scroll">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="right_list">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">True</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <signal name="row_activated" handler="use_right_row" last_modification_time="Sat, 19 Nov 2005 15:23:26 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHButtonBox" id="bottom_box">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkButton" id="mkdir">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">mkdir</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">False</property>
+ <signal name="clicked" handler="mkdir" last_modification_time="Sat, 19 Nov 2005 15:23:41 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="delete">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">delete</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">False</property>
+ <signal name="clicked" handler="delete" last_modification_time="Sat, 19 Nov 2005 15:23:49 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="rename">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">rename</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">False</property>
+ <signal name="clicked" handler="rename" last_modification_time="Sat, 19 Nov 2005 15:23:56 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="quit">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">quit</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">False</property>
+ <signal name="clicked" handler="quit" last_modification_time="Sat, 19 Nov 2005 15:24:04 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+</glade-interface>
diff --git a/scripts/ldfm b/scripts/ldfm
index c611a8b..d8b71ff 100644
--- a/scripts/ldfm
+++ b/scripts/ldfm
@@ -3,6 +3,16 @@ use utf8;
use strict;
use warnings;
use Gtk2 '-init';
+use Path::Class;
use LDFM::MainController;
-print "buh!\n";
+my $glade_dir=file(__FILE__)
+ ->parent
+ ->parent
+ ->subdir('resources');
+
+my $main_controller=LDFM::MainController->new(
+ glade_dir => $glade_dir
+);
+
+$main_controller->run();