[Glade-users] Opening a dialog window with a button
- From: parrishmm earthlink net (Parrish M Myers)
- Subject: [Glade-users] Opening a dialog window with a button
- Date: Sat, 16 Sep 2000 20:52:22 -0700 (PDT)
Hi all,
I am extremly green with gtk in general not to mention glade. But, in
my fooling around with creating an interface to the crontab I came up
with a question that all of you might be able to answer...
I have created two dialog windows. To keep it simple I put one button
on the main dialog that is shown on execution of the program (dialog1).
The second dialog is made but the gtk_show_widget(dialog2) function
has not been called yet. (I took that line out of the main.c file as
per the instructions in the comment above the function calls.) Now all
I want to do is open dialog2 when I click the button on dialog 1. I
found a way of doing it, but it required me to make GtkWidget *dialog2
global. The reason I say this is because if I rebuild the source in
glade (after a modification) the modified source gets lost... except in
main.c and callback.c. Main seems to be the only function that knows
about GtkWidget *dialog2, so rather than passing the widget into the
create_dialog1 (which will get lost during an update using glade) I set
the dialog2 wiget global and created a callback function:
open_dialog_2 () {
gtk_show_widget(dialog2);
}
Now the question: I did all this be modifing the source directly.
Which can be lost when I update the source through glade. Is there a
right way to do this completly from within glade? I couldn't seem to
do it directly from within glade without makeing GtkWidget *dialog2
global (I don't like that...).
thanks
=====
-----------------------------------------------------------
Academia is a little like child | Parrish M. Myers
rearing, it provides a chance at | The Wacked Jester
immortality without the stretch | parrishmm earthlink net
marks -- (unknown source) |
-----------------------------------------------------------
__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]