From sam at zoy.org Thu Nov 1 14:05:35 2007 From: sam at zoy.org (Sam Hocevar) Date: Thu, 1 Nov 2007 19:05:35 +0100 Subject: [Gtk-sharp-list] best strategy for bitmapped windows? Message-ID: <20071101180535.GI12123@zoy.org> I am trying to write a GTK# application that has a bitmapped window, a bit like XMMS, with resizing support, round corners etc. My strategy is to have a Gtk.Table as the window's top level widget, with each cell containing a Gtk.DrawingArea except the cells that will host standard GTK widgets. I then override each DrawingArea's OnExposeEvent method this way: protected override bool OnExposeEvent(Gdk.EventExpose args) { Gdk.Window win = args.Window; int w = Allocation.Width; int h = Allocation.Height; Gdk.Pixbuf tmp = pb.ScaleSimple(w, h, Gdk.InterpType.Hyper); win.DrawPixbuf(Style.BaseGC(StateType.Normal), tmp, 0, 0, 0, 0, w, h, Gdk.RgbDither.Normal, 0, 0); return true; } However the resulting effect is ugly flicker when resizing the window. What strategy would you suggest to tell GTK not to refresh anything until all the OnExposeEvent signals have been processed? Or maybe I should do something totally different? If anyone is interested, my code can be found here: http://people.zoy.org/~sam/mono/foo3000.tar.gz Regards, -- Sam. From f at rtfs.org Sun Nov 4 12:04:27 2007 From: f at rtfs.org (Fabian Sturm) Date: Sun, 04 Nov 2007 18:04:27 +0100 Subject: [Gtk-sharp-list] ANN: C# language binding for libabiword Message-ID: <1194195867.6570.10.camel@krypton> Hello! I just wanted to tell you that I did a language binding for abiword / abiwidget for C#. With this you can easily embed a abiword editing widget in your C# application. It's based on the SVN revision 22273 of abiword which must be compiled with --enable-libabiword. Beware that the language binding is not final and I was told that the api of libabiword will probably also change in the near future. You can get the binding with this command: "hg clone http://www.rtfs.org/hg/abiword-sharp/" This binding also exposes a bug in the gapi2 parser which for now makes it necessary to patch the abiword source a little bit. I would be thankful for any comment or hint about this binding. Sincerely, Fabian From uwog at uwog.net Sun Nov 4 18:20:06 2007 From: uwog at uwog.net (J.M. Maurer) Date: Mon, 05 Nov 2007 00:20:06 +0100 Subject: [Gtk-sharp-list] ANN: C# language binding for libabiword In-Reply-To: <1194195867.6570.10.camel@krypton> References: <1194195867.6570.10.camel@krypton> Message-ID: <1194218406.16329.3.camel@sigma.lan.uwog.net> On Sun, 2007-11-04 at 18:04 +0100, Fabian Sturm wrote: > > Hello! > > I just wanted to tell you that I did a language binding for abiword / > abiwidget for C#. With this you can easily embed a abiword editing > widget in your C# application. Very cool! > It's based on the SVN revision 22273 of abiword which must be compiled > with --enable-libabiword. > > Beware that the language binding is not final and I was told that the > api of libabiword will probably also change in the near future. I hope to keep the API stable at least during and entire stable series, starting with 2.6. Until 2.6 is really out, some minor changes might indeed happen. > You can get the binding with this command: > "hg clone http://www.rtfs.org/hg/abiword-sharp/" > > This binding also exposes a bug in the gapi2 parser which for now > makes > it necessary to patch the abiword source a little bit. > > I would be thankful for any comment or hint about this binding. Since I don't have any C# experience, I can't comment on the actual code, sorry :) Btw, what license will you release your work under? It would be nice if we could eventually integrate this into our repository, so users of libabiword have one place to go to to get bindings for C, C++, C# and Python. Thanks for your interest in our lil' widget! Marc From draekz at gmail.com Wed Nov 7 17:50:48 2007 From: draekz at gmail.com (Draek) Date: Wed, 07 Nov 2007 15:50:48 -0700 Subject: [Gtk-sharp-list] TreeModelFilter Issues, priv->stamp == stamp failed? In-Reply-To: <8ed5cbac0710180957w3c8c9887j75d767bd0fe398ee@mail.gmail.com> References: <8ed5cbac0710180957w3c8c9887j75d767bd0fe398ee@mail.gmail.com> Message-ID: <1194475848.20283.6.camel@home-desktop> Hello All, I'm having some real issues with using TreeModelFilter in a TreeView. Everything works wonderfully when I do not use the filter, so my TreeView in itself is working exactly the way that I want. As soon as I add a filter, everything goes out the crapper. I've even accounted for the fact that iters from the Filter Store need to be converted to the iters in the regular store, yet it still doesnt work and I am plagued with cryptic errors from Gtk: (TreeViewTest:21070): Gtk-CRITICAL **: gtk_tree_model_filter_convert_iter_to_child_iter: assertion `filter_iter->stamp == filter->priv->stamp' failed (TreeViewTest:21070): Gtk-CRITICAL **: gtk_tree_model_filter_iter_has_child: assertion `filter->priv->stamp == iter->stamp' failed Does anyone know what these errors even mean? I have created a small test application to work with my custom TreeView control and isolate it from my application, I get the same results so if someone is really good with TreeView and can help, I do have a small sized application that I can send to show what my problem is. Thanks for your time, Phil From talton at gmail.com Mon Nov 12 21:53:26 2007 From: talton at gmail.com (James Talton) Date: Mon, 12 Nov 2007 21:53:26 -0500 Subject: [Gtk-sharp-list] SpinButton Message-ID: I am wanting a SpinButton that allows high precision numbers to be entered by keyboard but only shows the number of decimal digits needed for the precision. If it is a whole number, I don't want to show any decimal digits. The SpinButton has a Digits property but if it is set to 0, you can't enter any decimal digits from the keyboard. I also found that the SpinButton sometimes rounds the SpinButton.Value when displaying it. I wrote a inherited SpinButton that seems to solve 99% of the issues, but I am not wild about the solution. Is there something I am missing? Anyone else have any suggestions? Thanks, James -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20071112/a606e165/attachment.html From garrydanger at gmail.com Wed Nov 14 02:23:13 2007 From: garrydanger at gmail.com (Gareth Stokes) Date: Wed, 14 Nov 2007 18:23:13 +1100 Subject: [Gtk-sharp-list] [OS X] Error while making gtk-sharp-2.8.4 Message-ID: <5243dd730711132323m73a7a8a0p61ec3bcd98db3b9f@mail.gmail.com> Im getting the following error while making the gtk# 2.8.4 using the the 1.2.5.1 build of the mono framework. I downloaded both from the mono website. The configure script runs fine and i have a "yes" to all the dependencies that are displayed at the end. Making all in sources make[2]: Nothing to be done for `all'. Making all in generator make[2]: Nothing to be done for `all'. Making all in parser make[2]: Nothing to be done for `all'. Making all in glib Making all in glue if /bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../..//Library/Frameworks/Mono.Framework/Versions/Current/lib/pkgconfig/. -I../..//Library/Frameworks/Mono.Framework/Versions/Current/lib/pkgconfig -I../..//Library/Frameworks/Mono.Framework/Versions/Current/lib/pkgconfig/./glib -DGTK_SHARP_2_6 -DGTK_SHARP_2_8 -I../.. -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -MT error.lo -MD -MP -MF ".deps/error.Tpo" -c -o error.lo error.c; \ then mv -f ".deps/error.Tpo" ".deps/error.Plo"; else rm -f ".deps/error.Tpo"; exit 1; fi gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../..//Library/Frameworks/Mono.Framework/Versions/Current/lib/pkgconfig/. -I../..//Library/Frameworks/Mono.Framework/Versions/Current/lib/pkgconfig -I../..//Library/Frameworks/Mono.Framework/Versions/Current/lib/pkgconfig/./glib -DGTK_SHARP_2_6 -DGTK_SHARP_2_8 -I../.. -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -MT error.lo -MD -MP -MF .deps/error.Tpo -c error.c -fno-common -DPIC -o .libs/error.o error.c:22:18: error: glib.h: No such file or directory error.c:25: error: parse error before '*' token error.c:25: error: parse error before '*' token error.c:25: warning: type defaults to 'int' in declaration of 'gtksharp_error_get_message' error.c:25: warning: function declaration isn't a prototype error.c:25: warning: data definition has no type or storage class error.c:28: error: parse error before '*' token error.c:29: error: parse error before '*' token error.c:30: warning: return type defaults to 'int' error.c:30: warning: function declaration isn't a prototype error.c: In function 'gtksharp_error_get_message': error.c:31: error: 'err' undeclared (first use in this function) error.c:31: error: (Each undeclared identifier is reported only once error.c:31: error: for each function it appears in.) error.c:32: warning: control reaches end of non-void function make[3]: *** [error.lo] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 any help would be greatly appreciated! From jon at jcosby.com Wed Nov 14 08:43:40 2007 From: jon at jcosby.com (Jon Cosby) Date: Wed, 14 Nov 2007 05:43:40 -0800 Subject: [Gtk-sharp-list] Flash in WebControl Message-ID: <473AFB8C.9000300@jcosby.com> I'm trying to view Flash content in a Gecko WebControl. The ComPath is set to the Firefox libs directory (/usr/lib/firefox) and Firefox does play Flash for me. The player just isn't detected in the WebControl. Is there anything else that can be done to point it to the player? Jon Cosby From vaughan2 at seas.upenn.edu Mon Nov 19 23:22:08 2007 From: vaughan2 at seas.upenn.edu (Jeffrey Vaughan) Date: Mon, 19 Nov 2007 23:22:08 -0500 Subject: [Gtk-sharp-list] Compilation Failure with Gtk# 2.10.2 Message-ID: <474260F0.6070706@seas.upenn.edu> Hi, I'm trying to compile Gtk# 2.10.2 under OS X 10.4. However, the make process dies when ld can't find several functions (e.g. _g_free). I've copied the output of make below. Can anyone help me understand what's going on? Thanks! Jeff (PS. Please copy any reply to me off list) jeff at echo gtk-sharp-2.10.2 $ uname -a Darwin echo.local 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc jeff at echo gtk-sharp-2.10.2 $ echo $PKG_CONFIG_PATH :/usr/local/gtk-osx/lib/pkgconfig:/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig jeff at echo gtk-sharp-2.10.2 $ mono --version Mono JIT compiler version 1.2.5.1 (tarball) Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com TLS: normal GC: Included Boehm (with typed GC) SIGSEGV: normal Architecture: ppc Disabled: none jeff at echo gtk-sharp-2.10.2 $ make make all-recursive Making all in sources make[2]: Nothing to be done for `all'. Making all in generator make[2]: Nothing to be done for `all'. Making all in parser make[2]: Nothing to be done for `all'. Making all in glib Making all in glue /bin/sh ../../libtool --tag=CC --mode=link gcc -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -o libglibsharpglue-2.la -rpath /usr/local/gtk-sharp-2.10.2/lib -module -avoid-version -no-undefined error.lo list.lo object.lo slist.lo type.lo unichar.lo value.lo valuearray.lo thread.lo /usr/local/gtk-osx/lib gcc -o .libs/libglibsharpglue-2.so -bundle .libs/error.o .libs/list.o .libs/object.o .libs/slist.o .libs/type.o .libs/unichar.o .libs/value.o .libs/valuearray.o .libs/thread.o /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols: _g_free _g_malloc0 _g_object_newv _g_cclosure_new _g_signal_lookup _g_signal_override_class_closure _g_type_check_instance_is_a _g_type_class_peek _g_type_class_ref _g_type_name _g_type_query _g_type_register_static _g_unichar_to_utf8 _g_utf16_to_ucs4 _g_object_class_find_property _g_type_check_value_holds _g_type_from_name _g_value_get_boxed _g_value_init _g_value_set_boxed _g_threads_got_initialized collect2: ld returned 1 exit status make[3]: *** [libglibsharpglue-2.la] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 From jon at jcosby.com Sun Nov 25 15:13:51 2007 From: jon at jcosby.com (Jon Cosby) Date: Sun, 25 Nov 2007 12:13:51 -0800 Subject: [Gtk-sharp-list] Entry position in a Table Message-ID: <4749D77F.1030704@jcosby.com> There seem to be three ways to align text in an Entry (Alignment, Position, Xalign) but nothing that aligns the widget itself. I have trackEntry = new Entry(); trackEntry.WidthRequest = 90; trackEntry.HeightRequest = 30; trackEntry.Xalign = 0; table1.Attach(trackEntry, 1, 2, 4, 5, AttachOptions.Shrink, AttachOptions.Shrink, 1, 1); trackEntry.Show(); but the Entry widget is center-aligned. It only seems to effect the cursor/text. I've also looked at Position but that doesn't make any difference. Any suggestions? Jon Cosby From andy at brdstudio.net Mon Nov 26 09:17:44 2007 From: andy at brdstudio.net (Andrew York) Date: Mon, 26 Nov 2007 09:17:44 -0500 Subject: [Gtk-sharp-list] Entry position in a Table In-Reply-To: <4749D77F.1030704@jcosby.com> References: <4749D77F.1030704@jcosby.com> Message-ID: <474AD588.6040806@brdstudio.net> I believe this should be accomplished in the parent container, using the Gtk.Alignment widget in the table cell and then putting the textbox in the Gtk.Alignment widget. I hope this helps Andy Jon Cosby wrote: > There seem to be three ways to align text in an Entry (Alignment, > Position, Xalign) but nothing that aligns the widget itself. I have > > trackEntry = new Entry(); > trackEntry.WidthRequest = 90; > trackEntry.HeightRequest = 30; > trackEntry.Xalign = 0; > table1.Attach(trackEntry, 1, 2, 4, 5, AttachOptions.Shrink, > AttachOptions.Shrink, 1, 1); > trackEntry.Show(); > > but the Entry widget is center-aligned. It only seems to effect the > cursor/text. I've also looked at Position but that doesn't make any > difference. Any suggestions? > > > Jon Cosby > _______________________________________________ > Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list > From jon at jcosby.com Mon Nov 26 15:25:28 2007 From: jon at jcosby.com (Jon Cosby) Date: Mon, 26 Nov 2007 12:25:28 -0800 Subject: [Gtk-sharp-list] Entry position in a Table In-Reply-To: <474AD588.6040806@brdstudio.net> References: <4749D77F.1030704@jcosby.com> <474AD588.6040806@brdstudio.net> Message-ID: <474B2BB8.9080901@jcosby.com> Not exactly what comes to mind when I think of "widget", but it works. Thanks. Jon Andrew York wrote: > I believe this should be accomplished in the parent container, using the > Gtk.Alignment widget in the table cell and then putting the textbox in > the Gtk.Alignment widget. > > I hope this helps > Andy > > Jon Cosby wrote: >> There seem to be three ways to align text in an Entry (Alignment, >> Position, Xalign) but nothing that aligns the widget itself. I have >> >> trackEntry = new Entry(); >> trackEntry.WidthRequest = 90; >> trackEntry.HeightRequest = 30; >> trackEntry.Xalign = 0; >> table1.Attach(trackEntry, 1, 2, 4, 5, AttachOptions.Shrink, >> AttachOptions.Shrink, 1, 1); >> trackEntry.Show(); >> >> but the Entry widget is center-aligned. It only seems to effect the >> cursor/text. I've also looked at Position but that doesn't make any >> difference. Any suggestions? >> >> >> Jon Cosby >> _______________________________________________ >> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list >> > > > > From ceronman at gmail.com Mon Nov 26 17:04:53 2007 From: ceronman at gmail.com (=?ISO-8859-1?Q?Manuel_Alejandro_Cer=F3n_Estrada?=) Date: Mon, 26 Nov 2007 17:04:53 -0500 Subject: [Gtk-sharp-list] Using a Layout inside a ScrolledWindow Message-ID: <796874fc0711261404r623bebd2y1c43a547ed70edc8@mail.gmail.com> Hello. I have a big Gtk.Layout and I want to put it inside a ScrolledWindow in order to use scroll bars. It's supposed that Gtk.Layout has native scrolling capabilities, so I can use the Add method instead of AddWithViewport. For some reason this is not working right. When I use Add, my window get expanded to the size of the Layout, which is the opposite of what I want. Here is a sample code: public class MainClass { public static void Main () { Application.Init (); Window win = new Window ("Layout test"); ScrolledWindow scroll = new ScrolledWindow (null, null); scroll.SetPolicy(PolicyType.Always, PolicyType.Always); win.Add (scroll); Layout layout = new Layout (null, null); layout.SetSizeRequest(1000, 1000); scroll.Add(layout); win.ShowAll(); Application.Run (); } } I want my window to remain small while the scrollbars can be used to navigate thought the layout. Thanks in advance. Manuel Cer?n. From ceronman at gmail.com Mon Nov 26 19:48:06 2007 From: ceronman at gmail.com (=?ISO-8859-1?Q?Manuel_Alejandro_Cer=F3n_Estrada?=) Date: Mon, 26 Nov 2007 19:48:06 -0500 Subject: [Gtk-sharp-list] Using a Layout inside a ScrolledWindow In-Reply-To: <796874fc0711261404r623bebd2y1c43a547ed70edc8@mail.gmail.com> References: <796874fc0711261404r623bebd2y1c43a547ed70edc8@mail.gmail.com> Message-ID: <796874fc0711261648u6756266djb5c5a4914d4d5447@mail.gmail.com> I answer to my self. The problem was that I was using SetSizeRequest Method and I should use SetSize. 2007/11/26, Manuel Alejandro Cer?n Estrada : > Hello. > > I have a big Gtk.Layout and I want to put it inside a ScrolledWindow > in order to use scroll bars. It's supposed that Gtk.Layout has native > scrolling capabilities, so I can use the Add method instead of > AddWithViewport. For some reason this is not working right. When I use > Add, my window get expanded to the size of the Layout, which is the > opposite of what I want. Here is a sample code: > > public class MainClass { > public static void Main () { > Application.Init (); > > Window win = new Window ("Layout test"); > ScrolledWindow scroll = new ScrolledWindow (null, null); > scroll.SetPolicy(PolicyType.Always, PolicyType.Always); > win.Add (scroll); > > Layout layout = new Layout (null, null); > layout.SetSizeRequest(1000, 1000); > scroll.Add(layout); > > win.ShowAll(); > Application.Run (); > } > } > > I want my window to remain small while the scrollbars can be used to > navigate thought the layout. > > Thanks in advance. > > Manuel Cer?n. > -- ? Manuel Alejandro Cer?n Estrada ? ceronman at gmail.com ? http://wiki.freaks-unidos.net/weblogs/ceronman