From 9a10f30cdb0484bfbff270d214dc05b862072dc7 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 20 Feb 2010 19:27:50 +0000 Subject: added gui signals callbacks git-svn-id: https://svn.helsinki.at/rhimport/trunk@7 7c65635b-ec39-4f67-a626-873dbafdd612 diff --git a/gui_callbacks.pm b/gui_callbacks.pm new file mode 100644 index 0000000..2817b65 --- /dev/null +++ b/gui_callbacks.pm @@ -0,0 +1,33 @@ +#!/usr/bin/perl -w +# +# +# rhdropbox +# +# Copyright (C) 2009 Christian Pointner +# +# This file is part of rhdropbox. +# +# rhdropbox 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 3 of the License, or +# any later version. +# +# rhdropbox 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 rhdropbox. If not, see . +# + +use strict; + +package gui_callbacks; + +sub on_exit() +{ + Gtk2->main_quit; +} + +1; diff --git a/rhimport.glade b/rhimport.glade index 4ed5a77..e573dcb 100644 --- a/rhimport.glade +++ b/rhimport.glade @@ -9,6 +9,7 @@ rhimport center 1 + True @@ -112,6 +113,7 @@ True True True + False diff --git a/rhimport.pl b/rhimport.pl index 29eba44..dab8d63 100755 --- a/rhimport.pl +++ b/rhimport.pl @@ -1,6 +1,25 @@ #!/usr/bin/perl -w # # +# rhimport +# +# Copyright (C) 2009 Christian Pointner +# +# This file is part of rhimport. +# +# rhimport 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 3 of the License, or +# any later version. +# +# rhimport 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 rhimport. If not, see . +# use strict; @@ -72,10 +91,11 @@ if(!$M3U) { my $guixml = Gtk2::GladeXML->new('rhimport.glade'); $guixml or die "can't load glade xml file"; + require gui_callbacks; + $guixml->signal_autoconnect_from_package('gui_callbacks'); my $appwin = $guixml->get_widget('appwin'); $appwin or die "can't find Main Window"; - $appwin->show; Gtk2->main; -- cgit v0.10.2