Re: Creating custom GTK+ widget using C++ -- Ctor/Dtor not called

2012-02-16 Thread Hrvoje Niksic
On 02/15/2012 11:35 PM, Agnel Kurian wrote: contained object were not being called. I had assumed that merely compiling as C++ would make it work... but now I realize it need not be so when allocated via g_object_new. Note that you can always call placement new in your gobject constructor and

Re: Unordered container of Glib::ustring

2013-04-04 Thread Hrvoje Niksic
On 04/03/2013 06:30 PM, Paul Davis wrote: Why? Isn't it natural to wish to have a map containing user-defined strings, which may be in any language? that describes std::string too. all that Glib::ustring gives you are UTF-8-aware iterators. It also uses UTF-8 *storage*, which makes yo

Re: Unordered container of Glib::ustring

2013-04-04 Thread Hrvoje Niksic
On 04/04/2013 11:19 AM, Hrvoje Niksic wrote: On 04/03/2013 06:30 PM, Paul Davis wrote: Why? Isn't it natural to wish to have a map containing user-defined strings, which may be in any language? that describes std::string too. all that Glib::ustring gives you are UTF-8-aware iter

Re: GTK3 -- query mouse pointer coordinates for keyboard input?

2014-01-20 Thread Hrvoje Niksic
On 01/17/2014 11:21 PM, Stefan Salewski wrote: On Fri, 2014-01-17 at 17:11 -0500, Jasper St. Pierre wrote: Yeah. This is to maintain ABI compatibility. Technically, events have private internal data, and you can use gdk_event_get_device(); to get the keyboard device for a key event. This isn't

Re: Request for documentation explanation

2014-07-14 Thread Hrvoje Niksic
On 07/12/2014 10:52 AM, Igor Korot wrote: Hi, ALL, On the link https://developer.gnome.org/gtk2/stable/GtkTextIter.html#gtk-text-iter-get-line it does not say whether it will return the number of physical lines or number of logical lines. Could someone please sched some light on this? A GtkTe

Re: Progress_bar failing to change

2014-12-16 Thread Hrvoje Niksic
On 12/15/2014 10:49 PM, Ian Chapman wrote: Hi All, I'm having a strange problem using gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR(Battery), x); I have it in two places, the first in my file that has main() and that works like I'd expect. The second in a different module and that compiles an

Re: Progress_bar failing to change

2014-12-17 Thread Hrvoje Niksic
On 12/16/2014 09:12 PM, Ian Chapman wrote: Spot on Hrvoje, that's my problem, many thanks for the help. I'll have to change the way I'm thinking. The classic hack to update the progress bar without returning to the main loop is by running: while (gtk_events_pending()) gtk_main_iteration()

Re: [GTK2] GTK2_RC_FILES override clashes with current theme

2015-09-16 Thread Hrvoje Niksic
On 09/15/2015 11:59 PM, lemonsqueeze wrote: I guess what greatly confuses me is: 1) GTK2_RC_FILES is documented as specifying (https://developer.gnome.org/gtk2/stable/gtk-running.html) "a list of RC files to parse instead of the default ones" 2) Actual behavior differs "a list of R

Re: GTK with libdispatch (GCD) on Linux and X11

2016-05-02 Thread Hrvoje Niksic
On 04/30/2016 03:26 PM, Integratron wrote: I have been investigating using GTK windows and widgets in a program whose main loop is controlled by libdispatch. The target is X11 on Linux. GTK is used only for the GUI. (Other glib event sources are not used in this application. Networking is don

Re: GTK with libdispatch (GCD) on Linux and X11

2016-05-03 Thread Hrvoje Niksic
On 05/03/2016 03:26 PM, Integratron wrote: This is great feedback! My application is very simple - it will only have buttons, checkboxes and a graphics area for showing monitoring information from a running application. There will be no file chooser, or modal dialogs. (It is easy to imagine thes

Re: Dynamicly styling a widget

2016-08-26 Thread Hrvoje Niksic
On 08/25/2016 08:32 PM, Jim Heald wrote: Hi there, I'm having a rough time figuring out how I can work with colors in Gtk+. I'll provide a rundown of what I'm trying to accomplish: I'm going to have a TreeView which will have Eventboxes as children. A tree view is not a container with childre

Re: trouble with g_stat

2018-06-04 Thread Hrvoje Niksic
On 06/04/2018 04:27 AM, GaryW wrote: Both of the following examples compile ok, but while this works: //-- GString *fspec; struct stat sB; //fspec->str tested to hold the correct file spec… if(stat(fspec->str,&sB)>0){… [as expected] this doesn’t: //-- GStri

Re: GtkTextBuffer is merging my tags

2009-04-06 Thread Hrvoje Niksic
Cornelius Hald wrote: there seems to be some optimization on the GtkTextBuffer which causes automatic merging of GtkTextTags. Is there a way to turn this off? Or some workaround? I suppose you can work around this by creating different tag objects for different list items, and applying them in

Re: GIOChannel & Intercepting stdout

2010-08-26 Thread Hrvoje Niksic
On 08/25/2010 08:26 PM, Chris Vine wrote: This won't work. file descriptor number 1 (stdout) is a file descriptor you write to, not read from. If you connect stdout to the write file descriptor of a pipe with dup2(), and then connect your GIOChannel object to the read file descriptor of the pip

Re: GIOChannel & Intercepting stdout

2010-08-26 Thread Hrvoje Niksic
On 08/26/2010 12:53 PM, richard boaz wrote: The actual program I intend to use this in is a background process where the actual processing executes in a separate thread while the main thread sits in the main loop. With the watch on the read-end of the pipe, the callback is fired and executes wit

Re: GIOChannel & Intercepting stdout

2010-08-26 Thread Hrvoje Niksic
On 08/26/2010 02:16 PM, Magnus Hjorth wrote: you do (and the size of the output exceeds the pipe's buffer, which is fairly small), that thread will deadlock deep inside stdio. This can Is the buffer really that small? I made a simple test program (below) to check this out, and it seems that