summaryrefslogtreecommitdiffstats
path: root/mdkapplet_gui.pm
diff options
context:
space:
mode:
authorJoão Victor Duarte Martins <jvictor@mandriva.com>2010-05-17 16:02:49 +0000
committerJoão Victor Duarte Martins <jvictor@mandriva.com>2010-05-17 16:02:49 +0000
commit8679124a6f88b1ff0c0d69e07633a6d7c7a30e75 (patch)
treef23a1595d1bb374b57367d4ec735a86fba0c1ac4 /mdkapplet_gui.pm
parentff052d48eac1c77d39a958022876a432f2fdc902 (diff)
downloadmgaonline-8679124a6f88b1ff0c0d69e07633a6d7c7a30e75.tar
mgaonline-8679124a6f88b1ff0c0d69e07633a6d7c7a30e75.tar.gz
mgaonline-8679124a6f88b1ff0c0d69e07633a6d7c7a30e75.tar.bz2
mgaonline-8679124a6f88b1ff0c0d69e07633a6d7c7a30e75.tar.xz
mgaonline-8679124a6f88b1ff0c0d69e07633a6d7c7a30e75.zip
* mdkonline.pm (translate_product): Updated to translate a product
passed as parameter. * mdkapplet_gui.pm: Moved run_no_rights_dialog.
Diffstat (limited to 'mdkapplet_gui.pm')
-rw-r--r--mdkapplet_gui.pm25
1 files changed, 24 insertions, 1 deletions
diff --git a/mdkapplet_gui.pm b/mdkapplet_gui.pm
index 6978bc88..cb0c5afa 100644
--- a/mdkapplet_gui.pm
+++ b/mdkapplet_gui.pm
@@ -41,7 +41,10 @@ our @EXPORT = qw(
setVar
);
-our @EXPORT_OK = qw(run_ask_credentials_dialog);
+our @EXPORT_OK = qw(
+ run_ask_credentials_dialog
+ run_no_rights_dialog
+);
use mygtk2 qw(gtknew); #- do not import gtkadd which conflicts with ugtk2 version
use ugtk2 qw(:all);
@@ -209,3 +212,23 @@ sub run_ask_credentials_dialog {
}
}
}
+
+sub run_no_rights_dialog {
+ my ($title, $info, $info_url) = @_;
+ my $w = new_portable_dialog($title);
+ my @widgets = (
+ mdkonline::get_banner($title),
+ gtknew('Label_Left',
+ text => $info,
+ @mdkapplet_gui::common),
+ gtknew('HButtonBox',
+ layout => 'start',
+ children_tight => [
+ interactive::gtk::add_padding(
+ new_link_button($info_url, N("More Information"))
+ )
+ ]),
+ create_okcancel($w, N("Close"), undef)
+ );
+ fill_n_run_portable_dialog($w, \@widgets);
+}