Re: Glib::Dispatcher1T

2007-01-20 Thread Chris Vine
On Friday 19 January 2007 07:44, Daniel Elstner wrote: Hello everyone, I recently learned that the POSIX memory visibility rules aren't as strict as I thought them to be (thanks to Chris for pointing this out). Given this, I'm now considering an API addition to glibmm, namely a

Re: Glib::Dispatcher1T

2007-01-20 Thread Chris Vine
On Saturday 20 January 2007 13:07, Daniel Elstner wrote: [snip] I don't get it. Why should there be a need for any synchronization beyond the memory barrier when passing pointers to custom types? Note that I'm proposing to stream the data argument through the pipe. Some pseudo code:

Re: Glib::Dispatcher1T

2007-01-20 Thread Chris Vine
On Saturday 20 January 2007 19:57, Daniel Elstner wrote: [snip] By static I meant unchanging over the lifetime of the thread. I know that dereferencing is the issue here. But if the data in question was only written to before the thread was created, or if you synchronize access yourself by

Re: closing the window automatically

2007-02-19 Thread Chris Vine
On Monday 19 February 2007 12:42, SaiKamesh Rathinasabapathy wrote: [snip] This is your problem: Gtk::Main::run(obj.wind);// displaying the first window ^^ char letter; while(!STOP) { if((letter=obj.rs_getch(port))0) // getting the data

Re: Gtkmm, LGPL and C++

2007-02-20 Thread Chris Vine
On Tuesday 20 February 2007 17:44, Jonathon Jongsma wrote: I believe there was some talk in the past about adding explicit language to the license regarding templates, but nobody has cared enough to propose language so far. That is not correct. Look at the archive. Chris

Re: Yet another problem with threads :

2007-02-20 Thread Chris Vine
On Thursday 08 February 2007 12:53, tboloo wrote: I'm trying to utilize threads in my app. Since there aren't many materials covering this topic this may be something trivial, but I really searched a lot and didn't find anything that would help me. This is what I've achieved so far : [snip]

Re: Gtkmm, LGPL and C++

2007-02-21 Thread Chris Vine
On Wednesday 21 February 2007 11:05, Neil wrote: Chris, Jonner Thanks for the pointers - and confirmation of what Gtkmm intends. My issue is with templates rather than sub-classing. There's a fair bit on the latter that I also found that suggests sub-classing needn't be an issue. If it is

Re: How can I port this gtk construct to gtkmm?

2007-03-21 Thread Chris Vine
On Wednesday 21 March 2007 12:55, Jef Driesen wrote: And the second was the automatic destruction of the dialog without the need to keep a pointer to it somewhere. Trying to do the same thing in C++ resulted either in a memory leak or immediate destruction of the dialog (when its variable goes

Re: where is alloc_color called

2007-04-26 Thread Chris Vine
On Thu, 2007-04-26 at 03:18 -0400, Mitchell Laks wrote: Hi, I am struggling to understand the (deprecated) but still useful parts of Gdk. Thus I read in the books (Havoc and Martin books) and tutorials about Gtk+ that I need to 0) get a graphics context 1) create a color object 2)

Re: Enable drag and drop for treeview?

