[Gtk-sharp-list] portability issues
Fri, 22 Oct 2004 15:00:32 +0100
After a lot of discussion on #mono @ irc.gnome.org and a bunch of google
searchs, I got this message on mono-list:
Of course the problem is the same - GTK isn't thread-safe and we're
trying to deploy a gui-multithreaded app, but what this guy hadn't
discovered was Gdk.Threads. With a Gdk.Threads.Enter() before the
Gtk.Application.Init(), and Gdk.Threads.Enter() plus <GTK-update-works>
plus Gdk.Threads.Leave(), we are able to create a special place for gui
updating outside the GTK mainloop.
The compatibility issues, were discussed and it seems that Gdk is not
fully ported to Windows in gtk-2.2.x, which is the actual bundled
version with mono.
What I am trying to do, is to simply install a previous
mono-combined-installer with GTK-2.4.x and try to run the app. I'll get
the feedback to the list in a few minutes!
Btw, gtk-2.4.x is not bundled with mono anymore because of glade
backwars compatibility, since some widgets created in glade-2.6.x are
non-existant in its previous versions, p.e.: GtkToolItem, GtkToolButton,
So many thanks to paco for the patience, to tremor for the
mono-combiner-installer and francis for the workaround :)
Sex, 2004-10-22 =E0s 11:32 +0100, Paulo Pires escreveu:
> I've gathered the two scenarios into one final scenario! Check it at
> It's working great on Linux, but in Windows it's a big *shit* :(
> Windows: mcs -pkg:gtk-sharp -pkg:glade-sharp -resource:trafficman.glade
> Main.cs wndSplash.cs wndMain.cs Globals.cs
> It's quite a tiny project, but I'm stuck, and I'm really needing this
> working, so any help is very appreciated.
> Thanks in advance
> Paulo Pires
> Qui, 2004-10-14 =E0s 19:27 +0100, Paulo Pires escreveu:
> > Hi folks
> > I'm new to .NET, GTK and Glade, so perhaps it's my problem instead of
> > GTK# or Glade#.
> > I'm trying to develop an app fully-portable between Windows and Linux
> > but some problems came to me while still testing. I've taken two
> > scenarios:
> > 1 - A simple Glade# app, built on Glade without any signals, besides
> > delete_event, attached on a bunch of code who shows a Gtk.Window.
> > Well, I've compiled it on Linux and tried to run it in Windows! After
> > installing the combined package of Mono+Gtk-sharp i've runned it and
> > everything went well, except the GtkToolItem and GtkToolButton widgets
> > that weren't recognized. I'm using glade-2.6.2.
> > My 1st question is: Are these widgets supported on Windows?
> > 2 - A-not-so-simple-full-gtk#-app, with two windows: wndSplash and
> > wndMain.
> > wndSplash has a Progressbar, which is updated using a Thread that once
> > completed destroys the current Window and creates the wndMain.
> > I had a problem! My wndSplash would die when calling the wndMain, with
> > this error: Xlib: async reply 0x00blablabla.
> > After searching about it, I've realized about GTK mainloop and found th=
> > Gdk.Threads.Enter() .Leave() .Init(), etc.
> > This solved my problem, but now, sometimes when I run the resulting exe
> > on Linux, it shows me the wndSplash with all the widgets but the
> > ProgressBar is not updated.
> > All the code is running fine, since I have my own debug on each Thread
> > and it's debuggin right. So I close my app, and try to run it again!
> > SURPRISE! It works very well! The ProgressBar is updated and all the
> > widgets works ...=20
> > My 2nd question is: What the hell is going on?
> > On Windows, I've compiled* it tried to run it and it works, but my
> > Threads don't debug :(. It creates the wndSplash and then wndMain, but
> > all of them without widgets and the program does not respond.
> > My 3rd question: Any clue about this?
> > *compiled: mcs -pkg:gtk-sharp wndSplash.cs wndMain.cs
> > If you want to checkout the code just ask me thought my personal mail
> > and I'll send it to you.
> > Sorry for my bad english!
> > Thanks in advance,
> > Paulo Pires
> > _______________________________________________
> > Gtk-sharp-list maillist - Gtkemail@example.com
> > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> Gtk-sharp-list maillist - Gtkfirstname.lastname@example.org