Glade2script commands
Prev The Glade2script Reference Next


Glade2script commands

These commands perform actions on a widget, modify its value, size, colour, ... from the associate script

APPINDICATOR@@name@@icon@@menu@@icon-path
CLIP@@GET
CLIP@@SET@@My text
COLOR@@widget,widget@@modify@@gtk_state@@color
COMBO@@CLEAR@@combobox[,combobo,...]
COMBO@@DELEND@@combobox
COMBO@@END@@combobox@@item[|icon]
COMBO@@FINDDEL@@combobox@@item
COMBO@@FINDSELECT@@combobox@@item
COMBO@@IMG@@combobox@@item|filename[|size]
EXIT@@
EXIT@@SAVE
FILE@@FILTER@@filechooser@@add_mime_type@@text/plain,text/html
GEO@@GET@@window
GEO@@SET@@window@@width height X Y
GET@widget.cmd()
GTKRC@@stylefile
IMG@@img@@filename@@width@@height
ISACTIVE@@widget
ITER@@MyFunction
MAKEMENU@@widget@@menu_name@@item::fonction::arg@@...
MULTI@@GET@@cmd()@@widget,widget
MULTI@@SET@@cmd()@@widget,widget
NOTIFY@@timer@@titre@@texte@@icon
PLUGIN@@CMD@@name@@cmd
PLUGIN@@INIT@@plugin@@name@@arg@@arg@@...
POINTER@@START@@delay@@widget
POINTER@@STOP@@widget
SCREEN@@
SET@widget.cmd()
STATUS@@statusbar@@My Text
SUBMENU@@menu_name@@label_menuitem@@item::fonction::arg@@...
SYSTRAY@@name@@menu@@icon@@infobulle
TERM@@FONT@@font
TERM@@KILL[@@sig]
TERM@@SEND@@commande
TERM@@WRITE@@text
TEXT@@TAG@@textview@@tag,tag
TEXT@@AUTOUR@@textview@@texteAvant@@texteAprès
TEXT@@AUTOURTAG@@textview@@tag@@texteAvant@@texteAprès
TEXT@@CLEAR@@textview
TEXT@@CREATETAG@@textview@@tagname@@args
TEXT@@CURSOR@@textview@@text
TEXT@@CURSORTAG@@textview@@tag@@text
TEXT@@DELEND@@textview
TEXT@@DELTAG@@textview@@tag,tag
TEXT@@END@@textview@@text
TEXT@@ENDTAG@@textview@@text
TEXT@@FIND@@textview@@text@@action
TEXT@@HIZO@@treeview
TEXT@@HIZOTAG@@textview
TEXT@@LOAD@@textview@@fichier
TEXT@@RSELECT@@textview@@newText
TEXT@@RSELECTTAG@@textview@@tag@@newText
TEXT@@SAVE@@textview@@fichier
TEXT@@SELECTTAG@@textview@@tag
TEXT@@SOURCE@@LANG@@textview@@lang
TEXT@@SOURCE@@STYLE@@textview@@style
TIMER@@START@@delay@@function
TIMER@@STOP@@function
TOGGLE@@ACTIVE@@widget,widget
TOGGLE@@EXPANDER@@widget,widget
TOGGLE@@SENSITIVE@@widget,widget
TOGGLE@@VISIBLE@@widget,widget
TREE@@BOTTOM@@treeview[@@line]
TREE@@CELL@@treeview@@[line[,col]]@@[data]
TREE@@CLEAR@@treeview
TREE@@DOWN@@treeview[@@line]
TREE@@END@@treeview@@data
TREE@@FIND@@treeview@@col/None@@motif
TREE@@FINDDEL@@treeview@@col/None@@motif
TREE@@FINDSELECT@@treeview@@col/None@@motif
TREE@@FORCE_SELECT@@treeview
TREE@@GET@@treeview
TREE@@HIZO@@treeview
TREE@@IMG@@treeview@@data|data@@colonne@@size
TREE@@INSERT@@treeview@@line@@data
TREE@@LOAD@@treeview@@fichier
TREE@@PROG@@treeview@@line,col@@value
TREE@@SAVE@@treeview@@fichier
TREE@@SELECT@@treeview@@row
TREE@@TOP@@treeview[@@line]
TREE@@UP@@treeview[@@line]
WEBKIT@@CACHE@@webview@@folder@@pattern@@dialog
WEBKIT@@DISCONNECT@@webview@@webcache,webrequest,webmenu,...
WEBKIT@@DOWNLOAD@@webview@@choice
WEBKIT@@JSFILE@@webview@@file
WEBKIT@@LINKFILTER@@webview@@pattern
WEBKIT@@LOAD@@name@@uri/html
WEBKIT@@LOADED@@webview,webview
WEBKIT@@MENU@@webview@@item::function::value/html@@...
WEBKIT@@OVERLINK@@webview,webview
WEBKIT@@REQUEST@@webview@@pattern
WEBKIT@@SAVE@@webview
WEBKIT@@SUBMENU@@menuitem@@item::function::value/html@@...
WINDOW@@BACKGROUND@@name@@image
WINDOW@@TRANS@@name@@trans@@color


