adding button events to a gtkdrawingarea based gobject

2011-02-14 Thread James Morris
Hi,

(forgive some imprecise names here, am writing from memory and in a
rush before work)

I'm adapting some code which uses gobject to create a widget. The code
previously used GtkWidget as the parent_class but I am trying to adapt
it to GtkDrawingArea as the parent_class.

However, the button_press_event code is no longer activated within the
custom widget now that it's a drawing area. How do I activate it?

I know with an ordinary GtkDrawingArea if I want to add
button-press-events to use gtk_add_events, but the code that uses the
custom widget shouldn't need to do this and besides the widget needs
to connect to it's own internal private implementation code anyway so
gtk_add_events is obviously wrong.

Can anyone provide some pointers please?

Thanks,
James.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk3: FileChooser schema not found

2011-02-14 Thread Allin Cottrell
On Sun, 13 Feb 2011, Allin Cottrell wrote:

 I have glib 2.28.0 installed, along with gtk 2.24.0 and gtk 3.0.0.
 Calls to the FileChooser in my app work as expected in 2.24, but
 in 3.0.0 they produce:

 GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser'
 is not installed

 and the program aborts. The file
 org.gtk.Settings.FileChooser.gschema.xml is installed in
 $prefix/share/glib-2.0/schemas (2133 bytes).

Solution: $prefix/share is not searched by default. This path must
be present in XDG_DATA_DIRS if the FileChooser is to work, as in
XDG_DATA_DIRS=/opt/gtk3/share:/usr/share...

Allin Cottrell
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk3: FileChooser schema not found

2011-02-14 Thread Kevin DeKorte
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 02/14/2011 04:08 PM, Allin Cottrell wrote:
 On Sun, 13 Feb 2011, Allin Cottrell wrote:
 
 I have glib 2.28.0 installed, along with gtk 2.24.0 and gtk 3.0.0.
 Calls to the FileChooser in my app work as expected in 2.24, but
 in 3.0.0 they produce:

 GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser'
 is not installed

 and the program aborts. The file
 org.gtk.Settings.FileChooser.gschema.xml is installed in
 $prefix/share/glib-2.0/schemas (2133 bytes).
 
 Solution: $prefix/share is not searched by default. This path must
 be present in XDG_DATA_DIRS if the FileChooser is to work, as in
 XDG_DATA_DIRS=/opt/gtk3/share:/usr/share...
 
 Allin Cottrell

To me that is probably the biggest disadvantage with using GSettings is
that the application will crash if settings can't be found. I would like
to see this behavior changed to be more like gconf where missing keys
are allowed to be missing.

Kevin



- -- 
Get my public GnuPG key from
http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x7D0BD5D1
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk1Zu4AACgkQ6w2kMH0L1dFfIgCfQaqAUGVbX8VAlNT4Lx8CJE7n
CeIAnissRATzC4984x82ggrxVTX2enHM
=NhdA
-END PGP SIGNATURE-
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list