[Gtk-sharp-list] list and parameters

Vincent Arnoux vincent.arnoux@rfo.atmel.com
Mon, 14 Mar 2005 17:50:15 +0100

Here is a code sample I wrote for browsing the list when a button is=20
pushed. I guess you can add a column with a value becoming true when the=20
line is selected, and test this value during the browsing.
void SendDownload()
TreeIter iter;
TreeModel model;

if (jobsStore.GetIterFirst(out iter))
string jobName =3D (string) jobsStore.GetValue(iter, 1);
string category =3D (string) jobsStore.GetValue(iter, 0);
string state =3D (string) jobsStore.GetValue(iter, 2);
Console.WriteLine("Line value : " + category + " " + jobName + " " + stat=
jobsStore.SetValue (iter, 2, "Processing...");
while (jobsStore.IterNext(ref iter));

PS: Tu peux me contacter directement si tu veux, je peux peut-=EAtre t'ai=


underdog10@netcourrier.com a =E9crit :

>I own the project XBGM# from xbgm.sf.net. I'am tring to implement new fu=
nctionnality to XBGM#.=20
>In the last release version i allow only one selected row.
>In the dev verion, i would like to implement a batch list.
>I add all information missing in in hidden column.
>My problem is than i couldn't figure out a nice way to pass each row to =
progress dialog then to a ftp library.
>At this time i create a copy of the list in a string with a special spli=
t caracter like this:
>// Main window to ProgreesDialog
>xISO =3D new StringBuilder((string)store2.GetValue(iter2, 8) + "|" +
>(string)store2.GetValue(iter2, 5) + "|" +=20
>(string)store2.GetValue(iter2, 2) + "|" +=20
>(string)store2.GetValue(iter2, 6) + "|" +=20
>(string)store2.GetValue(iter2, 9) );
>then i my xISOAdd function in split the string to create a list in order=
 to update label and progress bar of the progressdialog.
>In the same time, in a thread, i pass a copy of the sting to my ftp libr=
airy and split it again to finally create the extract batch list.
>Well, this is pretty ugly and heavy in memory and not even working very =
>I would like to see a nice way to received information directly from the=
 row and pass information between thread.
>I have pass many week looking at code and testing without nice result.=20
>So i relay need some ideas because i stuck with this ugly code.
>Thanks for helpping.
>NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, To=
>Web/Wap : www.netcourrier.com
>T=E9l=E9phone/Fax : 08 92 69 00 21 (0,34 =80 TTC/min)
>Minitel: 3615 NETCOURRIER (0,16 =80 TTC/min)
>Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
> =20