Re: Setting styles in Gtk 3.0

2013-10-10 Thread Dov Grobgeld
Actually I wanted to use this for changing the rendering of a specific widget based on certain events, and not for theming. E.g. if you want to create a quick and dirty simulation of a traffic light without using images or cairo. You can have e.g. three EventBoxes for the three traffic lights and t

Re: Setting styles in Gtk 3.0

2013-10-10 Thread Denis Linvinus
2013/10/10 Paul Davis > just be sure that benjamin doesn't take away any of that, please :) > i'm not sure what you mean, all i want to say is that i reply to you personally, while thinking that it was for all. Any way, sorry for my English, i hope Dov, have understood my mind. __

Re: Setting styles in Gtk 3.0

2013-10-10 Thread Paul Davis
just be sure that benjamin doesn't take away any of that, please :) ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list

Re: Setting styles in Gtk 3.0

2013-10-10 Thread Denis Linvinus
2013/10/10 Dov Grobgeld > ​Here's what I ended up doing, with the help of Denis Linvinus: > > ​ > #!/usr/bin/python > > from gi.repository import Gtk > > mw = Gtk.Window() > > prov = Gtk.CssProvider() > > Gtk.StyleContext.add_provider_for_screen(mw.get_screen(),prov,Gtk.STYLE_PROVIDER_PRIORITY_US

Re: Setting styles in Gtk 3.0

2013-10-10 Thread Dov Grobgeld
​Here's what I ended up doing, with the help of Denis Linvinus: ​ #!/usr/bin/python from gi.repository import Gtk mw = Gtk.Window() prov = Gtk.CssProvider() Gtk.StyleContext.add_provider_for_screen(mw.get_screen(),prov,Gtk.STYLE_PROVIDER_PRIORITY_USER) prov.load_from_data(""" * { font: Seri

Re: Second Question: Gtk Cross Platform Bug

2013-10-10 Thread Jasper St. Pierre
These typedefs make no such guarantee. `gint` is just a typedef to `int`. On Thu, Oct 10, 2013 at 9:42 AM, Daniel Espinosa wrote: > Without running the code just a few suggestions: > > Use GLib's functions every time you can and more important use GLib's > types: use gint instead int, for examp

Re: Second Question: Gtk Cross Platform Bug

2013-10-10 Thread Daniel Espinosa
Without running the code just a few suggestions: Use GLib's functions every time you can and more important use GLib's types: use gint instead int, for example, that guaranty to be same size cross platform. El oct 10, 2013 8:07 a.m., "Fan Chun-wei" escribió: > Hi Thomas, > > I was trying to buil

Re: Setting styles in Gtk 3.0

2013-10-10 Thread Paul Davis
On Thu, Oct 10, 2013 at 4:05 AM, Dov Grobgeld wrote: > Hi, > > Has something changed with the setting of styles in Gtk3, or is there some > environment setting that inhibits the setting of the style? Consider the > following python program: > > #!/usr/bin/python > > from gi.repository import Gtk >

Re: Call external programs and keep showing its outputs

2013-10-10 Thread salsaman
After step 3, you may need to do: g_io_channel_set_encoding (iochan, NULL, NULL); g_io_channel_set_buffer_size(iochan, 0); g_io_channel_set_flags(iochan, G_IO_FLAG_NONBLOCK, &gerr); Salsaman. http://lives.sourceforge.net https://www.ohloh.net/accounts/salsaman On Thu, Oct 10, 2

Re: Second Question: Gtk Cross Platform Bug

2013-10-10 Thread Fan Chun-wei
Hi Thomas, I was trying to build your code with Visual Studio (which I believe is GTK+2.x based), but it does seem to me that the code you have posted is not complete-there were a bunch of errors on MA* items. Can you try to re-post your code-can't tell about the Visual Studio part without thi

Re: Call external programs and keep showing its outputs

2013-10-10 Thread Kang Hu
see https://developer.gnome.org/glib/2.38/glib-Spawning-Processes.html#g-spawn-async-with-pipes 1. call g_spawn_async_with_pipes and get the stdin, stdout, stderr fds. 2. call g_child_watch on the pid returned in step 1. 3. create an io channel for each fd ( see g_io_channel_unix_new) 4. add each i

Setting styles in Gtk 3.0

2013-10-10 Thread Dov Grobgeld
Hi, Has something changed with the setting of styles in Gtk3, or is there some environment setting that inhibits the setting of the style? Consider the following python program: #!/usr/bin/python from gi.repository import Gtk Gtk.rc_parse_string(""" style "normal" { font_name ="serif 30" }

Re: Call external programs and keep showing its outputs

2013-10-10 Thread onetmt
Il 10/10/2013 06:55, Woody Wu ha scritto: > Hi, > > I am about to write a test runner with GTK+. It basically can list a lot > of external test programs (non-GTK+ pure Linux apps) in a treeview and > let user select one of them to run. While an external program is > running, I want to get all its