From miltondp at gmail.com Sun Jul 1 15:31:29 2007 From: miltondp at gmail.com (Milton Pividori) Date: Sun, 01 Jul 2007 16:31:29 -0300 Subject: [Gtk-sharp-list] Gtk# 2.10.1 runtime installer for .NET Framework 2.0 Message-ID: <1183318289.2332.4.camel@wasabi> Hi. I've downloaded the sources of the Medsphere's installer of Gtk# 2.10.1, and I've modified them to support the .NET Framework 2.0. Changes are very simple. Here is the link to download: http://code.google.com/p/zaspe-sharp/downloads/list I hope it can be useful for someone else. Bye. -- Milton Pividori Blog: http://www.miltonpividori.com.ar Jabber ID: milton.pividori at jabberes.org GnuPG Public Key: gpg --keyserver wwwkeys.pgp.net --recv-key 0x663C185C From monodanmorg at yahoo.com Mon Jul 2 11:33:23 2007 From: monodanmorg at yahoo.com (Daniel Morgan) Date: Mon, 2 Jul 2007 08:33:23 -0700 (PDT) Subject: [Gtk-sharp-list] Gtk# 2.10.1 runtime installer for .NET Framework 2.0 In-Reply-To: <1183318289.2332.4.camel@wasabi> Message-ID: <572643.80401.qm@web30814.mail.mud.yahoo.com> I wonder if you could take these changes to update the gtk#, gtk+, and dependencies for Mono. Does it include the gnome# and libgnome... too? --- Milton Pividori wrote: > Hi. I've downloaded the sources of the Medsphere's > installer of Gtk# > 2.10.1, and I've modified them to support the .NET > Framework 2.0. > Changes are very simple. > > Here is the link to download: > http://code.google.com/p/zaspe-sharp/downloads/list > > I hope it can be useful for someone else. Bye. > > -- > Milton Pividori > Blog: http://www.miltonpividori.com.ar > Jabber ID: milton.pividori at jabberes.org > GnuPG Public Key: gpg --keyserver wwwkeys.pgp.net > --recv-key 0x663C185C > > _______________________________________________ > Gtk-sharp-list maillist - > Gtk-sharp-list at lists.ximian.com > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list > ____________________________________________________________________________________ Get the Yahoo! toolbar and be alerted to new email wherever you're surfing. http://new.toolbar.yahoo.com/toolbar/features/mail/index.php From brad at getcoded.net Mon Jul 2 12:17:58 2007 From: brad at getcoded.net (Brad Taylor) Date: Mon, 02 Jul 2007 09:17:58 -0700 Subject: [Gtk-sharp-list] Gtk# 2.10.1 runtime installer for .NET Framework 2.0 In-Reply-To: <1183318289.2332.4.camel@wasabi> References: <1183318289.2332.4.camel@wasabi> Message-ID: <1183393078.31307.5.camel@beast> Hey, > I've downloaded the sources of the Medsphere's installer of Gtk# > 2.10.1, and I've modified them to support the .NET Framework 2.0. > Changes are very simple. Cool! I just have a few notes on your patch: * Much of your Runtime.iss still references the v1.1 GAC, namely ConfigureGacInstallBat, and your SDK.iss is still set up for Visual C# 2003 (v7.1). * You still use both Medsphere's registry paths and our GUID. Other than that, great work! Cheers, -Brad From miltondp at gmail.com Mon Jul 2 13:23:38 2007 From: miltondp at gmail.com (Milton Pividori) Date: Mon, 02 Jul 2007 14:23:38 -0300 Subject: [Gtk-sharp-list] Gtk# 2.10.1 runtime installer for .NET Framework 2.0 In-Reply-To: <572643.80401.qm@web30814.mail.mud.yahoo.com> References: <572643.80401.qm@web30814.mail.mud.yahoo.com> Message-ID: <1183397018.5612.19.camel@wasabi> El lun, 02-07-2007 a las 08:33 -0700, Daniel Morgan escribi?: > I wonder if you could take these changes to update the > gtk#, gtk+, and dependencies for Mono. Sorry, but I have not enough time to do it soon. > Does it include the gnome# and libgnome... too? No. I was using Gnome.DateEdit control in my app, but I had to replace it with some controls of Gtk+. I thought it would take more time to include gnome# in the installer than modifying my application to use gtk-only controls to replace DateEdit. Bye. -- Milton Pividori Blog: http://www.miltonpividori.com.ar Jabber ID: milton.pividori at jabberes.org GnuPG Public Key: gpg --keyserver wwwkeys.pgp.net --recv-key 0x663C185C From miltondp at gmail.com Mon Jul 2 14:05:42 2007 From: miltondp at gmail.com (Milton Pividori) Date: Mon, 02 Jul 2007 15:05:42 -0300 Subject: [Gtk-sharp-list] Gtk# 2.10.1 runtime installer for .NET Framework 2.0 In-Reply-To: <1183393078.31307.5.camel@beast> References: <1183318289.2332.4.camel@wasabi> <1183393078.31307.5.camel@beast> Message-ID: <1183399542.5612.47.camel@wasabi> El lun, 02-07-2007 a las 09:17 -0700, Brad Taylor escribi?: > Hey, > > > I've downloaded the sources of the Medsphere's installer of Gtk# > > 2.10.1, and I've modified them to support the .NET Framework 2.0. > > Changes are very simple. > > Cool! I just have a few notes on your patch: > > * Much of your Runtime.iss still references the v1.1 GAC, namely > ConfigureGacInstallBat, and your SDK.iss is still set up for Visual > C# 2003 (v7.1). If I understood, that procedure (ConfigureGacInstallBat) checks if the runtime or SDK are installed, and replace this string: 'C:\Program Files\Microsoft.NET\SDK\v1.1\' by the real path of the SDK in both .bat files, which are used to add and remove the gtk-sharp assemblies in the GAC. Is this right? Some comments on this procedure are incorrect. For example, when it says "// Base on SDK 1.1", while it's checking 2.0. I forgot to change it. Regarding Visual Studio, I don't have version 2005 to test the installer. > Other than that, great work! Thank you very much for your notes. I will try to fix them soon. Cheers. -- Milton Pividori Blog: http://www.miltonpividori.com.ar Jabber ID: milton.pividori at jabberes.org GnuPG Public Key: gpg --keyserver wwwkeys.pgp.net --recv-key 0x663C185C From thecurse at gmx.com Wed Jul 4 15:57:27 2007 From: thecurse at gmx.com (Tim Heinrich) Date: Wed, 04 Jul 2007 21:57:27 +0200 Subject: [Gtk-sharp-list] Howto Symbol View? Message-ID: <1183579047.9716.4.camel@gentoo.homenet> Hello, how can I display some Elements in symbol view? Do I have to use a TreeView? What properties do I have to set? ~Tim -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3409 bytes Desc: not available Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20070704/a7cc1495/attachment.bin From aaron at hardwarehookups.com.au Thu Jul 5 07:13:20 2007 From: aaron at hardwarehookups.com.au (Aaron Oxford) Date: Thu, 05 Jul 2007 21:13:20 +1000 Subject: [Gtk-sharp-list] Annoying disappearing window problem Message-ID: <20070705111050.C30317008B@herald.ximian.com> Hi all, I'm still having this problem where my main window loses focus after showing a dialog. The rather contrived scenario is one of the ways I can find to replicate the problem, which appears to occur as a result of launching one dialog from another dialog (for a context menu). Here I've demonstrated it occurring as a result of showing two dialogs at once. It's not just that the window becomes inactive, Gtk# actively seeks out another application's window, brings it to the front, and activates it. This is making my application impossible to use. Please help! Aaron. using System; using Gtk; using Gdk; public class Test { private Label label = null; private int counter = 0; private int configurationFailed = 0; private Gtk.Window wnd; const string s = "the quick brown fox jumped over the lazy dog. "; // Create the window. public static void Main() { if (!GLib.Thread.Supported) GLib.Thread.Init(); Gdk.Threads.Init(); Gdk.Threads.Enter(); Application.Init(); Test t = new Test(); GLib.Timeout.Add(100, new GLib.TimeoutHandler(t.Tick)); Application.Run(); Gdk.Threads.Leave(); } // This is our window. public Test() { wnd = new Gtk.Window("Test"); wnd.Destroyed += new EventHandler(wnd_Destroyed); VBox vbox = new VBox(); label = new Label(counter.ToString()); vbox.PackStart(label, false, false, 0); Button b = new Button(); b.Label = "mofokr"; b.Clicked += new EventHandler(b_Clicked); vbox.PackStart(b, false, false, 0); wnd.Add(vbox); wnd.ShowAll(); } void b_Clicked(object sender, EventArgs e) { configurationFailed = 1; showMessage(s); } // Timer function. private bool Tick() { Gdk.Threads.Enter(); if (configurationFailed > 0) { showMessage(s); configurationFailed--; } label.Text = "" + counter; counter++; Gdk.Threads.Leave(); return true; } // Show a dialog. private void showMessage(string p) { Gtk.Dialog dlg = new Dialog("caption", wnd, DialogFlags.Modal); dlg.AddButton(Gtk.Stock.Ok, Gtk.ResponseType.Ok); dlg.DefaultResponse = Gtk.ResponseType.Ok; ScrolledWindow sw = new ScrolledWindow(); Label l = new Label(p); l.WidthRequest = 285; l.Wrap = true; sw.AddWithViewport(l); dlg.VBox.PackStart(sw); dlg.SetDefaultSize(320, 160); dlg.ShowAll(); dlg.Run(); dlg.Destroy(); } // Close program. void wnd_Destroyed(object sender, EventArgs e) { Application.Quit(); } } --------------------------------------------------------------------------------- Aaron Oxford - aaron+hardwarehookups .com .au Director, Innovative Computer Solutions (Aust) Pty. Ltd. 49 Maitland Rd, Mayfield, NSW 2304 Australia http://www.ic-solutions.com.au Developer, SourceForge project VioLet Composer http://sourceforge.net/projects/buzz-like From bratsche at gnome.org Thu Jul 5 11:10:02 2007 From: bratsche at gnome.org (Cody Russell) Date: Thu, 05 Jul 2007 10:10:02 -0500 Subject: [Gtk-sharp-list] Annoying disappearing window problem In-Reply-To: <20070705111050.C30317008B@herald.ximian.com> References: <20070705111050.C30317008B@herald.ximian.com> Message-ID: <1183648202.7232.1.camel@prometheus> On Thu, 2007-07-05 at 21:13 +1000, Aaron Oxford wrote: > > I'm still having this problem where my main window loses focus after > showing a dialog. The rather contrived scenario is one of the ways I > can find to replicate the problem, which appears to occur as a result > of launching one dialog from another dialog (for a context menu). > Here I've demonstrated it occurring as a result of showing two dialogs > at once. > > It's not just that the window becomes inactive, Gtk# actively seeks > out another application's window, brings it to the front, and > activates it. This is making my application impossible to use. Please > hel Are you talking about gtk# on Windows? If so, this is a well-known problem that has been in GTK for a long time but will hopefully be fixed very soon. See: http://bugzilla.gnome.org/show_bug.cgi?id=112404 From mistral.oz at optimomes.org Fri Jul 6 11:09:43 2007 From: mistral.oz at optimomes.org (Mistral OZ) Date: Fri, 06 Jul 2007 17:09:43 +0200 Subject: [Gtk-sharp-list] WorkingArea ? Message-ID: <468E5B37.1090301@optimomes.org> Hello, I'm presently working on creation of application with two windows on two separated screens. I use Mono2 and Gtk Sharp2. I want to know how to get the dimensions/resolution of each screen and don't find any solution whitout WinForms. Can you redirect me on documentation for coding on multiscreen or help me ? Thanks, Mistral From latexer at gentoo.org Fri Jul 6 11:41:16 2007 From: latexer at gentoo.org (Peter Johanson) Date: Fri, 6 Jul 2007 08:41:16 -0700 Subject: [Gtk-sharp-list] WorkingArea ? In-Reply-To: <468E5B37.1090301@optimomes.org> References: <468E5B37.1090301@optimomes.org> Message-ID: <20070706154115.GD4409@butchest.cubesearch.com> On Fri, Jul 06, 2007 at 05:09:43PM +0200, Mistral OZ wrote: > Hello, > > I'm presently working on creation of application with two windows on two > separated screens. I use Mono2 and Gtk Sharp2. > > I want to know how to get the dimensions/resolution of each screen and > don't find any solution whitout WinForms. > Can you redirect me on documentation for coding on multiscreen or help me ? Check out Gdk.Display, which has static methods for getting instances of Gdk.Screen class, which has the info you want. -pete http://go-mono.com/docs/monodoc.ashx?tlink=5 at ecma%3a206%23Display%2f http://go-mono.com/docs/monodoc.ashx?link=T%3aGdk.Screen From aaron at hardwarehookups.com.au Fri Jul 6 19:02:58 2007 From: aaron at hardwarehookups.com.au (Aaron Oxford) Date: Sat, 07 Jul 2007 09:02:58 +1000 Subject: [Gtk-sharp-list] Disappearing window SOLUTION In-Reply-To: <1183648202.7232.1.camel@prometheus> References: <20070705111050.C30317008B@herald.ximian.com> <1183648202.7232.1.camel@prometheus> Message-ID: <20070706230026.07A6E70052@herald.ximian.com> Thanks very much for the link Cody. For anyone searching this list who, like me, doesn't normally search through the Gtk+ bugs as well, the link below contains a useable workaround. About this Gtk# 2.10 for Windows, how long does it generally take for the Novell guys to get around to updating their installer packages? Gtk# 2.10 itself has already been around for ages, hasn't it? Aaron. At 01:10 AM 6/07/2007, you wrote: >Are you talking about gtk# on Windows? If so, this is a well-known >problem that has been in GTK for a long time but will hopefully be fixed >very soon. See: http://bugzilla.gnome.org/show_bug.cgi?id=112404 --------------------------------------------------------------------------------- Aaron Oxford - aaron+hardwarehookups .com .au Director, Innovative Computer Solutions (Aust) Pty. Ltd. 49 Maitland Rd, Mayfield, NSW 2304 Australia http://www.ic-solutions.com.au Developer, SourceForge project VioLet Composer http://sourceforge.net/projects/buzz-like From aaron at hardwarehookups.com.au Sat Jul 14 07:01:40 2007 From: aaron at hardwarehookups.com.au (Aaron Oxford) Date: Sat, 14 Jul 2007 21:01:40 +1000 Subject: [Gtk-sharp-list] Dumb question: Gtk# versions, Licensing Message-ID: <20070714105854.2439670081@herald.ximian.com> Hi all, I'm having problems with users who seem to either have other versions of Gtk# or Gtk+ installed (under Windows), or for whom the installer from Novell is malfunctioning. As a result my app can't find its dependencies and won't run. This is generating one or two bug reports a week - about 10 times the usual traffic. :-) I'm relatively new to open source development. I've always worked in environments where you buy the things you need and do whatever you like with them within the confines of the office. Hence, I see several options for Gtk# integration but I can't seem to find a solid statement about what is allowed and what is not. If anyone could add options or information to the list below or point me towards a readable source of info on this, I'd be very grateful. My options seem to be (in order of best integration): 1 - Somehow add all of Gtk# and Gtk+ to my own project, compile them directly into it and put up with maintaining it (ie downloading and remodifying new versions as they are released by you guys). This would probably involve me having to get Gtk+ to compile as well (Linuxy C++, argh!), so I won't be doing this unless it turns out to be much easier than it sounds. On the bright side, it should be OK provided I ship all that source in my code releases. 2 - Rip all necessary DLLs from the Gtk# installer (that would include Gtk+ DLLs) from Novell and put them in my bin directory upon installation. This is the most attractive option, and should be the most reliable option. This would be a pretty flagrant violation of copyright (or something) though, wouldn't it? 3 - Compile my own DLLs using the Gtk# source code and put them in the installer. My understanding is that this would be allowed, provided the source for 'my' Gtk# DLLs was available with the rest of the code. For the same reasons as #1, this is not an attractive option. I could possibly rely on a Gtk+ installer but I think that's been part of the problem too, or at the very least has the potential to land me in exactly the same situation again later. 4 - Keep using Novell's installer, but integrated into mine. This has been giving me headaches but only with a few users. I just hate the fact that my software may be directly incompatible with other software (like Pidgin) because I'm using Gtk#. Installer integration would ensure that only users with broken installs had problems, but could actually break other people's software! As you can see, I seem to be stuck between options that involve me appropriating and working with all of Gtk#'s source code, doing things I'm not sure are legal (let alone moral), or creating an installer that breaks other software. :-( I apologise if everyone is reading this and thinking "well, duh", but as I said I'm new to this and try as I might I can't seem to find a clear statement about each of these alternatives or what the hell to do about it all, especially as a chump end user of Gtk# on Windows who can't compile it for himself. :-) Thanks in advance for any (more) help you guys can give me, Aaron. --------------------------------------------------------------------------------- Aaron Oxford - aaron+hardwarehookups .com .au Director, Innovative Computer Solutions (Aust) Pty. Ltd. 49 Maitland Rd, Mayfield, NSW 2304 Australia http://www.ic-solutions.com.au Developer, SourceForge project VioLet Composer http://sourceforge.net/projects/buzz-like From camilo.uribe at gmail.com Sat Jul 14 12:21:53 2007 From: camilo.uribe at gmail.com (Camilo Uribe) Date: Sat, 14 Jul 2007 09:21:53 -0700 Subject: [Gtk-sharp-list] Hey Gtk-sharp-list@lists.ximian.com ;) Message-ID: <948262599.1184430114125.JavaMail.root@sfupload050> http://www.hi5.com/register/dq1gi?inviteId=A_8399e52_vazekEf1Y2g0 Camilo From camilo.uribe at gmail.com Sat Jul 14 12:22:18 2007 From: camilo.uribe at gmail.com (Camilo Uribe) Date: Sat, 14 Jul 2007 09:22:18 -0700 Subject: [Gtk-sharp-list] Hey Gtk-sharp-list@lists.ximian.com ;) Message-ID: <1237493495.1184430137086.JavaMail.root@sfapp272> http://www.hi5.com/register/GkJT0?inviteId=A_8399e52_hKdomSis15g137993810 Camilo From gtk-sharp at indicium.za.net Sat Jul 14 12:55:17 2007 From: gtk-sharp at indicium.za.net (Walter Kempf) Date: Sat, 14 Jul 2007 18:55:17 +0200 Subject: [Gtk-sharp-list] Changing sizes of sub-components Message-ID: <4698FFF5.7000907@indicium.za.net> Good day, I would like to know if it is possible to change the size of two specific sub-components of a TreeView: the expander button and the (vertical) scrollbar. The preferable way for me to do this is via a Gtk RC file. I have Googled and RTFM'd, but all to no avail. Anyone here who can help? Thanks in advance, Walter From monoman at gmail.com Sun Jul 15 00:02:50 2007 From: monoman at gmail.com (Rafael Teixeira) Date: Sun, 15 Jul 2007 01:02:50 -0300 Subject: [Gtk-sharp-list] Dumb question: Gtk# versions, Licensing In-Reply-To: <20070714105854.2439670081@herald.ximian.com> References: <20070714105854.2439670081@herald.ximian.com> Message-ID: Won't comment on the legal bits, but just pinpoint that GTK+ isn't Linuxy C++, It's object-organized pure C code. :) On 7/14/07, Aaron Oxford wrote: > Hi all, > > I'm having problems with users who seem to either have other versions > of Gtk# or Gtk+ installed (under Windows), or for whom the installer > from Novell is malfunctioning. As a result my app can't find its > dependencies and won't run. This is generating one or two bug reports > a week - about 10 times the usual traffic. :-) > > I'm relatively new to open source development. I've always worked in > environments where you buy the things you need and do whatever you > like with them within the confines of the office. Hence, I see > several options for Gtk# integration but I can't seem to find a solid > statement about what is allowed and what is not. If anyone could add > options or information to the list below or point me towards a > readable source of info on this, I'd be very grateful. > > > My options seem to be (in order of best integration): > > 1 - Somehow add all of Gtk# and Gtk+ to my own project, compile them > directly into it and put up with maintaining it (ie downloading and > remodifying new versions as they are released by you guys). This > would probably involve me having to get Gtk+ to compile as well > (Linuxy C++, argh!), so I won't be doing this unless it turns out to > be much easier than it sounds. On the bright side, it should be OK > provided I ship all that source in my code releases. > > 2 - Rip all necessary DLLs from the Gtk# installer (that would > include Gtk+ DLLs) from Novell and put them in my bin directory upon > installation. This is the most attractive option, and should be the > most reliable option. This would be a pretty flagrant violation of > copyright (or something) though, wouldn't it? > > 3 - Compile my own DLLs using the Gtk# source code and put them in > the installer. My understanding is that this would be allowed, > provided the source for 'my' Gtk# DLLs was available with the rest of > the code. For the same reasons as #1, this is not an attractive > option. I could possibly rely on a Gtk+ installer but I think that's > been part of the problem too, or at the very least has the potential > to land me in exactly the same situation again later. > > 4 - Keep using Novell's installer, but integrated into mine. This has > been giving me headaches but only with a few users. I just hate the > fact that my software may be directly incompatible with other > software (like Pidgin) because I'm using Gtk#. Installer integration > would ensure that only users with broken installs had problems, but > could actually break other people's software! > > > As you can see, I seem to be stuck between options that involve me > appropriating and working with all of Gtk#'s source code, doing > things I'm not sure are legal (let alone moral), or creating an > installer that breaks other software. :-( > > I apologise if everyone is reading this and thinking "well, duh", but > as I said I'm new to this and try as I might I can't seem to find a > clear statement about each of these alternatives or what the hell to > do about it all, especially as a chump end user of Gtk# on Windows > who can't compile it for himself. :-) > > Thanks in advance for any (more) help you guys can give me, > > Aaron. > --------------------------------------------------------------------------------- > Aaron Oxford - aaron+hardwarehookups .com .au > Director, Innovative Computer Solutions (Aust) Pty. Ltd. > 49 Maitland Rd, Mayfield, NSW 2304 Australia > http://www.ic-solutions.com.au > Developer, SourceForge project VioLet Composer > http://sourceforge.net/projects/buzz-like > > _______________________________________________ > Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list > -- Rafael "Monoman" Teixeira --------------------------------------- "I myself am made entirely of flaws, stitched together with good intentions." Augusten Burroughs From jeroen at asselman.com Mon Jul 16 08:38:10 2007 From: jeroen at asselman.com (Jeroen Asselman) Date: Mon, 16 Jul 2007 14:38:10 +0200 Subject: [Gtk-sharp-list] Implementing a tree model using the Gtk.Treemodel interface Message-ID: <1184589490.19675.3.camel@jeroen-laptop> Hello, I want to implement my own treemodel and I inherited from the Gtk.Treemodel interface. This doesn't seem to work though, none of the methods in my own model is called. Is implementing the Gtk.Treemodel the right way to go? Or should I inherit from a baseclass? Or is inherting from the Gtk.Treemodel not enough. - Jeroen From mm-list at mm.42h.de Tue Jul 17 12:45:14 2007 From: mm-list at mm.42h.de (Mario Manno) Date: Tue, 17 Jul 2007 18:45:14 +0200 Subject: [Gtk-sharp-list] gconf schema support Message-ID: <1184690714.8939.13.camel@lila> Hi, I'm trying to get the description from a gconf key. key = '/schemas/apps/gnome_settings_daemon/keybindings/home'; GConf.Client client = new GConf.Client();; object result = (object) client.Get (key); Console.WriteLine ("{0} = {1}",key, result.GetType()); The above code results in: Exception of type GConf.InvalidValueTypeException was thrown. >From looking at the source of gnome-sharp2, i guess there is no support for the Schema return type. From ikaparamono at gmail.com Tue Jul 17 17:13:20 2007 From: ikaparamono at gmail.com (To) Date: Tue, 17 Jul 2007 23:13:20 +0200 Subject: [Gtk-sharp-list] Debug an "Out of memory" issue Message-ID: <1184706800.6982.2.camel@indi> Hi, I have a problem in my GTK + Mono application. Randomly, I get an "Unhandled Exception" message following by a "Out of memory" exception. Nothing more. I can't trace the code to check what it is wrong. Is there a way to catch this kind of issues? Thanks in advance Kind regards From gtk-sharp at indicium.za.net Wed Jul 18 10:12:34 2007 From: gtk-sharp at indicium.za.net (Walter Kempf) Date: Wed, 18 Jul 2007 16:12:34 +0200 Subject: [Gtk-sharp-list] Changing sizes of sub-components In-Reply-To: <4698FFF5.7000907@indicium.za.net> References: <4698FFF5.7000907@indicium.za.net> Message-ID: <469E1FD2.7090103@indicium.za.net> To answer my own question... It seems that the only way to change the size is via the theme engine. See http://ubuntuforums.org/showthread.php?t=255065. Haven't found anything about TreeView expanders, though. Walter Kempf wrote: > Good day, > > I would like to know if it is possible to change the size of two > specific sub-components of a TreeView: the expander button and the > (vertical) scrollbar. The preferable way for me to do this is via a Gtk > RC file. > > I have Googled and RTFM'd, but all to no avail. Anyone here who can help? > > Thanks in advance, > > Walter > _______________________________________________ > Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list > > > From xcap2000 at gmail.com Wed Jul 18 20:57:51 2007 From: xcap2000 at gmail.com (Carlos Adriano Portes) Date: Wed, 18 Jul 2007 21:57:51 -0300 Subject: [Gtk-sharp-list] What are Gtk events and extension events? Message-ID: <9a034090707181757i646ebb48r6897d2bc6e8af1a3@mail.gmail.com> Hi friends I would like to know what are these guys, I have seen them as properties on an entry control and some other controls. Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20070718/5349d157/attachment.html From olivier57b at yahoo.fr Fri Jul 20 23:52:09 2007 From: olivier57b at yahoo.fr (lolveley) Date: Sat, 21 Jul 2007 05:52:09 +0200 Subject: [Gtk-sharp-list] gtksourceview# does not recognize gnome# Message-ID: <46A182E9.7090303@yahoo.fr> Hello, here is my problem: I want to install monodevelop, and to do this I have to install gtksourceview#. But this last one does not recognize gnome#: checking for GTK_SHARP... configure: error: Package requirements (gnome-sharp-2.0 >= 1.9.3) were not met: No package 'gnome-sharp-2.0' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTK_SHARP_CFLAGS and GTK_SHARP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. so I reinstalled gnome-sharp and after having entered "./configure" I have the following message: --- Configuration summary * Installation prefix = /opt/local * C# compiler: /opt/local/bin/mcs -define:GTK_SHARP_2_6 -define:GTK_SHARP_2_8 -define:GNOME_SHARP_2_16 Optional assemblies included in the build: * art-sharp.dll: yes * gnomevfs-sharp.dll: yes * gnome-sharp.dll: no * rsvg-sharp.dll: no * gtkhtml-sharp.dll: no * vte-sharp.dll: no NOTE: if any of the above say 'no' you may install the corresponding development packages for them, rerun autogen.sh to include them in the build. --- so we can see that gnome-sharp is not installed.(what is confirmed if I go to /opt/local/lib/pkgconfig, where there is no gnome-sharp-2.0.pc file). Do you know how I can install this dll?Is there an option of the "configure" command I didn't used? lolveley. From olivier57b at yahoo.fr Fri Jul 20 23:53:38 2007 From: olivier57b at yahoo.fr (lolveley) Date: Sat, 21 Jul 2007 05:53:38 +0200 Subject: [Gtk-sharp-list] gtksourceview# does not recognize gnome# , new message Message-ID: <46A18342.6080608@yahoo.fr> Hello, here is my problem: I want to install monodevelop, and to do this I have to install gtksourceview#. But this last one does not recognize gnome#: checking for GTK_SHARP... configure: error: Package requirements (gnome-sharp-2.0 >= 1.9.3) were not met: No package 'gnome-sharp-2.0' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTK_SHARP_CFLAGS and GTK_SHARP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. so I reinstalled gnome-sharp and after having entered "./configure" I have the following message: --- Configuration summary * Installation prefix = /opt/local * C# compiler: /opt/local/bin/mcs -define:GTK_SHARP_2_6 -define:GTK_SHARP_2_8 -define:GNOME_SHARP_2_16 Optional assemblies included in the build: * art-sharp.dll: yes * gnomevfs-sharp.dll: yes * gnome-sharp.dll: no * rsvg-sharp.dll: no * gtkhtml-sharp.dll: no * vte-sharp.dll: no NOTE: if any of the above say 'no' you may install the corresponding development packages for them, rerun autogen.sh to include them in the build. --- so we can see that gnome-sharp is not installed.(what is confirmed if I go to /opt/local/lib/pkgconfig, where there is no gnome-sharp-2.0.pc file). Do you know how I can install this dll?Is there an option of the "configure" command I didn't used? thank you for your attention, lolveley. From jensen.somers at gmail.com Sat Jul 21 04:05:32 2007 From: jensen.somers at gmail.com (Jensen Somers) Date: Sat, 21 Jul 2007 10:05:32 +0200 Subject: [Gtk-sharp-list] gtksourceview# does not recognize gnome# , new message In-Reply-To: <46A18342.6080608@yahoo.fr> References: <46A18342.6080608@yahoo.fr> Message-ID: <46A1BE4C.6040904@gmail.com> Hi, lolveley wrote: > Hello, > > here is my problem: I want to install monodevelop, and to do this I have > to install gtksourceview#. > But this last one does not recognize gnome#: > > so we can see that gnome-sharp is not installed.(what is confirmed if I > go to /opt/local/lib/pkgconfig, where there is no gnome-sharp-2.0.pc file). > > Do you know how I can install this dll?Is there an option of the > "configure" command I didn't used? > > thank you for your attention, > > > lolveley. Gnome# is a package on it's own. http://anonsvn.mono-project.com/viewcvs/trunk/gnome-sharp/ is a web link to it. svn://anonsvn.mono-project.com/source/trunk/gnome-sharp is the SVN checkout link. If you are installing from a tarbal archive it should have been included as well. Also note that Gnome# contains gtkhtml. That might also be a requirement and is a question that frequently pops-up. Regards, Jensen From olivier57b at yahoo.fr Sat Jul 21 04:31:15 2007 From: olivier57b at yahoo.fr (lolveley) Date: Sat, 21 Jul 2007 10:31:15 +0200 Subject: [Gtk-sharp-list] gtksourceview# does not recognize gnome# , new message In-Reply-To: <46A1BE4C.6040904@gmail.com> References: <46A18342.6080608@yahoo.fr> <46A1BE4C.6040904@gmail.com> Message-ID: <46A1C453.2080202@yahoo.fr> My previous message seems not to include the results I obtain when I enter "./configure etc" in the folder of gnome#. here it is: --- Configuration summary * Installation prefix = /opt/local * C# compiler: /opt/local/bin/mcs -define:GTK_SHARP_2_6 -define:GTK_SHARP_2_8 -define:GNOME_SHARP_2_16 Optional assemblies included in the build: * art-sharp.dll: yes * gnomevfs-sharp.dll: yes * gnome-sharp.dll: no * rsvg-sharp.dll: no * gtkhtml-sharp.dll: no * vte-sharp.dll: no NOTE: if any of the above say 'no' you may install the corresponding development packages for them, rerun autogen.sh to include them in the build. --- I would like to have gnome-sharp.dll installed. I saw there exists some options of "configure": "--enable-FEATURE", and "--with-PACKAGE"; I think it could help me to install gnome-sharp.dll but I do not find which feature or which package to enter (I tried "--enable-gnome-sharp" e.g. but it does not works). lolveley. From marek.wyborski at arcor.de Wed Jul 18 13:06:02 2007 From: marek.wyborski at arcor.de (Marek Wyborski) Date: Wed, 18 Jul 2007 19:06:02 +0200 Subject: [Gtk-sharp-list] Glade Code Generator Message-ID: <469E487A.6020001@arcor.de> Hi! I have made a simple Code Generator for C#. It is updating the GUI during programming and makes all widgets and signals available. Also it checks through Reflection which kind of EventArgs a Signal is offering. It is available at: http://www.codeproject.com/csharp/GladeCodeChanger.asp If you like it, and think that it is a help maybe you could make a reference in "starting with Gtk#" on the Mono Page. I would also offer to write an introduction. It is tested in .Net and Mono. Also comments about wishes for functionality are welcome! Greetx Marek From olivier57b at yahoo.fr Sat Jul 21 08:55:45 2007 From: olivier57b at yahoo.fr (lolveley) Date: Sat, 21 Jul 2007 14:55:45 +0200 Subject: [Gtk-sharp-list] gtksourceview# does not recognize gnome# , new message In-Reply-To: <46A1BE4C.6040904@gmail.com> References: <46A18342.6080608@yahoo.fr> <46A1BE4C.6040904@gmail.com> Message-ID: <46A20251.9060703@yahoo.fr> Hi Jensen, you know, I'm a newbie in the world of linux,mac (and moreover a switcher) and maybe I have not understood as I should have, but when I enter "./configure --prefix=/opt/local" to install gnome-sharp, the process goes on until the end, but the file gnome-sharp.dll is not installed. do you know how I can install it? thank you, lolveley. From olivier57b at yahoo.fr Sat Jul 21 09:13:59 2007 From: olivier57b at yahoo.fr (lolveley) Date: Sat, 21 Jul 2007 15:13:59 +0200 Subject: [Gtk-sharp-list] gtksourceview# does not recognize gnome# , new message In-Reply-To: <46A20251.9060703@yahoo.fr> References: <46A18342.6080608@yahoo.fr> <46A1BE4C.6040904@gmail.com> <46A20251.9060703@yahoo.fr> Message-ID: <46A20697.8070307@yahoo.fr> ... I went to the address you gave me, but I did not see a file "configure", can you tell me what to do ? lolveley. From olivier57b at yahoo.fr Sat Jul 21 14:05:51 2007 From: olivier57b at yahoo.fr (lolveley) Date: Sat, 21 Jul 2007 20:05:51 +0200 Subject: [Gtk-sharp-list] gnome# does not install correctly Message-ID: <46A24AFF.7010907@yahoo.fr> Hello, here is my problem: I want to install monodevelop, and to do this I have to install gtksourceview#. But this last one does not recognize gnome#: checking for GTK_SHARP... configure: error: Package requirements (gnome-sharp-2.0 >= 1.9.3) were not met: No package 'gnome-sharp-2.0' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTK_SHARP_CFLAGS and GTK_SHARP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. so I reinstalled gnome-sharp and after having entered "./configure" I have the following message: --- Configuration summary * Installation prefix = /opt/local * C# compiler: /opt/local/bin/mcs -define:GTK_SHARP_2_6 -define:GTK_SHARP_2_8 -define:GNOME_SHARP_2_16 Optional assemblies included in the build: * art-sharp.dll: yes * gnomevfs-sharp.dll: yes * gnome-sharp.dll: no * rsvg-sharp.dll: no * gtkhtml-sharp.dll: no * vte-sharp.dll: no NOTE: if any of the above say 'no' you may install the corresponding development packages for them, rerun autogen.sh to include them in the build. --- so we can see that gnome-sharp is not installed.(what is confirmed if I go to /opt/local/lib/pkgconfig, where there is no gnome-sharp-2.0.pc file). Do you know how I can install this dll?(even these dlls, because I would like to install the others)Is there an option of the "configure" command I didn't used? lolveley. From olivier57b at yahoo.fr Mon Jul 23 13:57:45 2007 From: olivier57b at yahoo.fr (lolveley) Date: Mon, 23 Jul 2007 19:57:45 +0200 Subject: [Gtk-sharp-list] gnome# does not install correctly Message-ID: <46A4EC19.4080908@yahoo.fr> Hello, here is my problem: I want to install monodevelop, and to do this I have to install gnome# and gtksourceview# . But this last one does not recognize gnome#: checking for GTK_SHARP... configure: error: Package requirements (gnome-sharp-2.0 >= 1.9.3) were not met: No package 'gnome-sharp-2.0' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTK_SHARP_CFLAGS and GTK_SHARP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. I specify something concerning the installation of gnome#: after having entered "./configure" I have the following message: --- Configuration summary * Installation prefix = /opt/local * C# compiler: /opt/local/bin/mcs -define:GTK_SHARP_2_6 -define:GTK_SHARP_2_8 -define:GNOME_SHARP_2_16 Optional assemblies included in the build: * art-sharp.dll: yes * gnomevfs-sharp.dll: yes * gnome-sharp.dll: no * rsvg-sharp.dll: no * gtkhtml-sharp.dll: no * vte-sharp.dll: no NOTE: if any of the above say 'no' you may install the corresponding development packages for them, rerun autogen.sh to include them in the build. --- so we can see that gnome-sharp is not really installed.(what is confirmed if I go to /opt/local/lib/pkgconfig, where there is no gnome-sharp-2.0.pc file). Do you know how I can install these dll?Is there an option of the "configure" command I didn't used? Or some packages needed by gnome#? I'm desperate!Too bad to be stuck! lolveley. _______________________________________________ Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com http://lists.ximian.com/mailman/listinfo/gtk-sharp-list From mkestner at ximian.com Mon Jul 23 14:14:01 2007 From: mkestner at ximian.com (Mike Kestner) Date: Mon, 23 Jul 2007 13:14:01 -0500 Subject: [Gtk-sharp-list] gnome# does not install correctly In-Reply-To: <46A4EC19.4080908@yahoo.fr> References: <46A4EC19.4080908@yahoo.fr> Message-ID: <1185214441.3532.33.camel@linux-dii6.site> On Mon, 2007-07-23 at 19:57 +0200, lolveley wrote: > Optional assemblies included in the build: > > * art-sharp.dll: yes > * gnomevfs-sharp.dll: yes > * gnome-sharp.dll: no > * rsvg-sharp.dll: no > * gtkhtml-sharp.dll: no > * vte-sharp.dll: no > > NOTE: if any of the above say 'no' you may install the > corresponding development packages for them, rerun > autogen.sh to include them in the build. As the above indicates, you need to install some devel packages. The most likely culprits for gnome-sharp are libgnomeprint, libgnomeprintui, and gnome-panel. Are there not any gnome-sharp packages available for your platform? -- Mike Kestner From olivier57b at yahoo.fr Mon Jul 23 14:29:44 2007 From: olivier57b at yahoo.fr (lolveley) Date: Mon, 23 Jul 2007 20:29:44 +0200 Subject: [Gtk-sharp-list] gnome# does not install correctly In-Reply-To: <1185214441.3532.33.camel@linux-dii6.site> References: <46A4EC19.4080908@yahoo.fr> <1185214441.3532.33.camel@linux-dii6.site> Message-ID: <46A4F398.8040003@yahoo.fr> Hello mike, thank you for your answer. I will try to install these 3 packages, if I can find them. If I can not, do you think the regular package is good also? And I did not found any package for gnome-sharp. I will give you some news if something happens. regards, lolveley. From olivier57b at yahoo.fr Mon Jul 23 16:19:34 2007 From: olivier57b at yahoo.fr (lolveley) Date: Mon, 23 Jul 2007 22:19:34 +0200 Subject: [Gtk-sharp-list] gnome# does not install correctly In-Reply-To: <1185214441.3532.33.camel@linux-dii6.site> References: <46A4EC19.4080908@yahoo.fr> <1185214441.3532.33.camel@linux-dii6.site> Message-ID: <46A50D56.2070807@yahoo.fr> It works!!! You know, I spend a couple days to compile this source. Where did you found the three sources to include? thank you again! lolveley. From mm-list at mm.42h.de Tue Jul 24 11:46:24 2007 From: mm-list at mm.42h.de (Mario Manno) Date: Tue, 24 Jul 2007 17:46:24 +0200 Subject: [Gtk-sharp-list] gconf schema support In-Reply-To: <1184690714.8939.13.camel@lila> References: <1184690714.8939.13.camel@lila> Message-ID: <1185291984.8737.6.camel@lila> On Tue, 2007-07-17 at 18:45 +0200, Mario Manno wrote: > Hi, > > From looking at the source of gnome-sharp2, i guess there is no support > for the Schema return type. I wrote a little patch to address this problem. This patch doesn't add gconf_schema_new and gconf_schema_set_* support, but get_* should be sufficient for most use cases. I guess I could implement the other functions if you consider them useful. cheers, Mario -------------- next part -------------- A non-text attachment was scrubbed... Name: gconf-schema.patch Type: text/x-patch Size: 3883 bytes Desc: not available Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20070724/7c2ed0b3/attachment.bin From lluis at ximian.com Fri Jul 27 05:33:35 2007 From: lluis at ximian.com (Lluis Sanchez) Date: Fri, 27 Jul 2007 11:33:35 +0200 Subject: [Gtk-sharp-list] gnome# does not install correctly In-Reply-To: <1185214441.3532.33.camel@linux-dii6.site> References: <46A4EC19.4080908@yahoo.fr> <1185214441.3532.33.camel@linux-dii6.site> Message-ID: <1185528815.4565.5.camel@portador.site> El dl 23 de 07 del 2007 a les 13:14 -0500, en/na Mike Kestner va escriure: > On Mon, 2007-07-23 at 19:57 +0200, lolveley wrote: > > > Optional assemblies included in the build: > > > > * art-sharp.dll: yes > > * gnomevfs-sharp.dll: yes > > * gnome-sharp.dll: no > > * rsvg-sharp.dll: no > > * gtkhtml-sharp.dll: no > > * vte-sharp.dll: no > > > > NOTE: if any of the above say 'no' you may install the > > corresponding development packages for them, rerun > > autogen.sh to include them in the build. > > As the above indicates, you need to install some devel packages. The > most likely culprits for gnome-sharp are libgnomeprint, libgnomeprintui, > and gnome-panel. It would be good if the script was more specific about which devel packages might be missing, specially for gnome-sharp. The requirement of libgnomeprint* and gnome-panel are not obvious. Lluis. From mkestner at ximian.com Fri Jul 27 14:16:49 2007 From: mkestner at ximian.com (Mike Kestner) Date: Fri, 27 Jul 2007 13:16:49 -0500 Subject: [Gtk-sharp-list] gnome# does not install correctly In-Reply-To: <1185528815.4565.5.camel@portador.site> References: <46A4EC19.4080908@yahoo.fr> <1185214441.3532.33.camel@linux-dii6.site> <1185528815.4565.5.camel@portador.site> Message-ID: <1185560209.3532.57.camel@linux-dii6.site> On Fri, 2007-07-27 at 11:33 +0200, Lluis Sanchez wrote: > It would be good if the script was more specific about which devel > packages might be missing, specially for gnome-sharp. The requirement of > libgnomeprint* and gnome-panel are not obvious. Yeah, nobody seems to know how to use config.log. I added a blurb about the required libs. Hopefully people will be able to figure out which packages provide them. -- Mike Kestner From czarekzaw at wp.pl Sun Jul 29 11:09:56 2007 From: czarekzaw at wp.pl (Czapajewz) Date: Sun, 29 Jul 2007 17:09:56 +0200 Subject: [Gtk-sharp-list] C# and OpenOffice Message-ID: <46ACADC4.2010707@wp.pl> Hi! Does anybody know how to connect to the OpenOffice Base database both under linux and windows? best regards Czarek From adam at morrison-ind.com Mon Jul 30 00:03:12 2007 From: adam at morrison-ind.com (Adam Tauno Williams) Date: Mon, 30 Jul 2007 0:03:12 -0400 Subject: [Gtk-sharp-list] C# and OpenOffice In-Reply-To: <46ACADC4.2010707@wp.pl> References: <46ACADC4.2010707@wp.pl> Message-ID: <4162-SnapperMsg05076A73C2D31388@[75.219.138.204]> >Does anybody know how to connect to the OpenOffice Base >database both under linux and windows? What does this have to do with Gtk#? Seems like a general mono question. Anyway, I believe Oo Base uses Hypersonic. So if you can find a .NET provider for Hypersonic that should work. From lifewarped at yahoo.com Mon Jul 30 05:17:06 2007 From: lifewarped at yahoo.com (Glenn Martin) Date: Mon, 30 Jul 2007 05:17:06 -0400 Subject: [Gtk-sharp-list] C# and OpenOffice In-Reply-To: <46ACADC4.2010707@wp.pl> References: <46ACADC4.2010707@wp.pl> Message-ID: <46ADAC92.4050701@yahoo.com> It depends, if you want access to the interface look at the Python-UNO[1] bridge in OOo, if you want access to the data itself there may be a driver via odbc or a .NET provider for its Database engine[2]. Remember an OOo database is simply a zip file, unpack and access. Links: 1. http://udk.openoffice.org/python/python-bridge.html 2. http://hsqldb.org/ Glenn R. Martin http://www.technicalstressings.com http://www.macux.com Czapajewz wrote: > Hi! > > Does anybody know how to connect to the OpenOffice Base > database both under linux and windows? > > best regards > Czarek > _______________________________________________ > Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 4510 bytes Desc: S/MIME Cryptographic Signature Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20070730/d6b7fbfa/attachment.bin From christian_hoff at gmx.net Tue Jul 31 12:45:40 2007 From: christian_hoff at gmx.net (Christian Hoff) Date: Tue, 31 Jul 2007 18:45:40 +0200 Subject: [Gtk-sharp-list] Gtk.TreeModelFilterModifyFunc NOT working -> Patch Message-ID: <46AF6734.3030205@gmx.net> Hi, I have discovered a really serious bug in Gtk# appointing Gtk.TreeModelFilterModifyFunc. As you probably know it is possible to set a modify function to a Gtk.TreeModelFilter to modify the display of the underlying Gtk.TreeModel. In fact that means nothing different than creating a different model based on the old one, but with different columns. This can be very useful if you have a Gtk.TreeModel containing objects of a custom datatype. If you want to expose this model on a Gtk.TreeView you can either use a CellDataFunc to render the content of the TreeView or you can create a new TreeModel based on the old one with some columns containing data in a format that can be rendered by setting rendering attributes via AddAttribute(for example of type System.String). The second option can be done very easily and handy by using a ModifyFunc that is called for each data access/cell in the new model. A code example: void xyz() { GLib.GType[] ColTypes = new GLib.GType[5]; ColTypes[0] = GLib.GType.Int; ColTypes[1] = GLib.GType.String; ColTypes[2] = GLib.GType.String; ColTypes[3] = GLib.GType.String; ColTypes[4] = GLib.GType.String; treeview.SetModifyFunc(5, ColTypes, this.ModifyFunc); } private void ModifyFunc(Gtk.TreeModel model, Gtk.TreeIter iter, GLib.Value val, System.Int32 ColID) { // Get corresponding iter(row) in the old model Gtk.TreeIter MainIter; TreeModel.GetIterFromString(out MainIter, model.GetPath(iter).ToString()); // Fill the cell with the book's properties switch(ColID) { case 0: val.Val = (TreeModel.GetValue(MainIter, 0) as Bestandsverwaltung.Database.DataStruct.Book).ID; break; case 1: val.Val = (TreeModel.GetValue(MainIter, 0) as Bestandsverwaltung.Database.DataStruct.Book).BookType.Title; break; case 2: val.Val = (TreeModel.GetValue(MainIter, 0) as Bestandsverwaltung.Database.DataStruct.Book).BookType.Publisher; break; case 3: val.Val = (TreeModel.GetValue(MainIter, 0) as Bestandsverwaltung.Database.DataStruct.Book).BookType.Faculty.Name; System.Console.WriteLine((System.String) val.Val); break; case 4: val.Val = (TreeModel.GetValue(MainIter, 0) as Bestandsverwaltung.Database.DataStruct.Book).DamageDescr; System.Console.WriteLine((System.String) val.Val); break; } } As you see it is necessary to modify the parameter named val as it contains the new content of the cell. *Therefore it needs to be passed by reference and NOT by value* because otherwise the parameter(e.g. the new content of this cell) cannot be modified. That means that the above code snippet won't work and the content of the cell will always stay uninitialized(or, to be correct, stay initialized with the default value, which is 0 for a numeric datatype, "" for GLib.GType.String and so on). That's the reason why the ModifyFunc is not working. The delegate has to be changed so that the val argument is passed by reference. To do so, I have downloaded the sources of Gtk version 2.10 and also made it to find and fix the error(and even a second one). It's hidden in GtkSharp.TreeModelFilterModifyFuncNative.cs and TreeModelFilterModifyFunc.cs in the /gtk/generated directory, which are autogenerated by GAPI. However, I cannot commit a patch for this error because I simply didn't have the time to get familiar enough with GAPI to find out how the files are generated. But I modified them, recompiled the assembly, installed it into the GAC via make install and finally really got it working! These are the new versions of the files: * GtkSharp.TreeModelFilterModifyFuncNative.cs:* /// This file was generated by the Gtk# code generator. // Any changes made will be lost if regenerated. namespace GtkSharp { using System; #region Autogenerated code [GLib.CDeclCallback] internal delegate void TreeModelFilterModifyFuncNative(IntPtr model, ref Gtk.TreeIter iter, ref GLib.Value value, int column, IntPtr data); internal class TreeModelFilterModifyFuncWrapper { public void NativeCallback (IntPtr model, ref Gtk.TreeIter iter, ref GLib.Value value, int column, IntPtr data) { Gtk.TreeModel _arg0 = GLib.Object.GetObject(model) as Gtk.TreeModel; Gtk.TreeIter _arg1 = iter; int _arg3 = column; managed ( _arg0, _arg1, ref value, _arg3); } internal TreeModelFilterModifyFuncNative NativeDelegate; Gtk.TreeModelFilterModifyFunc managed; public TreeModelFilterModifyFuncWrapper (Gtk.TreeModelFilterModifyFunc managed) { this.managed = managed; if (managed != null) NativeDelegate = new TreeModelFilterModifyFuncNative (NativeCallback); } public static Gtk.TreeModelFilterModifyFunc GetManagedDelegate (TreeModelFilterModifyFuncNative native) { if (native == null) return null; TreeModelFilterModifyFuncWrapper wrapper = (TreeModelFilterModifyFuncWrapper) native.Target; if (wrapper == null) return null; return wrapper.managed; } } #endregion } * */*TreeModelFilterModifyFunc.cs:* /// This file was generated by the Gtk# code generator. // Any changes made will be lost if regenerated. namespace Gtk { using System; public delegate void TreeModelFilterModifyFunc(Gtk.TreeModel model, Gtk.TreeIter iter, ref GLib.Value value, int column); } /Everything I did in the TreeModelFilterModyFunc.cs file was to change the delegate so that value is passed by reference. Therefore I also needed to change GtkSharp.TreeModelFilterModifyFuncNative.cs. But my first change wasn't enough because there is still another error hidden in the second file: /public void NativeCallback (IntPtr model, ref Gtk.TreeIter iter, ref GLib.Value value, int column, IntPtr data) { Gtk.TreeModel _arg0 = GLib.Object.GetObject(model) as Gtk.TreeModel; Gtk.TreeIter _arg1 = iter; GLib.Value _arg2 = value; int _arg3 = column; managed ( _arg0, _arg1, ref _arg2, _arg3); }/ When you assign _arg2 to value(/GLib.Value _arg2 = value;/), normally both should be equal e.g. contain a reference to the same place in memory as they are no value datatypes like System.String. But to my own surprise this code didn't work. It is really necessary to pass the variable value directly to the delegate functionas in the complete listing further above. After doing so, I have recompiled the assembly, modified my program and suddenly the ModifyFunc worked! The assembly in which the error has been fixed can be found here: Hi, I have discovered a really serious bug in Gtk# appointing Gtk.TreeModelFilterModifyFunc. As you probably know it is possible to set a modify function to a Gtk.TreeModelFilter to modify the display of the underlying Gtk.TreeModel. In fact that means nothing different than creating a different model based on the old one, but with different columns. This can be very useful if you have a Gtk.TreeModel containing objects of a custom datatype. If you want to expose this model on a Gtk.TreeView you can either use a CellDataFunc to render the content of the TreeView or you can create a new TreeModel based on the old one with some columns containing data in a format that can be rendered by setting rendering attributes via AddAttribute(for example of type System.String). The second option can be done very easily and handy by using a ModifyFunc that is called for each data access/cell in the new model. A code example: void xyz() { GLib.GType[] ColTypes = new GLib.GType[5]; ColTypes[0] = GLib.GType.Int; ColTypes[1] = GLib.GType.String; ColTypes[2] = GLib.GType.String; ColTypes[3] = GLib.GType.String; ColTypes[4] = GLib.GType.String; treeview.SetModifyFunc(5, ColTypes, this.ModifyFunc); } private void ModifyFunc(Gtk.TreeModel model, Gtk.TreeIter iter, GLib.Value val, System.Int32 ColID) { // Get corresponding iter(row) in the old model Gtk.TreeIter MainIter; TreeModel.GetIterFromString(out MainIter, model.GetPath(iter).ToString()); // Fill the cell with the book's properties switch(ColID) { case 0: val.Val = (TreeModel.GetValue(MainIter, 0) as Bestandsverwaltung.Database.DataStruct.Book).ID; break; case 1: val.Val = (TreeModel.GetValue(MainIter, 0) as Bestandsverwaltung.Database.DataStruct.Book).BookType.Title; break; case 2: val.Val = (TreeModel.GetValue(MainIter, 0) as Bestandsverwaltung.Database.DataStruct.Book).BookType.Publisher; break; case 3: val.Val = (TreeModel.GetValue(MainIter, 0) as Bestandsverwaltung.Database.DataStruct.Book).BookType.Faculty.Name; System.Console.WriteLine((System.String) val.Val); break; case 4: val.Val = (TreeModel.GetValue(MainIter, 0) as Bestandsverwaltung.Database.DataStruct.Book).DamageDescr; System.Console.WriteLine((System.String) val.Val); break; } } As you see it is necessary to modify the parameter named val as it contains the new content of the cell. *Therefore it needs to be passed by reference and NOT by value* because otherwise the parameter(e.g. the new content of this cell) cannot be modified. That means that the above code snippet won't work and the content of the cell will always stay uninitialized(or, to be correct, stay initialized with the default value, which is 0 for a numeric datatype, "" for GLib.GType.String and so on). That's the reason why the ModifyFunc is not working. The delegate has to be changed so that the val argument is passed by reference. To do so, I have downloaded the sources of Gtk version 2.10 and also made it to find and fix the error(and even a second one). It's hidden in GtkSharp.TreeModelFilterModifyFuncNative.cs and TreeModelFilterModifyFunc.cs in the /gtk/generated directory, which are autogenerated by GAPI. However, I cannot commit a patch for this error because I simply didn't have the time to get familiar enough with GAPI to find out how the files are generated. But I modified them, recompiled the assembly, installed it into the GAC via make install and finally really got it working! These are the new versions of the files: * GtkSharp.TreeModelFilterModifyFuncNative.cs:* /// This file was generated by the Gtk# code generator. // Any changes made will be lost if regenerated. namespace GtkSharp { using System; #region Autogenerated code [GLib.CDeclCallback] internal delegate void TreeModelFilterModifyFuncNative(IntPtr model, ref Gtk.TreeIter iter, ref GLib.Value value, int column, IntPtr data); internal class TreeModelFilterModifyFuncWrapper { public void NativeCallback (IntPtr model, ref Gtk.TreeIter iter, ref GLib.Value value, int column, IntPtr data) { Gtk.TreeModel _arg0 = GLib.Object.GetObject(model) as Gtk.TreeModel; Gtk.TreeIter _arg1 = iter; int _arg3 = column; managed ( _arg0, _arg1, ref value, _arg3); } internal TreeModelFilterModifyFuncNative NativeDelegate; Gtk.TreeModelFilterModifyFunc managed; public TreeModelFilterModifyFuncWrapper (Gtk.TreeModelFilterModifyFunc managed) { this.managed = managed; if (managed != null) NativeDelegate = new TreeModelFilterModifyFuncNative (NativeCallback); } public static Gtk.TreeModelFilterModifyFunc GetManagedDelegate (TreeModelFilterModifyFuncNative native) { if (native == null) return null; TreeModelFilterModifyFuncWrapper wrapper = (TreeModelFilterModifyFuncWrapper) native.Target; if (wrapper == null) return null; return wrapper.managed; } } #endregion } * */*TreeModelFilterModifyFunc.cs:* /// This file was generated by the Gtk# code generator. // Any changes made will be lost if regenerated. namespace Gtk { using System; public delegate void TreeModelFilterModifyFunc(Gtk.TreeModel model, Gtk.TreeIter iter, ref GLib.Value value, int column); } /Everything I did in the TreeModelFilterModyFunc.cs file was to change the delegate so that value is passed by reference. Therefore I also needed to change GtkSharp.TreeModelFilterModifyFuncNative.cs. But my first change wasn't enough because there is still another error hidden in the second file: /public void NativeCallback (IntPtr model, ref Gtk.TreeIter iter, ref GLib.Value value, int column, IntPtr data) { Gtk.TreeModel _arg0 = GLib.Object.GetObject(model) as Gtk.TreeModel; Gtk.TreeIter _arg1 = iter; GLib.Value _arg2 = value; int _arg3 = column; managed ( _arg0, _arg1, ref _arg2, _arg3); }/ When you assign _arg2 to value(/GLib.Value _arg2 = value;/), normally both should be equal e.g. contain a reference to the same place in memory as they are no value datatypes like System.String. But to my own surprise this code didn't work. It is really necessary to pass the variable value directly to the delegate functionas in the complete listing further above. After doing so, I have recompiled the assembly, modified my program and suddenly the ModifyFunc worked! I have attached the gtk-sharp.dll assembly based on Gtk 2.10 where these errors are corrected can be found here: http://www.gmx.de/mc/CEtA2LYY4TxOZNeZS9qDwVtFhPCp1E(after opening the link in your browser you have to click on "GMX Media Center starten" to see and download the file; I'm sorry for this, but the list doesn't seem to accept such large attachments). Of course, fixing this error with the modify func will break support for old programs using it. But I don't think there are any; there is nearly no documentation to be found on this function and when I searched for it I didn't find any example for Mono(quiet logical ^^). That's why I really ask you to get this fixed; If you want, I can also update the Mono documentation and post an example for the correct use of this function. However, who added this non-working code to the repository didn't test it; otherwise the error would have been noticed because it occurs everytime when using this function. Quiet a worse indicator for the code quality in Gtk#. Christian Hoff Of course, fixing this error with the modify func will break support for old programs using it. But I don't think there are any; there is nearly no documentation to be found on this function and when I searched for it I didn't find any example for Mono(quiet logical ^^). That's why I really ask you to get this fixed; If you want, I can also update the Mono documentation and post an example for the correct use of this function. However, who added this non-working code to the repository didn't test it; otherwise the error would have been noticed because it occurs everytime when using this function. Quiet a worse indicator for the code quality in Gtk#. Christian Hoff From christian_hoff at gmx.net Tue Jul 31 12:53:27 2007 From: christian_hoff at gmx.net (Christian Hoff) Date: Tue, 31 Jul 2007 18:53:27 +0200 Subject: [Gtk-sharp-list] The mail again(without formatting errors) Message-ID: <46AF6907.6050409@gmx.net> Hi, I have discovered a really serious bug in Gtk# appointing Gtk.TreeModelFilterModifyFunc. As you probably know it is possible to set a modify function to a Gtk.TreeModelFilter to modify the display of the underlying Gtk.TreeModel. In fact that means nothing different than creating a different model based on the old one, but with different columns. This can be very useful if you have a Gtk.TreeModel containing objects of a custom datatype. If you want to expose this model on a Gtk.TreeView you can either use a CellDataFunc to render the content of the TreeView or you can create a new TreeModel based on the old one with some columns containing data in a format that can be rendered by setting rendering attributes via AddAttribute(for example of type System.String). The second option can be done very easily and handy by using a ModifyFunc that is called for each data access/cell in the new model. A code example: void xyz() { GLib.GType[] ColTypes = new GLib.GType[5]; ColTypes[0] = GLib.GType.Int; ColTypes[1] = GLib.GType.String; ColTypes[2] = GLib.GType.String; ColTypes[3] = GLib.GType.String; ColTypes[4] = GLib.GType.String; treeview.SetModifyFunc(5, ColTypes, this.ModifyFunc); } private void ModifyFunc(Gtk.TreeModel model, Gtk.TreeIter iter, GLib.Value val, System.Int32 ColID) { // Get corresponding iter(row) in the old model Gtk.TreeIter MainIter; TreeModel.GetIterFromString(out MainIter, model.GetPath(iter).ToString()); // Fill the cell with the book's properties switch(ColID) { case 0: val.Val = (TreeModel.GetValue(MainIter, 0) as Bestandsverwaltung.Database.DataStruct.Book).ID; break; case 1: val.Val = (TreeModel.GetValue(MainIter, 0) as Bestandsverwaltung.Database.DataStruct.Book).BookType.Title; break; case 2: val.Val = (TreeModel.GetValue(MainIter, 0) as Bestandsverwaltung.Database.DataStruct.Book).BookType.Publisher; break; case 3: val.Val = (TreeModel.GetValue(MainIter, 0) as Bestandsverwaltung.Database.DataStruct.Book).BookType.Faculty.Name; System.Console.WriteLine((System.String) val.Val); break; case 4: val.Val = (TreeModel.GetValue(MainIter, 0) as Bestandsverwaltung.Database.DataStruct.Book).DamageDescr; System.Console.WriteLine((System.String) val.Val); break; } } As you see it is necessary to modify the parameter named val as it contains the new content of the cell. *Therefore it needs to be passed by reference and NOT by value* because otherwise the parameter(e.g. the new content of this cell) cannot be modified. That means that the above code snippet won't work and the content of the cell will always stay uninitialized(or, to be correct, stay initialized with the default value, which is 0 for a numeric datatype, "" for GLib.GType.String and so on). That's the reason why the ModifyFunc is not working. The delegate has to be changed so that the val argument is passed by reference. To do so, I have downloaded the sources of Gtk version 2.10 and also made it to find and fix the error(and even a second one). It's hidden in GtkSharp.TreeModelFilterModifyFuncNative.cs and TreeModelFilterModifyFunc.cs in the /gtk/generated directory, which are autogenerated by GAPI. However, I cannot commit a patch for this error because I simply didn't have the time to get familiar enough with GAPI to find out how the files are generated. But I modified them, recompiled the assembly, installed it into the GAC via make install and finally really got it working! These are the new versions of the files: * GtkSharp.TreeModelFilterModifyFuncNative.cs:* /// This file was generated by the Gtk# code generator. // Any changes made will be lost if regenerated. namespace GtkSharp { using System; #region Autogenerated code [GLib.CDeclCallback] internal delegate void TreeModelFilterModifyFuncNative(IntPtr model, ref Gtk.TreeIter iter, ref GLib.Value value, int column, IntPtr data); internal class TreeModelFilterModifyFuncWrapper { public void NativeCallback (IntPtr model, ref Gtk.TreeIter iter, ref GLib.Value value, int column, IntPtr data) { Gtk.TreeModel _arg0 = GLib.Object.GetObject(model) as Gtk.TreeModel; Gtk.TreeIter _arg1 = iter; int _arg3 = column; managed ( _arg0, _arg1, ref value, _arg3); } internal TreeModelFilterModifyFuncNative NativeDelegate; Gtk.TreeModelFilterModifyFunc managed; public TreeModelFilterModifyFuncWrapper (Gtk.TreeModelFilterModifyFunc managed) { this.managed = managed; if (managed != null) NativeDelegate = new TreeModelFilterModifyFuncNative (NativeCallback); } public static Gtk.TreeModelFilterModifyFunc GetManagedDelegate (TreeModelFilterModifyFuncNative native) { if (native == null) return null; TreeModelFilterModifyFuncWrapper wrapper = (TreeModelFilterModifyFuncWrapper) native.Target; if (wrapper == null) return null; return wrapper.managed; } } #endregion } * */*TreeModelFilterModifyFunc.cs:* /// This file was generated by the Gtk# code generator. // Any changes made will be lost if regenerated. namespace Gtk { using System; public delegate void TreeModelFilterModifyFunc(Gtk.TreeModel model, Gtk.TreeIter iter, ref GLib.Value value, int column); } /Everything I did in the TreeModelFilterModyFunc.cs file was to change the delegate so that value is passed by reference. Therefore I also needed to change GtkSharp.TreeModelFilterModifyFuncNative.cs. But my first change wasn't enough because there is still another error hidden in the second file: /public void NativeCallback (IntPtr model, ref Gtk.TreeIter iter, ref GLib.Value value, int column, IntPtr data) { Gtk.TreeModel _arg0 = GLib.Object.GetObject(model) as Gtk.TreeModel; Gtk.TreeIter _arg1 = iter; GLib.Value _arg2 = value; int _arg3 = column; managed ( _arg0, _arg1, ref _arg2, _arg3); }/ When you assign _arg2 to value(/GLib.Value _arg2 = value;/), normally both should be equal e.g. contain a reference to the same place in memory as they are no value datatypes like System.String. But to my own surprise this code didn't work. It is really necessary to pass the variable value directly to the delegate functionas in the complete listing further above. After doing so, I have recompiled the assembly, modified my program and suddenly the ModifyFunc worked! I have attached the gtk-sharp.dll assembly based on Gtk 2.10 where these errors are corrected can be found here: http://www.gmx.de/mc/CEtA2LYY4TxOZNeZS9qDwVtFhPCp1E(after opening the link in your browser you have to click on "GMX Media Center starten" to see and download the file; I'm sorry for this, but the list doesn't seem to accept such large attachments). Of course, fixing this error with the modify func will break support for old programs using it. But I don't think there are any; there is nearly no documentation to be found on this function and when I searched for it I didn't find any example for Mono(quiet logical ^^). That's why I really ask you to get this fixed; If you want, I can also update the Mono documentation and post an example for the correct use of this function. However, who added this non-working code to the repository didn't test it; otherwise the error would have been noticed because it occurs everytime when using this function. Quiet a worse indicator for the code quality in Gtk#. Christian Hoff _______________________________________________ Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com http://lists.ximian.com/mailman/listinfo/gtk-sharp-list