diff options
author | Daouda Lo <daouda@mandriva.com> | 2003-07-25 13:36:00 +0000 |
---|---|---|
committer | Daouda Lo <daouda@mandriva.com> | 2003-07-25 13:36:00 +0000 |
commit | 3161d1cf02601fc9d7b3a35b0d82f8f27c388bf0 (patch) | |
tree | 7fff6f06c7d1255973edc700c9aa2d7752f62d22 | |
parent | 2cf7593a0398e7bf7dec8823bfd8da7de3910deb (diff) | |
download | userdrake-3161d1cf02601fc9d7b3a35b0d82f8f27c388bf0.tar userdrake-3161d1cf02601fc9d7b3a35b0d82f8f27c388bf0.tar.gz userdrake-3161d1cf02601fc9d7b3a35b0d82f8f27c388bf0.tar.bz2 userdrake-3161d1cf02601fc9d7b3a35b0d82f8f27c388bf0.tar.xz userdrake-3161d1cf02601fc9d7b3a35b0d82f8f27c388bf0.zip |
- fix crash happening when selection get lost (by refreshing list) and edit or
delete button is activated (found by David Baudens)
-rwxr-xr-x | userdrake | 8 | ||||
-rw-r--r-- | userdrake.spec | 7 |
2 files changed, 10 insertions, 5 deletions
@@ -138,7 +138,7 @@ map { [ N("Help"), N("Generic help on userdrake"), 'help', \&HelpSystem ] ); my ($tbuser, $tbgroup, $tbedit, $tbdel, $tbref, $tbhelp) = @toolbwg; -foreach (($tbedit, $tbdel, $buttorcheck{edit}, $buttorcheck{delete})) { $_->set_sensitive(0) }; +GrayDelEdit(); my $ctx = USER::ADMIN->new; $fbut->signal_connect('clicked', sub { $stringsearch = $filter->get_text() ; Refresh($sysfilter, $stringsearch) }); Refresh($sysfilter, $stringsearch); @@ -147,10 +147,13 @@ $us->{wnd}{rwindow}->show_all; Gtk2->main; ugtk2->exit; +sub GrayDelEdit { + foreach (($tbedit, $tbdel, $buttorcheck{edit}, $buttorcheck{delete})) { defined $_ and $_->set_sensitive(0) }; +} sub TreeUnselect { my $treev = shift; $treev->get_selection->unselect_all; - foreach (($tbedit, $tbdel, $buttorcheck{edit}, $buttorcheck{delete})) { $_->set_sensitive(0) }; + GrayDelEdit() } sub NotebookSwitch { my $page = $nb->get_current_page(); @@ -194,6 +197,7 @@ sub Refresh { my ($filt, $strfilt) = @_; RefreshUsersFull($filt, $strfilt); RefreshGroupsFull($filt, $strfilt); + GrayDelEdit() } sub AddUser { my $w = ugtk2->new(N("Create New User"), grab => 1, if_(!$::isEmbedded,transient => $us->{wnd}->{rwindow}), if_(!$::isEmbedded,transient => $us->{wnd}->{rwindow})); diff --git a/userdrake.spec b/userdrake.spec index 82f8b02..d83ba2c 100644 --- a/userdrake.spec +++ b/userdrake.spec @@ -15,7 +15,7 @@ URL: http://people.mandrakesoft.com/~daouda/mandrake/userdrake.html License: GPL Packager: Daouda Lo <daouda@mandrakesoft.com> Group: System/Configuration/Other -Requires: drakxtools >= 9.2-0.15mdk, perl-Gtk2 >= 0.26.cvs.2003.07.09.1-2mdk +Requires: drakxtools >= 9.2-0.15mdk, perl-Gtk2 >= 0.26.cvs.2003.07.09.1-2mdk, libuser >= 0.51.7-5mdk BuildRoot: %{_tmppath}/%{name}-buildroot BuildRequires: gettext perl-devel libuser-devel libglib2.0-devel @@ -79,8 +79,9 @@ rm -rf %{buildroot} %{_liconsdir}/*.png %changelog -* Thu Jul 17 2003 Daouda LO <daouda@mandrakesoft.com> 0.92-14mdk -- libuser require fix +* Fri Jul 25 2003 Daouda LO <daouda@mandrakesoft.com> 0.92-14mdk +- fix crash happening when tree selection get lost (by refresh action) + and edit or delete button is activated (found by David Baudens) * Thu Jul 17 2003 Daouda LO <daouda@mandrakesoft.com> 0.92-13mdk - change date format (YYYY/MM/DD) |