From xaviblas at gmail.com Tue Sep 4 08:05:16 2007 From: xaviblas at gmail.com (Xavi de Blas) Date: Tue, 4 Sep 2007 14:05:16 +0200 Subject: [Gtk-sharp-list] cursor_changed signal doesn't work on mono 1.2.5 windows Message-ID: <256a87490709040505u76700f9eka88025ca4cb10e2a@mail.gmail.com> Hello all On Linux is working but on mono 1.2.5-5 (also mono 1.2.5-4) for windows, cursor_changed signal on a treeview is not working. Any idea? Thanks a lot, Bye! From mschanzenbach at gmail.com Wed Sep 5 13:45:59 2007 From: mschanzenbach at gmail.com (Martin Schanzenbach) Date: Wed, 5 Sep 2007 19:45:59 +0200 Subject: [Gtk-sharp-list] Mono-cairo and Gtk# question regarding expose event Message-ID: <747c34400709051045w355c151foe42bd71894793280@mail.gmail.com> Hi, A few days ago I decided to learn mono and gtk#. I wanted to write a simple widget that looks like libnotify widgets just bigger. But when I tried to add widgets like a button to the window I couldn't see anything but the white background and the colored stripe I have drawn on the window using the expose event. I'm going to cut things short and show you the code: using System; using Gtk; using Cairo; public class MainWindow : Gtk.Window { public MainWindow (): base (Gtk.WindowType.Popup) { this.SetSizeRequest(400, 400); this.Show(); this.AppPaintable = true; Gtk.Button b = new Gtk.Button("test"); b.SetSizeRequest(20,20); this.Add(b); this.ExposeEvent += Expose; this.ShowAll(); } public void Expose(object o, Gtk.ExposeEventArgs args) { Cairo.Context cr = Gdk.CairoHelper.Create(this.GdkWindow); cr.Operator = Cairo.Operator.Source; Cairo.Surface surface = cr.Target.CreateSimilar(Cairo.Content.ColorAlpha, 400, 400); Cairo.Context crs = new Cairo.Context(surface); //FillBackground Gtk.Style stl = this.Style; Gdk.Color background = stl.Base(Gtk.StateType.Normal); crs.Color = new Cairo.Color( background.Red / 65535.0, background.Green / 65535.0, background.Blue / 65535.0); crs.Rectangle( 0, 0, 400, 400); crs.Fill(); crs.Color = new Cairo.Color(0.0,0.0,0.0); crs.LineWidth = 1.0; crs.Rectangle(0.5,0.5,400-0.5,400-0.5); crs.Stroke(); //draw stripe double strx = 1.5; double stry = 1.5; crs.Color = new Cairo.Color(0.3,0.3,0.3); crs.Rectangle(strx,stry,40, 397); crs.Fill(); cr.SetSourceSurface(surface,0,0); cr.PaintWithAlpha(0.8); } } class MainClass { public static void Main (string[] args) { Application.Init (); MainWindow win = new MainWindow (); Application.Run (); } } That's the important stuff. Now I checked the theme.c from notification-daemon (galago project) and the c code looks roughly the same with the exception that the widgets obviosly DON'T get painted over when the expose event is triggered. As you can see I used the paint method PaintWithAlpha so that it is possible to actually see the widgets below. My question finally is: Why does mono behave differently here than the c code? After all notification-daemon also repaints at every expose event but no widget is ever hidden. Any help would be greatly appreciated. Martin Schanzenbach From xaviblas at gmail.com Thu Sep 6 10:41:53 2007 From: xaviblas at gmail.com (Xavi de Blas) Date: Thu, 6 Sep 2007 16:41:53 +0200 Subject: [Gtk-sharp-list] cursor_changed signal doesn't work on mono 1.2.5 windows In-Reply-To: <256a87490709040505u76700f9eka88025ca4cb10e2a@mail.gmail.com> References: <256a87490709040505u76700f9eka88025ca4cb10e2a@mail.gmail.com> Message-ID: <256a87490709060741v32ce4132l20720dd45d94d7f5@mail.gmail.com> On windows, if it's defined in the code works!, but if it's on glade it doesn't work I hope it helps 2007/9/4, Xavi de Blas : > Hello all > > On Linux is working but on mono 1.2.5-5 (also mono 1.2.5-4) for > windows, cursor_changed signal on a treeview is not working. > > Any idea? > > Thanks a lot, Bye! > From vladimir.giszpenc at gmail.com Fri Sep 7 14:56:29 2007 From: vladimir.giszpenc at gmail.com (Vladimir Giszpenc) Date: Fri, 7 Sep 2007 14:56:29 -0400 Subject: [Gtk-sharp-list] Monodevelop Message-ID: <8ed5cbac0709071156t34eac869h327ff1227e741d5a@mail.gmail.com> Hi list members, Is there something that must be done to enable MonoDevelop to target a different Gtk# version. I recently upgraded to 0.15 and I think that now, it is actively targeting Gtk 10.2 (though I would like to change it to 8.3). Thanks, Vlad From lluis at ximian.com Fri Sep 7 16:41:35 2007 From: lluis at ximian.com (Lluis Sanchez) Date: Fri, 07 Sep 2007 22:41:35 +0200 Subject: [Gtk-sharp-list] Monodevelop In-Reply-To: <8ed5cbac0709071156t34eac869h327ff1227e741d5a@mail.gmail.com> References: <8ed5cbac0709071156t34eac869h327ff1227e741d5a@mail.gmail.com> Message-ID: <1189197695.4549.4.camel@portador.site> El dv 07 de 09 del 2007 a les 14:56 -0400, en/na Vladimir Giszpenc va escriure: > Hi list members, > > Is there something that must be done to enable MonoDevelop to target a > different Gtk# version. I recently upgraded to 0.15 and I think that > now, it is actively targeting Gtk 10.2 (though I would like to change > it to 8.3). That's not yet supported now. Maybe in the next release (coming in 2/3 weeks). Lluis. From david_cantin at videotron.ca Fri Sep 7 21:40:28 2007 From: david_cantin at videotron.ca (David Cantin) Date: Fri, 07 Sep 2007 21:40:28 -0400 Subject: [Gtk-sharp-list] Monodevelop In-Reply-To: <8ed5cbac0709071156t34eac869h327ff1227e741d5a@mail.gmail.com> References: <8ed5cbac0709071156t34eac869h327ff1227e741d5a@mail.gmail.com> Message-ID: <1189215628.32551.12.camel@tower> Le vendredi 07 septembre 2007 ? 14:56 -0400, Vladimir Giszpenc a ?crit : > Hi list members, > > Is there something that must be done to enable MonoDevelop to target a > different Gtk# version. I recently upgraded to 0.15 and I think that > now, it is actively targeting Gtk 10.2 (though I would like to change > it to 8.3). > > Thanks, > > Vlad For now, i solve this kind of problem by developing with the last version of monodevelop/mono and using some VMWare image that I found on the web of earlier version of monodevelop/mono to compile with when it's time to release something... hope this help David From elmar at haneke.de Mon Sep 10 05:08:43 2007 From: elmar at haneke.de (Elmar Haneke) Date: Mon, 10 Sep 2007 11:08:43 +0200 Subject: [Gtk-sharp-list] CellRendererCombo / Dropdown-Width Message-ID: <46E5099B.3020509@haneke.de> Hi, how can I enforce an CellRendererCombo to draw the dropdown list at an width sufficient to completely show all items. Currently I do have the ugly situation that there is an horizontal scrollbar added which makes the combo unusable. The space effectively available for listitems is only the colum-with reduced by the width of the buton to open dropdown even more reduced by the width of the (required) vertical scrollbar). Elmar From eskil.bylund at gmail.com Mon Sep 10 05:44:08 2007 From: eskil.bylund at gmail.com (Eskil Bylund) Date: Mon, 10 Sep 2007 11:44:08 +0200 Subject: [Gtk-sharp-list] Mono-cairo and Gtk# question regarding expose event In-Reply-To: <747c34400709051045w355c151foe42bd71894793280@mail.gmail.com> References: <747c34400709051045w355c151foe42bd71894793280@mail.gmail.com> Message-ID: When calling g_signal_connect the handler will be called before the default handler, i.e. the custom drawing happens before all the other widgets are drawn. The opposite is done by gtk-sharp when connecting to an event. The order can be changed by using the GLib.ConnectBeforeAttribute. [GLib.ConnectBefore] public void Expose(object o, Gtk.ExposeEventArgs args) {...} The other (recommended) way is to subclass the object and override the virtual method for the default handler. protected override bool OnExposeEvent(Gdk.EventExpose evnt) { // Custom drawing before and/or after the default handler. // The default handler can also be ignored completely. return base.OnExposeEvent(evnt); } Eskil From mschanzenbach at gmail.com Mon Sep 10 08:47:15 2007 From: mschanzenbach at gmail.com (Martin Schanzenbach) Date: Mon, 10 Sep 2007 14:47:15 +0200 Subject: [Gtk-sharp-list] Mono-cairo and Gtk# question regarding expose event In-Reply-To: References: <747c34400709051045w355c151foe42bd71894793280@mail.gmail.com> Message-ID: <1189428435.9791.1.camel@Nova> Am Montag, den 10.09.2007, 11:44 +0200 schrieb Eskil Bylund: > When calling g_signal_connect the handler will be called before the > default handler, i.e. the custom drawing happens before all the other > widgets are drawn. The opposite is done by gtk-sharp when connecting > to an event. The order can be changed by using the > GLib.ConnectBeforeAttribute. > > [GLib.ConnectBefore] > public void Expose(object o, Gtk.ExposeEventArgs args) > {...} > > The other (recommended) way is to subclass the object and override the > virtual method for the default handler. > > protected override bool OnExposeEvent(Gdk.EventExpose evnt) > { > // Custom drawing before and/or after the default handler. > // The default handler can also be ignored completely. > return base.OnExposeEvent(evnt); > } > > Eskil Thank you very much that did it. Martin Schanzenbach From agonza at gmail.com Mon Sep 10 11:29:22 2007 From: agonza at gmail.com (Adrian Gonzalez Alonso) Date: Mon, 10 Sep 2007 12:29:22 -0300 Subject: [Gtk-sharp-list] Change Widget Background color Message-ID: Just to give you an overview, I have a splash/login window with a fixed container and two widgets on it. An image widget that covers the whole window (logo and some nice gradients) and an entry widget over it to enter the user and then password (as some linux distribution does) The problem is that the entry widget has some white background that does not fit very well with the image (which is green). If there anyway to make it transparent or to manually set the color? I've tried : entry1.ModifyBg( Gtk.StateType.Normal, new Gdk.Color( 0xff, 0, 0 ); which should set the background to red, this did not happen. Thanks in advance, Adrian mono: 1.2.5 From bratsche at gnome.org Wed Sep 12 13:02:41 2007 From: bratsche at gnome.org (Cody Russell) Date: Wed, 12 Sep 2007 12:02:41 -0500 Subject: [Gtk-sharp-list] Change Widget Background color In-Reply-To: References: Message-ID: <1189616561.7369.3.camel@scherzo> An embedded and charset-unspecified text was scrubbed... Name: not available Url: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20070912/172e1b57/attachment.pl From djsiegel at gmail.com Fri Sep 14 12:04:27 2007 From: djsiegel at gmail.com (David Siegel) Date: Fri, 14 Sep 2007 12:04:27 -0400 Subject: [Gtk-sharp-list] GLib.List blows up upon iteration Message-ID: <4d7ffd60709140904o58b3f89ck7ea3aef65f8eb2df@mail.gmail.com> My mono application blows up "at (wrapper managed-to-native) GLib.Object.gtksharp_is_object (intptr) <0x0000e>" when I try to iterate over Gtk.RecentManager.Default.Items. http://monoport.com/4643 Is there a special incantation for iterating over GLib.List in managed code? I am trying to examine the Gtk.RecentInfo objects in Gtk.RecentManager.Default.Items. David -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20070914/54e875a1/attachment.html From jopsen at gmail.com Fri Sep 21 10:10:40 2007 From: jopsen at gmail.com (Jonas Finnemann Jensen) Date: Fri, 21 Sep 2007 16:10:40 +0200 Subject: [Gtk-sharp-list] Components using SynchronizationContext/AsyncOperationManager in GTK# ? Message-ID: Hi, I'm developing a small open source application in C#, it's suppose to run on both Windows, Linux og OS X. Using Windows.Forms, Gtk# and Cocoa# respectively. To make this easier I'm writing a .dll library to contain 99% of the program logic. Also enabling other projects to reuse some of the code... Now, I want to download a lot of things asynchronously in this library, and since both Windows.Forms and Gtk# isn't thread safe (don't know about Cocoa#) I have to make sure that my file downloaded event is executed on the main thread... I've seen people do this with BackgroundWorker or SynchronizationContext/AsyncOperationsManager, an article here: http://www.julmar.com/blog/mark/PermaLink,guid,78805871-cb7b-4ea4-9be8-a8a1d61a15d8.aspx But how can I make any of these work under Gtk#, I don't want to handle the thread invocation in my GUI frontends with Windows.Forms.Form.BeginInvoke(), Gtk.Application.Invoke() and whatever is used in Cocoa#... This wouldn't be nice to other thirdparty developers who might want to reuse some of my code either... So how can I host a ComponentModel.IComponent correctly i a Gtk# application? if possible? Is there anyother solution I've missed? The only reasonable solution I've seen is to takeover the main loop, but that's just a plain ugly hack :) Hope somebody is able to help me, if it this is impossible it's never going to be easy to write cross platform applications with mono... -- Regards Jonas Finnemann Jensen. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20070921/5ac7accc/attachment.html From elmar at haneke.de Mon Sep 24 11:06:53 2007 From: elmar at haneke.de (Elmar Haneke) Date: Mon, 24 Sep 2007 17:06:53 +0200 Subject: [Gtk-sharp-list] Reading Data beeing edited Message-ID: <46F7D28D.3000104@haneke.de> How can I read the data currently beeing edited within an CellRendererText? Is there an Way to finish the edit-Process? Elmar From alexandre.petitjean at quidd.com Mon Sep 24 11:58:47 2007 From: alexandre.petitjean at quidd.com (Alexandre Petitjean) Date: Mon, 24 Sep 2007 17:58:47 +0200 Subject: [Gtk-sharp-list] Pixel Access Message-ID: <1190649527.4321.32.camel@LQuidd.Quidd> Hello list, I want to create an image from numeric values. I have a 2d array with values between 0 and 65535. >From those values I want to create an 16bits grayscale pictures. So I start with that line : Gdk.Image gdi = new Gdk.Image(Gdk.ImageType.Normal, Gdk.Visual.GetBestWithType(Gdk.VisualType.Grayscale), 512, 512); but when I execute it returns the following error : (gtktif:16081): Gdk-CRITICAL **: gdk_visual_get_screen: assertion `GDK_IS_VISUAL (visual)' failed (gtktif:16081): Gdk-CRITICAL **: _gdk_image_new_for_depth: assertion `visual || depth != -1' failed How can I do ? -- Regards, Alexandre. From alexandre.petitjean at quidd.com Mon Sep 24 11:36:19 2007 From: alexandre.petitjean at quidd.com (Alexandre Petitjean) Date: Mon, 24 Sep 2007 17:36:19 +0200 Subject: [Gtk-sharp-list] Pixel Access Message-ID: <1190648179.4321.31.camel@LQuidd.Quidd> Hello list, I want to create an image from numeric values. I have a 2d array with values between 0 and 65535. >From those values I want to create an 16bits grayscale pictures. So I start with that line : Gdk.Image gdi = new Gdk.Image(Gdk.ImageType.Normal, Gdk.Visual.GetBestWithType(Gdk.VisualType.Grayscale), 512, 512); but when I execute it returns the following error : (gtktif:16081): Gdk-CRITICAL **: gdk_visual_get_screen: assertion `GDK_IS_VISUAL (visual)' failed (gtktif:16081): Gdk-CRITICAL **: _gdk_image_new_for_depth: assertion `visual || depth != -1' failed How can I do ? -- Regards, Alexandre. From elmar at haneke.de Mon Sep 24 12:33:56 2007 From: elmar at haneke.de (Elmar Haneke) Date: Mon, 24 Sep 2007 18:33:56 +0200 Subject: [Gtk-sharp-list] CellRendererCombo / appear-as-list Message-ID: <46F7E6F4.8080506@haneke.de> How can I enforce an CellRendererCombo to appear as menue or as list - independently from what's specified in current theme? Elmar From latexer at gentoo.org Mon Sep 24 12:16:28 2007 From: latexer at gentoo.org (Peter Johanson) Date: Mon, 24 Sep 2007 09:16:28 -0700 Subject: [Gtk-sharp-list] Reading Data beeing edited In-Reply-To: <46F7D28D.3000104@haneke.de> References: <46F7D28D.3000104@haneke.de> Message-ID: <20070924161628.GO16707@butchest.cubesearch.com> On Mon, Sep 24, 2007 at 05:06:53PM +0200, Elmar Haneke wrote: > How can I read the data currently beeing edited within an CellRendererText? The best way is to hook up to Gtk.CellRenderer.EditingStarted event, and then do something like: void OnEditingStarted (object o, EditingStartedArgs e) { Entry e = e.Editable as Entry; if (e == null) { return; } e.Changed += new EventHandler (OnEditableChanged); } > > Is there an Way to finish the edit-Process? You can do either Gtk.CellRenderer.CancelEditing or Gtk.CellRenderer.StopEditing (bool canceled). Check out the docs here: http://go-mono.com/docs/index.aspx?link=T%3aGtk.CellRenderer -pete From martinf at mfconsulting.com Tue Sep 25 11:30:29 2007 From: martinf at mfconsulting.com (Francisco T. Martinez) Date: Tue, 25 Sep 2007 10:30:29 -0500 Subject: [Gtk-sharp-list] [Mono-winforms-list] XIM support In-Reply-To: <00a701c7ff5c$ef151980$cd3f4c80$@com> References: <00a701c7ff5c$ef151980$cd3f4c80$@com> Message-ID: <46F92995.8040101@mfconsulting.com> John Hatton wrote: > > Hi, > > In the next 4 months, we?ll reach a point where our SWF/MWF app > , which runs on the OLPC, will have to be > re-written in GTK or QT for lack of custom-keyboard ability ( > https://bugzilla.novell.com/show_bug.cgi?id=320988 ). Being a Windows > shop, we don?t have the first clue how to go about adding this ourselves. > > Can anyone give me a feel for whether XIM support might be in the > near-term cards? > > Have you looked at Gtk#? If you are a Windows shop (using Visual Studio, etc.), I would try to use the Gtk# Installer for .NET Framework SDK, so that you can start using some of the C#/Gtk# Application project templates that get installed and are accessible through Visual Studio "New Project" in the File menu. This may give you a way to begin playing with Gtk# development right from the comfort of your Windows development environment. The resulting application can later be rapidly used in *NIX OS that sport modern versions of GTK/GNOME. MonoDoc documentation has quite a bit of information on Gtk# and consulting the Gtk# mailing list along with participation on the #mono IRC channel would get you started. These links may be useful: http://developer.novell.com/wiki/index.php/Special:Downloads/gtks-inst4win/Win32~~~Installer/v2.8.3/ http://developer.novell.com/wiki/index.php/Special:Downloads/gtks-inst4win/Gtk-Sharp~~~Help~~~for~~~VS~~~.NET~~~2003/v1.0.0.0.0/ Best regards, Paco From serickson at isillc.com Thu Sep 20 13:56:28 2007 From: serickson at isillc.com (Stephen Erickson) Date: Thu, 20 Sep 2007 12:56:28 -0500 Subject: [Gtk-sharp-list] [Newbie] TreeViewColumn.AddAttribute question Message-ID: <1190310988.27226.5.camel@station-13.ad.isillc.com> I've got a TreeViewColumn, call it tvc, along with its renderer, call it r When I do tvc.AddAttribute(r,string,int), the documentation is most unhelpful with what the string parameter named attribute does and what valid values for it exist. All of the example I find only have the hard-coded string literal "text" So my questions are: 1. What does that parameter do? 2. What are the other valid values for it? Thanks! From m.j.hutchinson at gmail.com Thu Sep 27 08:49:01 2007 From: m.j.hutchinson at gmail.com (Michael Hutchinson) Date: Thu, 27 Sep 2007 13:49:01 +0100 Subject: [Gtk-sharp-list] [Newbie] TreeViewColumn.AddAttribute question In-Reply-To: <1190310988.27226.5.camel@station-13.ad.isillc.com> References: <1190310988.27226.5.camel@station-13.ad.isillc.com> Message-ID: On 9/20/07, Stephen Erickson wrote: > I've got a TreeViewColumn, call it tvc, along with its renderer, call it > r > > When I do tvc.AddAttribute(r,string,int), the > documentation is most unhelpful with what the string parameter named > attribute does and what valid values for it exist. > > All of the example I find only have the hard-coded string literal "text" > > So my questions are: > > 1. What does that parameter do? > 2. What are the other valid values for it? Each attribute-name->store-column-no binding sets a GTK property on the cell renderer from a column in the store (which doesn't have to correspond to a column in the view, BTW). The valid names depend on the cell renderer. You can look the names up in the GTK+ docs... or if you look at cell renderer properties in MonoDoc, you will find that these properties have GLib.PropertyAttribute applied, e.g. CellRenderer.Sensitive has [GLib.Property("sensitive")], so you could bind that property with the "sensitive" name, etc. -- Michael Hutchinson http://mjhutchinson.com