2007-05-02 Thread Chris Vine
On Wed, 2007-05-02 at 16:27 +0200, Jef Driesen wrote: For my application, I want to be able to re-order rows in a treeview (treestore model) using drag and drop. According to the gtkmm book, I can use set_reorderable(). But how can I detect when a drag and drop operation is finished (to

Re: Glib::ustring's operator doing a conversion to locale, why?

2007-05-04 Thread Chris Vine
On Fri, 2007-05-04 at 12:41 +0200, Murray Cumming wrote: On Fri, 2007-05-04 at 12:26 +0200, Milosz Derezynski wrote: Hey Murray, Well the thing is that with UTF-8, you basically remain C string compatible (there are no zero/terminators in the middle of the string), which essentially

Re: Enable drag and drop for treeview?

2007-05-04 Thread Chris Vine
On Thu, 2007-05-03 at 21:05 -0400, Paul Davis wrote: On Thu, 2007-05-03 at 20:42 +0100, Chris Vine wrote: Except in the simplest usage, I use the basic gtk/gtkwidget drag and drop stuff. It is in my experience pretty easy to use once you get the hang of it, and it can do more or less

Re: Enable drag and drop for treeview?

2007-05-04 Thread Chris Vine
On Fri, 2007-05-04 at 09:20 +0200, Jef Driesen wrote: Does this method also work well with a sorted treemodel? Because the simple set_reorderable() does not seem to work in that case. Once the model is sorted (by clicking on a treeview column header), drag and drop is not possible anymore.

Re: Enable drag and drop for treeview?

2007-05-05 Thread Chris Vine
On Sat, 2007-05-05 at 14:39 +0200, Jef Driesen wrote: Chris Vine wrote: On Fri, 2007-05-04 at 09:20 +0200, Jef Driesen wrote: Does this method also work well with a sorted treemodel? Because the simple set_reorderable() does not seem to work in that case. Once the model is sorted

Re: Invalid UTF-8 strings

2007-06-01 Thread Chris Vine
On Fri, 2007-06-01 at 13:07 -0400, Matt Bragano wrote: Great debugging techniques, thanks! Turns out one of the strings being rendered contained some non-ASCII characters. The functions: Glib::locale_to_utf8() Glib::locale_from_utf8() did the trick. In order to render the text in a

Re: removing a elt from a std::vector in C++

2007-07-19 Thread Chris Vine
On Thu, 2007-07-19 at 11:24 +1000, Grizzly(Francis Smit) wrote: Thank you that did the trick btw do u know a good C++ list for future use At http://lists.linux.org.au/listinfo/tuxcpprogramming there is a linux C++ list, if that is what you are into, but it is not very active. The best resource

Re: Signaling TreeView to update

2007-07-29 Thread Chris Vine
On Thu, 2007-07-26 at 10:31 -0500, Joaquim Schmidlap wrote: On Wed, Jul 25, 2007 at 10:57:54AM -0500, Robert Caryl wrote: Use a dispatcher in your GUI window that will call Gtk::Widget::queue_draw for your Gtk::TreeView whenever your thread updates the Gtk::TreeModel displayed by your

Re: Sending slots to main thread (implemented)

2007-08-30 Thread Chris Vine
On Thu, 2007-08-30 at 18:07 +0200, Joaquim Duran wrote: En/na Joaquim Duran ha escrit: I've done the implementation and it works fine: I'm able to send a slot created at runtime to main thread. I've attached the source code to this e-mail to check it. I think that implement a class like

Re: Sending slots to main thread (implemented)

2007-09-01 Thread Chris Vine
On Thu, 2007-08-30 at 21:06 +0100, Chris Vine wrote: In any event, if you do want to pass an entire slot to the queue, I suspect it would be more efficient to have a pointer to a slot (or shared_ptrsigc::slotvoid ) as the contained element - boost::shared_ptr for example has a thread-safe

Re: Sending slots to main thread (implemented)

2007-09-01 Thread Chris Vine
On Sat, 2007-09-01 at 15:52 +0200, [EMAIL PROTECTED] wrote: Note on Dispatcher class, I've taken a closer look to its interface. I've seen that the connect member function returns a sigc::connection object. this means that the signal could be disconnected from dispatcher and another one

Re: Sending slots to main thread (implemented)

2007-09-01 Thread Chris Vine
On Sat, 2007-09-01 at 15:52 +0200, [EMAIL PROTECTED] wrote: On Sat Sep 1 14:38 , Chris Vine sent: You can however use the unwrapped g_idle_add() for passing your callbacks to the thread in which the default programme GMainContext is running, if you want. Thanks but I think that my

Re: difference of the get_dest_row_at_pos and get_path_at_pos in treeview class

2007-10-02 Thread Chris Vine
On Tue, 2007-10-02 at 20:45 +0100, Chris Vine wrote: On Tue, 2007-10-02 at 22:34 +0800, Liangxu Wang wrote: Hi, Sorry if I misunderstanding of these two function in treeview class, from my understanding, the two function should get the path result, but if I set the headers visible

Re: Glibmm and networking

2007-10-06 Thread Chris Vine
On Sat, 2007-10-06 at 09:22 +0100, Robert Pearce wrote: On Sat, 6 Oct 2007 00:00:01 -0300 you wrote: Jonathon, thanks for help. I´ve read that Glib::IOChannel could be bound to sockets, but don´t know if sockets could be used for transfering files over network Not directly. A socket

Re: Fwd: wide char string literals to Glib ustring

2007-12-08 Thread Chris Vine
On Sat, 2007-12-08 at 12:24 -0500, Onur Tugcu wrote: To me, easiest would be to be able to write unicode directly into code and to not worry about the codes. Also, I imagine multi-byte glyphs will suffer from endianness. No, UTF-8 is composed of a series of characters (a narrow codeset), so

Re: Fwd: wide char string literals to Glib ustring

2007-12-08 Thread Chris Vine
On Sat, 2007-12-08 at 18:20 -0500, Onur Tugcu wrote: On Dec 8, 2007 5:55 PM, Chris Vine [EMAIL PROTECTED] wrote: On Sat, 2007-12-08 at 12:24 -0500, Onur Tugcu wrote: To me, easiest would be to be able to write unicode directly into code and to not worry about the codes. Also, I imagine

Re: Fwd: wide char string literals to Glib ustring

2007-12-09 Thread Chris Vine
On Sun, 2007-12-09 at 11:13 -0500, Onur Tugcu wrote: Thank you, You're right. Most of the confusion was from my failed test on ucs4. I thought I wrote that code below and it threw an exception on linux. But apparently I was wrong, or missed something in the code. Now it is simply:

Re: help using Glib::ustring

2007-12-20 Thread Chris Vine
On Wed, 2007-12-19 at 18:54 -0500, Jamiil Abduqadir wrote: I am porting my old code to Gtkmm, I have started with the most fundamental of applications, a string manipulation class. What I am trying to do is very simple, but the new paradigm has me a bit confused, to convert a string to upper

Re: help using Glib::ustring

2007-12-20 Thread Chris Vine
On Thu, 2007-12-20 at 20:37 +, Chris Vine wrote: On Wed, 2007-12-19 at 18:54 -0500, Jamiil Abduqadir wrote: I am porting my old code to Gtkmm, I have started with the most fundamental of applications, a string manipulation class. What I am trying to do is very simple, but the new

Re: help using Glib::ustring

2007-12-20 Thread Chris Vine
On Thu, 2007-12-20 at 20:48 +, Chris Vine wrote: [snip] *i = i-uppercase() would work but be completely bizarre as the function returns what you say is a global object, so what's the point? Sigh. Actually that won't work either, for the reason that as I have mentioned Glib

Re: Race condition during Dispatcher deconstruction

2008-01-03 Thread Chris Vine
On Thu, 2008-01-03 at 09:10 -0600, Matt Hoosier wrote: Hi, I've been observing a crash which shortly follows the deletion of a Glib::Dispatcher object. The scenario goes something like this: * Dispatcher instance is allowed by mainloop thread * Some UI widget registers a callback on the

Re: Race condition during Dispatcher deconstruction

2008-01-03 Thread Chris Vine
On Thu, 2008-01-03 at 17:31 -0600, Matt Hoosier wrote: On Jan 3, 2008 5:15 PM, Chris Vine [EMAIL PROTECTED] wrote: [...] If you read the comments in the files I have mentioned then you will see the point. Thanks for the independent confirmation. I'll probably have to pass

Re: Race condition during Dispatcher deconstruction

2008-01-07 Thread Chris Vine
On Mon, 2008-01-07 at 08:43 -0600, Matt Hoosier wrote: On Jan 7, 2008 1:07 AM, Daniel Elstner [EMAIL PROTECTED] wrote: [snip] If the Dispatcher is created and destroyed together with the widget which registers the callback, then you did indeed hit the scenario already described by Chris

Re: Race condition during Dispatcher deconstruction

2008-01-07 Thread Chris Vine
On Tue, 2008-01-08 at 01:07 +, Chris Vine wrote: On Mon, 2008-01-07 at 08:43 -0600, Matt Hoosier wrote: [snip] I know that the DispatcherNotifier object attempts to avoid this by doing conn_io_handler_.disconnect() in its own destructor, but the crash inside pipe_io_handler

Re: Race condition during Dispatcher deconstruction

2008-01-08 Thread Chris Vine
On Tue, 2008-01-08 at 20:45 +0100, Daniel Elstner wrote: If I recall correctly we already had an exchange on the list about this very topic a while ago. I'll have to look it up, but from memory I think I didn't want to move to your alternative implementation because some of the design goals of

Re: Race condition during Dispatcher deconstruction

2008-01-08 Thread Chris Vine
On Tue, 2008-01-08 at 22:56 +0100, Daniel Elstner wrote: [snip] Are you sure? Even for blocking I/O? Because this contradicts the GNU libc documentation which I've quoted in a comment in dispatcher.cc: // Reading or writing pipe data is atomic if the size of data written is not //

Glib::Thread::create() thread safety

2008-01-25 Thread Chris Vine
According to the libsigc++ documentation (I think), if a slot created via sigc::mem_fun represents a non-static method of a class object derived from sigc::trackable, the slot will automatically be invalidated and disconnected if that object is destroyed. If that is correct, it would be achieved

RE: Glib::ustring

2008-03-09 Thread Chris Vine
On Thu, 2008-03-06 at 11:01 -0600, Jorge Luis Vidales Valladares wrote: Thanks for the int I Look for the doc's and finally i came up with this that works Glib::ustring str; str = m_Entry1.get_text(); locale_from_utf8 (str); const char *szMessage= str.c_str();

Re: ANNOUNCE: glibmm 2.16.2 released

2008-04-20 Thread Chris Vine
On Fri, 2008-04-18 at 22:42 -0500, Jonathon Jongsma wrote: *** About glibmm glibmm is a C++ API for glib, used by gtkmm. glibmm 2.16 wraps new API in glib 2.16, including the new gio library, and is API/ABI-compatibile with glibmm 2.14, 2.12, 2.10, 2.8, 2.6 and 2.4. It is a

Re: TreeView column widths

2008-04-24 Thread Chris Vine
On Wed, 2008-04-23 at 14:20 -0500, Joaquim Schmidlap wrote: I have a TreeView that starts out displaying N columns. The TreeView is contained in a ScrolledWindow, which is on a page in a Notebook, which lives on the top level Window. The ScrolledWindow is set to POLICY_NEVER on the X

Re: Gtk::ustring and std::getline()

2008-05-05 Thread Chris Vine
On Mon, 2008-05-05 at 13:40 -0400, Jamiil wrote: This is a patch up job, a very bad solution, but I hope that with our help it will be a temporarily one. I don't want to use the UTF8 benefits of ustring! What can I do? If you don't want to use the UTF8 benefits of ustring, then why use

Re: Arbitrary number of child windows

2008-05-12 Thread Chris Vine
I am however a bit sceptic on the frequent use of delete this; in member functions. As far as I know, delete this; itself is valid, but any other statement, even a return statement, is undefined behaviour. I might be wrong about that though. Yes, you are wrong. Provided that no members of

Re: Arbitrary number of child windows

2008-05-12 Thread Chris Vine
On Mon, 2008-05-12 at 16:34 -0400, Paul Davis wrote: if you're in a signal handling call stack, i can't agree with this. you have no idea which, if any, members of a Glib::Object and all of its derived classes might still be accessed after your handler method returns. Can you unpack that for

Re: Arbitrary number of child windows

2008-05-12 Thread Chris Vine
On Tue, 2008-05-13 at 00:01 +0100, Chris Vine wrote: At the C/GTK+ level this is OK. The OP was concerned with dialogs, and the destructor of Gtk::Window (via Gtk::Window::destroy_() and Gtk::Window::destroy_c_instance_()) will call gtk_window_destroy

Re: Arbitrary number of child windows

2008-05-13 Thread Chris Vine
On Tue, 2008-05-13 at 11:17 +0200, Murray Cumming wrote: On Mon, 2008-05-12 at 18:23 -0400, Paul Davis wrote: i think that in general, signal_bar() would like to know that the handlers it is calling do not destroy the objects they are invoked upon. I believe that fixing that was a

Re: UTF-16 in gtkmm?

2008-05-17 Thread Chris Vine
On Sat, 2008-05-17 at 11:43 +0200, Andreas Volz wrote: Hello, I like to read Unicode strings into my gtkmm application that are written in UTF-16. There's only the glib::ustring class to handle UTF-8. Is there a UTF-16 string class or a way to convert the UTF-16 string to UTF-8? Then I

Re: UTF-16 in gtkmm?

2008-05-17 Thread Chris Vine
On Sat, 2008-05-17 at 22:58 +0200, Andreas Volz wrote: Thanks, I'll try it. Any ideas why there's no glibmm wrapper for that? I think it probably arises from the fact that the size of the character used by std::wstring is not guaranteed by the standard, so a std::string to std::wstring

Re: std::cout Glib::ustring(utf8_literal) throws exception

2008-07-13 Thread Chris Vine
On Sun, 13 Jul 2008 10:01:02 -0700 Sohail Somani [EMAIL PROTECTED] wrote: But yes, I need to figure out why the conversion is failing in the first place rather than trying these hacks (ustring - std::string). Conversions can fail for various reasons, but to start from the beginning have you set

Re: std::cout Glib::ustring(utf8_literal) throws exception

2008-07-13 Thread Chris Vine
On Sun, 13 Jul 2008 14:54:38 -0700 Sohail Somani [EMAIL PROTECTED] wrote: Chris Vine wrote: Conversions can fail for various reasons, but to start from the beginning have you set a locale of any kind which handles non-ascii characters? In particular, have you called setlocale(LC_ALL

Re: std::cout Glib::ustring(utf8_literal) throws exception

2008-07-13 Thread Chris Vine
On Sun, 13 Jul 2008 15:17:31 -0700 Sohail Somani [EMAIL PROTECTED] wrote: Great, I thought this was exactly the problem as well! Now, do you know how I can set Windows XP to have a locale of UTF-8? I can't figure it out nor can I convince Professor Google to let me cheat on the test :-( Ah,

Re: std::cout Glib::ustring(utf8_literal) throws exception

2008-07-14 Thread Chris Vine
On Sun, 13 Jul 2008 20:14:55 -0700 Sohail Somani [EMAIL PROTECTED] wrote: Indeed, I believe I will have to use wcout after converting to UTF-16 on Windows. But now the question is: what do I do to write portable code? On Linux, simply std::cout Glib::ustring(some_utf8_string) works just fine.

Re: glibmm-2.16.4 compile error

2008-08-13 Thread Chris Vine
On Wed, 13 Aug 2008 09:49:22 +0200 Andreas Haumer [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi! Murray Cumming schrieb: | [snip] | g++ -g -O2 -Wall -Wno-long-long -o .libs/child_watch main.o -Wl,--export-dynamic ../../glib/glibmm/.libs/libglibmm-2.4.so

Re: glibmm-2.16.4 compile error

2008-08-13 Thread Chris Vine
On Wed, 13 Aug 2008 12:43:32 +0200 Andreas Haumer [EMAIL PROTECTED] wrote: In the glibmm sources there are some headers with typdefs using unsigned char, for example in ./glib/glibmm/ustring.h ./glib/glibmm/value_basictypes.h Perhaps one of those types is (directly or indirectly) used as

Re: glibmm-2.16.4 compile error

2008-08-13 Thread Chris Vine
On Wed, 13 Aug 2008 13:17:10 +0200 Andreas Haumer [EMAIL PROTECTED] wrote: Removing examples from the directory list is not enough: the same problem occurs in the tests directory: [snip] Removing both examples and tests directory leads to a successful build, but leaves me a little bit nervous

Re: How to draw to a pixbuf?

2008-09-02 Thread Chris Vine
On Tue, 2 Sep 2008 01:00:13 +0200 Carlo Wood [EMAIL PROTECTED] wrote: I have a function that can draw to a cairo_t*. I need to create a Gtk::IconSet. Gtk::IconSet wants me to pass a Glib::RefPtrGdk::Pixbuf const, so ... I need to: - create a Gdk::Pixbuf object somehow - get a related

Re: How to draw to a pixbuf?

2008-09-02 Thread Chris Vine
On Tue, 2 Sep 2008 10:36:40 +0100 Chris Vine [EMAIL PROTECTED] wrote: On Tue, 2 Sep 2008 01:00:13 +0200 Carlo Wood [EMAIL PROTECTED] wrote: I have a function that can draw to a cairo_t*. I need to create a Gtk::IconSet. Gtk::IconSet wants me to pass a Glib::RefPtrGdk::Pixbuf const, so

Re: How to draw to a pixbuf?

2008-09-02 Thread Chris Vine
On Tue, 2 Sep 2008 16:55:08 +0200 Carlo Wood [EMAIL PROTECTED] wrote: [snip] I also tried to create a cairo contex with alpha from the start, but that has problems: M_drawable-get_window() (my main window) simply has no transparancy, it's my screen - and if I explicitely set the depth to 32

Re: Glib::MainContext::signal_child_watch is not working

2008-10-03 Thread Chris Vine
On Thu, 2 Oct 2008 21:33:06 +0200 Fernando Tarín [EMAIL PROTECTED] wrote: Hi I sent a mail some days ago with the same issue, Armin suggested me a solution but is not working. Can some tell me why is this not working?. [snip] There is an exmple of using Glib::SignalChildWatch in the examples

Re: Connecting to a signal given as a string

2008-10-26 Thread Chris Vine
On Sun, 26 Oct 2008 11:28:58 +0100 Søren Hauberg [EMAIL PROTECTED] wrote: I've tried the following: g_signal_connect (G_OBJECT (html_widget), load_finished, G_CALLBACK (on_page_loaded), this); in the constructor of the class that does the rendering. Then I

Re: bells and whistle in Gtkmm

2008-12-07 Thread Chris Vine
On Sun, 07 Dec 2008 07:19:01 -0500 Jamiil [EMAIL PROTECTED] wrote: Thanks Mohamed for the help! I read the documentation and it is exactly what I am looking for and more. However, the compiler complains saying that Display() is protected and in Gdk::Display::Display *is a 'protected' method

Re: Gtkmm widgets move semantics.

2008-12-13 Thread Chris Vine
On Sat, 13 Dec 2008 14:25:59 +0100 Germán Diago germandi...@gmail.com wrote: I would like to know if it's planned to add move (no copy) semantics in widgets for gtkmm. I would like to have this feature, since that makes easier to manage by value many widgets. Is it a planned feature to add

Re: Gtkmm widgets move semantics.

2008-12-14 Thread Chris Vine
On Sun, 14 Dec 2008 14:26:14 +0100 Germán Diago germandi...@gmail.com wrote: Move semantics is a feature of c++0x that would allow to use widgets by value. It's very easy to add this to widgets (it's just one function which is very trivial for every movable widget). It makes sense to have move

Re: Using Glib::IOChannel for socket connections

2009-02-02 Thread Chris Vine
On Mon, 02 Feb 2009 10:29:39 +0100 Víctor M. Palacio Tárrega victorpala...@adtelecom.es wrote: Hi, I'm planning to manage remotely (or locally) a gtkmm graphical aplication through a network (or unix) socket. The use of Glib::IOChannel is not documented for use it in this case. I

Re: Seg fault reading data from IOChannel

2009-02-03 Thread Chris Vine
On Tue, 03 Feb 2009 11:14:27 +0100 Víctor M. Palacio Tárrega victorpala...@adtelecom.es wrote: You are absolutely right. buff remains from another workaround and should be eliminated. About data, should be defined as char foo[data_lenght]; where I use only 1 or 4 as data_lenght. Below are

Re: Seg fault reading data from IOChannel

2009-02-03 Thread Chris Vine
On Tue, 3 Feb 2009 13:01:24 + Chris Vine ch...@cvine.freeserve.co.uk wrote: However, as has already been mentioned you should pass sizeof(int) not 4 when reading and writing the int value - you cannot assume any particular integer size, as that is platform and processor dependent. Assuming

Re: Using Glib::IOChannel for socket connections

2009-02-03 Thread Chris Vine
On Tue, 03 Feb 2009 07:23:57 +0100 Víctor M. Palacio Tárrega victorpala...@adtelecom.es wrote: The use in the second case is not clear. The socket file descriptor is created with socket(), and is used with accept() to create a connection to a client. My intention is to use a callback when a

Re: Using Glib::IOChannel for socket connections

2009-02-03 Thread Chris Vine
On Tue, 3 Feb 2009 21:45:14 + Robert Pearce r...@bdt-home.demon.co.uk wrote: On Tue, 3 Feb 2009, Chris Vine ch...@cvine.freeserve.co.uk wrote : You can set the file descriptor returned by socket() non-blocking and poll it in the same way as you can poll the one returned by accept

Re: Problems on Displaying some characters in a Gtk::TreeView

2009-02-05 Thread Chris Vine
On Thu, 05 Feb 2009 12:47:52 + Filipe Apostolo f.apostolo@gmail.com wrote: Hi to everybody, Well I'm facing a strange problem when I try to display some special character of the ascii table. For example if I want to display character 3 of the table (the heart) it will not be

Re: Some feedback about using gtkmm in real projects.

2009-02-12 Thread Chris Vine
On Thu, 12 Feb 2009 15:43:49 +0100 Paul Davis p...@linuxaudiosystems.com wrote: On Thu, Feb 12, 2009 at 3:34 PM, Germán Diago germandi...@gmail.com wrote: 1.- One of the things I think gets a lot in the way of the programmer in gtkmm is the difference between objects that use Glib::RefPtr

Re: Some feedback about using gtkmm in real projects.

2009-02-12 Thread Chris Vine
On Thu, 12 Feb 2009 17:43:19 + Chris Vine ch...@cvine.freeserve.co.uk wrote: [snip] Since objects derived from Gtk::Widget are not intended to be copied (see more below), it would be pointless to obtain them by factory function. They can be constructed as auto objects (on the stack

Re: Removing widgets in the main loop from another thread

2009-02-26 Thread Chris Vine
On Thu, 26 Feb 2009 13:55:20 +0100 Robert Gründler doo...@gmail.com wrote: Hi all, i'm trying to add/remove widgets dynamically to a gtk::window from a separate thread. The classes i'm creating hold a singleton to the object that runs the main loop in the separate thread, and i communicate

Re: Removing widgets in the main loop from another thread

2009-02-26 Thread Chris Vine
On Thu, 26 Feb 2009 13:48:52 + Chris Vine ch...@cvine.freeserve.co.uk wrote: 3. You don't need to worry about an object ceasing to exist before a Glib::Dispatcher emission is executed via the main loop on one of its non-static methods if you derive the object from sigc::trackable

Re: Removing widgets in the main loop from another thread

2009-02-26 Thread Chris Vine
On Thu, 26 Feb 2009 17:20:04 +0100 Robert Gründler doo...@gmail.com wrote: Because your arrangement doesn't on the face of it make sense, there is probably more to it than at first appears. I therefore just make three points which may or may not be relevant to your question: 1. You

Re: The use of RefPtr

2009-03-07 Thread Chris Vine
On Sat, 07 Mar 2009 12:30:23 -0700 Eddie Carle ed...@erctech.org wrote: On Sat, 2009-03-07 at 18:48 +0100, Murray Cumming wrote: Eddie, presumably you are implementing a custom model (which will be difficult enough already), to avoid duplicating a large block of data inside the regular

Re: The use of RefPtr

2009-03-07 Thread Chris Vine
On Sat, 07 Mar 2009 13:49:48 -0700 Eddie Carle ed...@erctech.org wrote: [snip] In answer to your question, if you do not allow the tree model's reference count to reach zero then you will have a memory leak. But the point you may be missing here is that the tree view also acquires a

Re: The use of RefPtr

2009-03-07 Thread Chris Vine
On Sat, 07 Mar 2009 16:32:18 -0700 Eddie Carle ed...@erctech.org wrote: [snip] Now I see where the memory leak comes from. I was just examining the objectbase.h file in glibmm. This raises an interesting question as to why these functions are virtual. Were they made virtual to allow for

Re: The use of RefPtr

2009-03-07 Thread Chris Vine
On Sun, 8 Mar 2009 00:55:21 + Chris Vine ch...@cvine.freeserve.co.uk wrote: [snip] It would not be impossible (Gtk::Object enables it) to create the Glib::Object wrapper (but only the wrapper) on the stack, but it is ill-advised in a custom pure Glib::Object because it requires you

Re: The use of RefPtr

2009-03-08 Thread Chris Vine
On Sun, 08 Mar 2009 22:50:58 +0100 Murray Cumming murr...@murrayc.com wrote: On Sun, 2009-03-08 at 17:33 +, Chris Vine wrote: In glib-2/gtk+-2 a lot of the code formerly in GtkObject was moved to GObject. There is no significant difference in memory management between a pure GObject

Re: nonmodal dialog, additional main windows

2009-04-13 Thread Chris Vine
On Sun, 12 Apr 2009 16:08:32 -0500 Fleming, Matthew mflem...@mcw.edu wrote: Folks, Would really appreciate your help with the following. If its not obvious, I'm a neophyte with gtkmm. I would like to create a nonmodal (nonblocking) dialog. I can create a dialog by subclassing Gtk::Dialog

Re: g_utf16_to_utf8

2009-04-23 Thread Chris Vine
On Thu, 23 Apr 2009 09:51:41 -0500 Jonathon Jongsma jonat...@quotidian.org wrote: Fabrício Godoy wrote: Can I file a bug? Seems that this function is not wrapped. Yes, please file bugs if there are things that are not wrapped I believe this is deliberate, and not a bug. The problem is

Re: Something wrong with ustring::const_iterator

2009-04-27 Thread Chris Vine
On Mon, 27 Apr 2009 10:30:14 +0200 Krzesimir Nowak qdl...@gmail.com wrote: On Sat, 2009-04-25 at 09:51 +0200, François Legendre wrote: #include iostream #include glibmm.h int main() { Glib::ustring str(Hello) ; for ( Glib::ustring::iterator it = str.begin() ; it

Re: Something wrong with ustring::const_iterator

2009-04-27 Thread Chris Vine
On Mon, 27 Apr 2009 11:38:44 -0400 Hubert Figuiere h...@figuiere.net wrote: On 27/04/09 04:30 AM, Krzesimir Nowak wrote: That doesn't work, because your str is not const, so it executes this method: iterator Glib::ustring::end(); instead of: const_iterator Glib::ustring::end() const;

Re: Something wrong with ustring::const_iterator

2009-04-27 Thread Chris Vine
On Mon, 27 Apr 2009 10:46:49 -0500 Jonathon Jongsma jonat...@quotidian.org wrote: If this is actually a bug It is, see my follow up and test case. Chris ___ gtkmm-list mailing list gtkmm-list@gnome.org

Re: Something wrong with ustring::const_iterator

2009-04-28 Thread Chris Vine
On Mon, 27 Apr 2009 22:23:52 +0200 Murray Cumming murr...@murrayc.com wrote: On Mon, 2009-04-27 at 18:29 +0100, Chris Vine wrote: On Mon, 27 Apr 2009 10:46:49 -0500 Jonathon Jongsma jonat...@quotidian.org wrote: If this is actually a bug It is, see my follow up and test case

Re: Something wrong with ustring::const_iterator

2009-04-28 Thread Chris Vine
On Tue, 28 Apr 2009 17:58:54 +0200 Daniel Elstner daniel.ki...@googlemail.com wrote: I think it should just work to make the comparison operators non-templated functions that take const_iterator arguments only, and rely on the implicit conversion from iterator to const_iterator. Yes, that

Re: Something wrong with ustring::const_iterator

2009-04-28 Thread Chris Vine
On Tue, 28 Apr 2009 21:19:54 +0100 Chris Vine ch...@cvine.freeserve.co.uk wrote: On Tue, 28 Apr 2009 17:58:54 +0200 Daniel Elstner daniel.ki...@googlemail.com wrote: I think it should just work to make the comparison operators non-templated functions that take const_iterator arguments only

Re: Removing widgets in the main loop from another thread

2009-05-14 Thread Chris Vine
On Thu, 14 May 2009 11:17:52 -0400 Damon Register damon.w.regis...@lmco.com wrote: I am working on a small test app in order to understand how to use Glib::Thread. I have read the Glib::Thread reference at http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1Thread.html and

Re: Glib::ustring in utf8 to std::wstring

2009-05-20 Thread Chris Vine
On Wed, 20 May 2009 10:42:17 +0100 Filipe Apostolo f.apostolo@gmail.com wrote: Hi to all, I'm facing a problem that consists to go back to the previous encodding. I'm workin in windows and with DCOM objects. Those DCOM Objects works with wchar parameters. So if I' want to list in a

Re: Problem when closing a program

2009-05-20 Thread Chris Vine
On Wed, 20 May 2009 11:37:21 -0500 Oscar Dávila odavi...@gmail.com wrote: How can i close a program? the thing is i was using Gtk::Main::run(*window) and when i use hide in the main window the program closed but now im using Gtk::Main::run() because i want to hide de main window to open an

Re: Problem when closing a program

2009-05-21 Thread Chris Vine
On Thu, 21 May 2009 10:27:14 -0500 Oscar Dávila odavi...@gmail.com wrote: Thanks, it works for my exit button but when i close my window with the x in the right top window it dont finish the loop. Thanks again. On Wed, May 20, 2009 at 7:10 PM, Chris Vine ch...@cvine.freeserve.co.ukwrote

Re: to many invalidate_rect calls freezes window

2009-05-21 Thread Chris Vine
On Thu, 21 May 2009 22:58:53 +0200 buergi pat_buergi...@gmx.de wrote: perhaps someone could explain how the Dispatcher works, not in code but what happens behind the scenes. when i emit the dispatcher in the worker thread, when does the connected function in the main thread get executed. will

Re: to many invalidate_rect calls freezes window

2009-05-21 Thread Chris Vine
On Thu, 21 May 2009 22:43:10 +0100 Chris Vine ch...@cvine.freeserve.co.uk wrote: On the other hand you don't have to worry about the validity of a Glib::Dispatcher object, which must exist when a slot is executed via a dispatcher (the main loop tries to look up the dispatcher object on slot

Re: Get gchar* from Glib::ustring

2009-06-03 Thread Chris Vine
On Wed, 3 Jun 2009 15:37:53 -0300 Fabrício Godoy skarl...@gmail.com wrote: 2009/6/3 Hubert Figuiere h...@figuiere.net On 06/03/2009 02:08 PM, Fabrício Godoy wrote: path = g_build_filename(ustr1.c_str(), ustr2.c_str(), ustr3.c_str()); Because, as written in the Fine Manual, you

Re: Get gchar* from Glib::ustring

2009-06-03 Thread Chris Vine
On Wed, 03 Jun 2009 23:53:09 +0200 Daniel Elstner daniel.ki...@googlemail.com wrote: Am Mittwoch, den 03.06.2009, 22:18 +0100 schrieb Chris Vine: And note that because the argument is untyped (it is an elipsis argument) you cannot use the normal C++ 0 as a synonym for NULL. Note

Re: Get gchar* from Glib::ustring

2009-06-04 Thread Chris Vine
On Thu, 4 Jun 2009 10:05:21 +0200 (CEST) Mark Roberts gt...@manumark.de wrote: Your arguments to g_build_filename() are pointers to characters. On a 32bit system a pointer is 32bit, on a 64bit system it is 64bit. NULL is a pointer to anything (therefore also 64bit on a 64bit system), while 0

Re: How does libsigc++ accept member functions?

2009-06-04 Thread Chris Vine
On Thu, 04 Jun 2009 16:01:33 +0400 Igor Gorbounov igorbou...@topazelectro.ru wrote: Daniel Elstner пишет: Am Donnerstag, den 04.06.2009, 15:41 +0400 schrieb Igor Gorbounov: Because it looks very ugly, I'm eager to understand how did you bypassed all this stuff using libsigc++?

Re: How does libsigc++ accept member functions?

2009-06-05 Thread Chris Vine
On Fri, 05 Jun 2009 08:51:38 +0400 Igor Gorbounov igorbou...@topazelectro.ru wrote: Daniel Elstner пишет: Am Donnerstag, den 04.06.2009, 16:01 +0400 schrieb Igor Gorbounov: [...] As an example, I'm calling a method directly through a PMF here:

Re: Crash when calling Gdk::Drawable::draw_pixbuf

2009-06-20 Thread Chris Vine
On Sat, 20 Jun 2009 13:33:12 +0200 Falk Schilling falk.schill...@gmx.net wrote: [snip] Thank you for this clarification. My whole experience with GTKMM/GTK+ relates to only a few weeks, so I am far away from understandig the whole complexity of all part libraries. This will explain how the

Re: query on create_from_file and gdk_threads_enter() and gdk_threads_leave()

2009-06-22 Thread Chris Vine
On Mon, 22 Jun 2009 16:47:30 +1000 Robert Bui vnco...@msn.com wrote: Hello all, I am trying to load multiple images (one after another) onto a Gtk::Image widget. I have multiple background threads that looks for files at different location on disk. As soon as there is a new file, one of

Re: Gtk::Image location

2009-07-18 Thread Chris Vine
On Sat, 18 Jul 2009 11:43:28 -0400 xp xjpeng.buff...@gmail.com wrote: Thanks for reply. Yes, what I want is to catch the signal of mouse motion. Actually, I also used Gtk::EventBox. The problem is although I can catch the mouse motion event, the event-x and event-y is for ScrollWindow, but

Re: why on_configure_event() is never called here ?

2009-08-07 Thread Chris Vine
On Thu, 06 Aug 2009 17:16:52 -0400 José Alburquerque jaalburquer...@cox.net wrote: On Thu, 2009-08-06 at 04:47 -0800, Renato Merli wrote: class myCtn : public Gtk::Fixed { public: Gtk::Button btn; int x, y; bool on_configure_event (GdkEventConfigure

<    1   2   3   4   >