Re: [glade--]Todays patches...

On Thu, 12 Dec 2002, Christof Petig wrote:

> > -          f.FunctionArg() << "Gtk::Menu_Helpers::AccelKey(" << mods
> > -          	<< ", " << key << ")";
> > +          f.FunctionArg() << "Gtk::Menu_Helpers::AccelKey("
> > +          	<< "'" << key << "', " << mods << ")";
> this change is dubious indeed, as it will not work with e.g. F1. Can you
> tell me exactly what glade-2 puts in the .glade file when you specify
> F1. IIRC glademm has to emit something like GDK_F1 or Gdk::F1?

You're correct. Glade-2 writes the full Gdk key name (without the GDK_
prefix, very inconsistent with the mask definition):
<accelerator key="F1" modifiers="GDK_CONTROL_MASK" signal="activate"/>

So, the easiest fix would be to prefix the key with either GDK_ or Gdk::
as you say.

> If you still have problems with current code, tell me again (because I
> fixed these different).

My biggest problem is that I can't get the current CVS version the same
day it was commited. I'll have to wait about one day. Is this something
the gnome cvs server is supposed to do? Even if I try to browse the files
with Bonzai, I cannot view the latest version, although I can see the
latest diffs which is just wierd...

As I mentioned above, I have to prefix the accelerator key with GDK_ to
get the real key definition (Gdk::<keyvalue> does not seem to be

There is also a new problem with in line 64: gcc
requires call to w.WritePropertyEnumNS() to be to a const function if used
on a const object. This might be a compiler bug (gcc 3.0) as the method is
static and its constness shouldn't matter. My solultion was to call
Gtk_ScrolledWindow::WritePropertyEnumNS() instead...

And finally, in, line 375: Its not a good idea to declare the
variable inside the switch block (in fact, gcc 3.0 refuses to compile
it), so I moved the declaration outside.

Let me know if you want diffs for my fixes above...

Björn Axelsson

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]