summaryrefslogtreecommitdiffstats
path: root/mdkapplet_gui.pm
diff options
context:
space:
mode:
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);
+}