Re: Gtk::FileChooserButton

2011-04-29 Thread Jaroslav Šmíd
I know this won't help much, but when writing new app, I wouldn't bother to use gtk2 anymore and I would use gtk3 instead. Anyway, you could always just destroy the whole dialog and create it anew so that the file won't be selected. On 04/29/2011 07:54 PM, John Emmas wrote: I've been experim

Re: GTK3 porting problem (clipboard)

2011-03-11 Thread Jaroslav Šmíd
Seems I was blind not to see gtk_target_table_from_list. And maybe I was not alone :-) J. On 03/10/2011 01:44 PM, Miroslav Rajcic wrote: I resolved the majority of the the issues when porting my program from GTK 2.x to GTK 3.x. Unfortunately I still have one issue left: when compiling the prog

Re: I Miss Using My Anjuta IDE

2011-03-11 Thread Jaroslav Šmíd
This might be caused by gkt2 -> gtk3 transition. On 03/11/2011 01:23 PM, Craig Bakalian wrote: Hi, I don't know if this is the right place to complain about this, but ever since I update to 11.04 I have not been able to use Anjuta IDE. It crashes during initialization or opening. There appear t

Re: GTK3 porting problem (clipboard)

2011-03-11 Thread Jaroslav Šmíd
Maybe you should report the bug about missing accessors so it gets fixed. On 03/11/2011 12:06 PM, Miroslav Rajcic wrote: GtkTargetEntry targets[] = { {"text/html", 0, 0}, {"text/plain", 0, 0} }; size_t num_targets = sizeof(targets) / sizeof(targets[]); This would work if I would know the cou

Re: GTK3 porting problem (clipboard)

2011-03-11 Thread Jaroslav Šmíd
And perhaps missing accessors for GtkTargetList should be reported as BUG. On 03/11/2011 08:55 AM, Miroslav Rajcic wrote: You're right, but this seems odd. In the GTK3 version of the documentation the basic structures GtkTargetEntry and GtkTargetPair are still exposed in the API, and although Gt

Re: GTK3 porting problem (clipboard)

2011-03-11 Thread Jaroslav Šmíd
GtkTargetEntry targets[] = { {"text/html", 0, 0}, {"text/plain", 0, 0} }; size_t num_targets = sizeof(targets) / sizeof(targets[]); // This IS required no matter what, or your program WILL BE broken if (sizeof(size_t) > sizeof(guint) && num_targets > (size_t)G_MAX_GUINT) { // fail here bec

Re: GTK3 porting problem (clipboard)

2011-03-10 Thread Jaroslav Šmíd
From GTK documentation: --- A GtkTargetList structure is a reference counted list of GtkTargetPair. It is used to represent the same information as a table of GtkTargetEntry, but in an efficient form. This structure should be treated as opaque. --- Important to read is "This structure should

Re: GTK3 porting problem (clipboard)

2011-03-10 Thread Jaroslav Šmíd
I don't know the answer, but this is "wrong": int nTargetCnt = g_list_length (list->list); g_list_length returns guint, not int. Although this is valid code (implicit typecast), it can cause bad things. On 03/10/2011 01:44 PM, Miroslav Rajcic wrote: I resolved the majority of the the issues w

Re: g_remove

2011-02-19 Thread Jaroslav Šmíd
Glib itself wouldn't even compile if I removed that before compilation as it wouldn't find 64bit integer type. Glib just cannot require 64bit integer type and be C89 standard compliant at the same time when C89 doesn't require existence of 64bit integer type. Ok, I won't troll anymore. On 02/

Re: g_remove

2011-02-19 Thread Jaroslav Šmíd
on x86-32 linux. On 02/19/2011 02:50 PM, David Nečas wrote: On Sat, Feb 19, 2011 at 02:37:51PM +0100, Jaroslav Šmíd wrote: Maybe. Doesn't meen you didn't tell which one. I did not have to because everyone except you understood the context. Since you did not ask the question and eviden

Re: g_remove

2011-02-19 Thread Jaroslav Šmíd
Hmm, resending, got identified as spam ... On 02/19/2011 02:37 PM, Jaroslav Šmíd wrote: On 02/19/2011 10:19 AM, David Nečas wrote: On Sat, Feb 19, 2011 at 01:21:37AM +0100, Jaroslav Šmíd wrote: C99 has no implicit int ., so don't ignore compiler's warning and fix it. David N

Re: g_remove

2011-02-19 Thread Jaroslav Šmíd
On 02/19/2011 10:19 AM, David Nečas wrote: On Sat, Feb 19, 2011 at 01:21:37AM +0100, Jaroslav Šmíd wrote: C99 has no implicit int shits, so don't ignore compiler's warning and fix it. David Nečas: "All according to the C standard". Right, you didn't tell us which one,

