[Frugalware-git] frugal-tweak: can uninstall package

bouleetbil bouleetbil at frogdev.info
Mon Jan 10 22:06:56 CET 2011


Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugal-tweak.git;a=commitdiff;h=c585053d8553ef212950924443ddc2eb1b709169

commit c585053d8553ef212950924443ddc2eb1b709169
Author: bouleetbil <bouleetbil at frogdev.info>
Date:   Mon Jan 10 22:03:33 2011 +0100

can uninstall package

diff --git a/frugal-tweak-vala/src/EventGtk.vala b/frugal-tweak-vala/src/EventGtk.vala
index f80638e..31461d6 100644
--- a/frugal-tweak-vala/src/EventGtk.vala
+++ b/frugal-tweak-vala/src/EventGtk.vala
@@ -105,5 +105,21 @@ public class EventGtk{
if(str=="") return;
Tools.run_command("fwroot" ,"frugalware-tweak-terminal -e pacman-g2 -S "+str,false);
}
+	[CCode (cname = "G_MODULE_EXPORT EventGtk_on_button_uninstall_clicked",instance_pos = -1)]
+	public void on_BTN_uninstall_clicked (Button source) {
+		TreeIter iter;
+		TreeModel model;
+		string str = "";
+		//can only uninstall package installed
+		if( GtkObj.combobox_repo.get_active_text()!=pacman.FW_LOCAL) return ;
+
+		TreeSelection sel = GtkObj.tree_pkg.get_selection();
+		if (sel.count_selected_rows() == 1) {
+			sel.get_selected( out model, out iter);
+			GtkObj.listmodel_pkg.get(iter, 0, out str);
+		}
+		if(str=="") return;
+		Tools.run_command("fwroot" ,"frugalware-tweak-terminal -e pacman-g2 -Rc "+str,false);
+	}

}


More information about the Frugalware-git mailing list