diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2005-01-12 12:44:07 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2005-01-12 12:44:07 +0000 |
commit | 9d6a2878f243596e4164b498dd4921f53ec12888 (patch) | |
tree | b3076189814115b761296a798078a43e5e8cf7f3 | |
parent | 247029ed2828af07eecdbde6e641f730ea3ca7c0 (diff) | |
download | userdrake-9d6a2878f243596e4164b498dd4921f53ec12888.tar userdrake-9d6a2878f243596e4164b498dd4921f53ec12888.tar.gz userdrake-9d6a2878f243596e4164b498dd4921f53ec12888.tar.bz2 userdrake-9d6a2878f243596e4164b498dd4921f53ec12888.tar.xz userdrake-9d6a2878f243596e4164b498dd4921f53ec12888.zip |
- fix crash when embedded
- show banner when embedded
-rwxr-xr-x | userdrake | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -27,7 +27,7 @@ use standalone; use common; use any; # i18n: IMPORTANT: to get correct namespace (userdrake instead of libDrakX) -BEGIN { unshift @::textdomains, 'userdrake' } +BEGIN { unshift @::textdomains, 'userdrake', 'drakconf' } use ugtk2 qw(:all); use interactive; use POSIX qw(mktime ceil); @@ -78,7 +78,7 @@ sub HelpSystem { exec("drakhelp --id userdrake") unless fork() }; $us->{wnd} = ugtk2->new(N("Mandrakelinux Users Management Tool") . " " . $us->{VERSION}); gtkset_size_request($us->{wnd}{rwindow}, 660, 460); -$us->{wnd}{rwindow}->set_position('center'); +$us->{wnd}{rwindow}->set_position('center') if !$::isEmbedded; $us->{wnd}{window}->signal_connect(delete_event => \&QuitGlobal); my $utree_model = Gtk2::ListStore->new("Glib::String", "Glib::Int", "Glib::String", "Glib::String", "Glib::String", "Glib::String", "Glib::String"); my $gtree_model = Gtk2::ListStore->new("Glib::String", "Glib::Int", "Glib::String"); @@ -134,8 +134,15 @@ gtkappend_page(my $nb = Gtk2::Notebook->new, gtkpack(create_scrolled_window($use #PO: list of users belonging to that group gtkappend_page($nb, gtkpack(create_scrolled_window($grouptree)), gtkshow(Gtk2::Label->new(N("Groups")))); $nb->set_show_border(0); +my @extra_widgets; +if ($::isEmbedded) { + push @extra_widgets, 0, Gtk2::Banner->new("/usr/share/mcc/themes/default/user-mdk.png", + #-PO: do not translate, this is already translated in mcc + translate("Users and groups")); +} $us->{wnd}{window}->add(gtkpack_(Gtk2::VBox->new(0, 0), 0, $menu, + @extra_widgets, 0, $toolb, 0, $searchBox, 0, Gtk2::HSeparator->new, |