Re: g_remove

2011-02-18 Thread Jaroslav Šmíd
C99 has no implicit int shits, so don't ignore compiler's warning and fix it. David Nečas: "All according to the C standard". Right, you didn't tell us which one, one could think you mean "every C standard out there". C99 is old enough to be supported by decent compilers, older standards aren

Re: interested in gtk+ project development

2011-02-18 Thread Jaroslav Šmíd
If you are currently learning C, please, learn the difference between size_t, int and long - some of glib/GTK devs didn't and because of that they use int in places where size_t is more appropriate. For example g_application_open() - quite new API and they had to mess it up by using (g)int inst

Re: GTK+ 2.99.3 released

2011-02-03 Thread Jaroslav Šmíd
On 02/02/2011 09:32 PM, David Nečas wrote: On Wed, Feb 02, 2011 at 08:47:48PM +0100, Jaroslav Šmíd wrote: I am running ubuntu 10.10 and Gnome 2.32.0. I am a bit afraid to update via a install from a tar download because of all the dependence issues on ubuntu. Is there a way to update via

Re: GTK+ 2.99.3 released

2011-02-02 Thread Jaroslav Šmíd
I am running ubuntu 10.10 and Gnome 2.32.0. I am a bit afraid to update via a install from a tar download because of all the dependence issues on ubuntu. Is there a way to update via command line or synaptic? Install gtk2-dev (or something like that). It will install most of required depencie

Re: Strange GObject warning, crashes GUI

2011-02-02 Thread Jaroslav Šmíd
If window managers hang because app is behaving "badly", it is serious bug of the window manager or even X itself - this just shall not happen and if it does it is yet another + for wayland. On 01/15/2011 04:57 PM, John Coppens wrote: On Sat, 15 Jan 2011 12:38:03 +0200 Mohammed Sameer wrote:

Re: Couldn't link my app with GTK+ 3

2011-02-01 Thread Jaroslav Šmíd
export PKG_CONFIG_PATH=/usr/lib/pkgconfig/ ./configure pkg-config used in confugure script will use glib-2.0.pc from that location. PKG_CONFIG_PATH should point to your new glib's ${libdir}/pkgconfig/ Your old glib doesn't seem to have functions/symbols used in gtk-3 and you will need to use

Re: Using ALSA mixer, GSource and g_thread_init() results in busy loop

2011-01-21 Thread Jaroslav Šmíd
attachments? > > Sorry for the noise, > Thierry > > ___ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > -- Jaroslav Šmíd

Re: Transparent Floating GtkEntry

2011-01-17 Thread Jaroslav Šmíd
Transparent entry - see gtk-demo, offscreen widgets. Entry on top - well, you could implement custom GtkContainer, but don't know if events will work right ... On 01/07/2011 10:46 PM, Cinolt wrote: Hello, I want develop a game that can take multilingual input, including CJK characters. Is it p

Re: Application path

2011-01-17 Thread Jaroslav Šmíd
The only way to get this on linux is to read symlink /proc/self/exe (readlink()) On Windows, you can use GetModuleName(NULL, xx, yy). Don't know if glib has anything for this. On 01/12/2011 02:13 PM, John Emmas wrote: Browsing through glib/gutils.c this morning, I noticed a function called g_g

Re: Bring a widget to the foreground

2011-01-04 Thread Jaroslav Šmíd
Don't do that. Fixed size buffers are evil for string formatting. You better use g_strdup_printf even though this would lead to reallocations. But much better then end up with cropped text. On 01/02/2011 10:00 PM, jcup...@gmail.com wrote: On 2 January 2011 15:39, John Emmas wrote: To be hone

Re: resetting timeout source

2011-01-04 Thread Jaroslav Šmíd
Well, I cannot find anything in glib. If you use linux, you can use timerfd_create() to create pollable timer, create new GSource, attach the descriptor and you got your timer. Set intervals to zero to stop it, descriptor will get no more read events, and you don't even need to detach the sourc

Re: Signal inside widget subclass

2010-12-02 Thread Jaroslav Šmíd
Lets say your buffer's class is like typedef struct _MyTextBufferClass { GtkTextBufferClass parent_class; // more stuff here } MyTextBufferClass; Basicaly in my_text_buffer_class_init override "changed" function void my_text_buffer_class_init(MyTextBufferClass *klass) { GtkTextBufferClas

Re: Cancel construction of GObject

2010-11-27 Thread Jaroslav Šmíd
On 11/27/2010 05:32 PM, Jannis Pohlmann wrote: On Sat, 27 Nov 2010 12:14:39 +0100 Jaroslav Šmíd wrote: Is it possible to "cancel" construction in gobject-derived class? Lets say I have GMyObject derived from GObject. In its init function I need to spawn a thread. When that fail

