menubar question



hi there,

i have a menubar on an app which includes the following line:


        GtkWidget *filew;
        filew = gtk_file_selection_new ("File selection");

        (cut)

        static GtkItemFactoryEntry menu_items[] = {
          { "/_File",         NULL,         NULL,          0, "<Branch>" },
          { "/File/_New",     "<control>N", hello,         0, NULL },
          { "/File/_Open",    "<control>O", ShowWidget,    0, NULL },


i'd like to open a file browser if the user clicks "file | open" on the
menubar.   the problem is that i'm not sure how to show the widget from here.

i have a function:

        void ShowWidget(GtkWidget *widget)
        {
                gtk_widget_show(widget);
        }

which i plan on using things that are transient like pop-up windows and a
file browser.  i'd like to pass *filew to ShowWidget().  the problem is, i'm
not sure how to pass arguments to the callbacks listed in GtkItemFactory.

i just started learning about gtk this morning.  any help would be
appreciated!

thanks!
pete

-- 
"The following addresses had permanent fatal errors..."      p dirac org
                               -- Mailer Daemon              www.dirac.org/p




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