[Frugalware-git] frugal-mono-tools: *Use Installed into combobox instead local

bouleetbil bouleetbil at frogdev.info
Sat Aug 28 15:59:16 CEST 2010


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

commit e0b99bdd713c1d5839b982233b5042f0d1e6ebb3
Author: bouleetbil <bouleetbil at frogdev.info>
Date:   Sat Aug 28 13:18:28 2010 +0200

*Use Installed into combobox instead local

diff --git a/frugal-mono-tools/MainWindow.cs b/frugal-mono-tools/MainWindow.cs
index c8668e6..5abff87 100644
--- a/frugal-mono-tools/MainWindow.cs
+++ b/frugal-mono-tools/MainWindow.cs
@@ -80,7 +80,9 @@ public partial class MainWindow : Gtk.Window
int i = 0 ;
foreach (string repo in Pkg.fwRepo)
{
-			modelRepoList.AppendValues(repo,i);
+			string strRepo=repo;
+			if (strRepo=="local") strRepo ="Installed";
+			modelRepoList.AppendValues(strRepo,i);
i++;
}
CBO_Repo.Model=modelRepoList;
diff --git a/frugal-mono-tools/PacmanG2.cs b/frugal-mono-tools/PacmanG2.cs
index 98ac27f..6929ae6 100644
--- a/frugal-mono-tools/PacmanG2.cs
+++ b/frugal-mono-tools/PacmanG2.cs
@@ -120,6 +120,7 @@ namespace frugalmonotools
//public
public string repoSelected="";
public List<string> fwRepo = new List<string>();
+		public const string repoInstalled= "Installed";

private void EnumRepoProc(string section, string lParam)
{
@@ -142,12 +143,14 @@ namespace frugalmonotools

public void SelectRepo(string repo)
{
+			if (repo==repoInstalled) repo ="local";
pmdb_t=pacman_db_register(repo);
repoSelected=repo;
}

public List<Package> Search(string strSearch,string repo)
{
+			if (repo==repoInstalled) repo ="local";
//don't use pacman more quickly to use .net directly
List<Package> packages = new List<Package>();
string dirpkg=ROOT_PATH+PACMANG2_BDD+repo+"/";


More information about the Frugalware-git mailing list