summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--NEWS3
-rwxr-xr-xmdkapplet-config71
3 files changed, 75 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 25072da9..19809b4d 100644
--- a/Makefile
+++ b/Makefile
@@ -54,7 +54,7 @@ install: all
mkdir -p $(PREFIX)/etc/pam.d
install -m644 pam.d_urpmi.update $(PREFIX)/etc/pam.d/urpmi.update
ln -sf consolehelper $(PREFIX)/usr/bin/urpmi.update
- for i in mdkapplet-restricted-helper mdkapplet-upgrade-helper; do \
+ for i in mdkapplet-config mdkapplet-restricted-helper mdkapplet-upgrade-helper; do \
install -m755 $$i $(SBINDIR); \
ln -sf consolehelper $(PREFIX)/usr/bin/$$i; \
done
diff --git a/NEWS b/NEWS
index 9d1b1f55..f03ce708 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- mdkapplet-config
+ o add an updates configurator (#37903)
+
Version 2.73 - 11 February 2008
- mdkapplet
diff --git a/mdkapplet-config b/mdkapplet-config
new file mode 100755
index 00000000..955afffc
--- /dev/null
+++ b/mdkapplet-config
@@ -0,0 +1,71 @@
+#!/usr/bin/perl
+################################################################################
+# Mandriva Online #
+# #
+# Copyright (C) 2008 Mandriva #
+# #
+# Thierry Vignaud <tvignaud at mandriva dot com> #
+# #
+# This program is free software; you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License Version 2 as #
+# published by the Free Software Foundation. #
+# #
+# 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 strict;
+use lib qw(/usr/lib/libDrakX /usr/lib/libDrakX/drakfirsttime);
+use standalone; # for explanations
+use common;
+
+BEGIN { unshift @::textdomains, 'mdkonline' }
+
+use mygtk2 qw(gtknew); #- do not import gtkadd which conflicts with ugtk2 version
+use ugtk2 qw(:all);
+use mdkonline;
+use mdkapplet_gui;
+use interactive;
+
+configure();
+
+ugtk2::exit(0);
+
+
+sub configure() {
+ my $w = ugtk2->new(N("Adding an additional package medium"), width => $width + 20);
+
+ my $config_file = '/etc/sysconfig/mdkapplet';
+ my %config = getVarsFromSh($config_file);
+
+ # convert from ms to seconds:
+ $config{FIRST_CHECK_DELAY} /= 1000;
+
+ my $res =
+ fill_n_run_portable_dialog(
+ $w,
+ [
+ get_banner(N("Updates Configuration")),
+ gtknew('Label_Left', text => N("Here you can configure the updates applet"), @common),
+ gtknew('Table', col_spacings => 5, row_spacings => 5, children => [
+ [ N("Update frequency (seconds)"),
+ gtknew('Entry', text_ref => \$config{UPDATE_FREQUENCY}) ],
+ [ N("First check delay (seconds)"),
+ gtknew('Entry',text_ref => \$config{FIRST_CHECK_DELAY}) ],
+ ]),
+ create_okcancel($w), #, N("Next"), N("Cancel")),
+ ]);
+
+ if ($res) {
+ # convert back into ms from seconds:
+ $config{FIRST_CHECK_DELAY} *= 1000;
+
+ setVarsInSh($config_file, \%config);
+ }
+}