[Glade-users] Interface Source Code
- From: ljohnson accessnet com (Eljin)
- Subject: [Glade-users] Interface Source Code
- Date: Sat, 26 Mar 2005 12:57:06 -0500
I've got a couple of questions.
I need to make some changes to the interface.c source code. Glade keeps
adding in stuff that I don't need and it's
just easier for me to edit it by hand.
I need to know, however, if it would be beneficial for me to move all of
the GtkWidget* definitions into the header file?
I've seen this done in a couple of programs and looks as if it would
help me with the first major problem I ran into.
I was looking through the examples for using notebooks and trying to
implement a remove_page on the notebook in my code.
It kept crashing with a segmentation fault. Finally, after hunting
someone down in a chat room, they pointed out to me that I needed to
change my "GtkWidget* notebook1;" line to read: "GtkWidget* notebook1 =
GTK_NOTEBOOK(user_data);" in the callback function. I also had a hard
time finding the documentation for user_data.
Would declaring the widgets in the header file make it easier for the
calling functions to find them?
Lastly, the create_main_window function is huge and difficult to read,
so I would like to split off the code that creates each page in the
notebook into a separate function, which would also make it easier to
tweak the interface.
Does anyone have any useful opinions about this and would like to help
out a novice programmer?
I haven't taken a class in programming in about 14 years now and never
in C, but have managed to teach myself a lot and would like to learn more.
Lee
ljohnson accessnet com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]