Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 31 Jul 2014, 05:50
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Glade3-3.6.7-full and gtk-server-2.3.1-03
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [7 Posts]  
Author Message
der-schutzhund

Joined: 26 Nov 2007
Posts: 781
Location: Blomberg / Germany

PostPosted: Sun 28 Apr 2013, 11:09    Post subject:  Glade3-3.6.7-full and gtk-server-2.3.1-03
Subject description: how to read fields of gladefile?
 

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
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5010
Location: Arizona, U.S.A.

PostPosted: Sun 28 Apr 2013, 13:55    Post subject:  

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? ).
Back to top
View user's profile Send private message 
der-schutzhund

Joined: 26 Nov 2007
Posts: 781
Location: Blomberg / Germany

PostPosted: Sun 28 Apr 2013, 15:50    Post subject:  

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
gtk-server-2.3.1-03.pet
Description  gtk-server-2.3.1
pet

 Download 
Filename  gtk-server-2.3.1-03.pet 
Filesize  80.43 KB 
Downloaded  129 Time(s) 
test.tar.gz
Description  the Projectfiles
gz

 Download 
Filename  test.tar.gz 
Filesize  2.27 KB 
Downloaded  126 Time(s) 
configmaster_easyshot.jpg
 Description   this is the GUI-Design made with Glade
 Filesize   21.72 KB
 Viewed   224 Time(s)

configmaster_easyshot.jpg

Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5010
Location: Arizona, U.S.A.

PostPosted: Tue 30 Apr 2013, 13:59    Post subject:  

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.
.
Back to top
View user's profile Send private message 
der-schutzhund

Joined: 26 Nov 2007
Posts: 781
Location: Blomberg / Germany

PostPosted: Tue 30 Apr 2013, 15:17    Post subject:  

The Target is to make a gui without programming the Elements!!!!!!
Is it right that this is impossible with Bacon and gtkdialog-ide ?
Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Tue 30 Apr 2013, 16:36    Post subject:  

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:
<signal name="clicked" handler="on_abbrechen_clicked &quot;$VARID&quot; &quot;$VARID&quot; &quot;$VARID&quot;"/>


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:
<signal name="clicked" handler="on_abbrechen_clicked &quot;$wpassid&quot;"/>


Your function could receive them as ""$1" "$2" , etc.


Cheers,
s
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 2053
Location: The Blue Marble

PostPosted: Sat 04 May 2013, 12:32    Post subject:  

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, Slacko and Puppeee user. Puppy user since 2.13
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [7 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0715s ][ Queries: 13 (0.0194s) ][ GZIP on ]