Re: Attaching functions to widgets
- From: Sven Neumann <sven gimp org>
- To: "Lourdes Maldonado" <maldonado ibiquity com>
- Cc: "Gtk-List (E-mail)" <gtk-list gnome org>
- Subject: Re: Attaching functions to widgets
- Date: 30 Oct 2001 13:28:50 +0100
Hi,
"Lourdes Maldonado" <maldonado ibiquity com> writes:
> I have a library that implements several dialog boxes. This library
> gets linked in by two applications (say 1 and 2). One of the dialog
> boxes in the library contains Continue and Cancel options, when Continue
> is selected, depending on the application running, a function from
> application 1 or a function from application 2 has to be called but I do
> not want to link in any application specific code in the dialog library.
>
> Is there a way that when say application 1 calls the dialog library it
> can pass in a string with the function name that needs to be called, so
> the dialog code can attached this name to the Continue button on the
> dialog box and if this button is pressed that functions gets called?
you should export the Continue and Cancel button widgets so your
application can connect to the "clicked" signal of the buttons. If you
want a slightly cleaner solution you could also make your dialogs real
widgets derived from GtkDialog (or whatever is appropriate) and have
them emit "continue" and "cancel" signals.
Salut, Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]