Re: Dynamic Object

2005-10-31 Thread John Cupitt
On 10/31/05, Kranz, Willi [EMAIL PROTECTED] wrote:
 I have to create ca. 50 Objects in an application.
 Each Object has 2 Eventboxes, 2 Labes and a Pixmap
 and 2 or 3 callback-functions.

 Or what is the best way to solve this problem.

If your object is simple, you can just write a function to build one
and call it 50 times.

If it's more complicated, I would write a new compound widget. There's
a chapter in the gtk tutorial about this:

http://gtk.org/tutorial/c2201.html

One of the nice things about gtk (compared to Xt based kits, anyway)
is that it's very easy to subclass widgets to change their behaviour.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Missing include in gscanner.h

2005-10-31 Thread Gian Mario Tagliaretti
2005/10/31, Uzytkownik [EMAIL PROTECTED]:

 I'm not quite sure I'm doing correctly(bad format of patch, bad mailing
 list).

I think all patches should go into bugzilla not on the mailing lists
so the developers can review it and approve or reject.

cheers
--
Gian Mario Tagliaretti
PyGTK GUI programming
http://www.parafernalia.org/pygtk/
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


bindings for scale widgets

2005-10-31 Thread John Cupitt
Hello all,

My app has a main window containing (as well as other stuff) some
comboboxes and some hscale widgets. If I use the mouse scrollwheel to
go up and down, and the mouse pointer happens to be over one of these
widgets, instead of scrolling the window, it changes the widget value.
This unfortunately makes the scrollwheel too dangerous to use :-(
which is annoying.

I'd like to be able to stop the scrollwheel changing hscale and
optionmenu widgets, but I'm not sure what the best way is. I found
gtk_binding_*, which looks promising, but there's not much
documentation and the things I tried didn't seem to have any effect.
Does anyone have any good ideas on this?

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


Naming conventions

2005-10-31 Thread César Leonardo Blum Silveira
Hello,

Are there any naming conventions used for naming my widgets'
variables, so that for example when I have to name a label, instead of
naming it foo_label I could name it lblFoo?

Thanks,

César
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


GtkTooltips event handler

2005-10-31 Thread Gian Mario Tagliaretti
Hi all,

I don't know if this is the correct list to ask these questions, is
something about gtk internals, but I don't think devel-list will
appeciate these kind of questions :) if not please let me know.

I was looking at gtktooltips.c to get some ideas on a custom tooltip,
to be implemented with pygtk but I have some troubles in understanding
this lines in the event handler function:

if ((event-type == GDK_LEAVE_NOTIFY || event-type == GDK_ENTER_NOTIFY) 
  event-crossing.detail == GDK_NOTIFY_INFERIOR)

If I'm right here we check if the pointer leave or enter the widget,
but what is GDK_NOTIFY_INFERIOR?

thanks in advance

cheers
--
Gian Mario Tagliaretti
PyGTK GUI programming
http://www.parafernalia.org/pygtk/
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Programming style

2005-10-31 Thread Wallace Owen
On Mon, 2005-10-24 at 17:21 -0400, Tristan Van Berkom wrote:
 ...
 I just wanted to point out that the user data argument is usable and
 efficient (since nobody had mentioned that yet).
 
 Ofcourse there are cases where it isn't convenient to use the user_data;
 I might as well also note that, with the cost of a slight overhead;
 g_object_set_data (); is often usefull for this type of inconvenience.

gtk_object_set_user_data() is deprecated, so we're left with
g_object_set_data(), which will involve a string lookup.


  // Wally

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