APPINDICATOR@@name@@icon@@menu@@icon-path
Init new app indicator (not avalaible with GTK3)
name: acces name
icon: the icon name
menu: the context menu
path: additional icon theme path or None
see exemple for usage
CLIP@@GET
Get the clipboard content. Indicate the --clipboard option
sh: 'clipboard' function will be called with the clipboard content as argument.
py: clipboard content
CLIP@@SET@@My text
Loads 'My text' in the clipboard. Indicate the --clipboard option
COLOR@@widget,widget@@modify@@gtk_state@@color
Changes the color of a widget
#FFFFFF or name color
modify gtk2: modify_fg, modify_text, modify_bg, modify_base
modify gtk3: background_color, color
gtk_state: NORMAL, SELECTED, ACTIVE, PRELIGHT
echo 'COLOR@@_textview1@@color@@NORMAL@@black'
COMBO@@CLEAR@@combobox[,combobo,...]
Deletes all the elements of the combobox
COMBO@@DELEND@@combobox
Deletes the last element of the combobox.
COMBO@@END@@combobox@@item[|icon]
Adds a line to the combo.
icon: name of the image (gtk theme), optional
COMBO@@FINDDEL@@combobox@@item
Deletes one combobox element by its item.
item: Regular expression
COMBO@@FINDSELECT@@combobox@@item
Selects a combobox element by its item.
item: Regular expression
COMBO@@IMG@@combobox@@item|filename[|size]
Adds a line with image to the combo.
size: in pixel, optional
filename: relative or absolute path of the picture
EXIT@@
Exits without keeping variables
EXIT='no' or exit code 1
EXIT@@SAVE
Exits with the variables
EXIT='yes' or exit code 0
FILE@@FILTER@@filechooser@@add_mime_type@@text/plain,text/html
Adds a filter to fileselection
add_mime_type => text/plain,text/html,...
add_pattern => *view*,*tray*,... (see pygtk doc for pattern syntax)
GEO@@GET@@window
Dimensions and location of the window
sh: geo@width height X Y
py: ('geo', (width, height, X, Y))
window_geo variable loaded too
GEO@@SET@@window@@width height X Y
Resizes and moves a window
GET@widget.cmd()
Gets a widget value via a pygtk command and loads a variable in the environnement
sh: The widget.cmd() command will load the ${widget_cmd} variable
py: (value)
GTKRC@@stylefile
Loads a rc-style file (or css file in gtk3)
stylefile: relative or absolute path of the gtk-style file
IMG@@img@@filename@@width@@height
Modify an image
filename: relatif or absolute path of the image
width, height: image size in pixels
echo 'IMG@@_img_tux@@tux.png@@150@@150'
ISACTIVE@@widget
Resends all the active toogles for the widget childs
sh: isactive@widget widget widget
py: (widgets_list)
ITER@@MyFunction
Calls a function of the associate script
This allows to call a function in the environnement loaded with the new variables
plus ...
MAKEMENU@@widget@@menu_name@@item::fonction::arg@@...
Creates a context menu (is easier to use glade to create it ...)
widget: the widget which will receive the menu
menu_name: menu name
item: menu label
function: function to be called
arg: function argument
use `separator::None::None' to add separator
MULTI@@GET@@cmd()@@widget,widget
Runs the pygtk command on the widgets.
Same principle as GET@, but simultaneously on several widgets
same as GET@
MULTI@@SET@@cmd()@@widget,widget
Runs the pygtk command on the widgets.
Same principle as SET@, but simultaneously on several widgets
NOTIFY@@timer@@titre@@texte@@icon
Displays a notify message
timer: display delay in millisecondes
titre: message title
texte: text to display
icon: image path or icon name
dependancies: pynotify and libnotify
echo 'NOTIFY@@2@@Titre@@Ligne1\nLigne2\nLigne3@@dialog-yes'
PLUGIN@@CMD@@name@@cmd
Execute a plugin command
PLUGIN@@INIT@@plugin@@name@@arg@@arg@@...
Starts plugin
plugin the plugin name
name the name used for the plugin instance
POINTER@@START@@delay@@widget
Starts the cursor monitoring on a widget
delay: milliseconds
sh: move@x y
py-cb: ('move', x, y)
POINTER@@STOP@@widget
STops the cursor monitoring for the widget
SCREEN@@
Loads the screen dimensions in the environment
keep for retro-compatibility since < 2.3.0
otherwise G2S_SCREEN_HEIGHT, G2S_SCREEN_WIDTH variables was loaded
screen_height="1200" screen_width="1800"
py: (width, height)
SET@widget.cmd()
runs a pygtk command (show(), hide(), ...)
STATUS@@statusbar@@My Text
Displays a text in a statusbar.
SUBMENU@@menu_name@@label_menuitem@@item::fonction::arg@@...
Creates a sub-menu
menu_name: menu name
label_menuitem: the menu label where the sub-menu will appear from
SYSTRAY@@name@@menu@@icon@@infobulle
Displays a systray icon.
name: acces name
icon: the icon name
menu: associated contextmenu or None
infobulle: tootltip text
Default hide, use pygtk command to show it and more (see exemple)
TERM@@FONT@@font
Modify the terminal font
Indicate the --terminal option
font: pangoFontDescription ex: serif,monospace bold italic condensed 10
TERM@@KILL[@@sig]
Kills the process launched in the terminal (not avalaible with GTK3)
sig: numerical kill signal
Indicate the --terminal option
TERM@@SEND@@commande
Runs a command in the terminal
TERM@@WRITE@@text
Writes in the terminal
TEXT@@TAG@@textview@@tag,tag
Apply a tag to the entire textbuffer
tag: name of the tag(s) previously created
TEXT@@AUTOUR@@textview@@texteAvant@@texteAprès
Circles a text selection
TEXT@@AUTOURTAG@@textview@@tag@@texteAvant@@texteAprès
Circles a text selection with tag
TEXT@@CLEAR@@textview
Deletes the textview
TEXT@@CREATETAG@@textview@@tagname@@args
Creates a tag that can be used for the textview
tagname: tag name
args: see pygtk doc, e.g.: style=Pango.Style.ITALIC
gtk2: pango.STYLE_ITALIC
gtk3: Pango.Style.ITALIC
echo 'TEXT@@CREATETAG@@textview[,textview,...]@@redItalic@@style=Pango.Style.ITALIC,foreground=red'
TEXT@@CURSOR@@textview@@text
Adds some text at the cursor location
TEXT@@CURSORTAG@@textview@@tag@@text
Adds some text with tag at the cursor location
TEXT@@DELEND@@textview
Deletes the last line of the textview
TEXT@@DELTAG@@textview@@tag,tag
Deletes tag(s) of the textview
Use ALL to delete all tags
TEXT@@END@@textview@@text
Adds at the end of the textview
TEXT@@ENDTAG@@textview@@text
Adds at the end of the textview with a tag
echo 'TEXT@@ENDTAG@@_textview1@@un text with <redItalic>tag</redItalic>'
TEXT@@FIND@@textview@@text@@action
Search text
text: text to find, use ^ or $ for starts or ends line search
action: scroll, select, or tag name
TEXT@@HIZO@@treeview
Calls the textview function with its content as argument
The end-of-line will be replaced by some @@
sh: hizo@texte@@texte@@texte...
py: ('hizo', texte)
TEXT@@HIZOTAG@@textview
Calls the textview function with its content as argument
The end-of-line will be replaced by some @@
sh: hizotag@texte@@texte@@texte...
py: ('hizotag', texte)
TEXT@@LOAD@@textview@@fichier
Loads the textview from a file
fichier: absolute or relative file path
TEXT@@RSELECT@@textview@@newText
Replace the selected text
TEXT@@RSELECTTAG@@textview@@tag@@newText
Replace the selected text with a tag
TEXT@@SAVE@@textview@@fichier
Saves the textview in a file
fichier: absolute or relative file path
TEXT@@SELECTTAG@@textview@@tag
Adds/remove one or several tag(s) to the selection
TEXT@@SOURCE@@LANG@@textview@@lang
Set the language code view
Only with --sourceview option
Environnement variable G2S_SOURCEVIEW_LANG loaded
TEXT@@SOURCE@@STYLE@@textview@@style
Set the language code view
Only with --sourceview option
Environnement variable G2S_SOURCEVIEW_STYLE loaded
TIMER@@START@@delay@@function
Loop call of a function
delay: milliseconds
TIMER@@STOP@@function
Stops the loop call
TOGGLE@@ACTIVE@@widget,widget
Toggle the active status of one or several widget(s) (check, radio, toggle)
TOGGLE@@EXPANDER@@widget,widget
Opens or closes one or several expander(s)
TOGGLE@@SENSITIVE@@widget,widget
Toggles the sensitive (grey) status of one or several widget(s)
TOGGLE@@VISIBLE@@widget,widget
Toggles the visibility status of one or several widget(s)
TREE@@BOTTOM@@treeview[@@line]
Push down in last position the selected line or the indicated line
Indicate the --tree/-t option
line: line number (optional)
TREE@@CELL@@treeview@@[line[,col]]@@[data]
Modify a cell or a line
Indicate the --tree/-t option
line: path (1 ou 1:0)
col: colonne (optionnel)
data: text|text|text
if not `data', the line will be erased
if not `col', line will be replaced
else the cellule will be modified
TREE@@CLEAR@@treeview
Deletes the treeview
Indicate the --tree/-t option
TREE@@DOWN@@treeview[@@line]
Push down the selected line or the indicated line
Indicate the --tree/-t option
line: line number (optional)
TREE@@END@@treeview@@data
Adds a line at the end of the treeview
Indicate the --tree/-t option
data: text|text|text
TREE@@FIND@@treeview@@col/None@@motif
Finds and sends the lines according to a motif and a column
Indicate the --tree/-t option
col/None: if None, will be the entire line
motif: Regular expression
sh: find@item|path|path|path...
py: (None, [liste_find], 'find')
TREE@@FINDDEL@@treeview@@col/None@@motif
Finds and deletes a line according to a motif and a column
Indicate the --tree/-t option
col/None: if None, will be the entire line
motif: Regular expression
sh: finddel@path@linedata
py: (path, [line], 'finddel')
TREE@@FINDSELECT@@treeview@@col/None@@motif
Finds and selects a line according to a motif and a column
Indicate the --tree/-t option
col/None: if None, will be the entire line
motif: Regular expression
TREE@@FORCE_SELECT@@treeview
Force the variable selection (security block)
Indicate the --tree/-t option
TREE@@GET@@treeview
Loads the selected line in a variable and calls the treeview function
Python direct acces: self.g2s.retourne_selection(treename)
Indicate the --tree/-t option
variable and calls function, arg: line@data|data|data
TREE@@HIZO@@treeview
Sends the treeview content to its function
path will send if it's a real treeview (arborescence)
With python to get return, call directly self.g2s.TREEHIZO('TREE@@HIZO@@treeview')
Indicate the --tree/-t option
sh: hizo@[path@]data|data@@[path@]data|data => the lines are separated by @@
py: (None, [list], 'hizo')
TREE@@IMG@@treeview@@data|data@@colonne@@size
Adds a line containing an image
Indicate the --tree/-t option
column: where the image is
size: in pixels
echo 'TREE@@IMG@@treeview1@@texte col 1|texte col 2|tux.png@@2@@150'
TREE@@INSERT@@treeview@@line@@data
insert a line in the treeview
Indicate the --tree/-t option
line: path (1 or 1:0)
data: text|text|text
TREE@@LOAD@@treeview@@fichier
Loads the treeview from a file
Indicate the --tree/-t option
fichier: absolute or relative file path
TREE@@PROG@@treeview@@line,col@@value
Modify the value of a progressbar contained in the treeview
Indicate the --tree/-t option
value: 0 to 100
echo 'TREE@@PROG@@treeview1@@1,2@80'
TREE@@SAVE@@treeview@@fichier
Saves the treeview in a file
Indicate the --tree/-t option
fichier: relative or absolute file path
TREE@@SELECT@@treeview@@row
Select row in the treeview
Indicate the --tree/-t option
row: integrer
TREE@@TOP@@treeview[@@line]
Push up in first position the selected line or the indicated line
Indicate the --tree/-t option
line: line number (optional)
TREE@@UP@@treeview[@@line]
Push up the selected line or the indicated line
Indicate the --tree/-t option
line: line number (optional)
WEBKIT@@CACHE@@webview@@folder@@pattern@@dialog
Puts in cache filtered via the pattern
dossier: folder path or None (/tmp/webcache)
pattern: Regular expression
dialog: verbose / quiet
sh: cache@url
py: (cache, url)
WEBKIT@@DISCONNECT@@webview@@webcache,webrequest,webmenu,...
disconnects all signals
WEBKIT@@DOWNLOAD@@webview@@choice
Action to perform during a download request
choice: UserChoose/UserSave/GetLink
UserChoose calls the function with the save destination user choice
UserSave: saves a file directly from the user choice, also calls the function
GetLink: simple function call
sh: UserChoose@destination, UserSave@destination, GetLink@url
py: (arg, value)
WEBKIT@@JSFILE@@webview@@file
Loads a JS file in a html environnement
file: absolute and relative file path
WEBKIT@@LINKFILTER@@webview@@pattern
Filters each user click on links via the pattern
pattern: Regular expression
linkfilter@url
WEBKIT@@LOAD@@name@@uri/html
Loads the webview
uri: http://something;com or /home/folder/file.html
html: html raw text
WEBKIT@@LOADED@@webview,webview
Calls the function when the html is loaded
loaded
WEBKIT@@MENU@@webview@@item::function::value/html@@...
Creates a context menu
item:function:value/html
item: menu label
function: function to call
value: value of the element under the cursor
html: html of the element under the cursor
separator:None:None
WEBKIT@@OVERLINK@@webview,webview
Calls the function when cursor goes above the links
sh: overlink@url
py: (overlink, url)
WEBKIT@@REQUEST@@webview@@pattern
Filters the http requests
pattern: `ALL' / item
All: calls the function with all the requests as argument
item: filters via the regular expression (does not display the filtered requests in the webview)
sh: request@http://...
py: (request, http//...)
WEBKIT@@SAVE@@webview
Calls the webview function with its content as argument
sh: save@html_quoted
py: ('save', html)
WEBKIT@@SUBMENU@@menuitem@@item::function::value/html@@...
Creates a context sub-menu
menuitem: label of the context menu from where the sub-menu will appear
item:function:value/html
item: menu label
function: function to call
value: value of the element under the cursor
html: html of the element under the cursor
separator:None:None
WINDOW@@BACKGROUND@@name@@image
Uses an image as window background (not available GTK3)
this command must be run before the window display,
set the window on invisible then run a show().
name: window name
image: relative or absolute image path
WINDOW@@TRANS@@name@@trans@@color
Ajusts the transparency and color of the window background (not available GTK3)
add the --transparent option
name: window name
trans: transparency (0 to 1)
color: #ffffff or color name



Prev The Glade2script Reference Next