summaryrefslogtreecommitdiffstats
path: root/draksnapshot-applet
diff options
context:
space:
mode:
authortv <tv@99302b65-d5f7-0310-b3dd-f8cd6f4e3d94>2008-09-26 14:38:57 +0000
committertv <tv@99302b65-d5f7-0310-b3dd-f8cd6f4e3d94>2008-09-26 14:38:57 +0000
commitacc70d598c15c144ef113cd88ed56ec9c373704b (patch)
tree228020f6ec846837aabe5a3da0736411ac2ac1c9 /draksnapshot-applet
parent62f7ab17c808bfa6aff68773b7687828379ef55f (diff)
downloaddraksnapshot-acc70d598c15c144ef113cd88ed56ec9c373704b.tar
draksnapshot-acc70d598c15c144ef113cd88ed56ec9c373704b.tar.gz
draksnapshot-acc70d598c15c144ef113cd88ed56ec9c373704b.tar.bz2
draksnapshot-acc70d598c15c144ef113cd88ed56ec9c373704b.tar.xz
draksnapshot-acc70d598c15c144ef113cd88ed56ec9c373704b.zip
create status icon earlier (needed for next commits)
git-svn-id: http://svn.mandriva.com/svn/soft/draksnapshot/trunk@246733 99302b65-d5f7-0310-b3dd-f8cd6f4e3d94
Diffstat (limited to 'draksnapshot-applet')
-rwxr-xr-xdraksnapshot-applet17
1 files changed, 11 insertions, 6 deletions
diff --git a/draksnapshot-applet b/draksnapshot-applet
index bbe1d66..2c28075 100755
--- a/draksnapshot-applet
+++ b/draksnapshot-applet
@@ -75,6 +75,16 @@ my %actions = (
'configure' => { name => N("Configure"), launch => \&configure }
);
+
+# create status icon:
+my $icon = Gtk2::StatusIcon->new;
+$icon->signal_connect(popup_menu => sub {
+ my ($_icon, $button, $time) = @_;
+ $menu and $menu->popup(undef, undef, undef, undef, $button, $time);
+ });
+$icon->signal_connect(activate => \&configure);
+
+
my $hal_dn = 'org.freedesktop.Hal';
my $hal_manager = "$hal_dn.Manager";
my $manager_path = '/org/freedesktop/Hal/Manager';
@@ -105,12 +115,7 @@ $con->add_filter(sub {
});
$con->add_match("type='signal',interface='$hal_manager'");
-my $icon = Gtk2::StatusIcon->new;
-$icon->signal_connect(popup_menu => sub {
- my ($_icon, $button, $time) = @_;
- $menu and $menu->popup(undef, undef, undef, undef, $button, $time);
- });
-$icon->signal_connect(activate => \&configure);
+
my ($opt) = @ARGV;
if ($opt eq '--force' || $opt eq '-f') { setAutoStart('TRUE') }