implenting signals for the widgets in widgets.c



On 2/7/07, Lars Clausen <lars raeder dk> wrote:

> > > http://bugzilla.gnome.org/show_bug.cgi?id=60331

> > http://gtk.org/tutorial/x2202.html

I do think it's worth it to make them correct, for several reasons: 1)
it will make them reusable in other contexts, 2) it means that normal
and custom gtk widgets behave the same, 3) it makes it easier to find
out where things are happening in the future, and 4) correct does tend
to be the good solution in the long term.

Hello,

This is about implementing signals for all the custion Dia* widgets,
since they are necessary before group properties can be edited from
the properties dialog. I have modified most of the widgets to emit
useful signals. All the changes are pretty non-intrusive, except
DiaDynamicMenu.

I have replaced the activate_func callback used by the dynamic menu,
with a "changed" signal. All the constructors have been modified
accordingly, and all users now connect their callback to the signal
instead of passing it as an argument.

Attaching a patch with only the changes that modify DiaDynamicMenu,
and all its users. This includes the sheets menu, font selector and
the color selector. The patch "works for me".

If this works out, will send another patch that implements a
"value-changed" signal for all the remaining simpler widgets.

Note: I've tried to use only the Gtk 2.0 API in all the new code,
avoiding all the deprecated stuff.

Sameer.
--
Research Scholar, KReSIT, IIT Bombay
http://www.it.iitb.ac.in/~sameerds/

Attachment: dynamic_menu_signals.patch
Description: Text Data



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