Archive

Archive for October, 2008

how to create a glade store

29 October 2008 Ivo Leave a comment

unfortunately, guys at pygtk haven’t thought about a solution about making persistent GUIs. This means that, at your next graphical application restart, you will get the initial window size and settings. And with initial, I mean the design ones.

In the last few days, I have developed a small class to store sensible informations: gladeStore. This class is instanciated just on the application ‘destroy’ event, and its job is to save all the listed properties for all the widgets belonging to your application.

It works without problems on a small test application. I will be bughunting on Gino the next few days.

BTW: Gino interface has been redesigned just today. And XMLTreeView supports the ‘tail’ of XML nodes, for the sake of completeness :-)

how to create/share a directory over a SMB network, using the command line

14 October 2008 Ivo Leave a comment

@echo off
if x%1x==xx goto usage
if +%2+ == ++ goto usage
if +%1+ == +/?+ goto usage
if +%1+ == +?+ goto usage
:command
md %1
net share %2=%1 /grant:Everyone,FULL
CACLS %1 /E /G Everyone:F
goto end
:usage
echo salut mon gars, ce script va creer le dossier que tu passe comme premier paramètre
echo et le partage sur le reseau (pour Everyone) avec le nom que t'as passé comme deuxième paramètre.
echo exemple:
echo cescript.bat c:\totocaca totocacapartage
:end

Categories: Uncategorized Tags: , , , ,

how to install gtksourceview2 on windows

8 October 2008 Ivo 1 comment

download and install all the following components:

gtk runtime installer (easier than take all the binaries and put them together)
http://sourceforge.net/projects/gtk-win/

gtksourceview2.4 binaries for win32
http://ftp.gnome.org/pub/gnome/binaries/win32/gtksourceview/2.4/
put them in the gtk runtime lib folder (or somewhere in your path)

pygtksourceview2 installer for win32
http://ftp.gnome.org/pub/gnome/binaries/win32/pygtksourceview/

libxml2, latest version binaries (really take the latest version)
ftp://xmlsoft.org/libxml2/win32/
put them in the gtk runtime lib folder (or somewhere in your path)

ok, now you can take the code in the previous post and execute it successfully.

up-to-date sample code for gtksourceview2 (from the svn)

8 October 2008 Ivo Leave a comment
#CREDITS
#http://www.progbox.co.uk/wordpress/?p=300
#DEPENDS: gtksourceview2 and libxml2
import gtk
import gtksourceview2
win = gtk.Window()
bufferS = gtksourceview2.Buffer()
manager = gtksourceview2.LanguageManager()
language = manager.get_language("xml")
#langS.set_mime_types(["text/x-python"])
bufferS.set_language(language)
bufferS.set_highlight_syntax(True)
view = gtksourceview2.View(bufferS)
view.set_show_line_numbers(True)
win.resize(400,400)
win.add(view)
win.show_all()
gtk.main()
Categories: Uncategorized Tags: , , ,

news from the SVN

3 October 2008 Ivo Leave a comment

this week’s edition of “news from the SVN” follows:

- XMLFinder: a graphical xpath evaluator (PyGTK)
- XMLFindTool and XMLTreeView: two classes which implement the Gino and XMLFinder cores; XMLFinder uses both the classes
- something doesn’t work in the CompressedFile class; under investigation

no binary distributions of these tools are provided, for now

notice: we have moved, once more. this blog is now available also on tec.nilleb.com