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
Glade3-3.6.7-full and gtk-server-2.3.1-03
-
- Posts: 1045
- Joined: Mon 26 Nov 2007, 22:07
- Location: Blomberg / Germany
-
- Posts: 1045
- Joined: Mon 26 Nov 2007, 22:07
- Location: Blomberg / Germany
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
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
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.
.
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.
.
-
- Posts: 1045
- Joined: Mon 26 Nov 2007, 22:07
- Location: Blomberg / Germany
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....
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
Your function could receive them as ""$1" "$2" , etc.
Cheers,
s
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""/>
Code: Select all
<signal name="clicked" handler="on_abbrechen_clicked "$wpassid""/>
Cheers,
s
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!
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]