From 26ed9f0d46a88cc6392d09bfbb4121b570a5e9fa Mon Sep 17 00:00:00 2001 From: Harvie Date: Sun, 25 Jul 2010 11:10:22 +0200 Subject: [PATCH] rc.conf state (disabled/enabled) now moved to another column in view --- PKGBUILD | 6 +++--- aldm-gui | 13 +++++++++---- aldm.ui | 2 ++ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 816ac21..c1632fa 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,7 +3,7 @@ # You can also contact me on http://blog.harvie.cz/ pkgname=aldm -pkgver=0.4 +pkgver=0.5 pkgrel=1 pkgdesc="ArchLinux Daemon Manager (Shell + Gnome GTK+ GUI) - Gives you control over services in rc.d and settings in rc.conf" arch=('any') @@ -12,8 +12,8 @@ url="http://github.com/Harvie/ArchLinux-Daemon-Manager" depends=('bash' 'gtk2-perl' 'gksu' 'sed') source=('aldm' 'aldm-gui' 'aldm.ui') md5sums=('0c16113ad13f4e79c9b76ec22cf97206' - '6a73ae72411eda426e9f97cfa1942fdd' - 'dd2f8a1d52200756edfb34afa5a574af') + '4ee212dc72229a8f92c53bafa7d50084' + '0cd99b332e56846039ac562d6c59abb5') build() { mkdir -p ${pkgdir}/usr/bin diff --git a/aldm-gui b/aldm-gui index d776119..bf4ed6b 100755 --- a/aldm-gui +++ b/aldm-gui @@ -32,10 +32,13 @@ $builder = undef; my $column = Gtk2::TreeViewColumn->new_with_attributes('Daemon', Gtk2::CellRendererText->new, text => 0); $widgets{'treeview1'}->append_column($column); - $column = Gtk2::TreeViewColumn->new_with_attributes('Running', Gtk2::CellRendererText->new, text => 1); + $column = Gtk2::TreeViewColumn->new_with_attributes('?', Gtk2::CellRendererText->new, text => 1); $widgets{'treeview1'}->append_column($column); - $column = Gtk2::TreeViewColumn->new_with_attributes('WhatIs', Gtk2::CellRendererText->new, text => 2); + $column = Gtk2::TreeViewColumn->new_with_attributes('Running', Gtk2::CellRendererText->new, text => 2); + $widgets{'treeview1'}->append_column($column); + + $column = Gtk2::TreeViewColumn->new_with_attributes('WhatIs', Gtk2::CellRendererText->new, text => 3); $widgets{'treeview1'}->append_column($column); refresh_view(); @@ -77,13 +80,15 @@ sub refresh_view #my $iter = $widgets{'liststore1'}->append(); #$widgets{'liststore1'}->set($iter, 0 => "$_", 1=> "$run", 2 => "$w"); + my $state = $_; + $state =~ s/[a-zA-Z0-9 \-]*//g; + my $serv = $_; $serv =~ s/^(!|@)//g; - if(!defined($iterators{$serv})) { $iterators{$serv} = $widgets{'liststore1'}->append(); } - $widgets{'liststore1'}->set($iterators{$serv}, 0 => "$_", 1=> "$run", 2 => "$w"); + $widgets{'liststore1'}->set($iterators{$serv}, 0 => "$serv", 1=> "$state", 2=> "$run", 3 => "$w"); } close($daemon_list); } diff --git a/aldm.ui b/aldm.ui index 41f568d..f993bf3 100644 --- a/aldm.ui +++ b/aldm.ui @@ -6,6 +6,8 @@ + + -- 2.30.2