From miguel at ximian.com Sun Jun 1 11:22:11 2008 From: miguel at ximian.com (Miguel de Icaza) Date: Sun, 01 Jun 2008 11:22:11 -0400 Subject: [Gtk-sharp-list] Gtk-sharp widget library released ! In-Reply-To: <1212272772.7694.35.camel@aleph> References: <17578339.post@talk.nabble.com> <1212269601.7694.26.camel@aleph> <17580032.post@talk.nabble.com> <1212272772.7694.35.camel@aleph> Message-ID: <1212333731.4968.44.camel@linux.site> > This calendar is in its own DLL, code is at > in the > trunk/Gtk/Calendar folder. It would be great if you guys joined forces, it seems that Daniel is on to something with this nice new collection of widget add-ons. Miguel. From kenw at quarter-flash.com Mon Jun 2 10:14:34 2008 From: kenw at quarter-flash.com (Kenneth D Weinert) Date: Mon, 02 Jun 2008 08:14:34 -0600 Subject: [Gtk-sharp-list] I really need some sort of tutorial Message-ID: <4844004A.7080702@quarter-flash.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 on interactive applications. I am working on a Powerball simulator and I'm just completely lost on how to make the application part responsive. Basically, there are a lot of fields (you can see an image at http://quarter-flash.com/powerball.png) and the [Play] button kicks off either a thread or just starts the loop that starts running the program. Because the actual code for updating fields is part of a separate class (separate from the GUI) I am not seeing the UI update at all. I have seen a lot of very simple tutorials on how to make a GUI responsive, but I'm not seeing two way communications happening. That is, I need to grab values from the text entry fields, process them, and then update the text entry fields with the new values. I'm most likely just being very dense here, and I'm finding it very difficult to wrap my mind around how this works. I think I understand that if the user was editing the fields I could attach callbacks for the fields, but since it's the program editing the fields I'm just not making the connection (literally :) in how this works. The interface was designed in Glade and perhaps there are some properties there that I've set incorrectly that are hindering my attempts. Any pointers/references that you can point me to would be *greatly* appreciated. I don't have any previous experience with using GTK in C or C++. Thank you. Ken - -- Ken Weinert http://quarter-flash.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIRABJH0OpnUzq8fARAms1AKCwNLdcFd6gQDvvmRxqgfwPnWUl9ACgqWWH vCzfx9HKD+I1HmJRAHcGK3U= =D1a1 -----END PGP SIGNATURE----- From adam at morrison-ind.com Mon Jun 2 10:35:37 2008 From: adam at morrison-ind.com (Adam Tauno Williams) Date: Mon, 02 Jun 2008 10:35:37 -0400 Subject: [Gtk-sharp-list] I really need some sort of tutorial In-Reply-To: <4844004A.7080702@quarter-flash.com> References: <4844004A.7080702@quarter-flash.com> Message-ID: <1212417337.5330.19.camel@EVTLIS03.morrison.iserv.net> > on interactive applications. > I don't have any previous experience with using GTK in C or C++. I came to GTK# from the same place so don't feel too bad. Last time I'd done any GUI programming was with Borland's OWL toolkit on Windows For Workgroups. :) > Basically, there are a lot of fields (you can see an image at > http://quarter-flash.com/powerball.png) and the [Play] button kicks > off either a thread or just starts the loop that starts running the > program. > Because the actual code for updating fields is part of a separate > class (separate from the GUI) I am not seeing the UI update at all. I assume your Window / Dialog with the form fields is a class? Just expose the fields as properties might be the simplest way. ... public string Jackpot { set { jackpot.Text = value; } } ... That should update the value in the field. Have your command class call that method of your Window/Dialog/Form class. > I have seen a lot of very simple tutorials on how to make a GUI > responsive, but I'm not seeing two way communications happening. That > is, I need to grab values from the text entry fields, process them, > and then update the text entry fields with the new values. > I'm most likely just being very dense here, and I'm finding it very > difficult to wrap my mind around how this works. I think I understand > that if the user was editing the fields I could attach callbacks for > the fields, but since it's the program editing the fields I'm just not > making the connection (literally :) in how this works. You can either update the field whenever the value is changed by the calculation or call a Timer to refresh the values from the command class. > The interface was designed in Glade and perhaps there are some > properties there that I've set incorrectly that are hindering my attempts. > Any pointers/references that you can point me to would be *greatly* > appreciated. -- Consonance: an Open Source .NET OpenGroupware client. Contact:awilliam at whitemiceconsulting.com http://freshmeat.net/projects/consonance/ From mhenriquezs at terra.cl Mon Jun 2 17:36:50 2008 From: mhenriquezs at terra.cl (Mauricio Henriquez) Date: Mon, 02 Jun 2008 17:36:50 -0400 Subject: [Gtk-sharp-list] Strange GdkSharp.PixbufDestroyNotifyWrapper error.. In-Reply-To: <930bfd5c0805311159y6e4aeee7x2fe82a794d4189f6@mail.gmail.com> References: <17578339.post@talk.nabble.com> <930bfd5c0805311159y6e4aeee7x2fe82a794d4189f6@mail.gmail.com> Message-ID: <484467F2.1060307@terra.cl> Hi guys: In a custom widget I use a pixbuf to update the image of the widget, I use: internalPixbuf = new Pixbuf(buffer, Colorspace.Rgb, false, 8, ImageWidth, ImageHeight, ImageWidth * 3, null); //buffer of byte[] but the app crash with: ExcObject: System.InvalidProgramException: Invalid IL code in (wrapper native-to-managed) GdkSharp.PixbufDestroyNotifyWrapper:NativeCallback (intptr,intptr): IL_0030: call 0x00000006 at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_delegate_to_ftnptr (object) at (wrapper managed-to-native) Gdk.Pixbuf:gdk_pixbuf_new_from_data (byte[],int,bool,int,int,int,int,GdkSharp.PixbufDestroyNotifyNative,intptr) at Gdk.Pixbuf..ctor (System.Byte[] data, Colorspace colorspace, Boolean has_alpha, Int32 bits_per_sample, Int32 width, Int32 height, Int32 rowstride, Gdk.PixbufDestroyNotify destroy_fn) [0x00000] I use GLib.ExceptionManager.UnhandledException to get that info :-S ... The weird thing is that with exactly the same code with mono-1.2.6 work like a charm and now the problem show up after a update to mono-1.9.1-3.1... Mike, from mono-devel mailing list tell me that this is a "know issue" (https://bugzilla.novell.com/show_bug.cgi?id=362951), from that thread I read about a "problem with the image" (in my case a total crash..) and also talk about some patch and some fix needed in mono about the "MarchalAs.." for the byte[] type and the GC, but I'm really confuse if this is something that can be fixed (update soources from svn+patch+compilation don't seems to be a "easy" option) with other approach? Also I try to use the PixbufLoader, but trying to build the pixbufloader with the (byte[], widht, height) constructor allways give me "Image with zero width" error..:-S, also try to use a MemoryStream to build the pixbufloader and the pixbuf with the same result.. there is some alternative?, is dificult to me to belive that this can't be handled in a diferent way, not posible to build the pixbuf beside a image from harddrive?, I use this custom widget with mono-1.2.6 (and the related version of gtk#) without any problem, and wait for a next RPM release for my fedora 8 is not a option for me...need to go back to mono-1.2.6? any ideas?, sugestions?, prays?. black magic?, budu? Thanks. Mauricio P.D: right now I'm using gtk-sharp2-100145-0.suse103.novell ..but same problem... From mhenriquezs at terra.cl Tue Jun 3 09:39:40 2008 From: mhenriquezs at terra.cl (Mauricio Henriquez) Date: Tue, 03 Jun 2008 09:39:40 -0400 Subject: [Gtk-sharp-list] pixbuf/pixbufloader from stream help In-Reply-To: <484467F2.1060307@terra.cl> References: <17578339.post@talk.nabble.com> <930bfd5c0805311159y6e4aeee7x2fe82a794d4189f6@mail.gmail.com> <484467F2.1060307@terra.cl> Message-ID: <4845499C.9060407@terra.cl> Hi Guys: As I explain in my previous post, right now gtk#/mono have issues about build a pixbuf using the byte[] contrcutor, so I 'm searching for alternatives, right now focused in build the pixbuf from a stream adn I realy need some help becouse with diferent aproach I can't get it and obviously I'm doing something wrong. First I try building a PixBufLoader from a byte[] buffer: Gdk.PixbufLoader pbL = new PixbufLoader(buffer, ImageWidth, ImageHeight); This allways return me "Image has zero width", don't know what is my mistake... Second: First be sure that the stream is correct using GDI+ :-S : BitmapData bd = bitmapBuffer.LockBits(new System.Drawing.Rectangle(0, 0, ImageWidth, ImageHeight), ImageLockMode.WriteOnly, System.Drawing.Imaging.PixelFormat.Format24bppRgb); Marshal.Copy(buffer,0,bd.Scan0,ImageWidth*ImageHeight*3); bitmapBuffer.UnlockBits(bd); MemoryStream mstr = new System.IO.MemoryStream(); bitmapBuffer.Save(mstr, System.Drawing.Imaging.ImageFormat.Bmp); ..then only for test: System.Drawing.Image returnImage = System.Drawing.Image.FromStream(mstr); returnImage.Save("testStr.bmp"); This work, so the stream is corect Third try: Use the memory stream to try to build the Pixbuf or the Pixbufloader: Gdk.PixbufLoader pbL = new PixbufLoader(mstr, ImageWidth, ImageHeight); or internalPixbuf = new Pixbuf(mstr, ImageWidth, ImageHeight); or just: Gdk.Pixbuf pb = new Pixbuf(mstr); Allways return me "GLib.GException: Unrecognized image file format" Finall test: Try to use other type to build from stream like Gtk.Image: Gtk.Image img = new Gtk.Image(mstr); This seems to work, but I still can't get the pixbuf from this!!!, img.Pixbuf return null (I supose that is becouse the image is not builded from a pixbuf..)... So the question is, how can I really build a pixbuf/pixbufloader from a stream and/or get the PixBuf from a Gtk.Image that was builded from a stream? Please, please I really need some help here, this is driving me crazy, I need to get working this widget, previously in mono-1.2.6 I I only use ONE line to so this: internalPixbuf = new Pixbuf(buffer, Colorspace.Rgb, false, 8, ImageWidth, ImageHeight, ImageWidth * 3, null); //buffer of byte[] type I know with the "byte[]" bug/problem I really need an alternative, and I know that is posible to build this thing from a stream so please give any sugestion.. In advance, thank you very much... Mauricio From cdhowie at gmail.com Tue Jun 3 11:52:56 2008 From: cdhowie at gmail.com (Chris Howie) Date: Tue, 3 Jun 2008 11:52:56 -0400 Subject: [Gtk-sharp-list] I really need some sort of tutorial In-Reply-To: <1212417337.5330.19.camel@EVTLIS03.morrison.iserv.net> References: <4844004A.7080702@quarter-flash.com> <1212417337.5330.19.camel@EVTLIS03.morrison.iserv.net> Message-ID: <3d2f29dc0806030852h39f3543bhe0773eefe25d8baf@mail.gmail.com> On Mon, Jun 2, 2008 at 10:35 AM, Adam Tauno Williams wrote: > I assume your Window / Dialog with the form fields is a class? Just > expose the fields as properties might be the simplest way. > > ... > public string Jackpot { set { jackpot.Text = value; } } > ... > > That should update the value in the field. Have your command class call > that method of your Window/Dialog/Form class. > > [snip] > > You can either update the field whenever the value is changed by the > calculation or call a Timer to refresh the values from the command > class. If the application is multi-threaded, this approach will die horribly. Kenneth, have a look at . -- Chris Howie http://www.chrishowie.com http://en.wikipedia.org/wiki/User:Crazycomputers From kenw at quarter-flash.com Tue Jun 3 12:09:18 2008 From: kenw at quarter-flash.com (Kenneth D Weinert) Date: Tue, 03 Jun 2008 10:09:18 -0600 Subject: [Gtk-sharp-list] I really need some sort of tutorial In-Reply-To: <3d2f29dc0806030852h39f3543bhe0773eefe25d8baf@mail.gmail.com> References: <4844004A.7080702@quarter-flash.com> <1212417337.5330.19.camel@EVTLIS03.morrison.iserv.net> <3d2f29dc0806030852h39f3543bhe0773eefe25d8baf@mail.gmail.com> Message-ID: <48456CAE.6080003@quarter-flash.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Chris Howie wrote: > On Mon, Jun 2, 2008 at 10:35 AM, Adam Tauno Williams > wrote: >> I assume your Window / Dialog with the form fields is a class? >> Just expose the fields as properties might be the simplest way. >> >> ... public string Jackpot { set { jackpot.Text = value; } } ... >> >> That should update the value in the field. Have your command >> class call that method of your Window/Dialog/Form class. >> >> [snip] >> >> You can either update the field whenever the value is changed by >> the calculation or call a Timer to refresh the values from the >> command class. > > If the application is multi-threaded, this approach will die > horribly. Kenneth, have a look at > . > That's a problem - I *have* looked at that and I'm just not making the connection. For what you understand of my application, which one of those approaches would make most sense? To restate: I need to pull information from the widgets *and* then update them. I think I understand how the signal/callback works if I am interacting with the widgets, I just don't see quite how it works if it's the program that needs to update them. The main reason for looking at it being threaded is solely to get the responsiveness. Perhaps I'd be better off making all the form elements be part of a class and then just pass the instance (or make it "global") and leave it all in one thread. I'll have to eventually sort out the threading issue for other projects. Can you recommend any resources that show examples of threaded GUI interaction? So far all the tutorial articles I've seen either have a very limited, partially implemented example or they're very simple interactions between a button and a static label sort of thing. Thanks for your reply - I'll take another look and see if I can sort it out some more. - -- Ken Weinert http://quarter-flash.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIRWyuH0OpnUzq8fARAhWcAJ9rzWYsh5n2qxSVeOqFR5wCUSnaRgCgtFk/ lx/eDm56qpxeZ7SZltUIZkA= =koYA -----END PGP SIGNATURE----- From cdhowie at gmail.com Tue Jun 3 12:19:05 2008 From: cdhowie at gmail.com (Chris Howie) Date: Tue, 3 Jun 2008 12:19:05 -0400 Subject: [Gtk-sharp-list] I really need some sort of tutorial In-Reply-To: <48456CAE.6080003@quarter-flash.com> References: <4844004A.7080702@quarter-flash.com> <1212417337.5330.19.camel@EVTLIS03.morrison.iserv.net> <3d2f29dc0806030852h39f3543bhe0773eefe25d8baf@mail.gmail.com> <48456CAE.6080003@quarter-flash.com> Message-ID: <3d2f29dc0806030919h2af04311tf3d0571c467174bc@mail.gmail.com> On Tue, Jun 3, 2008 at 12:09 PM, Kenneth D Weinert wrote: > That's a problem - I *have* looked at that and I'm just not making the > connection. For what you understand of my application, which one of > those approaches would make most sense? If you are familiar with threads, just use those. (I do and it's not too tricky.) The main thing is that if you ever, *ever* touch the GUI from an alternate thread you must actually do so from the main thread. This sounds contradictory, but it is in fact not. First, all of the data that you are reading from your thread (in this case the values in the entries) must be available to the thread without needing access to the GUI objects. So make a data structure to hold them and parse them out on the *main* thread. Pass these parsed values to the thread (either with a ParameterizedThreadStart or an anonymous delegate, etc). This will ensure you don't read from the GUI. Then, to write back updates to the GUI while it's running you need to pass a delegate over to the main thread for invocation there. The simplest way is: Application.Invoke(delegate { someEntry.Text = "foobar"; }); Or some such pattern. You could create a wrapper class that does this in the setters if you wanted. Note that this will not work for getters (since Invoke returns immediately) and besides you don't want to do cross-thread communication for values you'll be using frequently. Hope you can salvage some meaning from this. :) -- Chris Howie http://www.chrishowie.com http://en.wikipedia.org/wiki/User:Crazycomputers From christian_hoff at gmx.net Tue Jun 3 15:05:25 2008 From: christian_hoff at gmx.net (Christian Hoff) Date: Tue, 03 Jun 2008 21:05:25 +0200 Subject: [Gtk-sharp-list] Involvement of Gtk# community into development Message-ID: <484595F5.3030800@gmx.net> Hi guys, I'm really frustrated about Gtk#. By now I have found 4 bugs(TreeModelFilter.ModifyFunc, broken SetValue methods, GType of *Adapter classes wrong, virtual methods ignored by object genratable) just by development. I have created patches for two of these and need further info to create one for the "GType of the *Adapter classes" bug. One patch has already made it to SVN, the other one is for a bug that hasn't even been assigned since more than 1 week and until now I haven't gotten the info I need to create the third patch. I have also created a new feature for Gtk#(GObject property registration) and sent a patch to the mailing list 8 days ago; I didn't get any feedback on it. That all costed me hell of a lot time (about eight hours for two weeks just for Gtk#) to create bug reports and the new feature. I don't blame you that I had to do so; this is free software that lives from its community(and the generous support of Novell). But by ignoring the patches you are implicitly telling me that my work(and community efforts in general) are not appreciated. I did already write 3 posts to the mailing list and didn't get a reply; please prove that you can do better by commenting on this post and telling me what will happen to the GObject patch ;-) From adam at morrison-ind.com Tue Jun 3 15:30:23 2008 From: adam at morrison-ind.com (Adam Tauno Williams) Date: Tue, 03 Jun 2008 15:30:23 -0400 Subject: [Gtk-sharp-list] Involvement of Gtk# community into development In-Reply-To: <484595F5.3030800@gmx.net> References: <484595F5.3030800@gmx.net> Message-ID: <1212521423.7221.13.camel@WM_ADAM1.morrison.iserv.net> > I'm really frustrated about Gtk#. By now I have found 4 > bugs(TreeModelFilter.ModifyFunc, broken SetValue methods, GType of > *Adapter classes wrong, virtual methods ignored by object genratable) > just by development. I have created patches for two of these and need > further info to create one for the "GType of the *Adapter classes" bug. > One patch has already made it to SVN, the other one is for a bug that > hasn't even been assigned since more than 1 week and until now I haven't > gotten the info I need to create the third patch. This list is typically pretty low volume. If you want immediate developer-ish feedback it might be better to hit the Mono IRC channel which seems pretty active. Most of the traffic on this list seems to related to just consuming Gtk# and not necessarily hacking Gtk#. From mkestner at gmail.com Tue Jun 3 15:51:46 2008 From: mkestner at gmail.com (Mike Kestner) Date: Tue, 03 Jun 2008 14:51:46 -0500 Subject: [Gtk-sharp-list] Involvement of Gtk# community into development In-Reply-To: <484595F5.3030800@gmx.net> References: <484595F5.3030800@gmx.net> Message-ID: <1212522706.25463.82.camel@t61p.site> On Tue, 2008-06-03 at 21:05 +0200, Christian Hoff wrote: > I'm really frustrated about Gtk#. By now I have found 4 > bugs(TreeModelFilter.ModifyFunc, broken SetValue methods, GType of > *Adapter classes wrong, virtual methods ignored by object genratable) > just by development. I have created patches for two of these and need > further info to create one for the "GType of the *Adapter classes" bug. > One patch has already made it to SVN, the other one is for a bug that > hasn't even been assigned since more than 1 week and until now I haven't > gotten the info I need to create the third patch. Sorry about that. I appreciate your efforts on providing patches. I saw the TreeModelFilter patch land over the weekend, and meant to comment on it. As you indicated in your comments, it still needs some work and I needed to spend some time investigating to give you appropriate feedback. > I have also created a new feature for Gtk#(GObject property > registration) and sent a patch to the mailing list 8 days ago; I didn't > get any feedback on it. This one I don't remember seeing, can you attach it to a bug or send it to me directly. > That all costed me hell of a lot time (about eight hours for two weeks > just for Gtk#) to create bug reports and the new feature. I don't blame > you that I had to do so; this is free software that lives from its > community(and the generous support of Novell). But by ignoring the > patches you are implicitly telling me that my work(and community efforts > in general) are not appreciated. That's one interpretation. Another is that our team is very small, taking on an enormous development space, and occasionally we drop the ball on some patch review. I am certainly not ignoring your patches. At the moment, I've been focusing on MonoDevelop, my other job on the mono team. Again, I apologize that your patches haven't gotten the swift attention they should have. > I did already write 3 posts to the mailing list and didn't get a reply; > please prove that you can do better by commenting on this post and > telling me what will happen to the GObject patch ;-) The number of active contributors to the list is pretty small, and you are asking some fairly difficult questions. If you are an irc user, feel free to drop into #monodev on gimpnet at any time and ask questions. I'm in there 8-10 hours a day on weekdays as user mkestner. Sometimes bugzilla and mailing lists just sit a while every now and then. It's certainly not because we don't care about your contributions. I'll comment on your bug reports this afternoon. Thanks, Mike From lluis at novell.com Tue Jun 3 16:26:15 2008 From: lluis at novell.com (Lluis Sanchez Gual) Date: Tue, 03 Jun 2008 22:26:15 +0200 Subject: [Gtk-sharp-list] Involvement of Gtk# community into development In-Reply-To: <484595F5.3030800@gmx.net> References: <484595F5.3030800@gmx.net> Message-ID: <1212524775.4713.38.camel@portador.aticatac-centre> El dt 03 de 06 del 2008 a les 21:05 +0200, en/na Christian Hoff va escriure: > Hi guys, > > I'm really frustrated about Gtk#. By now I have found 4 > bugs(TreeModelFilter.ModifyFunc, broken SetValue methods, GType of > *Adapter classes wrong, virtual methods ignored by object genratable) > just by development. I have created patches for two of these and need > further info to create one for the "GType of the *Adapter classes" bug. > One patch has already made it to SVN, the other one is for a bug that > hasn't even been assigned since more than 1 week and until now I haven't > gotten the info I need to create the third patch. Sorry, but there is no guaranteed time of response in open source projects. 1 week is a reasonable amount of time for pinging the maintainer(s) about a patch review, but not for accusing the community of lack of involvement. Get used to it. > > I have also created a new feature for Gtk#(GObject property > registration) and sent a patch to the mailing list 8 days ago; I didn't > get any feedback on it. > > That all costed me hell of a lot time (about eight hours for two weeks > just for Gtk#) to create bug reports and the new feature. I don't blame > you that I had to do so; this is free software that lives from its > community(and the generous support of Novell). But by ignoring the > patches you are implicitly telling me that my work(and community efforts > in general) are not appreciated. > > I did already write 3 posts to the mailing list and didn't get a reply; > please prove that you can do better by commenting on this post and > telling me what will happen to the GObject patch ;-) > _______________________________________________ > Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list From mkestner at gmail.com Tue Jun 3 16:45:26 2008 From: mkestner at gmail.com (Mike Kestner) Date: Tue, 03 Jun 2008 15:45:26 -0500 Subject: [Gtk-sharp-list] pixbuf/pixbufloader from stream help In-Reply-To: <4845499C.9060407@terra.cl> References: <17578339.post@talk.nabble.com> <930bfd5c0805311159y6e4aeee7x2fe82a794d4189f6@mail.gmail.com> <484467F2.1060307@terra.cl> <4845499C.9060407@terra.cl> Message-ID: <1212525926.25463.88.camel@t61p.site> On Tue, 2008-06-03 at 09:39 -0400, Mauricio Henriquez wrote: > Hi Guys: > > As I explain in my previous post, right now gtk#/mono have issues about > build a pixbuf using the byte[] contrcutor, so I 'm searching for > alternatives, right now focused in build the pixbuf from a stream adn I > realy need some help becouse with diferent aproach I can't get it and > obviously I'm doing something wrong. > > First I try building a PixBufLoader from a byte[] buffer: > Gdk.PixbufLoader pbL = new PixbufLoader(buffer, ImageWidth, ImageHeight); > This allways return me "Image has zero width", don't know what is my > mistake... I suspect the problem is that the Loader is probably expecting a formatted image like a jpg or png instead of raw byte data like the method you have been using. I probably led you astray pointing you at PixbufLoader. You may have to bite the bullet and upgrade your gtk-sharp and mono to get all the fixes you need to use that Pixbuf constructor successfully. Mike From count.cb at gmx.net Thu Jun 5 04:16:10 2008 From: count.cb at gmx.net (countcb) Date: Thu, 5 Jun 2008 01:16:10 -0700 (PDT) Subject: [Gtk-sharp-list] Gtk# TextView and Scrolling Text In-Reply-To: <17653284.post@talk.nabble.com> References: <17653284.post@talk.nabble.com> Message-ID: <17664545.post@talk.nabble.com> Emfor wrote: > > Hi there, > I'm fighting with TextView widget. Everything is fine except that when I > load text to it and move cursor in it - the coursor can go out of view > (TextView doesn't scroll). I tried many examples with using TextIter and > TextMark and ScrollToMark function, bu it simply doesn't work. > Can anyone please tell me what am I doing wrong? > > -- > Best regards, > Emfor > Hi. You have to add your TextView to a ScrolledWindow widget and then add this ScrolledWindow to the window/dialog you want the TextView to be displayed in. Below is a small test program which demostrates a srolling TextView. Christopher. ------ using Gtk; using Gdk; namespace GtkTest { class Program { public static void Main (string[] args) { Application.Init (); Gtk.Window win = new TestWindow(); win.ShowAll(); Application.Run (); } } } namespace GtkTest { class TestWindow : Gtk.Window { public TestWindow() : base(Gtk.WindowType.Toplevel) { this.DeleteEvent += this.OnDeleteEvent; this.SetSizeRequest(800, 600); ScrolledWindow scrolledWindow = new ScrolledWindow(); TextView yourTextView = new TextView(); scrolledWindow.Add(yourTextView); this.Add(scrolledWindow); } private void OnDeleteEvent(object sender, DeleteEventArgs a) { System.Console.WriteLine("onDelete"); Application.Quit(); a.RetVal = true; } } } -- View this message in context: http://www.nabble.com/Gtk--TextView-and-Scrolling-Text-tp17653284p17664545.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From count.cb at gmx.net Fri Jun 6 06:56:32 2008 From: count.cb at gmx.net (countcb) Date: Fri, 6 Jun 2008 03:56:32 -0700 (PDT) Subject: [Gtk-sharp-list] Gtk# TextView and Scrolling Text In-Reply-To: <17686795.post@talk.nabble.com> References: <17653284.post@talk.nabble.com> <17664545.post@talk.nabble.com> <17686795.post@talk.nabble.com> Message-ID: <17689448.post@talk.nabble.com> Emfor wrote: > > Hi, > I did that. When I load text, the scroll bar is shown, but when I move > cursor around the text and it goes away the visible part of the TextView, > it doesn't scroll to show the cursor. I experiment here with OnCursorMove > event and Iter/Mark, but none of the solutions I've found (mostly for > C/C++) doesn't work with Gtk#. > Does this also happen with my code snippet? When you add text to it? Adding the TextView to a ScrolledWindow should be everything you need to do. What version of mono and gtk# are you using? I think i can't say more, wihout seeing some code. -- View this message in context: http://www.nabble.com/Gtk--TextView-and-Scrolling-Text-tp17653284p17689448.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From aria.francesco at gmail.com Wed Jun 4 05:24:17 2008 From: aria.francesco at gmail.com (Panoramix) Date: Wed, 4 Jun 2008 02:24:17 -0700 (PDT) Subject: [Gtk-sharp-list] MedSphere GTK# Graph widgets Message-ID: <17642588.post@talk.nabble.com> Hello to all At last I found the component to make 2D lines graph in GTK# but I can not compile it. I downloaded the sources from http://www.medsphere.org/projects/widgets http://www.medsphere.org/projects/widgets I unpacked the file but when launching the configure script I receive a message saying that I did not MONO. The problem is that I Mono and Mono develop ce I installed them. I'm using a UBUBTU 8.04 How to solve? Thanks to all. PS Medsphere.Widgets currently includes 4 widgets: CPaned: A helper class for dealing with Gtk.VPaneds with a Gtk.Expander child FBox: A "flowed" container for wrapping widgets GridView: An Excel-like grid Graph: A Cairo-based 2D graph IconLayout: A Cairo-based icon view ----- :working: ----------------------------------------------------------------------------- http://freeflow.awardspace.com http://freeflow.awardspace.com ----------------------------------------------------------------------------- -- View this message in context: http://www.nabble.com/MedSphere-GTK--Graph-widgets-tp17642588p17642588.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From ylatuya at gmail.com Mon Jun 2 16:22:31 2008 From: ylatuya at gmail.com (Andoni Morales Alastruey) Date: Mon, 02 Jun 2008 22:22:31 +0200 Subject: [Gtk-sharp-list] Bindings troubles on Windows when conecting gsignals Message-ID: <1212438151.8370.6.camel@longo> ? Hello! I'm creating the bindings for a Gtk Timescale written in C. This timescale is a simple widget witch allows to adjust the inbounds and the outbounds of a segment of time. It has 2 pointers witch delimits the segment and emits 2 signal in_changed and out_changed with the new limits when a pointer is moved. I've used the gapi tools to get the c# bindings and the widget is working properly on Linux. On Windows I also get it working, but when the widget emits a signal and this signal is rised on the app, the program finish without any debug info. This the output when I execute a test window with the widget. When I move one of the cursors I get this: Method (wrapper runtime-invoke) System.Object:runtime_invoke_void_string (object,intptr,intptr,intptr) emitted at 00F60028 to 00F600BD(codelength 149) [test.exe] Method System.OutOfMemoryException:.ctor (string) emitted at 00F600C0 to 00F600E3 (code length 35) [test.exe] Method System.SystemException:.ctor (string) emitted at 00F60100 to 00F60123 (code length 35) [test.exe] Method System.Exception:.ctor (string) emitted at 00F60130 to 00F60148 (code length 24) [test.exe] Method System.Exception:set_HResult (int) emitted at 00F60148 to 00F60156 (codelength 14) [test.exe] Method System.NullReferenceException:.ctor (string) emitted at 00F60158 to 00F6017E (code length 38) [test.exe] Method System.StackOverflowException:.ctor (string) emitted at 00F60180 to 00F60196 (code length 22) [test.exe] When I execute my aplication I get this: Method LongoMatch.GtkTimescale:OutChangedSignalCallback (intptr,double,intptr) emitted at 00FDAEC0 to 00FDB05B (code length 411) [LongoMatch.exe] Method LongoMatch.OutChangedArgs:.ctor () emitted at 00FDB068 to 00FDB076 (codelength 14) [LongoMatch.exe] Method LongoMatch.TimeLine:OnStopValueChanged(object,LongoMatch.OutChangedArgs)emitted at 00FDB078 to 00FDB1BE (code length 326) [LongoMatch.exe] Method LongoMatch.OutChangedArgs:get_Val () emitted at 00FDB1D0to00FDB234 (code length 100) [LongoMatch.exe] MethodLongoMatch.MainWindow:OnTimeScaleTimeNodeChanged(LongoMatch.TimeNode,object) emitted at 00FDB238 to 00FDB3A2 (codelength 362) [LongoMatch.exe] Method CesarPlayer.PlayerBin:UpdateSegmentStopTime (long) emitted at 00FDB500 to00FDB51F (code length 31) [LongoMatch.exe] Method CesarPlayer.GstPlayer:UpdateSegmentStopTime (long) emitted at 00FDB520 to00FDB545 (code length 37) [LongoMatch.exe] Method(wrappermanaged-to-native)CesarPlayer.GstPlayer:bacon_video_widget_segment_stop_update (intptr,long) emitted at 00FDB558 to 00FDB5B0 (code length 88) [ LongoMatch.exe] Stacktrace: at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00004> at (wrapper managed-to-native) Gtk.Application.gtk_main () <0xffffffff> at Gtk.Application.Run () <0x00007> at LongoMatch.MainClass.Main (string[]) <0x000a6> at (wrapper runtime-invoke) LongoMatch.MainClass.runtime_invoke_void_string[](object,intptr,intptr,intptr) <0xffffffff> This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. As you can see the signal is rised and processed: Method LongoMatch.GtkTimescale:OutChangedSignalCallback (intptr,double,intptr) emitted at 00FDAEC0 to 00FDB05B (code length 411) [LongoMatch.exe] Method LongoMatch.OutChangedArgs:.ctor () emitted at 00FDB068 to 00FDB076 (codelength 14) [LongoMatch.exe] Last week I had no problems with this and the only thing that changes between Windows and Linux is the compilation of the lib "libtimescale", so I think I'm missing something at the compilation time. To compile I use mingw/Msys linking to the Gtk binaries provided with Mono with this flags: -DWIN32 -mno-cygwin -mms-bitfields Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20080602/af3a6451/attachment.html From m-a-t-i at o2.pl Wed Jun 4 14:23:24 2008 From: m-a-t-i at o2.pl (Emfor) Date: Wed, 4 Jun 2008 11:23:24 -0700 (PDT) Subject: [Gtk-sharp-list] Gtk# TextView and Scrolling Text Message-ID: <17653284.post@talk.nabble.com> Hi there, I'm fighting with TextView widget. Everything is fine except that when I load text to it and move cursor in it - the coursor can go out of view (TextView doesn't scroll). I tried many examples with using TextIter and TextMark and ScrollToMark function, bu it simply doesn't work. Can anyone please tell me what am I doing wrong? -- Best regards, Emfor -- View this message in context: http://www.nabble.com/Gtk--TextView-and-Scrolling-Text-tp17653284p17653284.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From m-a-t-i at o2.pl Fri Jun 6 04:00:41 2008 From: m-a-t-i at o2.pl (Emfor) Date: Fri, 6 Jun 2008 01:00:41 -0700 (PDT) Subject: [Gtk-sharp-list] Gtk# TextView and Scrolling Text In-Reply-To: <17664545.post@talk.nabble.com> References: <17653284.post@talk.nabble.com> <17664545.post@talk.nabble.com> Message-ID: <17686795.post@talk.nabble.com> countcb wrote: > > Hi. > You have to add your TextView to a ScrolledWindow widget and then add this > ScrolledWindow to the window/dialog you want the TextView to be displayed > in. > Hi, I did that. When I load text, the scroll bar is shown, but when I move cursor around the text and it goes away the visible part of the TextView, it doesn't scroll to show the cursor. I experiment here with OnCursorMove event and Iter/Mark, but none of the solutions I've found (mostly for C/C++) doesn't work with Gtk#. -- Best regards, Mateusz -- View this message in context: http://www.nabble.com/Gtk--TextView-and-Scrolling-Text-tp17653284p17686795.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From brad at getcoded.net Fri Jun 6 12:56:51 2008 From: brad at getcoded.net (Brad Taylor) Date: Fri, 06 Jun 2008 09:56:51 -0700 Subject: [Gtk-sharp-list] MedSphere GTK# Graph widgets In-Reply-To: <17642588.post@talk.nabble.com> References: <17642588.post@talk.nabble.com> Message-ID: <1212771411.2099.10.camel@nightcrawler> Hey Aria, > At last I found the component to make 2D lines graph in GTK# but I can not > compile it. > I downloaded the sources from > http://www.medsphere.org/projects/widgets > http://www.medsphere.org/projects/widgets > > I unpacked the file but when launching the configure script I receive a > message saying that I did not MONO. > The problem is that I Mono and Mono develop ce I installed them. > I'm using a UBUBTU 8.04 > How to solve? I don't know if you've received my direct email yet, but I suspect you need to install one more package: sudo apt-get install libmono-dev Unfortunately, Ubuntu splits up mono into a million little packages, and even the pkgconfig file (/usr/lib/pkgconfig/mono.pc) comes in it's own package. We look for this to figure out whether we're running on a mono or MS .NET system. Hope this helps, -Brad From wim at fixnum.org Sun Jun 8 06:21:46 2008 From: wim at fixnum.org (wvdschel) Date: Sun, 8 Jun 2008 03:21:46 -0700 (PDT) Subject: [Gtk-sharp-list] Simple drag and drop demo? Message-ID: <17717396.post@talk.nabble.com> Hi, I'm new to Mono, C# and Gtk#, and while intellisense and google help me most of the time, I can't find a clear and simple drag and drop demo. What I want to do is have a widget that accepts all files dragged from a file manager onto a widget. Can anyone point me to some demo code? Kind regards, Wim -- View this message in context: http://www.nabble.com/Simple-drag-and-drop-demo--tp17717396p17717396.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From count.cb at gmx.net Mon Jun 9 03:15:10 2008 From: count.cb at gmx.net (countcb) Date: Mon, 9 Jun 2008 00:15:10 -0700 (PDT) Subject: [Gtk-sharp-list] NodeStore In-Reply-To: <8ed5cbac0805280638oc592ad2v42444765f99cf2@mail.gmail.com> References: <8ed5cbac0805280638oc592ad2v42444765f99cf2@mail.gmail.com> Message-ID: <17727625.post@talk.nabble.com> Vladimir Giszpenc-2 wrote: > > > Is there an easy way to check if a NodeStore contains a Node? > > Hi Vlad. You could get an Enumarator with yourNodeStore.GetEnumerator() and check if there are nodes in it. Check this links for more info: http://www.go-mono.com/docs/index.aspx?link=T%3aGtk.NodeStore%2f* http://www.go-mono.com/docs/index.aspx?link=T%3aSystem.Collections.IEnumerator http://www.go-mono.com/docs/index.aspx?link=T%3aSystem.Collections.IEnumerator%2f* -- View this message in context: http://www.nabble.com/NodeStore-tp17512880p17727625.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From aria.francesco at gmail.com Mon Jun 9 10:15:22 2008 From: aria.francesco at gmail.com (Panoramix) Date: Mon, 9 Jun 2008 07:15:22 -0700 (PDT) Subject: [Gtk-sharp-list] MedSphere GTK# Graph widgets In-Reply-To: <1212771411.2099.10.camel@nightcrawler> References: <1212771411.2099.10.camel@nightcrawler> Message-ID: <17733731.post@talk.nabble.com> libmono-dev INSTALLED ALL WORKS :handshake: One million THANKS Brad Brad Taylor wrote: > > Hey Aria, > >> At last I found the component to make 2D lines graph in GTK# but I can >> not >> compile it. >> I downloaded the sources from >> http://www.medsphere.org/projects/widgets >> http://www.medsphere.org/projects/widgets >> >> I unpacked the file but when launching the configure script I receive a >> message saying that I did not MONO. >> The problem is that I Mono and Mono develop ce I installed them. >> I'm using a UBUBTU 8.04 >> How to solve? > > I don't know if you've received my direct email yet, but I suspect you > need to install one more package: > > sudo apt-get install libmono-dev > > Unfortunately, Ubuntu splits up mono into a million little packages, and > even the pkgconfig file (/usr/lib/pkgconfig/mono.pc) comes in it's own > package. We look for this to figure out whether we're running on a mono > or MS .NET system. > > Hope this helps, > > -Brad > > _______________________________________________ > Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list > > ----- :working: ----------------------------------------------------------------------------- http://freeflow.awardspace.com http://freeflow.awardspace.com ----------------------------------------------------------------------------- -- View this message in context: http://www.nabble.com/Re%3A-MedSphere-GTK--Graph-widgets-tp17696987p17733731.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From fr.daniil at gmail.com Tue Jun 10 07:51:18 2008 From: fr.daniil at gmail.com (daniil00) Date: Tue, 10 Jun 2008 04:51:18 -0700 (PDT) Subject: [Gtk-sharp-list] New widget in Gtk Holly Library Message-ID: <17753555.post@talk.nabble.com> Hy guys, I've added a new color picker widget / dialog on my Holly-Gtk-Library. Take a look here ( screen shots and code sample ): http://code.google.com/p/holly-gtk-widgets/wiki/HColorPickerWidget Also I've added checkbox support to the HSimpleList ( a new screen shot and the updated API is there with a code sample ): http://code.google.com/p/holly-gtk-widgets/wiki/HSimpleList The HColorPicker now uses the new HColorPickerDialog now, hope you will like it ! Best wishes, Daniel -- View this message in context: http://www.nabble.com/New-widget-in-Gtk-Holly-Library-tp17753555p17753555.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From christian_hoff at gmx.net Tue Jun 10 11:17:27 2008 From: christian_hoff at gmx.net (Christian Hoff) Date: Tue, 10 Jun 2008 17:17:27 +0200 Subject: [Gtk-sharp-list] Simple drag and drop demo? In-Reply-To: <17717396.post@talk.nabble.com> References: <17717396.post@talk.nabble.com> Message-ID: <484E9B07.5070303@gmx.net> The Gtk# SVN repo contains a lot of code samples; download instructions can be found at www.mono-project.com -> Download -> Unsupported downloads -> SVN(can't tell you the correct URL because the site seems currently down). TestDnd.cs in the sample directory ahould be the right one for you ;-) Christian Hoff wvdschel schrieb: > Hi, > > I'm new to Mono, C# and Gtk#, and while intellisense and google help me most > of the time, > I can't find a clear and simple drag and drop demo. > > What I want to do is have a widget that accepts all files dragged from a > file manager onto a widget. > > Can anyone point me to some demo code? > > Kind regards, > > Wim > From vladimir.giszpenc at gmail.com Thu Jun 12 16:24:09 2008 From: vladimir.giszpenc at gmail.com (Vladimir Giszpenc) Date: Thu, 12 Jun 2008 16:24:09 -0400 Subject: [Gtk-sharp-list] Suppressing response in a dialog Message-ID: <8ed5cbac0806121324h7436cb5fr555f43641d3077f6@mail.gmail.com> Hi, After reading on this list about the Dispose pattern as applied to Gtk.Dialogs, I followed the lead of others. My problem is that in my OK button I call a bool Validate() function. When this function returns false, I want to alert the user to what is wrong and NOT CLOSE. I return out of my Click event, but someone else is generating a ResponseType.OK response. How can I suppress the Response signal that is now leading to my dialog getting closed? The .Netish thing to do would be a class that inherits eventArgs on which I set some cancel = true. I know this not to exist. Any ideas? Thanks, Vlad From cdhowie at gmail.com Thu Jun 12 21:37:32 2008 From: cdhowie at gmail.com (Chris Howie) Date: Thu, 12 Jun 2008 21:37:32 -0400 Subject: [Gtk-sharp-list] Suppressing response in a dialog In-Reply-To: <8ed5cbac0806121324h7436cb5fr555f43641d3077f6@mail.gmail.com> References: <8ed5cbac0806121324h7436cb5fr555f43641d3077f6@mail.gmail.com> Message-ID: <3d2f29dc0806121837t5a7f2c12x3054a0bbae7350f4@mail.gmail.com> On Thu, Jun 12, 2008 at 4:24 PM, Vladimir Giszpenc wrote: > Hi, > > After reading on this list about the Dispose pattern as applied to > Gtk.Dialogs, I followed the lead of others. My problem is that in my > OK button I call a > bool Validate() function. When this function returns false, I want to > alert the user to what is wrong and NOT CLOSE. I return out of my > Click event, but someone else is generating a ResponseType.OK > response. > > How can I suppress the Response signal that is now leading to my > dialog getting closed? The .Netish thing to do would be a class that > inherits eventArgs on which I set some cancel = true. I know this not > to exist. > > Any ideas? Set the response type of the button to None, and use Dialog.Respond to emit the OK response yourself after your validation succeeds. -- Chris Howie http://www.chrishowie.com http://en.wikipedia.org/wiki/User:Crazycomputers From vladimir.giszpenc at gmail.com Fri Jun 13 16:04:08 2008 From: vladimir.giszpenc at gmail.com (Vladimir Giszpenc) Date: Fri, 13 Jun 2008 16:04:08 -0400 Subject: [Gtk-sharp-list] Deployment to Windows Message-ID: <8ed5cbac0806131304j5d9002e8r695ad55c74e31335@mail.gmail.com> Hi, Is there a howto for deploying a gtk# app to Windows? Note that it is .Net 2.0 (Mono 1.9.1). I am looking for something that will tell me how to create an MSI or other installer with all my dependencies. I don't need this right away, but I figured I would start asking now. Thanks! Vlad From aagaande at gmail.com Fri Jun 13 14:26:54 2008 From: aagaande at gmail.com (Anders Aagaard) Date: Fri, 13 Jun 2008 11:26:54 -0700 (PDT) Subject: [Gtk-sharp-list] Treeviews and popups, and easy way? Message-ID: <17829552.post@talk.nabble.com> Hi I'm using monodevelop, and I have a treeview that needs to support multiple selections, and a popup menu. I dont really want to make my own custom treeview and override OnButtonPress if I can avoid it, as I use monodevelop and it'd be a lot cleaner for me to keep the ui in the ui designer. I've tried a few different solutions to work around this problem, mostly [ConnectBefore] on my OnTreeviewButtonPress, and then a function that's called immediatly to update the selected treeview based on ButtonPressEventArgs, but this seems awfully hackish, and isn't reliable (and since I switched to MultipleSelect, not really working at all). Does anyone have any similar functions? Preferably something that works, I just want to be able to get the currently selected rows from my OnTreeviewButtonPressEvent. Is there any clean way of implementing a popup menu in a treeview when you need to know the selection? I've googled for hours now, and everything I find is a ton of fairly hackish code. Anders Aagaard -- View this message in context: http://www.nabble.com/Treeviews-and-popups%2C-and-easy-way--tp17829552p17829552.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From pascalfresnay at free.fr Mon Jun 16 04:25:53 2008 From: pascalfresnay at free.fr (Pascal Fresnay) Date: Mon, 16 Jun 2008 01:25:53 -0700 (PDT) Subject: [Gtk-sharp-list] Random AccessViolationException on Windows with GTK# Message-ID: <17860038.post@talk.nabble.com> We are developping a GUI on Windows with GTK# (2.10) and Glade#. There is some serious stability problems : random AccessViolationException with .NET 2.0 runtime. Most of time, it occures in a custom TreeView render method when trying to access model, ex : model.GetValue(iter, 0) It seems that this problem was reported a few months ago : http://lists.ximian.com/pipermail/gtk-sharp-list/2006-April/007108.html http://lists.ximian.com/pipermail/glade-users/2004-December/002295.html Any idea ? Thanks Pascal -- View this message in context: http://www.nabble.com/Random-AccessViolationException-on-Windows-with-GTK--tp17860038p17860038.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From Christian_Hoff at gmx.net Mon Jun 16 07:08:14 2008 From: Christian_Hoff at gmx.net (Christian Hoff) Date: Mon, 16 Jun 2008 13:08:14 +0200 Subject: [Gtk-sharp-list] Treeviews and popups, and easy way? In-Reply-To: <17829552.post@talk.nabble.com> References: <17829552.post@talk.nabble.com> Message-ID: <20080616110814.309340@gmx.net> Hi, I had exactly the same problem(after a click with the right mouse button only the item that was clicked on remains selected). There are basically two ways two work around this problem: One would be to use the ConnectBefore attribute(overriding OnButtonPress won't work because it sometimes gets called afterthe TreeView processed the event and updated the selection). (In my opinion using the attribute isn't "hackish" at all) Another one would be to drop the idea of the context menu and instead making the column titles clickable. The disadvantage is that this functionality won't be easy to discover. Christian Hoff -------- Original-Nachricht -------- > Datum: Fri, 13 Jun 2008 11:26:54 -0700 (PDT) > Von: Anders Aagaard > An: gtk-sharp-list at lists.ximian.com > Betreff: [Gtk-sharp-list] Treeviews and popups, and easy way? > > Hi > > I'm using monodevelop, and I have a treeview that needs to support > multiple > selections, and a popup menu. > > I dont really want to make my own custom treeview and override > OnButtonPress > if I can avoid it, as I use monodevelop and it'd be a lot cleaner for me > to > keep the ui in the ui designer. > > I've tried a few different solutions to work around this problem, mostly > [ConnectBefore] on my OnTreeviewButtonPress, and then a function that's > called immediatly to update the selected treeview based on > ButtonPressEventArgs, but this seems awfully hackish, and isn't reliable > (and since I switched to MultipleSelect, not really working at all). > > Does anyone have any similar functions? Preferably something that works, > I > just want to be able to get the currently selected rows from my > OnTreeviewButtonPressEvent. > > Is there any clean way of implementing a popup menu in a treeview when you > need to know the selection? I've googled for hours now, and everything I > find is a ton of fairly hackish code. > > Anders Aagaard > -- > View this message in context: > http://www.nabble.com/Treeviews-and-popups%2C-and-easy-way--tp17829552p17829552.html > Sent from the Mono - Gtk# mailing list archive at Nabble.com. > > _______________________________________________ > Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list -- GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf at gmx From aagaande at gmail.com Mon Jun 16 07:27:27 2008 From: aagaande at gmail.com (Anders Aagaard) Date: Mon, 16 Jun 2008 04:27:27 -0700 (PDT) Subject: [Gtk-sharp-list] Treeviews and popups, and easy way? In-Reply-To: <20080616110814.309340@gmx.net> References: <17829552.post@talk.nabble.com> <20080616110814.309340@gmx.net> Message-ID: <17862360.post@talk.nabble.com> Using ConnectBefore is fine when you dont need the treeview.selection data to be up to date. When you need it to be up to date, you have to manually make sure the selection is correct, by using GetPathAtPos with X,Y coordinates, which gets especially fun when your dealing with multiple selections. And that's hackish imo. Making the columns clickable isn't really a solution for me, my popupbox shows a file tree of files that are hidden from view (it's a media manager, text files/subtitles etc are not visible in the normal view). I've ended up making my own custom treeview, which means my monodevelop views isn't as pretty, but atleast it works :) Christian Hoff wrote: > > Hi, > > I had exactly the same problem(after a click with the right mouse button > only the item that was clicked on remains selected). There are basically > two ways two work around this problem: > > One would be to use the ConnectBefore attribute(overriding OnButtonPress > won't work because it sometimes gets called afterthe TreeView processed > the event and updated the selection). (In my opinion using the attribute > isn't "hackish" at all) > > Another one would be to drop the idea of the context menu and instead > making the column titles clickable. The disadvantage is that this > functionality won't be easy to discover. > > Christian Hoff > > -------- Original-Nachricht -------- >> Datum: Fri, 13 Jun 2008 11:26:54 -0700 (PDT) >> Von: Anders Aagaard >> An: gtk-sharp-list at lists.ximian.com >> Betreff: [Gtk-sharp-list] Treeviews and popups, and easy way? > >> >> Hi >> >> I'm using monodevelop, and I have a treeview that needs to support >> multiple >> selections, and a popup menu. >> >> I dont really want to make my own custom treeview and override >> OnButtonPress >> if I can avoid it, as I use monodevelop and it'd be a lot cleaner for me >> to >> keep the ui in the ui designer. >> >> I've tried a few different solutions to work around this problem, mostly >> [ConnectBefore] on my OnTreeviewButtonPress, and then a function that's >> called immediatly to update the selected treeview based on >> ButtonPressEventArgs, but this seems awfully hackish, and isn't reliable >> (and since I switched to MultipleSelect, not really working at all). >> >> Does anyone have any similar functions? Preferably something that works, >> I >> just want to be able to get the currently selected rows from my >> OnTreeviewButtonPressEvent. >> >> Is there any clean way of implementing a popup menu in a treeview when >> you >> need to know the selection? I've googled for hours now, and everything I >> find is a ton of fairly hackish code. >> >> Anders Aagaard >> -- >> View this message in context: >> http://www.nabble.com/Treeviews-and-popups%2C-and-easy-way--tp17829552p17829552.html >> Sent from the Mono - Gtk# mailing list archive at Nabble.com. >> >> _______________________________________________ >> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list > > -- > GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! > Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf at gmx > _______________________________________________ > Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list > > -- View this message in context: http://www.nabble.com/Treeviews-and-popups%2C-and-easy-way--tp17829552p17862360.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From zpon.dk at gmail.com Tue Jun 17 08:20:31 2008 From: zpon.dk at gmail.com (=?ISO-8859-1?Q?S=F8ren_Juul?=) Date: Tue, 17 Jun 2008 14:20:31 +0200 Subject: [Gtk-sharp-list] Tooltip Message-ID: Hi I have been trying to get a tooltip working, but has ran in to some problems. I want to use a real tooltip (not just Widget.TooltipText). I have a checkbox which i would like to have a tooltip for, so i did the following: CheckButton checkbox = new CheckButton("This is my checkbox"); > checkbox.HasTooltip = true; > checkbox.QueryTooltip += new QueryTooltipHandler(showTooltip); > > [...] > > public void userToolTip(object o, QueryTooltipArgs args) > { > args.Tooltip.SetIconFromStock(Stock.Help, IconSize.LargeToolbar); > args.Tooltip.Text = "Testing"; > } If I write something like System.Console.WriteLine("write out"); the text is shown in my terminal, but i never get to see a tooltip. What could I be doing wrong? -- Med venlig hilsen / Kind regards S?ren Juul -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20080617/856e7ab7/attachment.html From smarini at tiscali.it Tue Jun 17 07:13:28 2008 From: smarini at tiscali.it (smarini) Date: Tue, 17 Jun 2008 04:13:28 -0700 (PDT) Subject: [Gtk-sharp-list] Move(0,0) Message-ID: <17884152.post@talk.nabble.com> Using GTK# I try to move an undecorated window to a specific xy position. I use Move(0,0), but the window assume a random position into the monitor. Instead using Move(1,0) the window it's moved to nortwest corner of the monitor but with a distance from east of one pixel. Can someone help me? -- View this message in context: http://www.nabble.com/Move%280%2C0%29-tp17884152p17884152.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From ylatuya at gmail.com Tue Jun 17 21:47:29 2008 From: ylatuya at gmail.com (Andoni Morales Alastruey) Date: Wed, 18 Jun 2008 03:47:29 +0200 Subject: [Gtk-sharp-list] Compiling dynamic dll on windows Message-ID: <1213753649.13322.31.camel@longo> Hi! I would like to know how to compile GTK dynamic libraries for win32 for creating C# bindings. On linux I compile the library for a Gtk widget I wrote on C, than I create the bindings with the gapi tools and all works fine. Instead,on windows, I compile the library, I use the bindings I created before and all works if I don't connect any of the 3 signals sended by my GTK widget. But if I add any handler to the widget events (this.timescale1.InChanged += new LongoMatch.InChangedHandler(this.OnStartValueChanged);), and a the signal "in_changed" is sent, my app finishes without any info. Running "mono test.exe" I get a System.AccesViolationException : Trying to read or write in the protected memory. Running "mono -v test.exe" the output is more interesting, as we can see the signal is caught and processed and that the aplication is deading in the callback method (OnChanged()) Method (wrapper managed-to-native) System.Object:__icall_wrapper_mono_delegate_ctor (object,object,intptr) emitted at 00F71DC0 to 00F71E06 (code length 70) [test.exe] Method LongoMatch.GtkTimescale : add_InChanged(LongoMatch.InChangedHandler) emitted at 00F71E20 to 00F71E74 (code length 84) [test.exe] Method (wrapper native-to-managed) LongoMatch.GtkTimescale:InChangedSignalCallback (intptr,double,intptr) emitted at 00F71E78 to 00F71EE8 (code length 112) [test.exe] Method Gtk.Application:Run () emitted at 00F71EF8 to 00F71F02 (code length 10) [test.exe] Method (wrapper managed-to-native) Gtk.Application:gtk_main () emitted at 00F71F10 to 00F71F4D (code length 61) [test.exe] Method LongoMatch.GtkTimescale:InChangedSignalCallback(intptr,double,intptr) emitted at 00F71F50 to 00F720E5 (code length 405) [test.exe] Method LongoMatch.InChangedArgs:.ctor () emitted at 00F72128 to 00F72136 (code length 14) [test.exe] Method GLib.SignalArgs:.ctor () emitted at 00F72148 to 00F7216A (code length 34)[test.exe] Method System.EventArgs:.ctor () emitted at 00F72178 to 00F7217D (code length 5)[test.exe] Method System.EventArgs:.cctor () emitted at 00F72180 to 00F721A5 (code length 37) [test.exe] Method GLib.SignalArgs:set_Args (object[]) emitted at 00F721A8 to 00F721B6 (codelength 14) [test.exe] Method GLib.SignalArgs:get_Args () emitted at 00F721B8 to 00F721CC (code length20) [test.exe] Method GLib.Signal:get_Handler () emitted at 00F721D0 to 00F7226C (code length 156) [test.exe] Method (wrapper managed-to-native) GLib.Signal:g_signal_get_invocation_hint (intptr) emitted at 00F72288 to 00F722CF (code length 71) [test.exe] Method (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:PtrToStructure (intptr,System.Type) emitted at 00F722D0 to 00F72316 (code length 70) [test.exe] Method (wrapper runtime-invoke) GLib.InvocationHint:runtime_invoke_void_intptr_object (object,intptr,intptr,intptr) emitted at 00F72318 to 00F723B2 (code length154) [test.exe] Method (wrapper unknown) GLib.InvocationHint:PtrToStructure (intptr,object) emitted at 00F723B8 to 00F72449 (code length 145) [test.exe] Method GLib.Object:GetObject (intptr) emitted at 00F72450 to 00F7246B (code length 27) [test.exe] Method GLib.Object:GetObject (intptr,bool) emitted at 00F72478 to 00F725C5 (codelength 333) [test.exe] Method System.Collections.Hashtable:KeyEquals (object,object) emitted at 00F72608 to 00F7267E (code length 118) [test.exe] Method System.IntPtr:Equals (object) emitted at 00F72680 to 00F726FB (code length 123) [test.exe] Method GLib.ToggleRef:get_IsAlive () emitted at 00F72710 to 00F72799 (code length 137) [test.exe] Method GLib.ToggleRef:get_Target () emitted at 00F727A0 to 00F72848 (code length168) [test.exe] Method test.MainWindow:onChanged (object,object) emitted at 00F72848 to 00F7284D(code length 5) [test.exe] Stacktrace: at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00004> at (wrapper managed-to-native) Gtk.Application.gtk_main () <0xffffffff> at Gtk.Application.Run () <0x00007> at test.MainWindow.Main (string[]) <0x00021> at (wrapper runtime-invoke) test.MainWindow.runtime_invoke_void_string[] (object,intptr,intptr,intptr) <0xffffffff> This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. C:\Documents and Settings\ubuntu\Mis documentos\Proyectos\LongoMatch \test\bin\Debug> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20080618/ba8a3d21/attachment-0001.html From wasbridge at gmail.com Tue Jun 17 23:08:04 2008 From: wasbridge at gmail.com (Billy Schoenberg) Date: Tue, 17 Jun 2008 23:08:04 -0400 Subject: [Gtk-sharp-list] Deploying on Windows, having some issues Message-ID: Hello, I use GTK# (2.10.4 I think) in my project that I am trying to distribute over the net. I am having a really hard time with GTK, seems like for some percentage of the people who install my app there is a problem with GTK which prevents the program from launching. I am really at a loss over what to do. I am using a GTK# installer which I built from here: http://medsphere.org/projects/gtksharp/svn/trunk . I am doing this because I need 2.10.4 because 2.10.3 has a known issue with TreevViews that was fixed in 2.10.4. On my machine and every machine I can get my hands on there isn't a problem, but I know the situation does exist because I have 3 tickets about it, and I know how tricky it is to get my app to find GTK, even on my machine. This is the info that I have from their crashes, http://dialect.openmodeling.net/report/1 if anyone can help I would really appreciate it, I do not know what to do in order to make sure that my app can find GTK. Billy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20080617/73b4b7fd/attachment.html From bratsche at gnome.org Tue Jun 17 23:53:02 2008 From: bratsche at gnome.org (Cody Russell) Date: Tue, 17 Jun 2008 22:53:02 -0500 Subject: [Gtk-sharp-list] Deploying on Windows, having some issues In-Reply-To: References: Message-ID: <1213761182.19603.15.camel@prometheus> Hey Billy, Not sure if it will make any difference, but rather than building from svn why don't you try grabbing Brad's pre-built 2.10.4 installer from here: http://bzr.medsphere.com/~brad/experimental/gtksharp-sdk-2.10.4-1-unofficial.msi If you're using that then you should have the following in the environment: GTK_BASEPATH=C:\Program Files\Medsphere\Gtk# SDK\ PATH=C:\Program Files\Medsphere\Gtk# SDK\bin The person who filed ticket #12 talks about GTK-BASE being correctly set, but I'm not sure what GTK-BASE is. Maybe he meant GTK_BASEPATH but that seems like something to double check. You seem to be asking the right questions in the bug reports though. If the user has any old versions of GTK+ or Gtk# installed anywhere on the system, it's possible that they will conflict. On Tue, 2008-06-17 at 23:08 -0400, Billy Schoenberg wrote: > > I use GTK# (2.10.4 I think) in my project that I am trying to > distribute over the net. I am having a really hard time with GTK, > seems like for some percentage of the people who install my app there > is a problem with GTK which prevents the program from launching. I am > really at a loss over what to do. I am using a GTK# installer which I > built from here: http://medsphere.org/projects/gtksharp/svn/trunk . I > am doing this because I need 2.10.4 because 2.10.3 has a known issue > with TreevViews that was fixed in 2.10.4. On my machine and every > machine I can get my hands on there isn't a problem, but I know the > situation does exist because I have 3 tickets about it, and I know how > tricky it is to get my app to find GTK, even on my machine. This is > the info that I have from their crashes, > http://dialect.openmodeling.net/report/1 if anyone can help I would > really appreciate it, I do not know what to do in order to make sure > that my app can find GTK. From bratsche at gnome.org Tue Jun 17 23:57:17 2008 From: bratsche at gnome.org (Cody Russell) Date: Tue, 17 Jun 2008 22:57:17 -0500 Subject: [Gtk-sharp-list] Compiling dynamic dll on windows In-Reply-To: <1213753649.13322.31.camel@longo> References: <1213753649.13322.31.camel@longo> Message-ID: <1213761437.19603.19.camel@prometheus> On Wed, 2008-06-18 at 03:47 +0200, Andoni Morales Alastruey wrote: > I would like to know how to compile GTK dynamic libraries for win32 > for creating C# bindings. > On linux I compile the library for a Gtk widget I wrote on C, than I > create the bindings with the gapi tools and all works fine. Instead,on > windows, I compile the library, I use the bindings I created before Okay, trying to understand what your problem is here.. it sounds like you're binding your own C library? Do you have any "glue" code that sits between the managed code and the C library? For example, Gtk# has some additional C code and you obviously can't build the binding itself on Linux and expect it to work on Windows. So it sounds like you may want to build the binding on Windows and not copy them over from Linux. But I may be misunderstanding the problem. From ylatuya at gmail.com Wed Jun 18 00:02:14 2008 From: ylatuya at gmail.com (Andoni Morales Alastruey) Date: Wed, 18 Jun 2008 06:02:14 +0200 Subject: [Gtk-sharp-list] Compiling dynamic dll on windows In-Reply-To: <1213761437.19603.19.camel@prometheus> References: <1213753649.13322.31.camel@longo> <1213761437.19603.19.camel@prometheus> Message-ID: <1213761734.23287.19.camel@longo> So do I have to generate the bindings with the gapi tools both on windows and Linux? El mar, 17-06-2008 a las 22:57 -0500, Cody Russell escribi?: > On Wed, 2008-06-18 at 03:47 +0200, Andoni Morales Alastruey wrote: > > I would like to know how to compile GTK dynamic libraries for win32 > > for creating C# bindings. > > On linux I compile the library for a Gtk widget I wrote on C, than I > > create the bindings with the gapi tools and all works fine. Instead,on > > windows, I compile the library, I use the bindings I created before > > Okay, trying to understand what your problem is here.. it sounds like > you're binding your own C library? Do you have any "glue" code that > sits between the managed code and the C library? For example, Gtk# has > some additional C code and you obviously can't build the binding itself > on Linux and expect it to work on Windows. > > So it sounds like you may want to build the binding on Windows and not > copy them over from Linux. But I may be misunderstanding the problem. > > _______________________________________________ > Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list > From ylatuya at gmail.com Wed Jun 18 11:05:22 2008 From: ylatuya at gmail.com (Andoni Morales Alastruey) Date: Wed, 18 Jun 2008 17:05:22 +0200 Subject: [Gtk-sharp-list] Compiling dynamic dll on windows In-Reply-To: <1213761437.19603.19.camel@prometheus> References: <1213753649.13322.31.camel@longo> <1213761437.19603.19.camel@prometheus> Message-ID: <1213801522.8421.20.camel@longo> Hi Cody: I've thinking about this, and I think I don't need to do anything special for Windows as I don't use any glue code. Generating the bindings is just generating the C# code. I'll try to explain the situation a little bit. My C library is just a GTK Widget (GtkTimeScale), witch is a kind of scale with three cursors. The first one delimits the start, the second one the position, and the third one the stop. This widget cand send 3 signals : in_changed out_changed pos_changed Witch are sended when one of the cursor is moved. On Linux I comple the library and I use the C# code generated by the GAPI tools: all works great. On windows I do the same, I compile the lbrary and I use the C# code generate by the GAPI tools. If I don't connect any of the three signals, the widget is displayed and I can move the cursors without any problem. The problem comes when I add an event handler for one of the 3 signals. When I move the cursor the signal is sended and caught and my app finishes. I'm having the same problem with Gstreamer player. I compile the C libs for the GstPlayer, I run my app with the GstPlayer bindings, and all works well. The movie is playing on Windows (When I saw it for the first time I was really happy because I was having a C# multiplatform video player) but when the movie reaches the final and the end_of_stream event is sended, the app deads again. I don't really know why because 2 months ago I din have this problem. I have tried to compile it on Visual studio with cygwin and mingw, and always with the same result. I don't know how to debug it... Can I send you the sources so you can try to comple it and execute it? By the way I notice just at the beginning of the execution of my test app (a simple window with the gtktimescale) this: Method (wrapper runtime-invoke) System.Object:runtime_invoke_void_string (object,intptr,intptr,intptr) emitted at 00F60028 to 00F600BD (code length 149) [test.exe] Method System.OutOfMemoryException:.ctor (string) emitted at 00F600C0 to 00F600E3 (code length 35) [test.exe] Method System.SystemException:.ctor (string) emitted at 00F60100 to 00F60123 (code length 35) [test.exe]Method System.Exception:.ctor (string) emitted at 00F60130 to 00F60148 (code length 24) [test.exe] Method System.Exception:set_HResult (int) emitted at 00F60148 to 00F60156 (codelength 14) [test.exe]Method System.NullReferenceException:.ctor (string) emitted at 00F60158 to 00F6017E (code length 38) [test.exe] Method System.StackOverflowException:.ctor (string) emitted at 00F60180 to 00F60196 (code length 22) [test.exe] El mar, 17-06-2008 a las 22:57 -0500, Cody Russell escribi?: > On Wed, 2008-06-18 at 03:47 +0200, Andoni Morales Alastruey wrote: > > I would like to know how to compile GTK dynamic libraries for win32 > > for creating C# bindings. > > On linux I compile the library for a Gtk widget I wrote on C, than I > > create the bindings with the gapi tools and all works fine. Instead,on > > windows, I compile the library, I use the bindings I created before > > Okay, trying to understand what your problem is here.. it sounds like > you're binding your own C library? Do you have any "glue" code that > sits between the managed code and the C library? For example, Gtk# has > some additional C code and you obviously can't build the binding itself > on Linux and expect it to work on Windows. > > So it sounds like you may want to build the binding on Windows and not > copy them over from Linux. But I may be misunderstanding the problem. > > _______________________________________________ > Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list > From mkestner at gmail.com Wed Jun 18 11:50:27 2008 From: mkestner at gmail.com (Mike Kestner) Date: Wed, 18 Jun 2008 10:50:27 -0500 Subject: [Gtk-sharp-list] Compiling dynamic dll on windows In-Reply-To: <1213801522.8421.20.camel@longo> References: <1213753649.13322.31.camel@longo> <1213761437.19603.19.camel@prometheus> <1213801522.8421.20.camel@longo> Message-ID: <1213804227.13386.17.camel@t61p.site> On Wed, 2008-06-18 at 17:05 +0200, Andoni Morales Alastruey wrote: > I've thinking about this, and I think I don't need to do anything > special for Windows as I don't use any glue code. Generating the > bindings is just generating the C# code. I'll try to explain the > situation a little bit. Since the issue seems to be callback related, are you doing a cdecl delegate transformation on your assemblies for win32? We have a tool we run during the gtk-sharp win32 build process called gapi-cdecl-insert which converts all the CDeclCallback attributes in an assembly to the necessary IL code for proper callback execution on the MS runtime. It's possible you just need to run that tool on your binding assembly. Mike From ylatuya at gmail.com Wed Jun 18 15:38:25 2008 From: ylatuya at gmail.com (Andoni Morales Alastruey) Date: Wed, 18 Jun 2008 21:38:25 +0200 Subject: [Gtk-sharp-list] Compiling dynamic dll on windows In-Reply-To: <1213804227.13386.17.camel@t61p.site> References: <1213753649.13322.31.camel@longo> <1213761437.19603.19.camel@prometheus> <1213801522.8421.20.camel@longo> <1213804227.13386.17.camel@t61p.site> Message-ID: <1213817906.25124.10.camel@longo> wow!!! You got it!!!! Just have a look to this, it's even simpler http://themonkeysgrinder.blogspot.com/2007/07/using-glib-callbacks-with-managed.html You just have to replace the [GLib.CDeclCallback] attribute with this one [UnmanagedFunctionPointer(CallingConvention.Cdecl)] for the delegate definitions. No need to use the gapi-cdecl-insert Thank you so much!!! I think this info should placed somewhere on the gtk# proyect and the mono proyect. El mi?, 18-06-2008 a las 10:50 -0500, Mike Kestner escribi?: > On Wed, 2008-06-18 at 17:05 +0200, Andoni Morales Alastruey wrote: > > > I've thinking about this, and I think I don't need to do anything > > special for Windows as I don't use any glue code. Generating the > > bindings is just generating the C# code. I'll try to explain the > > situation a little bit. > > Since the issue seems to be callback related, are you doing a cdecl > delegate transformation on your assemblies for win32? We have a tool we > run during the gtk-sharp win32 build process called gapi-cdecl-insert > which converts all the CDeclCallback attributes in an assembly to the > necessary IL code for proper callback execution on the MS runtime. It's > possible you just need to run that tool on your binding assembly. > > Mike > > _______________________________________________ > Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list > From mkestner at gmail.com Wed Jun 18 16:54:15 2008 From: mkestner at gmail.com (Mike Kestner) Date: Wed, 18 Jun 2008 15:54:15 -0500 Subject: [Gtk-sharp-list] Compiling dynamic dll on windows In-Reply-To: <1213817906.25124.10.camel@longo> References: <1213753649.13322.31.camel@longo> <1213761437.19603.19.camel@prometheus> <1213801522.8421.20.camel@longo> <1213804227.13386.17.camel@t61p.site> <1213817906.25124.10.camel@longo> Message-ID: <1213822455.14279.6.camel@t61p.site> On Wed, 2008-06-18 at 21:38 +0200, Andoni Morales Alastruey wrote: > wow!!! You got it!!!! > > Just have a look to this, it's even simpler > http://themonkeysgrinder.blogspot.com/2007/07/using-glib-callbacks-with-managed.html > > You just have to replace the [GLib.CDeclCallback] attribute with this > one [UnmanagedFunctionPointer(CallingConvention.Cdecl)] for the > delegate definitions. No need to use the gapi-cdecl-insert Unfortunately, that one is not available on .Net 1.x, so we can't use it. That's why we came up with the gapi-cdecl-insert hack. > Thank you so much!!! I think this info should placed somewhere on the > gtk# proyect and the mono proyect. Good idea. I just added a note about it on: http://mono-project.com/GAPI#Win32_binding_issues Mike From iggy.ma at gmail.com Wed Jun 18 16:55:37 2008 From: iggy.ma at gmail.com (Iggy) Date: Wed, 18 Jun 2008 15:55:37 -0500 Subject: [Gtk-sharp-list] Dependent assemblies in Executing Assembly Folder Sub-Folders? Message-ID: <527a90a10806181355g34fc40c8lca16b4fcbe464670@mail.gmail.com> I have my executable in my bin folder, and a lot of dependent assemblies. I want to put those assemblies in different subfolders of the main executing assembly directory. I have put the dependencies and manually edited my csprojects to reference them there, but when I run my program it still says it can't find the assemblies unless they are in the same folder as the executing assembly. How can I specify in my assemblies where to look for dependent assemblies? From iggy.ma at gmail.com Wed Jun 18 18:08:39 2008 From: iggy.ma at gmail.com (Iggy MA) Date: Wed, 18 Jun 2008 15:08:39 -0700 (PDT) Subject: [Gtk-sharp-list] Dependent assemblies in Executing Assembly Folder Sub-Folders? In-Reply-To: <527a90a10806181355g34fc40c8lca16b4fcbe464670@mail.gmail.com> References: <527a90a10806181355g34fc40c8lca16b4fcbe464670@mail.gmail.com> Message-ID: <17993042.post@talk.nabble.com> For anybody who is wondering, I figured out how to do this, specify assemblies in other folders: private class Program { public static void Main() { AppDomain currentDomain = AppDomain.CurrentDomain; currentDomain.AssemblyResolve += new ResolveEventHandler(currentDomain_AssemblyResolve); MyProgram.Initialize(); } static Assembly currentDomain_AssemblyResolve(object sender, ResolveEventArgs args) { Assembly MyAssembly = null; string simpleName = (new AssemblyName(args.Name).Name) + ".dll"; string path = Path.Combine(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location.ToString()), "mono"), simpleName); // Try to get the assembly from one path // If it doesn't work, get it from a different path // Rinse and Repeat as necessary try { MyAssembly = Assembly.LoadFrom(path); } catch { path = path.Replace("mono", "lib"); MyAssembly = Assembly.LoadFrom(path); } return MyAssembly; } } private class MyProgram { public static void Initialize() { Gtk.Application.Init(); new wMain(); Gtk.Application.Run(); } } Iggy MA wrote: > > I have my executable in my bin folder, and a lot of dependent > assemblies. I want to put those assemblies in different subfolders of > the main executing assembly directory. I have put the dependencies and > manually edited my csprojects to reference them there, but when I run > my program it still says it can't find the assemblies unless they are > in the same folder as the executing assembly. > > How can I specify in my assemblies where to look for dependent assemblies? > _______________________________________________ > Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list > > -- View this message in context: http://www.nabble.com/Dependent-assemblies-in-Executing-Assembly-Folder-Sub-Folders--tp17991647p17993042.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From iggy.ma at gmail.com Fri Jun 20 18:37:17 2008 From: iggy.ma at gmail.com (Iggy MA) Date: Fri, 20 Jun 2008 15:37:17 -0700 (PDT) Subject: [Gtk-sharp-list] WHy doesn't TreeView.RulesHint work in Windows? Message-ID: <18038566.post@talk.nabble.com> Does anybody know why Rules Hint only works in Linux? Any hacks I can use to get this working in windows? -- View this message in context: http://www.nabble.com/WHy-doesn%27t-TreeView.RulesHint-work-in-Windows--tp18038566p18038566.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From brad at getcoded.net Mon Jun 23 13:45:29 2008 From: brad at getcoded.net (Brad Taylor) Date: Mon, 23 Jun 2008 10:45:29 -0700 Subject: [Gtk-sharp-list] WHy doesn't TreeView.RulesHint work in Windows? In-Reply-To: <18038566.post@talk.nabble.com> References: <18038566.post@talk.nabble.com> Message-ID: <1214243129.10858.28.camel@nightcrawler> On Fri, 2008-06-20 at 15:37 -0700, Iggy MA wrote: > Does anybody know why Rules Hint only works in Linux? Any hacks I can use to > get this working in windows? Medsphere's GTK# installers[1] ship the following in $GTK_BASE_PATH\etc \gtk-2.0: ?style "rules-hint" { GtkTreeView::allow-rules = 1 } class "*" style "rules-hint" This overrides the MS-Windows theme's default of not showing the rules-hint. Hope this helps, -Brad -- [1] https://sourceforge.net/project/showfiles.php?group_id=74626&package_id=223067 From rbrinson at gmail.com Mon Jun 23 19:27:09 2008 From: rbrinson at gmail.com (jaboo) Date: Mon, 23 Jun 2008 16:27:09 -0700 (PDT) Subject: [Gtk-sharp-list] Strategy for Databinding Entry to Business Object Property Message-ID: <18080605.post@talk.nabble.com> I have a little C#/GTK# project that I have been working on that is presenting an interesting challenge to me. I have a traditional 3-tier architecture with GTK# presenting the UI, a pure C# problem domain (business layer), and a disk IO layer for the data access layer, since the app works with JPG photos on the file system. The main business class is Picture, and it has some properties that are displayed/edited at the UI level in Gtk.Entry and Gtk.TextView objects. Thus far, I have been managing the edit of these Entry/TextView objects by capturing the existing Text value in the OnFocusInEvent and then comparing that captured string to the Text property of the Entry/TextView object in the OnFocusOutEvent. If they are not equal, then obviously a change was made, and I update the Picture objects property. Today, I recognized a problem with this strategy in that if the user clicks on the Gtk.MenuBar or the Gtk.Toolbar, the OnFocusOutEvent is not triggered. Thus updating the property on Picture does not occur, and the user may be clicking on the Save toolbar button or Save menu item. The only other property update strategy that I have been able to think of is to use the OnChanged event of the Entry/TextView.Buffer object. However, this event is fired everytime a character is typed or deleted. This seems like it would be firing off way too many events. The System.Windows.Forms.TextBox has a DataBindings property that can be used to set the datasource for a TextBox. Does anything like this exist for GTK#? Does anyone have another databinding strategy that they could suggest or point to with a URL? Thanks for any insights. -- View this message in context: http://www.nabble.com/Strategy-for-Databinding-Entry-to-Business-Object-Property-tp18080605p18080605.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From iggy.ma at gmail.com Tue Jun 24 15:55:26 2008 From: iggy.ma at gmail.com (Iggy MA) Date: Tue, 24 Jun 2008 12:55:26 -0700 (PDT) Subject: [Gtk-sharp-list] A new Mono Blog Message-ID: <18098731.post@talk.nabble.com> I started a new Mono Blog to document things I learn in Mono if anybody would like to check it out... http://iggyma.blogspot.com/ http://iggyma.blogspot.com/ -- View this message in context: http://www.nabble.com/A-new-Mono-Blog-tp18098731p18098731.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From iggy.ma at gmail.com Tue Jun 24 16:54:58 2008 From: iggy.ma at gmail.com (Iggy MA) Date: Tue, 24 Jun 2008 13:54:58 -0700 (PDT) Subject: [Gtk-sharp-list] Deployment to Windows In-Reply-To: <8ed5cbac0806131304j5d9002e8r695ad55c74e31335@mail.gmail.com> References: <8ed5cbac0806131304j5d9002e8r695ad55c74e31335@mail.gmail.com> Message-ID: <18099869.post@talk.nabble.com> There shouldn't be anything special. Do you have access to visual studio? If so you can create a deployment project there to build an msi installer and just include your dependencies. With VS you can also check to see if Mono is installed. There are other installer builders out there as well you could search google for http://iggyma.blogspot.com/ Vladimir Giszpenc-2 wrote: > > Hi, > > Is there a howto for deploying a gtk# app to Windows? Note that it is > .Net 2.0 (Mono 1.9.1). I am looking for something that will tell me > how to create an MSI or other installer with all my dependencies. I > don't need this right away, but I figured I would start asking now. > > Thanks! > > Vlad > _______________________________________________ > Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list > > -- View this message in context: http://www.nabble.com/Deployment-to-Windows-tp17831032p18099869.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From iggy.ma at gmail.com Tue Jun 24 17:01:01 2008 From: iggy.ma at gmail.com (Iggy MA) Date: Tue, 24 Jun 2008 14:01:01 -0700 (PDT) Subject: [Gtk-sharp-list] Calling TreeStore.AppendValues with array of values In-Reply-To: <17371182.post@talk.nabble.com> References: <17371182.post@talk.nabble.com> Message-ID: <18099982.post@talk.nabble.com> If you're just passing it an array you may need to set the TreeCellDataFunc to render the values properly. There is a good example of how to do it on the mono wiki at http://www.mono-project.com/GtkSharp_TreeView_Tutorial under the section 'Controlling how the model is used' http://iggyma.blogspot.com/ pcloches wrote: > > Hello, > > I am attempting to call TreeStore.AppendValues with an array containing > the values. However, AppendValues seems to have two conflicting > definitions: > > AppendValues(params object[] values) > and > AppendValues(Array values) > > When I attempt to pass an array of strings for the values, the first > element of the passed array gets populated for each value. I believe that > even though I am passing an array, it is only taking the first value of > the array because it thinks its still a variable argument call with only > one variable argument. I attempted to use Type.Invoke on the method, > specifying the arguments as just typeof(Array), however it still did the > same thing. > > Any ideas how I can overcome this? > -- View this message in context: http://www.nabble.com/Calling-TreeStore.AppendValues-with-array-of-values-tp17371182p18099982.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From plushpuffin at gmail.com Wed Jun 25 13:49:25 2008 From: plushpuffin at gmail.com (plushpuffin) Date: Wed, 25 Jun 2008 10:49:25 -0700 (PDT) Subject: [Gtk-sharp-list] Gtk.DotNet && System.Drawing && Images, strange behavior Message-ID: <18116118.post@talk.nabble.com> Hello, I just ditched WinXP a few weeks ago and switched to Ubuntu 8.04, and I'm trying to port my C# Windows.Forms applications over to Gtk#. I have a newly-created sample Gtk# project that simply isn't working, and I'm not sure what it is that I'm doing wrong. I am using Gtk# with the Gtk-dotnet library so that my library files' graphics handling functions don't have to be rewritten. I noticed that many of my images, rectangles, and ellipses are being drawn at the wrong positions on the DrawingArea. Below is my code and a screenshot of the strange behavior I'm seeing. I'm running monodevelop 1.0 and mono 1.9.1 (from the badgerports Ubuntu repository). I was originally using the official Ubuntu mono 1.2.6 release, but I decided to upgrade mono before coming here for help. It didn't fix anything. I finally figured out what the problem is. For some reason, after drawing an image on the Graphics object, the next thing drawn, NO MATTER WHAT IT IS OR WHERE IT IS PLACED, is offset vertically by about the height of the image drawn. The next thing drawn after that is drawn in its proper position. Have I found a bug in the Gtk.DotNet class library, or I am just not understanding something? I know that certain graphics libraries have a "pen cursor" which moves from place to place, so you can draw a square by saying 'place pen at 50:50, draw 100 right, draw 100 up, draw 100 left, draw 100 down," but that doesn't seem to be the case here because this strange behavior only takes effect after drawing an image. If I draw ellipse->rectangle->image, everything is in the right place. If I draw ellipse->image->rectangle, the rectangle will be shifted down by about the height of the image. Notice that I say "about the height," because as you can see in the attached screenshot, my attempted 4x4 square of images is NOT aligned along 32x32 boundaries. The top-left image is in the proper location, but the other three are shifted down 29 pixels (they shouldn't be shifted down at all), which makes no sense. protected virtual void OnDrawingarea1ExposeEvent (object o, Gtk.ExposeEventArgs args) { System.Drawing.Image pic = new Bitmap("./bots/grad.png"); using( Graphics g = Gtk.DotNet.Graphics.FromDrawable(args.Event.Window) ) { g.Clear(Color.Aqua); g.DrawImage(pic, 50.0F, 50.0F, 32, 32); g.DrawImage(pic, 50.0F, 82.0F, 32, 32); g.DrawImage(pic, 82.0F, 50.0F, 32, 32); g.DrawImage(pic, 82.0F, 82.0F, 32, 32); } } http://www.nabble.com/file/p18116118/monodeveloptest1.png -- View this message in context: http://www.nabble.com/Gtk.DotNet----System.Drawing----Images%2C-strange-behavior-tp18116118p18116118.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From plushpuffin at gmail.com Wed Jun 25 15:15:17 2008 From: plushpuffin at gmail.com (plushpuffin) Date: Wed, 25 Jun 2008 12:15:17 -0700 (PDT) Subject: [Gtk-sharp-list] Gtk.DotNet && System.Drawing && Images, strange behavior In-Reply-To: <18116118.post@talk.nabble.com> References: <18116118.post@talk.nabble.com> Message-ID: <18119843.post@talk.nabble.com> plushpuffin wrote: > > The top-left image is in the proper location, but the other three are > shifted down 29 pixels (they shouldn't be shifted down at all), which > makes no sense. > > http://www.nabble.com/file/p18116118/monodeveloptest1.png > I think I've discovered the reason for this. It can't be coincidence that my menu strip is 29 pixels tall. It seems that, after drawing an image, the graphics library (or the Drawingarea widget itself) mistakenly adds the height of the menu strip a second time to the Drawingarea's y-offset. After drawing the NEXT image/polygon/line, however, it seems to recalculate and get the right y-offset again. I have no idea why it screws up or why it fixes itself afterward. If someone else can confirm that does seem to be a bug (and that it's not one of those "up late last night, eyes bloodshot, brain fried, ignoring something that's staring me right in the face" situations), then I'll go find out how to submit a bug report. -- View this message in context: http://www.nabble.com/Gtk.DotNet----System.Drawing----Images%2C-strange-behavior-tp18116118p18119843.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From mkestner at gmail.com Wed Jun 25 17:41:29 2008 From: mkestner at gmail.com (Mike Kestner) Date: Wed, 25 Jun 2008 16:41:29 -0500 Subject: [Gtk-sharp-list] Gtk.DotNet && System.Drawing && Images, strange behavior In-Reply-To: <18119843.post@talk.nabble.com> References: <18116118.post@talk.nabble.com> <18119843.post@talk.nabble.com> Message-ID: <1214430089.4862.4.camel@t61p.site> On Wed, 2008-06-25 at 12:15 -0700, plushpuffin wrote: > I have no idea why it screws up or why it fixes itself afterward. If someone > else can confirm that does seem to be a bug (and that it's not one of those > "up late last night, eyes bloodshot, brain fried, ignoring something that's > staring me right in the face" situations), then I'll go find out how to > submit a bug report. I suspect this would be a problem with mono's System.Drawing as opposed to Gtk.Dotnet, since all it does is hand you a surface to draw on. One way to verify that would be to make a simple test case in winforms on mono and see if it does the same thing. If so, you could probably file a bug against mcs/classlibs. That assumes the same code works properly on the MS System.Drawing implementation. Mike From wasbridge at gmail.com Thu Jun 26 17:28:09 2008 From: wasbridge at gmail.com (Billy Schoenberg) Date: Thu, 26 Jun 2008 17:28:09 -0400 Subject: [Gtk-sharp-list] Error on Windows Vista Message-ID: Hello, I am having problems with GTK deployment, especially on Windows Vista, and I think mainly on 64bit configurations. This is one common stack trace I get: This line of code is filling a TreeView with a list store, it comes very soon after the Application.Init() and before Applicaiton.Run(). It is the second line that I actually use GTK The type initializer for 'GLib.GType' threw an exception. glib-sharp at GLib.GType.op_Explicit(Type type) at Gtk.ListStore?..ctor(Type[] types) at Open_Dialect.MainWindow?..ctor(String fileToOpen) at Open_Dialect.Program.Main(String[] args) System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) at GLib.GType.g_type_init() at GLib.GType..cctor() A second common issue is this: Unable to load image-loading module: /target/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ico.dll: The specified module could not be found. gdk-sharp at Gdk.Pixbuf..ctor(String filename) at Open_Dialect.MainWindow..ctor(String fileToOpen) in C:\Users\Billy\Desktop\Open Dialect\Open Dialect\OpenDialect\FormsAndViews\MainWindow.cs:line 143 To fix this second issue I have to manually modify gdk-pixbuf.loaders and replace /target/ with the full path, is there anyway to do this without modifying that file? Is /target/ a environment variable that i can set somehwere? Billy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20080626/493a18c3/attachment.html From brad at getcoded.net Thu Jun 26 17:51:27 2008 From: brad at getcoded.net (Brad Taylor) Date: Thu, 26 Jun 2008 14:51:27 -0700 Subject: [Gtk-sharp-list] Error on Windows Vista In-Reply-To: References: Message-ID: <1214517087.16107.19.camel@nightcrawler> Hey Billy, > A second common issue is this: > > Unable to load image-loading > module: /target/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ico.dll: > The specified module could not be found. > > gdk-sharp > > at Gdk.Pixbuf..ctor(String filename) > at Open_Dialect.MainWindow..ctor(String fileToOpen) in C:\Users > \Billy\Desktop\Open Dialect\Open Dialect\OpenDialect\FormsAndViews > \MainWindow.cs:line 143 > > To fix this second issue I have to manually modify gdk-pixbuf.loaders > and replace /target/ with the full path, is there anyway to do this > without modifying that file? Is /target/ a environment variable that > i can set somehwere? The experimental Gtk# installers that I'm working on run a VB script file on post-installation that is supposed to clean up these paths. Is it possible that running VB script is somehow disabled on Windows Vista? -Brad From wasbridge at gmail.com Thu Jun 26 19:56:52 2008 From: wasbridge at gmail.com (Billy Schoenberg) Date: Thu, 26 Jun 2008 19:56:52 -0400 Subject: [Gtk-sharp-list] Error on Windows Vista In-Reply-To: <1214517087.16107.19.camel@nightcrawler> References: <1214517087.16107.19.camel@nightcrawler> Message-ID: Hello, I do not think VBScript is reliable on Vista because when user account control is on it fails (silently in this case), but when it is off (and windows is restarted) it works. I tested the unoffical installer in both cases and the UAC install failed with that /target/ stuff, but the other is just fine. Anyone have any ideas about the first stack trace?? Billy On Thu, Jun 26, 2008 at 5:51 PM, Brad Taylor wrote: > Hey Billy, > > > A second common issue is this: > > > > Unable to load image-loading > > module: /target/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-ico.dll: > > The specified module could not be found. > > > > gdk-sharp > > > > at Gdk.Pixbuf..ctor(String filename) > > at Open_Dialect.MainWindow..ctor(String fileToOpen) in C:\Users > > \Billy\Desktop\Open Dialect\Open Dialect\OpenDialect\FormsAndViews > > \MainWindow.cs:line 143 > > > > To fix this second issue I have to manually modify gdk-pixbuf.loaders > > and replace /target/ with the full path, is there anyway to do this > > without modifying that file? Is /target/ a environment variable that > > i can set somehwere? > > The experimental Gtk# installers that I'm working on run a VB script > file on post-installation that is supposed to clean up these paths. Is > it possible that running VB script is somehow disabled on Windows Vista? > > -Brad > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20080626/a8154b0b/attachment.html From jestin.stoffel at gmail.com Fri Jun 27 00:14:49 2008 From: jestin.stoffel at gmail.com (Jestin Stoffel) Date: Thu, 26 Jun 2008 23:14:49 -0500 Subject: [Gtk-sharp-list] ScrolledWindow and TextView Message-ID: <1214540089.6732.18.camel@studio> I am using a TextView inside a ScrolledWindow in an application designed using Monodevelop 1.0 with the Stetic designer. When I type text into the TextView, it works but does not scroll with the text. A little research into this helped me find a solution where I add the TextView to the ScrolledWindow first, and then add the ScrolledWindow to its container. Since I am using the Stetic designer, and not adding my GUI elements in code, is there any way to get the desired result, or do TextViews simply not work with ScrolledWindows in the designer? --Jestin From count.cb at gmx.net Fri Jun 27 04:18:15 2008 From: count.cb at gmx.net (countcb) Date: Fri, 27 Jun 2008 01:18:15 -0700 (PDT) Subject: [Gtk-sharp-list] Treeview, delete the selected row (can't get it done :( ) In-Reply-To: <18144085.post@talk.nabble.com> References: <18144085.post@talk.nabble.com> Message-ID: <18150331.post@talk.nabble.com> Werner666 wrote: > > > [code] > TreeIter iter; > TreeModel model; > > > TreePath path = ((TreeSelection)sender).GetSelectedRows(); > this.klantListStore.GetIter(out iter, path[0]); > Console.WriteLine(path[0]); > > klantListStore.Remove(ref iter); > [/code] > The Exception is in the OnButton2Clicked Method. Is the code you posted above inside this OnButton2Clicked Method? If yes, sender is the button you clicked on. So you tried to cast a button to a TreeSelection. That's why you get a InvalidCastException. -- View this message in context: http://www.nabble.com/Treeview%2C-delete-the-selected-row-%28can%27t-get-it-done-%3A%28-%29-tp18144085p18150331.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From count.cb at gmx.net Fri Jun 27 06:32:30 2008 From: count.cb at gmx.net (countcb) Date: Fri, 27 Jun 2008 03:32:30 -0700 (PDT) Subject: [Gtk-sharp-list] Treeview, delete the selected row (can't get it done :( ) In-Reply-To: <18151414.post@talk.nabble.com> References: <18144085.post@talk.nabble.com> <18150331.post@talk.nabble.com> <18151414.post@talk.nabble.com> Message-ID: <18152264.post@talk.nabble.com> The error message means, that the passed iterator is not valid for your listStore. You can check this yourself with listStore.IterIsValid(iterSelected); It will return true if the iter is valid, false otherwise. WHY it is not valid I can't see with the code you showd. Can you show the line where you connect the OnSelectionChanged Method with the Changed Event? -- View this message in context: http://www.nabble.com/Treeview%2C-delete-the-selected-row-%28can%27t-get-it-done-%3A%28-%29-tp18144085p18152264.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From count.cb at gmx.net Fri Jun 27 07:01:34 2008 From: count.cb at gmx.net (countcb) Date: Fri, 27 Jun 2008 04:01:34 -0700 (PDT) Subject: [Gtk-sharp-list] Treeview, delete the selected row (can't get it done :( ) In-Reply-To: <18152434.post@talk.nabble.com> References: <18144085.post@talk.nabble.com> <18150331.post@talk.nabble.com> <18151414.post@talk.nabble.com> <18152264.post@talk.nabble.com> <18152434.post@talk.nabble.com> Message-ID: <18152742.post@talk.nabble.com> The only problem i can imagine is that your assinging a TreeModelFilter or a TreeModelsort to tv_klanten.Model. Then the selction you get when you click on the tree will be an iterator for THAT model. NOT for your listStore. Thats why your iter is not valid. If you do like I assume you have to change the call listStore.Remove(ref iterSelected); to listStore.Remove(ref subModel.ConvertIterToChildIter(iterSelected)); where "subModel" is the model you assigned to tv_klanten.Model -- View this message in context: http://www.nabble.com/Treeview%2C-delete-the-selected-row-%28can%27t-get-it-done-%3A%28-%29-tp18144085p18152742.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From count.cb at gmx.net Fri Jun 27 15:31:53 2008 From: count.cb at gmx.net (countcb) Date: Fri, 27 Jun 2008 12:31:53 -0700 (PDT) Subject: [Gtk-sharp-list] Treeview, delete the selected row (can't get it done :( ) In-Reply-To: <18153422.post@talk.nabble.com> References: <18144085.post@talk.nabble.com> <18150331.post@talk.nabble.com> <18151414.post@talk.nabble.com> <18152264.post@talk.nabble.com> <18152434.post@talk.nabble.com> <18152742.post@talk.nabble.com> <18153422.post@talk.nabble.com> Message-ID: <18162302.post@talk.nabble.com> Ah. sorry. My mistake. The parameter to the remove method is passed via the ref keyword. That means the Remove method wants to change this iter (it will set the iter to the next valid row after it deleted the row). But we just passed a method which will return a iter. But the remove method can't assign anything to this reutn value because it not held in a variable. So the correct way of doing it would be: TreeIter iter = subModel.ConvertIterToChildIter(iterSelected); listStore.Remove(ref iter); -- View this message in context: http://www.nabble.com/Treeview%2C-delete-the-selected-row-%28can%27t-get-it-done-%3A%28-%29-tp18144085p18162302.html Sent from the Mono - Gtk# mailing list archive at Nabble.com. From wasbridge at gmail.com Sat Jun 28 02:31:06 2008 From: wasbridge at gmail.com (Billy Schoenberg) Date: Sat, 28 Jun 2008 02:31:06 -0400 Subject: [Gtk-sharp-list] Removing all the widgets from a table Mac OSX GTK# Message-ID: Hi, I am having a problem removing all of the widgets from a table. I use this code foreach ( Widget c in controller.GTKObjectPropertiesTable.Children) { controller.GTKObjectPropertiesTable.Remove(c); } to try to clear a table, but it gives this exception at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00004> at (wrapper managed-to-native) Gtk.Application.gtk_main () <0xffffffff> at Gtk.Application.Run () <0x0000a> at Open_Dialect.MainWindow..ctor (string) [0x0070a] in /Users/Billy/Desktop/Open Dialect/Open Dialect/OpenDialect/FormsAndViews/MainWindow.cs:257 at Open_Dialect.Program.Main (string[]) [0x0005f] in /Users/Billy/Desktop/Open Dialect/Open Dialect/OpenDialect/Program.cs:43 at (wrapper runtime-invoke) Open_Dialect.Program.runtime_invoke_void_string[] (object,intptr,intptr,intptr) <0xffffffff> yes that is the full stack trace, it is missing pieces and I do not know why. The first time this piece of code is called it works fine, removes the widgets from the table, but then after I reattach them and call this method again it throws this exception. Any ideas? Who to report to? I am having a lot of trouble registering for the Bugzilla at Novell. Billy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20080628/af546b45/attachment.html From m.j.hutchinson at gmail.com Sat Jun 28 12:48:47 2008 From: m.j.hutchinson at gmail.com (Michael Hutchinson) Date: Sat, 28 Jun 2008 12:48:47 -0400 Subject: [Gtk-sharp-list] Removing all the widgets from a table Mac OSX GTK# In-Reply-To: References: Message-ID: On Sat, Jun 28, 2008 at 2:31 AM, Billy Schoenberg wrote: > Hi, > I am having a problem removing all of the widgets from a table. I use this > code > > foreach ( Widget c in controller.GTKObjectPropertiesTable.Children) > { > controller.GTKObjectPropertiesTable.Remove(c); > } > to try to clear a table, but it gives this exception > at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00004> > at (wrapper managed-to-native) Gtk.Application.gtk_main () <0xffffffff> > at Gtk.Application.Run () <0x0000a> > at Open_Dialect.MainWindow..ctor (string) [0x0070a] in > /Users/Billy/Desktop/Open Dialect/Open > Dialect/OpenDialect/FormsAndViews/MainWindow.cs:257 > at Open_Dialect.Program.Main (string[]) [0x0005f] in > /Users/Billy/Desktop/Open Dialect/Open Dialect/OpenDialect/Program.cs:43 > at (wrapper runtime-invoke) > Open_Dialect.Program.runtime_invoke_void_string[] > (object,intptr,intptr,intptr) <0xffffffff> > yes that is the full stack trace, it is missing pieces and I do not know > why. The first time this piece of code is called it works fine, removes the It an unmanaged segfault in the main loop. Something you've done leaves this in a state that doesn't immediately cause problems, but makes the main loop crash. > widgets from the table, but then after I reattach them and call this method What's the code that you use to re-attach them? > again it throws this exception. Any ideas? Who to report to? I am having > a lot of trouble registering for the Bugzilla at Novell. Have you seen http://www.mono-project.com/FAQ:_Novell_Bugzilla ? Also, are you using the X11 or "native" version of GTK on OS X? -- Michael Hutchinson http://mjhutchinson.com From wasbridge at gmail.com Sat Jun 28 13:52:48 2008 From: wasbridge at gmail.com (Billy Schoenberg) Date: Sat, 28 Jun 2008 13:52:48 -0400 Subject: [Gtk-sharp-list] Removing all the widgets from a table Mac OSX GTK# In-Reply-To: References: Message-ID: Hey, Thanks for the response. I do not think the code I use to reattch them is an issue, but I have attached it below. The reason I do not think its an issues is because if i comment out those lines I showed you last e-mail the program does not crash, it just piles widgets on top of each other. Also this code works just fine on Windows (all versions) and Linux (SUSE and Ubuntu) I use the "Native Version" of GTK on OSX 10.5 with Mono 1.9.1 that I installed 3 or so months ago. Do you have any ideas about a work around, another way to remove widgets from a table? public override void LayoutPropertiesPanel() { if(showPropPanel) { Table GTKTable = drawView.Controller.GTKObjectPropertiesTable; GTKTable.Attach(typeIndicator, 1, 4, 2, 5); GTKTable.Attach(nameBox, 1, 4, 6, 8); GTKTable.Attach(xLabel, 4, 6, 2, 5); GTKTable.Attach(xBox, 4, 6, 6, 8); GTKTable.Attach(yLabel, 6, 8, 2, 5); GTKTable.Attach(yBox, 6, 8, 6, 8); GTKTable.Attach(widthLabel, 4, 6, 9, 12); GTKTable.Attach(widthBox, 4, 6, 12, 14); GTKTable.Attach(heightLabel, 6, 8, 9, 12); GTKTable.Attach(heightBox, 6, 8, 12, 14); GTKTable.Attach(buttonModeCheckBox, 8, 12, 11, 15); GTKTable.Attach(fillLabel, 8, 10, 2, 5); GTKTable.Attach(fillButton, 8, 10, 6, 8, AttachOptions.Fill, AttachOptions.Expand, 0, 0); GTKTable.Attach(strokeLabel, 9, 13, 2, 5); GTKTable.Attach(strokeButton, 10, 12, 6, 8, AttachOptions.Fill, AttachOptions.Expand, 0, 0); GTKTable.Attach(strokeWidthLabel, 12, 15, 2, 5); GTKTable.Attach(strokeComboBox, 12, 15, 6, 8, AttachOptions.Fill, AttachOptions.Expand, 0, 0); if ( showEvents ) { GTKTable.Attach(eventsLabel, 15, 18, 2, 5); GTKTable.Attach(eventsComboBox, 15, 18, 6, 8, AttachOptions.Fill, AttachOptions.Expand, 0, 0); eventHandlerBox.BorderWidth = 1; GTKTable.Attach(eventHandlerBox, 18, 31, 2, 15); eventHandlerBox.GdkWindow.Background = new Gdk.Color(0, 0, 0); } GTKTable.ShowAll(); UpdatePropertiesPanel(); // sets all of the values of the widgets we just attached } } Billy On Sat, Jun 28, 2008 at 12:48 PM, Michael Hutchinson < m.j.hutchinson at gmail.com> wrote: > On Sat, Jun 28, 2008 at 2:31 AM, Billy Schoenberg > wrote: > > Hi, > > I am having a problem removing all of the widgets from a table. I use > this > > code > > > > foreach ( Widget c in controller.GTKObjectPropertiesTable.Children) > > { > > controller.GTKObjectPropertiesTable.Remove(c); > > } > > to try to clear a table, but it gives this exception > > at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00004> > > at (wrapper managed-to-native) Gtk.Application.gtk_main () <0xffffffff> > > at Gtk.Application.Run () <0x0000a> > > at Open_Dialect.MainWindow..ctor (string) [0x0070a] in > > /Users/Billy/Desktop/Open Dialect/Open > > Dialect/OpenDialect/FormsAndViews/MainWindow.cs:257 > > at Open_Dialect.Program.Main (string[]) [0x0005f] in > > /Users/Billy/Desktop/Open Dialect/Open Dialect/OpenDialect/Program.cs:43 > > at (wrapper runtime-invoke) > > Open_Dialect.Program.runtime_invoke_void_string[] > > (object,intptr,intptr,intptr) <0xffffffff> > > yes that is the full stack trace, it is missing pieces and I do not know > > why. The first time this piece of code is called it works fine, removes > the > > It an unmanaged segfault in the main loop. Something you've done > leaves this in a state that doesn't immediately cause problems, but > makes the main loop crash. > > > widgets from the table, but then after I reattach them and call this > method > > What's the code that you use to re-attach them? > > > again it throws this exception. Any ideas? Who to report to? I am > having > > a lot of trouble registering for the Bugzilla at Novell. > > Have you seen http://www.mono-project.com/FAQ:_Novell_Bugzilla ? > > Also, are you using the X11 or "native" version of GTK on OS X? > > -- > Michael Hutchinson > http://mjhutchinson.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20080628/d0f30c42/attachment-0001.html From wcfarrington at gmail.com Sat Jun 28 14:07:44 2008 From: wcfarrington at gmail.com (William Farrington) Date: Sat, 28 Jun 2008 14:07:44 -0400 Subject: [Gtk-sharp-list] Issues with generating bindings for telepathy-glib and telepathy-mission-control via GAPI Message-ID: <6FF6377E-DA23-4F53-B7A7-06608D041DDA@gmail.com> Hello, Miguel suggested I post this query here as it'd be more likely to be seen by someone knowledgeable about GAPI. As part of my SoC project, I've got to create bindings for telepathy- glib and telepathy-mission-control for C#. Things were generally going well, however, I've now hit a point were a handful of header files are inexplicably *not* being generated into C# code. I've spent a couple weeks working on this to no real avail, and with the deadline looming (a bit more than a week off), it is fairly critical I figure this issue out. Anyone willing to test this on their own box would need to build libtelepathy, telepathy-glib, and telepathy-mission-control. The bindings are currently hosted on github, http://github.com/wfarr/missioncontrol-sharp/tree/master and http://github.com/wfarr/telepathy-glib-sharp/tree/master . Thank you for your time. From mkestner at gmail.com Sat Jun 28 14:56:13 2008 From: mkestner at gmail.com (Mike Kestner) Date: Sat, 28 Jun 2008 13:56:13 -0500 Subject: [Gtk-sharp-list] Issues with generating bindings for telepathy-glib and telepathy-mission-control via GAPI In-Reply-To: <6FF6377E-DA23-4F53-B7A7-06608D041DDA@gmail.com> References: <6FF6377E-DA23-4F53-B7A7-06608D041DDA@gmail.com> Message-ID: <1214679373.26965.17.camel@t61p.site> On Sat, 2008-06-28 at 14:07 -0400, William Farrington wrote: > As part of my SoC project, I've got to create bindings for telepathy- > glib and telepathy-mission-control for C#. Things were generally going > well, however, I've now hit a point were a handful of header files are > inexplicably *not* being generated into C# code. I tried telepathy-glib-sharp and see some obvious problems. You are setting up the parser source file to scan the installed headers. This isn't going to work, since the parser also needs to scan the source files to get at things like class init funcs and type initializations. The typical approach for GAPI projects is to set a makefile target to download a source tarball to be used by the make api target and to configure your parse to access the sources from the downloaded and extracted target. You can see examples of this in the gtk-sharp/sources directory where the gapi2-parser step is performed in Gtk#. Unless you have a good reason to vary from the typical project layout, I would recommend sticking to it. This project layout is fairly well described on: http://mono-project.com/GAPI Mike From m.j.hutchinson at gmail.com Sat Jun 28 15:23:32 2008 From: m.j.hutchinson at gmail.com (Michael Hutchinson) Date: Sat, 28 Jun 2008 15:23:32 -0400 Subject: [Gtk-sharp-list] Removing all the widgets from a table Mac OSX GTK# In-Reply-To: References: Message-ID: On Sat, Jun 28, 2008 at 1:52 PM, Billy Schoenberg wrote: > Hey, > > Thanks for the response. I do not think the code I use to reattch them is an > issue, but I have attached it below. The reason I do not think its an > issues is because if i comment out those lines I showed you last e-mail the > program does not crash, it just piles widgets on top of each other. Also > this code works just fine on Windows (all versions) and Linux (SUSE and > Ubuntu) I use the "Native Version" of GTK on OSX 10.5 with Mono 1.9.1 that I Ah. Yeah, that's the followup I was going to ask. If it works fine on linux and windows, the OS X "native" GTK port is probably to blame. It's nowhere near as mature as the other GTK ports. You could use the X11 version of GTK on OS X for now, though it's less convenient to install, as it requires X11. > installed 3 or so months ago. Do you have any ideas about a work around, > another way to remove widgets from a table? Firstly, it's bad in a "foreach" to modify the collection over which you're iterating, since the enumerator object usually becomes invalid (in fact, most of the .NET collections will throw exceptions if you try this). Try this: while (controller.GTKObjectPropertiesTable.Children.Count > 0) controller.GTKObjectPropertiesTable.Remove(controller.GTKObjectPropertiesTable.Children[0]); A workaround could be to do controller.GTKObjectPropertiesTable.Visible = false; or since you're clearing the entire table, just Destroy() it and create a new one. Also, doesn't keeping a widget on your controller violate MVC? :) -- Michael Hutchinson http://mjhutchinson.com From m.j.hutchinson at gmail.com Sat Jun 28 15:32:09 2008 From: m.j.hutchinson at gmail.com (Michael Hutchinson) Date: Sat, 28 Jun 2008 15:32:09 -0400 Subject: [Gtk-sharp-list] ScrolledWindow and TextView In-Reply-To: <1214540089.6732.18.camel@studio> References: <1214540089.6732.18.camel@studio> Message-ID: On Fri, Jun 27, 2008 at 12:14 AM, Jestin Stoffel wrote: > I am using a TextView inside a ScrolledWindow in an application designed > using Monodevelop 1.0 with the Stetic designer. When I type text into > the TextView, it works but does not scroll with the text. A little > research into this helped me find a solution where I add the TextView to > the ScrolledWindow first, and then add the ScrolledWindow to its > container. Since I am using the Stetic designer, and not adding my GUI > elements in code, is there any way to get the desired result, or do > TextViews simply not work with ScrolledWindows in the designer? They certainly *should* work; this sounds like a strange bug, and I dont know if it's in GTK, GTK# or Stetic... In fact, the following code generated by stetic seems to indicate that it does things in the "correct" order: this.scrolledwindow4.Add(this.extraCompilerTextView); this.table5.Add(this.scrolledwindow4); Could you take a look at the stetic-generated code in the gtk-gui directory to check whether it's ordering things differently for you? -- Michael Hutchinson http://mjhutchinson.com From wasbridge at gmail.com Sat Jun 28 16:33:39 2008 From: wasbridge at gmail.com (Billy Schoenberg) Date: Sat, 28 Jun 2008 16:33:39 -0400 Subject: [Gtk-sharp-list] Removing all the widgets from a table Mac OSX GTK# In-Reply-To: References: Message-ID: Hey, I thought about the Destroy, make new, but I have run into a problem there, Destroy and Dispose both delete all of the Widgets packed inside of them, is there anyway to toss out the table but not the widgets packed inside? BIlly On Sat, Jun 28, 2008 at 3:23 PM, Michael Hutchinson < m.j.hutchinson at gmail.com> wrote: > On Sat, Jun 28, 2008 at 1:52 PM, Billy Schoenberg > wrote: > > Hey, > > > > Thanks for the response. I do not think the code I use to reattch them is > an > > issue, but I have attached it below. The reason I do not think its an > > issues is because if i comment out those lines I showed you last e-mail > the > > program does not crash, it just piles widgets on top of each other. Also > > this code works just fine on Windows (all versions) and Linux (SUSE and > > Ubuntu) I use the "Native Version" of GTK on OSX 10.5 with Mono 1.9.1 > that I > > Ah. Yeah, that's the followup I was going to ask. If it works fine on > linux and windows, the OS X "native" GTK port is probably to blame. > It's nowhere near as mature as the other GTK ports. > > You could use the X11 version of GTK on OS X for now, though it's less > convenient to install, as it requires X11. > > > installed 3 or so months ago. Do you have any ideas about a work around, > > another way to remove widgets from a table? > > Firstly, it's bad in a "foreach" to modify the collection over which > you're iterating, since the enumerator object usually becomes invalid > (in fact, most of the .NET collections will throw exceptions if you > try this). Try this: > > while (controller.GTKObjectPropertiesTable.Children.Count > 0) > > controller.GTKObjectPropertiesTable.Remove(controller.GTKObjectPropertiesTable.Children[0]); > > A workaround could be to do > > controller.GTKObjectPropertiesTable.Visible = false; > > or since you're clearing the entire table, just Destroy() it and > create a new one. > > Also, doesn't keeping a widget on your controller violate MVC? :) > > -- > Michael Hutchinson > http://mjhutchinson.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20080628/52f57475/attachment.html From jestin.stoffel at gmail.com Sat Jun 28 17:03:43 2008 From: jestin.stoffel at gmail.com (Jestin Stoffel) Date: Sat, 28 Jun 2008 16:03:43 -0500 Subject: [Gtk-sharp-list] ScrolledWindow and TextView In-Reply-To: References: <1214540089.6732.18.camel@studio> Message-ID: <1214687023.6971.19.camel@studio> On Sat, 2008-06-28 at 15:32 -0400, Michael Hutchinson wrote: > On Fri, Jun 27, 2008 at 12:14 AM, Jestin Stoffel > wrote: > > I am using a TextView inside a ScrolledWindow in an application designed > > using Monodevelop 1.0 with the Stetic designer. When I type text into > > the TextView, it works but does not scroll with the text. A little > > research into this helped me find a solution where I add the TextView to > > the ScrolledWindow first, and then add the ScrolledWindow to its > > container. Since I am using the Stetic designer, and not adding my GUI > > elements in code, is there any way to get the desired result, or do > > TextViews simply not work with ScrolledWindows in the designer? > > They certainly *should* work; this sounds like a strange bug, and I > dont know if it's in GTK, GTK# or Stetic... > > In fact, the following code generated by stetic seems to indicate that > it does things in the "correct" order: > > this.scrolledwindow4.Add(this.extraCompilerTextView); > this.table5.Add(this.scrolledwindow4); > > Could you take a look at the stetic-generated code in the gtk-gui > directory to check whether it's ordering things differently for you? > Here is my generated code: // Container child GtkAlignment.Gtk.Container+ContainerChild this.scrolledwindow1 = new Gtk.ScrolledWindow(); this.scrolledwindow1.CanFocus = true; this.scrolledwindow1.Name = "scrolledwindow1"; this.scrolledwindow1.ShadowType = ((Gtk.ShadowType)(1)); // Container child scrolledwindow1.Gtk.Container+ContainerChild Gtk.Viewport w65 = new Gtk.Viewport(); w65.ShadowType = ((Gtk.ShadowType)(0)); // Container child GtkViewport3.Gtk.Container+ContainerChild this.textview1 = new Gtk.TextView(); this.textview1.CanFocus = true; this.textview1.Name = "textview1"; w65.Add(this.textview1); this.scrolledwindow1.Add(w65); this.GtkAlignment.Add(this.scrolledwindow1); this.frame2.Add(this.GtkAlignment); Apparently there is a Gtk.Viewport that gets created, and that is what the ScrolledWindow contains. Checking the gui.stetic file showed that Stetic is adding in the Viewport. It seems that Stetic automatically assumes add_with_viewport instead of a normal add, and creates a Viewport in gui.stetic. Since a TextView is something that handle's it's own scrolling, this Viewport is just mucking things up. Thanks for pointing me in the right direction, but I still don't know how to use the Stetic designer to accomplish a TextView inside a ScrolledWindow. I looked for some sort of configuration option, but couldn't find one. I can probably just work around the issue by creating a custom "scrolledtextview" widget where I do my add()'s in code (without Stetic), but it is starting to look like there's a bug somewhere. Thanks for the help. --Jestin From m.j.hutchinson at gmail.com Sat Jun 28 17:26:38 2008 From: m.j.hutchinson at gmail.com (Michael Hutchinson) Date: Sat, 28 Jun 2008 17:26:38 -0400 Subject: [Gtk-sharp-list] ScrolledWindow and TextView In-Reply-To: <1214687023.6971.19.camel@studio> References: <1214540089.6732.18.camel@studio> <1214687023.6971.19.camel@studio> Message-ID: On Sat, Jun 28, 2008 at 5:03 PM, Jestin Stoffel wrote: > Apparently there is a Gtk.Viewport that gets created, and that is what > the ScrolledWindow contains. Checking the gui.stetic file showed that > Stetic is adding in the Viewport. It seems that Stetic automatically > assumes add_with_viewport instead of a normal add, and creates a > Viewport in gui.stetic. Since a TextView is something that handle's > it's own scrolling, this Viewport is just mucking things up. Thanks for > pointing me in the right direction, but I still don't know how to use > the Stetic designer to accomplish a TextView inside a ScrolledWindow. I > looked for some sort of configuration option, but couldn't find one. I > can probably just work around the issue by creating a custom > "scrolledtextview" widget where I do my add()'s in code (without > Stetic), but it is starting to look like there's a bug somewhere. Actually, I just played around with textviews in stetic, and discovered that adding a textview to a container that's not a ScrolledWindow *automatically* adds a ScrolledWindow without a viewport. Adding a textview to a ScrolledWindow does insert a viewport, which can be seen in the .stetic file (xml) but is not accessible from the designer. Fortunately the workaround is simple; just skip adding the scrolledwindow. This is clearly a bug in stetic; could you file a bug report? -- Michael Hutchinson http://mjhutchinson.com From m.j.hutchinson at gmail.com Sat Jun 28 17:43:51 2008 From: m.j.hutchinson at gmail.com (Michael Hutchinson) Date: Sat, 28 Jun 2008 17:43:51 -0400 Subject: [Gtk-sharp-list] Removing all the widgets from a table Mac OSX GTK# In-Reply-To: References: Message-ID: On Sat, Jun 28, 2008 at 4:33 PM, Billy Schoenberg wrote: > Hey, I thought about the Destroy, make new, but I have run into a problem > there, Destroy and Dispose both delete all of the Widgets packed inside of > them, is there anyway to toss out the table but not the widgets packed > inside? Nope, except removing them first. That said, it may be that the crasher bug is in the table, so that might work fine. IMO it's a pretty odd pattern to clear out all the widgets from the table, store them, and put them back in. Why not just rebuild the whole thing from scratch, or store the fully populated table? -- Michael Hutchinson http://mjhutchinson.com From jestin.stoffel at gmail.com Sat Jun 28 20:14:49 2008 From: jestin.stoffel at gmail.com (Jestin Stoffel) Date: Sat, 28 Jun 2008 19:14:49 -0500 Subject: [Gtk-sharp-list] ScrolledWindow and TextView In-Reply-To: References: <1214540089.6732.18.camel@studio> <1214687023.6971.19.camel@studio> Message-ID: <1214698489.6971.27.camel@studio> On Sat, 2008-06-28 at 17:26 -0400, Michael Hutchinson wrote: > On Sat, Jun 28, 2008 at 5:03 PM, Jestin Stoffel > wrote: > > Apparently there is a Gtk.Viewport that gets created, and that is what > > the ScrolledWindow contains. Checking the gui.stetic file showed that > > Stetic is adding in the Viewport. It seems that Stetic automatically > > assumes add_with_viewport instead of a normal add, and creates a > > Viewport in gui.stetic. Since a TextView is something that handle's > > it's own scrolling, this Viewport is just mucking things up. Thanks for > > pointing me in the right direction, but I still don't know how to use > > the Stetic designer to accomplish a TextView inside a ScrolledWindow. I > > looked for some sort of configuration option, but couldn't find one. I > > can probably just work around the issue by creating a custom > > "scrolledtextview" widget where I do my add()'s in code (without > > Stetic), but it is starting to look like