Glade3-3.6.7-full and gtk-server-2.3.1-03

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
der-schutzhund
Posts: 1045
Joined: Mon 26 Nov 2007, 22:07
Location: Blomberg / Germany

Glade3-3.6.7-full and gtk-server-2.3.1-03

#1 Post by der-schutzhund »

Hi,

i have created a GUI with Glade3-3.6.7 and created with gtk-server-2.3.1-03 a Bashscript.
http://www.murga-linux.com/puppy/viewtopic.php?t=60705

Can anyone tell me how to read the contents of text fields, etc. in the Gladefile?

Greedings

Wolfgang

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#2 Post by sunburnt »

Hi der-schutzhund; I`d help, but I don`t know what a Glade file looks like.

Post a section of code showing what you want to ( scrape or read? ).

der-schutzhund
Posts: 1045
Joined: Mon 26 Nov 2007, 22:07
Location: Blomberg / Germany

#3 Post by der-schutzhund »

Hi,

very nice that you will help me!

The Projectfiles are:
project.glade, project.inc, functions.inc, events.inc and the script myproject

In the file functions.inc each Button gets his function and in this file i need the entry of the textfields into stringsvariables and the other checkfields.

In "on_speichern_clicked ()" i have tried out but it will not work!

The pet must be installed!

greetings

Wolfgang
Attachments
gtk-server-2.3.1-03.pet
gtk-server-2.3.1
(80.43 KiB) Downloaded 288 times
test.tar.gz
the Projectfiles
(2.27 KiB) Downloaded 264 times
configmaster_easyshot.jpg
this is the GUI-Design made with Glade
(21.72 KiB) Downloaded 294 times

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#4 Post by sunburnt »

I think what you`re saying is that you want to assign the contents of the text boxes and check boxes to variables?
Doesn`t Glade have a standard way of doing this? I`ve never used Glade so I`m not aware of how it returns data.

If you want to scrape the info from the GUI while the GUI is up and running, the Glade file doesn`t contain the data.
I assumed you wanted to extract text from a file, if this is so show the text you want to automatically grab.

I was not aware that Glade uses GtkServer as it`s GTK+ wrapper.

You could just make the GUI with GtkServer and use it`s output.

If this is for Puppy only, then best to use GtkDialog for the GUI.

Or use BaCon to make the GUI. It makes an exec. file that shows GUIs and manipulates data ( BASIC language ).
http://murga-linux.com/puppy/viewtopic.php?t=48901
http://basic-converter.org/
http://basic-converter.proboards.com/
BaCon exec files should work in almost any Linux distro.
.

der-schutzhund
Posts: 1045
Joined: Mon 26 Nov 2007, 22:07
Location: Blomberg / Germany

#5 Post by der-schutzhund »

The Target is to make a gui without programming the Elements!!!!!!
Is it right that this is impossible with Bacon and gtkdialog-ide ?

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#6 Post by seaside »

der-schutzhund ,

I don't really know much about gtkserver, but looking at your test "project.glade" file, if you want to pass the text variables to your "functions.inc" file, you could pass them as parameters to the called functions like this....

Code: Select all

<signal name="clicked" handler="on_abbrechen_clicked "$VARID" "$VARID" "$VARID""/>
Each $VARID is the widget "id=VAR" for those widgets. For example to pass only the "<widget class="GtkEntry" id="wpassid">" text entry, the code would be

Code: Select all

<signal name="clicked" handler="on_abbrechen_clicked "$wpassid""/>
Your function could receive them as ""$1" "$2" , etc.


Cheers,
s

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#7 Post by jamesbond »

der-schutzhund,

I use glade to generate GtkBuilder XML files (instead of glade files). This way you don't depend on libglade, but only on base libgtk. I have written an example here, granted it is for TreeView but it would be similar for entry fields: http://murga-linux.com/puppy/viewtopic.php?t=77026.

If you want to see more working examples, get Fatdog ISO and boot it. Most of Fatdog's core GUI are based on gtk-server. Examine the contents of /usr/sbin/*.sh.xml - these are the GtkBuilder XML GUI files which you can open with glade, and the corresponding *.sh files are the shell scripts for the GUI. fatdog-event-manager.sh and fatdog-event-manager.sh.xml are probably the easiest to follow.

cheers!
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

Post Reply