Returning *this from Glib::Date::add_days() can be useful

2011-03-20 Thread Kjell Ahlstedt
Hi, I found the following comment in glibmm/glib/src/date.hg: //TODO: Why return Date (which is always *this) from these methods? //Isn't it enough to also change the current instance? //murrayc An answer is, the return value makes it possible to write statements like:

RE: Trouble with Gtk::EventBox and Expose Events

2011-03-22 Thread Kjell Ahlstedt
Hi Andrew, What I think happens is 1. The default signal handler draws the background and the label. 2. Your signal handler draws a new background on top of it all. This is worth trying: 1. in BaseBox::BaseBox() signal_expose_event().connect(sigc::mem_fun(*this, BaseBox::_on_expose_event),

Re: Gtk::AboutDialog

2011-03-24 Thread Kjell Ahlstedt
Hi Stéphane, Have you installed package gvfs? If not, do that. This info is not easy for a gtkmm programmer to find. It's mentioned in the description of gtk_show_uri(), but only in gtk+ version 2.24 and later. It says The uri must be of a form understood by GIO (i.e. you need to install gvfs

Re: GLib-GObject-CRITICAL **: g_value_get_boolean: assertion `G_VALUE_HOLDS_BOOLEAN (value)' failed

2011-03-26 Thread Kjell Ahlstedt
Hi Glus, The message is printed by a function called g_return_if_fail_warning. If your debugger can set a breakpoint at the entry to that function, and then print a backtrace, I think that would be a good start of your debugging session. Kjell lör 2011-03-26 klockan 09:06 +0100 skrev Yann

Re: GLib-GObject-CRITICAL **: g_value_get_boolean: assertion `G_VALUE_HOLDS_BOOLEAN (value)' failed

2011-03-26 Thread Kjell Ahlstedt
to see beyond... I just see that there is an option to call a function... but how to mark a breakpoint to g_return_if_fail_warning ...? Glus 2011/3/26 Kjell Ahlstedt kjell.ahlst...@bredband.net: Hi Glus, The message is printed by a function called g_return_if_fail_warning. If your

Error messages from gmmproc in glibmm and gtkmm

2011-04-03 Thread Kjell Ahlstedt
Perhaps the following observations fit better in Bugzilla, but this seemed easier. I can file bugs, if necessary. I've found that gmmproc leaves a few error messages in the .h files when glibmm and gtkmm are built. (master branch in Git repository) 1) glibmm/gio/glibmm/settings.h //gtkmmproc

Do you want a faster gmmproc?

2011-04-04 Thread Kjell Ahlstedt
Present gmmproc: 13 min 25 s Future gmmproc: 1 min 17 s I've noticed that when you build e.g. gtkmm, the generation of .h/.cc files from .hg/.ccg files is a slow process. It takes more time than the compilation of the .h/.cc files. I suspected that gmmproc spends most its time reading the .defs

Re: Do you want a faster gmmproc?

2011-04-05 Thread Kjell Ahlstedt
I have filed bug 646820 gmmproc: Increase speed by processing many files in one invocation. https://bugzilla.gnome.org/show_bug.cgi?id=646820 mån 2011-04-04 klockan 23:16 +0200 skrev Krzesimir Nowak: Maybe this feature would be very useful when building gtkmm (which has indeed very large defs

Re: Tutorial

2011-04-10 Thread Kjell Ahlstedt
Hi Joseph, You might have found the tutorial here: http://developer.gnome.org/gtkmm-tutorial/stable/ The source code is stored in Git, just as the source code of gtkmm. You can see it at http://git.gnome.org/browse/gtkmm-documentation/ or more specifically at

Re: Do you want a faster gmmproc?

2011-04-11 Thread Kjell Ahlstedt
Yes, I think a binary file with the info from the defs and xml files is the best way to speed up gmmproc. It's too complicated to combine a many-files-per-invocation version of gmmproc with concurrent jobs, run by make. See https://bugzilla.gnome.org/show_bug.cgi?id=646820#c1 Kjell tis

Re: Do you want a faster gmmproc?

2011-04-11 Thread Kjell Ahlstedt
(\@data, $filename); To recreate the data structure, execute $ref_to_data = Storable::retrieve($filename); Of course it's wise to add some error checking, but still very little code is necessary. mån 2011-04-11 klockan 17:49 +0200 skrev Murray Cumming: On Mon, 2011-04-11 at 17:13 +0200, Kjell

Re: ScrolledWindow problem

2011-04-20 Thread Kjell Ahlstedt
gtk+/gtk/gtkscolledwindow.c was modified on 2010-10-30 by Javier Jardón with commit Use gtk_scrollbar_new() instead gtk_[v|h]scrollbar_new() http://git.gnome.org/browse/gtk +/commit/?id=570b90e218d06da28fb7674c010c73da9427aa9b That commit also modifies gtkmenu.c and gtkwidget.c. And there are more

Re: ScrolledWindow problem

2011-04-21 Thread Kjell Ahlstedt
. I suppose the comments and the variable name in bin.ccg are wrong. ons 2011-04-20 klockan 18:08 +0200 skrev Murray Cumming: On Wed, 2011-04-20 at 17:38 +0200, Kjell Ahlstedt wrote: gtk+/gtk/gtkscolledwindow.c was modified on 2010-10-30 by Javier Jardón with commit Use gtk_scrollbar_new

Re: Deriving from Gtk::CellEditable

2011-04-29 Thread Kjell Ahlstedt
Hi Andrew, I became curious, and tried to find an answer to your question. Unfortunately I failed. I doubt that interfaces in glibmm and gtkmm are meant to be used like you want to do, deriving directly from an interface without a corresponding C class that the derived C++ class wraps. It would

Re: Sort a treeview by program

2011-05-02 Thread Kjell Ahlstedt
I have not used this myself, so I'm not 100% sure it will work, but you can try using Gtk::TreeView::Column::clicked(). (Or the equivalent Gtk::TreeViewColumn::clicked().) I think it will have the same effect as a user clicking the header. There is also the sorting TreeModel, Gtk::TreeModelSort,

Are bugs still fixed in gtkmm 2.24?

2011-05-19 Thread Kjell Ahlstedt
won't file a bug report. Or would a bug report still be useful, just to have the bugs documented? Regards Kjell Ahlstedt ___ gtkmm-list mailing list gtkmm-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtkmm-list

Re: Are bugs still fixed in gtkmm 2.24?

2011-05-20 Thread Kjell Ahlstedt
fre 2011-05-20 klockan 12:38 +0200 skrev Murray Cumming: On Thu, 2011-05-19 at 16:14 +0200, Kjell Ahlstedt wrote: I have found two bugs in comboboxtext.cc in gtkmm version 2.24. They have probably been fixed in gtkmm 3.0. ComboBoxText is implemented very differently there. The last

Re: Signals with default handlers

2011-06-01 Thread Kjell Ahlstedt
console_message seems to be the kind of signal that stops calling signal handlers as soon as a called signal handler returns true. See the description of g_signal_accumulator_true_handled. When you connect your signal handler with m_web_view.signal_console_message().connect(sigc::mem_fun(this,

Are vtables of interfaces always correctly initialized?

2011-06-07 Thread Kjell Ahlstedt
This question is related to goocanvasmm bug 606357 (https://bugzilla.gnome.org/show_bug.cgi?id=606357). Inheritance structure of involved classes: class Goocanvas::Item : public Glib::Interface class Goocanvas::ItemSimple : public Glib::Object, public Goocanvas::Item class Rect : public

Re: Are vtables of interfaces always correctly initialized?

2011-06-12 Thread Kjell Ahlstedt
Let's see if I can clarify the reasoning in my previous message. I continue to use GooCanvas classes as an example, but now I'll turn to a syntax that resembles Java. The rules for inheritance hierarchies in C/GObject are more like Java than like C++: Only single inheritance between classes, but

Re: terminate called after throwing an instance of 'Glib::FileError'

2011-06-19 Thread Kjell Ahlstedt
Hello Phong Cao, 1. I compiled and run your program. It started without an error. 2. I renamed the file now-playing.png so the program would not find it. Then I got the same abrupt termination as you got. 3. I restored the file name, and started the program from another directory. Then it also

Re: Problem with memory management with builder.

2011-06-20 Thread Kjell Ahlstedt
Hi Krzysztof, I'm only 99% sure of this, but here's how I think it works: When a top-level window (or any container) is deleted, its child widgets are not unconditionally deleted. They are unreferenced, i.e. their reference counts are decreased by 1, and only if a widget's ref count reaches 0,

Re: Fwd: Problem with memory management with builder.

2011-06-21 Thread Kjell Ahlstedt
Hi Krzysztof, I expanded your program a bit (see attachment) and made some tests. When UNDO_REF_FROM_GET_WIDGET is *not* defined, the program ends normally, and its output is: 1 button-ref_count=3 1 treeview-ref_count=3 2 window-ref_count=3 2 button-ref_count=3 2 treeview-ref_count=3 4

Re: GLib critical message

2011-06-26 Thread Kjell Ahlstedt
Hi Carlos, You are not the first one to get this critical message. See http://mail.gnome.org/archives/gtkmm-list/2011-April/msg00072.html (Deriving from Gtk::CellEditable) and the replies http://mail.gnome.org/archives/gtkmm-list/2011-April/msg00078.html

Re: Query regarding the Gtk::Label::modify_font() function

2011-06-29 Thread Kjell Ahlstedt
Hi, Do you use gtkmm2 or gtkmm3? In gtkmm2 there is the function Gtk::Widget::modify_font(const Pango::FontDescription font_desc). In gtkmm3 it has been replaced by Gtk::Widget::override_font(const Pango::FontDescription font_desc). If you have studied a tutorial for gtkmm2, and then use gtkmm3,

Re: GLib critical message

2011-07-04 Thread Kjell Ahlstedt
The code in the attached file compiles and runs without errors or warnings. It shows one way to inherit from an interface with a property. But it's fairly ugly. Glib::Propertybool redefines property editing-canceled with g_object_class_install_property() instead of

Re: focus chain of children in a Gtk::Layout

2011-07-07 Thread Kjell Ahlstedt
Have you tried Gtk::Container::set_focus_chain()? /Kjell tor 2011-07-07 klockan 16:36 +0200 skrev Yann Leydier: Hi, I'm placing Entries in a Layout in order to mimic the paging a of scanned document that is displayed next to it. I want the user to fill the entries in the read order (eg:

Re: How to change label's font , color , and size using code??

2011-07-23 Thread Kjell Ahlstedt
gtkmm2: font and size: Gtk::Widget::modify_font() color of label: Gtk::Widget::modify_fg() color of widget with editable text: Gtk::Widget::modify_text() gtkmm3: font and size: Gtk::Widget::override_font() color: Gtk::Widget::override_color() Concerning color, see also bug 551912

Re: Gtkmm installation

2011-08-23 Thread Kjell Ahlstedt
I assume that you refer to the Bugzilla comment https://bugzilla.gnome.org/show_bug.cgi?id=653579#c5 To use the version of gtkmm that you have built and installed with 'jhbuild build', you can start a new shell with 'jhbuild shell'. See

Re: Selection color in TreeView

2011-08-23 Thread Kjell Ahlstedt
C++ methods for changing color: gtkmm2: Gtk::Widget::modify_fg(), modify_text(), modify_bg(), modify_base(). gtkmm3: Gtk::Widget::override_color(), override_background_color(). See also bug 551912 (https://bugzilla.gnome.org/show_bug.cgi?id=551912). It's more complicated than you would think to

Re: hand wrapping cluttermm functions

2011-09-12 Thread Kjell Ahlstedt
Hi Ian, I think that the only thing that's really wrong with your code is that you should have take_copy = true in the call to Glib::wrap_auto(). You create a new Glib::RefPtr object, but clutter_animator_set_key() does not increase the reference count. But the code is unnecessarily complex. You

Re: problems with Gtk::ComboBoxText and Gtk::Builder

2011-09-23 Thread Kjell Ahlstedt
Hi, No, I don't think you are doing anything wrong. I think the critical message is a result of the problem discussed in the bugs https://bugzilla.gnome.org/show_bug.cgi?id=653579 (gtkmm) and https://bugzilla.gnome.org/show_bug.cgi?id=650369 (gtk+). You can check, if it helps to add

Re: problems with Gtk::ComboBoxText and Gtk::Builder

2011-09-23 Thread Kjell Ahlstedt
fre 2011-09-23 klockan 17:51 +0200 skrev Stefano Facchini: Il giorno ven, 23/09/2011 alle 16.55 +0200, Kjell Ahlstedt ha scritto: Hi, No, I don't think you are doing anything wrong. I think the critical message is a result of the problem discussed in the bugs https://bugzilla.gnome.org

Re: Help wth packing

2011-09-26 Thread Kjell Ahlstedt
Hi Carlos, Have you tried using Gtk::Alignment? Perhaps something like this: // Constructor: xalign=0.5, yalign=0.0, xscale=0.0, yscale=0.0 my_alignment(0.5, 0.0, 0.0, 0.0); my_vbox.pack_start(my_label, Gtk::PACK_SHRINK); my_vbox.pack_start(my_toolpalette, Gtk::PACK_EXPAND_WIDGET);

Re: Help wth packing

2011-09-29 Thread Kjell Ahlstedt
Hi Carlos, No, I can't get the behavior that you want, and that Gimp achieves. I think Murray is right in suspecting a problem with GtkToolPalette's size request code. I suspect an error in GtkToolItemGroup, in gtk_tool_item_group_size_request(). It seems it requests the same size whether the

Re: keyboard events - for documentation

2011-09-29 Thread Kjell Ahlstedt
Hi, If no one else has time for your contribution to the gtkmm tutorial, I can have a look at it when I've finished my work with bug 658265 (https://bugzilla.gnome.org/show_bug.cgi?id=658265). It may take two or three weeks. I don't work very fast. Kjell tor 2011-09-22 klockan 03:14 +0100 skrev

Re: Wrapping Clutter

2011-10-07 Thread Kjell Ahlstedt
fre 2011-10-07 klockan 15:34 +1300 skrev Ian Martin: Hi, Another question. I'm trying to wrap Clutter::State at present. It's got a struct within it called State. Will it be causing name clashes with the C++ generated class? I can't see how it won't, and I'm getting tied in verbal knots

Re: keyboard events - for documentation

2011-10-12 Thread Kjell Ahlstedt
tor 2011-09-29 klockan 18:46 +0100 skrev lecas malecas: Its alright, better late than never :) Hi again, Now I've tested your example programs and looked at your description in the .txt files. I think they can fit into the gtkmm tutorial after some rework. But I don't decide myself. The

Re: keyboard events - for documentation

2011-10-14 Thread Kjell Ahlstedt
tor 2011-10-13 klockan 19:50 +0100 skrev lecas malecas: Hey, Events propagate to its parents, until you stop it or it reaches the top. I don't remember where this is said in the documentation, but I've seen this behaviour in other places (for example with html/javascript in the web)...

Re: keyboard events - for documentation

2011-10-16 Thread Kjell Ahlstedt
Searching a bit, I found these: http://faq.pygtk.org/index.py?file=faq03.011.htpreq=show http://www.gtk.org/tutorial1.2/gtk_tut-18.html The python one says that the keyboard events work differently than what I've thought... You have found an old version of the gtk+ tutorial.

Re: Label.set_pattern does not work in Gtkmm

2011-10-16 Thread Kjell Ahlstedt
This is a gtk+ bug. It has been corrected in gtk+ 3.2, but it exists in many earlier versions. https://bugzilla.gnome.org/show_bug.cgi?id=658111 If you want underlined text, and you use an earlier version of gtk+ and gtkmm, use Gtk::Label::set_use_markup() and Pango markup. Perhaps you can

Re: Programming with Gtkmm typo

2011-10-21 Thread Kjell Ahlstedt
mån 2011-10-17 klockan 22:13 +0300 skrev Jorge Orf: I think I found a typo in Programming with Gtkmm on page 79 (7.2.4.2. Example): #include gtkmm.h #include packbox.h class ExampleWindow : public Gtk::Window should be #include gtkmm.h #include

Re: Disconnecting signals and connection control

2011-10-21 Thread Kjell Ahlstedt
mån 2011-10-17 klockan 08:41 -0700 skrev eypros: Anyway it works up to a point. The problem is that instead of getting the value of SpinButton as an argument for signal_timeout connection it just increases the speed. This makes me think that maybe I install new connection with each SpinButton

Re: Linking error on Ubuntu

2011-10-27 Thread Kjell Ahlstedt
2011-10-18 15:56, Stefano Facchini skrev: Hi, could anyone using Ubuntu 11.10 have a look at bug 870662 (https://bugs.launchpad.net/ubuntu/+source/gtkmm3.0/+bug/870662) and tell me if the same error is obtained? Yes. Basically, it seems that I cannot link against gtkmm-3.0 and poppler-glib at

Re: Cannot build a complete environment with jhbuildrc

2011-11-02 Thread Kjell Ahlstedt
2011-11-02 16:04, Glus Xof skrev: [Sorry, for this cross-posting. I send this message to gtk+ and gtkmm lists] Hi guys, Since some days ago, I cannot build through jhbuildrc the complete Gtkmm environment that I need to work... The problem seems that the mm wrappers request a newer versions

Re: Why m_scrwindow doesn't resize vertically ?

2011-11-18 Thread Kjell Ahlstedt
2011-11-16 19:35, Glus Xof skrev: Hi guys, To explain better my problem, I write for you a little example code... --- #includegtkmm.h class DialogTest : public Gtk::Dialog { public: DialogTest(); ~DialogTest(){}; private: Gtk::Frame m_frame; Gtk::Label

Re: Gtk::HScale (Gtk::Range): Jump-to-position by left-click instead of middle-click?

2011-11-21 Thread Kjell Ahlstedt
2011-11-19 13:58, Phong Cao skrev: Hello everybody, I am new to Gtkmm. I am trying to develop a small music player using Gtkmm GStreamermm. I use Gtk::HScale for the progress bar, which is responsible for updating the track progress allow user to move to different time position in the

Re: libgnomedbmm

2011-11-22 Thread Kjell Ahlstedt
2011-11-12 16:34, Чистый skrev: Hi! Please help me :) when the make get error: g++: error: /usr/lib/libgnomedb_graph-4.0.so: No such file or directory g++: error: /usr/lib/libgnomedb_extra-4.0.so: No such file or directory g++: error: /usr/lib/libgnomedb-4.0.so: No such file or directory ls

Re: Program suddenly quits after hiding Gtk::Window(Gtk::WINDOW_POPUP) (Attachment included)

2011-11-23 Thread Kjell Ahlstedt
) { // ...and d_popup_win is hidden then show d_popup_win d_popup_win.show(); is_hide = false; Gtk::Main::run(d_popup_win); // !!! added } A question that you don't have to answer: Are you really sure you don't want to use a Gtk::Dialog instead? Kjell Ahlstedt

Re: GThread struct now hidden

2011-11-24 Thread Kjell Ahlstedt
2011-11-23 13:51, Murray Cumming skrev: Unfortunately, glibmm now does not build with --enable-warnings=fatal: templateclass T inline PrivateT::Private(typename PrivateT::DestructorFunc destructor_func) { //TODO: This causes this warning: //extended initializer lists only available with

Re: GThread struct now hidden

2011-11-24 Thread Kjell Ahlstedt
2011-11-24 10:05, Murray Cumming skrev: On Thu, 2011-11-24 at 10:01 +0100, Kjell Ahlstedt wrote: #define G_PRIVATE_INIT(notify) { NULL, (notify), { NULL, NULL } } can be used for initialization, but it can't be used for assignment. This version builds: templateclass T inline PrivateT

Re: int (utf-8) to Glib::ustring

2011-12-02 Thread Kjell Ahlstedt
2011-12-02 10:02, Spazzatura.Live skrev: Hi everyone. I have an hex representation (in a string) of a 2 byte UTF-8 char. When i try to use g_unichar_to_utf8(), it converts a UTF-16 value to a gchar *, so: 1) How can i convert UTF-8 to UTF-16 value? OR 2) How can i convert a UTF-8 value

Re: int (utf-8) to Glib::ustring

2011-12-04 Thread Kjell Ahlstedt
2011-12-03 15:29, Spazzatura.Live skrev: char *utf8hex_to_str(const char *utf8hex) { const size_t utf8_char_size_t = strlen(utf8hex)/2 + 1; char *utf8_char = new char[utf8_char_size_t]; int utf8int; sscanf(utf8hex, %8x, utf8int); utf8_char[utf8_char_size_t-1] = '\0';

Re: No yet encrypted...

2011-12-05 Thread Kjell Ahlstedt
Three comments to the receiving code below. 2011-12-05 09:54, Glus Xof skrev: (I prefer to use a Glib::ustring object instead of a std::string, here). The problem is that at the receiving endpoint, the messages with a multi-byte character doesn't appear (For example: Works fine with strings

Re: (process:5746): GLib-GObject-CRITICAL **: gtype.c:2708: You forgot to call g_type_init() - Fedora 16

2011-12-05 Thread Kjell Ahlstedt
Attached with this email is the source code of this program. I hope you guys can download compile it in your computer to see if it works. Just type make and everything will be compiled... I wonder if there are even errors in my Makefile. Where's the attachment? I don't find any. Kjell

Re: align middle button's labels

2011-12-07 Thread Kjell Ahlstedt
2011-12-07 02:13, kiet tran skrev: Hi, Is there way to align buttons labels to the centre of the button, where that button has more than 1 line text. cheers, Kiet Tran A Gtk::Button is a Gtk::Bin, and the button's label is its child widget. Gtk::Button::get_child() (actually the inherited

Fwd: Re: (process:5746): GLib-GObject-CRITICAL **: gtype.c:2708: You forgot to call g_type_init() - Fedora 16

2011-12-08 Thread Kjell Ahlstedt
meddelande Ämne: Re: (process:5746): GLib-GObject-CRITICAL **: gtype.c:2708: You forgot to call g_type_init() - Fedora 16 Datum: Tue, 6 Dec 2011 09:08:00 -0500 Från: Phong Cao phn...@gmail.com Till: Kjell Ahlstedt kjell.ahlst...@bredband.net Hi Kjell, Thank you for the response

Fwd: Re: (process:5746): GLib-GObject-CRITICAL **: gtype.c:2708: You forgot to call g_type_init() - Fedora 16

2011-12-08 Thread Kjell Ahlstedt
Från: Phong Cao phn...@gmail.com Till: Kjell Ahlstedt kjell.ahlst...@bredband.net Hi Kjell, Thank you for your solution! It works perfectly! On Tue, Dec 6, 2011 at 3:12 PM, Kjell Ahlstedt kjell.ahlst...@bredband.net mailto:kjell.ahlst...@bredband.net wrote: 2011-12-06 15:08, Phong Cao

Re: GStreamermm: Gst::Taglist can not get Gst::TAG_DURATION?

2011-12-08 Thread Kjell Ahlstedt
2011-12-08 11:50, Ian Martin skrev: On 08/12/11 08:53, Phong Cao wrote: I went through the Gst::TagList reference and it is said that Gst::TagList::get_value(Gst::TAG_DURATION, Glib::ValueBase value) required the variable value to be unsigned 64 bit integer

Re: Segmentation fault on append to Glib::ustring

2011-12-09 Thread Kjell Ahlstedt
Hi, I don't know anything about libcurl, and I haven't tried to build and execute your program. I've just studied your code a bit. Are you aware that n in Glib::append(const char* src, size_type n) is _not_ the number of bytes to append? It's the number of UTF-8 encoded Unicode characters.

Re: Segmentation fault on append to Glib::ustring

2011-12-10 Thread Kjell Ahlstedt
is a website content and for compatibility reason (with the other application's function) i used Glib::ustring, but if i try with std::string the result is the same. Thanks for the answer. Stefano. Il 09/12/2011 20:47, Kjell Ahlstedt ha scritto: Hi, I don't know anything about libcurl, and I

Re: Gtkmm DrawingArea tutorial query

2011-12-18 Thread Kjell Ahlstedt
Robert Pearce wrote: Minor thing this... In the DrawingArea section of the tutorial, on the page about arcs, at http://developer.gnome.org/gtkmm-tutorial/2.22/sec-cairo-drawing-arcs.html.en the second paragraph shows how to draw an ellipse then says this contradicts the Cairo

Re: Drag cursor name

2011-12-21 Thread Kjell Ahlstedt
2011-12-21 04:55, lecas malecas skrev: Hi, just an observation. I was just now trying to find the name of the drag cursor ( for Gdk::Cursor::create() ), and when looking through the CursorType enumerator, I couldn't find anything that seemed related to dragging stuff. So I ended up just trying

Re: change font in treeview

2011-12-29 Thread Kjell Ahlstedt
2011-12-29 02:32, kiet tran skrev: Hi, Could any1 show me how to change font and its size for each row in TreeModel. cheers, Kiet Tran The TreeModel stores the data, the TreeView shows the data. The TreeView gets help from CellRenderers, such as CellRendererText. What you need to do is

Re: change background color for Gtk::fixed container

2012-01-05 Thread Kjell Ahlstedt
2012-01-05 03:59, kiet tran skrev: hi everyone, Is it possible to change the background of Gtk::fixed container I tried using modify_bg() function and it didnt do anything. That modify_bg() works for a button widget and Gtk::window. So is there any other method to do this. Cheers, Kiet

Re: very basic question

2012-01-06 Thread Kjell Ahlstedt
2012-01-06 19:22, Andy Gilman skrev: A newbie (seemingly perpetually), I am stumped trying to change the background color of an eventbox. I have included this line: eventbox.modify_bg(Gtk::STATE_NORMAL, color) (having defined a color, I think appropriately), but I keep being told that

Re: disable automatic resizing for every widgets within the main window

2012-01-09 Thread Kjell Ahlstedt
Hi Kiet, Since you've sent a copy to me, and not just to the gtkmm-list, you seem to think that I can answer your questions. I'm sorry, but I can't. I can just give you some wild guesses how to proceed. Even if my guesses are correct, they are no quick fixes. 1. Use the container

Re: how to get gtk::table widget by using just x y coordinate

2012-01-09 Thread Kjell Ahlstedt
I don't think so, but GtkGrid has GtkWidget* gtk_grid_get_child_at(GtkGrid* grid, gint left, gint top); since gtk+ 3.2. This function has not yet been wrapped in gtkmm. Kjell 2012-01-09 06:58, kiet tran skrev: Hi is there way to get widet inside gtk::table container with just coordinates

Re: Creating toolbar menubuttons via UI Manager

2012-01-10 Thread Kjell Ahlstedt
It's possible to use Gtk::MenuToolButton with Gtk::UIManager in gtkmm, but it's rather messy there, too. It's somewhat easier than in gtk+, because it's easier to derive new classes in C++ than it is in C. See the attached file, where I've changed the book/menus/main_menu example in the Gtkmm

Re: Using Gtk::Grid in gtkmm-documentation

2012-01-12 Thread Kjell Ahlstedt
2012-01-10 13:41, Murray Cumming skrev: On Tue, 2012-01-10 at 13:40 +0100, Murray Cumming wrote: The latest unstable version of GTK+ deprecates GtkBox, so we should replace it with Gtk::Grid in the gtkmm book's examples. Does someone have time to do that?

Re: Event Propagation problem

2012-01-13 Thread Kjell Ahlstedt
A long reply to a long question. The most interesting part is at the end of the reply. The propagation of keyboard events is more complicated than the description in the Gtkmm tutorial shows. When I helped Pedro with the Keyboard Events chapter, he found this description:

Re: Event Propagation problem

2012-01-14 Thread Kjell Ahlstedt
Hi Carlos, Glib::SignalProxy1... with its connect() method is documented here: http://developer.gnome.org/glibmm/unstable/classGlib_1_1SignalProxy1.html When I look at your code I notice that my previous long reply was not long enough. I had forgotten the possibility to override default signal

Re: Event Propagation problem

2012-01-15 Thread Kjell Ahlstedt
I think this is work trying: bool Toolbox::on_key_press_event(GdkEventKey* event) { Gtk::Widget* focused_widget = get_focus(); if (focused_widget_shall_override_accelerators(focused_widget)) return focused_widget-event((GdkEvent*)event); return Gtk::Window::on_key_press_event(event);

Re: Event Propagation problem

2012-01-15 Thread Kjell Ahlstedt
2012-01-15 17:10, Kjell Ahlstedt skrev: I think this is work trying: Shall be I think this is *worth* trying: bool Toolbox::on_key_press_event(GdkEventKey* event) { Gtk::Widget* focused_widget = get_focus(); if (focused_widget_shall_override_accelerators(focused_widget)) return

Re: Event Propagation problem

2012-01-15 Thread Kjell Ahlstedt
Yes, it would be a good idea to update the Keyboard Events chapter. I realize now that the example program keyboard_events/simple has an unfortunate mixture of overriding the default signal handler, and connecting an extra signal handler. Similar to what Carlos first did, after my incomplete

Re: Using Gtk::Grid in gtkmm-documentation

2012-01-17 Thread Kjell Ahlstedt
I have a patch for gtkmm-documentation, where Gtk::Table has been replaced by Gtk::Grid in all example programs except book/table. I have deleted book/table. It's identical to book/grid, except for its use of Table instead of Grid. I have also replaced deprecated classes in

Re: Event Propagation problem

2012-01-17 Thread Kjell Ahlstedt
2012-01-16 21:23, lecas malecas skrev: On Sun, Jan 15, 2012 at 6:26 PM, Kjell Ahlstedt kjell.ahlst...@bredband.net wrote: Yes, it would be a good idea to update the Keyboard Events chapter. Ok, I'll try to do that (should I reply to the same bug report of the chapter?). You can either reopen

Re: Using Gtk::Grid in gtkmm-documentation

2012-01-26 Thread Kjell Ahlstedt
I have pushed the patch that replaces Table by Grid in gtkmm-documentation. http://git.gnome.org/browse/gtkmm-documentation/commit/?id=3464d7e149c7035db8eb86610a8f6684ccc77c63 Kjell 2012-01-17 11:24, Kjell Ahlstedt skrev: I have a patch for gtkmm-documentation, where Gtk::Table has been

Re: Something simple I can't do

2012-02-05 Thread Kjell Ahlstedt
Strange! When I add #if 0 cmdOne-property_expand() = true; cmdTwo-property_expand() = true; cmdThree-property_expand() = true; #else cmdOne-set_hexpand(true); cmdOne-set_vexpand(true); cmdTwo-set_hexpand(true); cmdTwo-set_vexpand(true); cmdThree-set_hexpand(true);

Re: SplashScreen no cursor, timeout, top full screen,

2012-02-08 Thread Kjell Ahlstedt
I think this is a way to hide the cursor: Glib::RefPtrGdk::Window gdk_window = fenestre.get_window(); if (gdk_window) gdk_window-set_cursor(Gdk::Cursor::create(Gdk::BLANK_CURSOR)); A possible complication is that Gtk::Widget::get_window() returns a Gdk::Window pointer only if the widget has

Re: how get scroll_to_row working

2012-02-13 Thread Kjell Ahlstedt
function_append() returns a pointer to a local variable (row). That's asking for trouble! I added your code (approximately) to the example program at http://git.gnome.org/browse/gtkmm-documentation/tree/examples/book/treeview/list If I let function_append() return row directly, the compiler

Re: ComboBox with some entries not selectable or grayed out

2012-02-17 Thread Kjell Ahlstedt
The attached file shows one way to gray out a row in a combo box. I've added a bool column to the TreeModel and connected it to the CellRenderer's sensitive property. Search for //!!. It shows where I've modified the combobox/complex example in the gtkmm tutorial. Kjell 2012-02-16 21:17,

Re: Why does this behave the way it does?

2012-02-29 Thread Kjell Ahlstedt
I looked in the source code of GtkTable, and I think the error is in gtk_table_size_request_pass3(). If you're insterested, you can look at http://git.gnome.org/browse/gtk+/tree/gtk/deprecated/gtktable.c The size calculation is not perfect when widgets span multiple columns, and they partly

Re: Why does this behave the way it does?

2012-02-29 Thread Kjell Ahlstedt
2012-02-29 16:16, D. R. Evans skrev: Oooh! That's interesting. Thank you for making things much clearer. So suppose that the bug were fixed, and also suppose that I switch to using a Grid instead of a Table (since if that's deprecated, they might not be willing to fix any bugs related to it).

Re: Why does this behave the way it does?

2012-03-01 Thread Kjell Ahlstedt
Btw, have you considered using Gtk::Fixed instead of Table or Grid? I has its own drawbacks, though. Its description lists several reasons not to use it. I've never used it, and I don't know how useful it is. Kjell 2012-02-29 19:36, Kjell Ahlstedt skrev: 2012-02-29 16:16, D. R. Evans skrev

Re: Why does _WRAP_SIGNAL look for signal in base class?

2012-03-02 Thread Kjell Ahlstedt
|The collision signal| in|ClutterBox2DChild has no default handler. box2d_child_signals[COLLISION] = g_signal_new (collision, G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, 0,

Re: How to make a single cell editable in Gtk::TreeView?

2012-03-04 Thread Kjell Ahlstedt
The attached file is a modified version of the treeview/editable_cells example in the gtkmm tutorial. I've added a bool column to the tree model, and connected it to the editable attribute of two TreeView columns. Search for //!!. It shows where I've modified the treeview/editable_cells

Re: Why does this behave the way it does?

2012-03-04 Thread Kjell Ahlstedt
2012-03-02 16:07, D. R. Evans skrev: D. R. Evans said the following at 03/01/2012 02:28 PM : Kjell Ahlstedt said the following at 02/29/2012 03:19 AM : If you file a bug report, assign it to gtk+. Bug filed: https://bugzilla.gnome.org/show_bug.cgi?id=671170 And they responded

Re: Faling to wrap object in signal handler

2012-03-04 Thread Kjell Ahlstedt
2012-03-04 18:45, a.j.dela...@brighton.ac.uk skrev: Dear all, I've been extending the clutter-box2dmm bindings and have run into another issue. I have exposed the signal_collision so that you can now tell if two Box2DChild objects have collided. It is also necessary to expose

Re: Faling to wrap object in signal handler

2012-03-05 Thread Kjell Ahlstedt
2012-03-04 20:54, Kjell Ahlstedt skrev: It's possible that the wrap_init() function, generated by generate_wrap_init.pl, does not correctly register Clutter::Box2D::Box2DCollision_Class::wrap_new(). Possible reasons: 1. generate_wrap_init.pl has not been told to read the .hg file where

Re: How to make a single cell editable in Gtk::TreeView?

2012-03-06 Thread Kjell Ahlstedt
2012-03-06 08:48, Gerardo Ballabio skrev: 2012/3/4 Kjell Ahlstedtkjell.ahlst...@bredband.net: The attached file is a modified version of the treeview/editable_cells example in the gtkmm tutorial. I've added a bool column to the tree model, and connected it to the editable attribute of two

Re: How to make a single cell editable in Gtk::TreeView?

2012-03-07 Thread Kjell Ahlstedt
2012-03-07 09:00, Murray Cumming skrev: On Tue, 2012-03-06 at 22:28 +0100, Gerardo Ballabio wrote: 2012/3/6, Kjell Ahlstedtkjell.ahlst...@bredband.net: I haven't tested this, but I think you shall call one of the Gtk::TreeView::set_cursor() methods with start_editing = true. That worked after

Re: usage of Gsv::LanguageManager::get_default from Gtksourceviewmm

2012-03-18 Thread Kjell Ahlstedt
2012-03-18 10:12, Basile Starynkevitch skrev: And it is probably because, when executing _app_langman = Gsv::LanguageManager::get_default(); line 619 of my simplemelt-gtkmm-probe.cc I am getting (simplemelt-gtkmm-probe:14602): glibmm-WARNING **: Failed to wrap object of type

Re: convert from alpha to int

2012-03-19 Thread Kjell Ahlstedt
response. I am sorry, I don't think I explained myself well enough. If the user enters the number 24 in an Gtk::Entry, how can I check if the entry is actually a number and not a character string? thank in advance *From:*Kjell Ahlstedt [mailto:kjell.ahlst...@bredband.net] *Sent:* Thursday, March 15

Re: About Dialog : Close button to close dialog?

2012-03-23 Thread Kjell Ahlstedt
There is an AboutDialog example at http://git.gnome.org/browse/gtkmm-documentation/tree/examples/book/dialogs/aboutdialog but I don't think it's mentioned in the gtkmm tutorial. It uses Dialog::show() to show it as a modeless dialog box. Alternatively, you can show a modal AboutDialog with

Re: Button not working

2012-03-24 Thread Kjell Ahlstedt
The documentation of signals is poor in present releases of gtkmm. That will change in the future. Then the documentation will be copied from gtk+ to gtkmm (with small changes). The documentation of GtkButton's activate signal in gtk+ says The ::activate signal on GtkButton is an action

Re: Button not working

2012-03-25 Thread Kjell Ahlstedt
2012-03-24 14:34, nalin4linux77 linux skrev: But friend it is not working when i replace exit(0); with coutHai; Any idea ?? std::cout is buffered. To see the printed text you have to either add an end-of-line cout Hai endl; or explicitly flush the buffer cout Hai flush; Kjell

Re: automatic selection of text in entries on focus in

2012-04-02 Thread Kjell Ahlstedt
2012-04-02 11:29, Yann Leydier skrev: Hi, I have entries that I fill when they get the focus. The text I set is automatically selected and I don't want that. In my application, the user should be able to append text immediately. Neither set_position nor select_region have any effect. I

Re: GTKMM MainMenu tutorial

2012-04-07 Thread Kjell Ahlstedt
2012-04-07 05:34, Phil Wolff skrev: I tried the Source Code link for the MainMenu example at file:///usr/share/doc/gtkmm-documentation/tutorial/html/sec-menus-examples.html

Re: gtkmm-list Digest, Vol 96, Issue 6

2012-04-13 Thread Kjell Ahlstedt
I suppose you have already seen other replies to your question on gtkmm-list, with a reference to the gtkmm tutorial http://developer.gnome.org/gtkmm-tutorial/stable/chapter-builder.html.en It contains the example

  1   2   3   4   5   6   7   >