Cancel construction of GObject

2010-11-27 Thread Jaroslav Šmíd
Is it possible to "cancel" construction in gobject-derived class? Lets say I have GMyObject derived from GObject. In its init function I need to spawn a thread. When that fails, I would like to cancel construction of the object (so that gobjectclass' finalize function would be called on the ob

Re: GTK Error handling..

2010-11-24 Thread Jaroslav Šmíd
New process, use g_spawn_with_pipes (or how is it called) and just pass it through pipe. On 11/24/2010 02:35 PM, Champ Clark III [Softwink] wrote: On Wed, Nov 24, 2010 at 03:22:56PM +0200, Dov Grobgeld wrote: If all you want is a popup, then you might as well create a new process instead of a

Re: GTK Error handling..

2010-11-24 Thread Jaroslav Šmíd
GTK is not smart toolkit and is unable to work without X display and is not even able to reconnect to different display (or to the same later) when the connection get lost. This is with all X based toolkits I know of - it just seems easier for developers to just call exit() then to install like

Re: Problem with GSource and polling

2010-11-20 Thread Jaroslav Šmíd
mail.gnome.org/mailman/listinfo/gtk-app-devel-list > > > > _ > Listen to KNAC, Hit the Home page and Tune In Live! ---> http://www.knac.com > _

Re: Problem with 64 bit gtk binaries in Win 7 (32 bit works fine)

2010-11-08 Thread Jaroslav Šmíd
32 bit dependencies when compiling gtk+, do you > think that might affect this problem? I think it shouldn't but who knows. I > haven't read about any similar problems so far. > > I haven't tried only with glib, I don't know much about it and I will have > to wait until I have finished this project to try that, but thanks for the > suggestion, I will try when I have time. > > > Thanks! > > Mario Maqueo > ___ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > -- Jaroslav Šmíd ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Strange display problem with gtk-win32 and VC++

2010-11-07 Thread Jaroslav Šmíd
ngoRenderWin32', script='latin' > > I guess that narrows it down a bit..! > ___ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > -- Jarosl

Re: Problem with 64 bit gtk binaries in Win 7 (32 bit works fine)

2010-11-07 Thread Jaroslav Šmíd
values are vertex >> positions) >> >> I solved this issue changing all the csdtio calls to c++ calls ( from the >> ifstream library e.g. ifstream fin("file"); fin>>floatVar; ). With the c++ >> calls the values were adecuately read and stored. There is a side p

Re: Problem with 64 bit gtk binaries in Win 7 (32 bit works fine)

2010-11-02 Thread Jaroslav Šmíd
nfused. I downloaded the latest 64 bit version and then an older > one to see if it was broken, but the results were the same. > > Or is the problem not related to the 64 bit thing? Any ideas/thoughts are > welcome. > > Thanks in advance for your time. >

Re: Change view of GtkCheckMenuItem without trigger the action

2010-08-26 Thread Jaroslav Šmíd
g_signal_handlers_block_by_func() if you just want to block your signal handler. After toggling GtkCheckMenuItem use g_signal_handlers_unblock_by_func() http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-handlers-block-by-func On 10.8.2010 8:01, KC wrote: Hi, Is it

Re: How to change color of GtkCellRendererProgress ?

2010-08-05 Thread Jaroslav Šmíd
t;> From: kcc1...@gmail.com >> Date: Mon, 2 Aug 2010 10:21:31 +0800 >> Subject: Re: How to change color of GtkCellRendererProgress ? >> To: jardas...@gmail.com >> CC: gtk-app-devel-list@gnome.org >> >> On Mon, Aug 2, 2010 at 2:46 AM, Jaroslav Šmíd wrote: >> >

Re: How to change color of GtkCellRendererProgress ?

2010-08-01 Thread Jaroslav Šmíd
ut > I can't find anything from Google yet. > > Thanks a lot. > > Regards, > KC > ___ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailma

Re: Making an element look like a resize grip

2010-07-11 Thread Jaroslav Šmíd
In expose event handler, use function gtk_paint_resize_grip(). Note that due to GTK's system of skinning/theming the resize grip might look different then the one on statusbar depending on the theme. On 07/11/2010 09:33 AM, Noam Yorav-Raphael wrote: Hello, I have made a widget that acts as a

GObject and threads

2010-07-08 Thread Jaroslav Šmíd
hieve the signal being executed in the secondary thread? I know I might do something like creating gsource and add it to secondary thread's context, but because each callback requires different arguments, it would be pain in the a?s to do this for every type of callback. -- Jar