--- devede-3.21.0.old/devede.py +++ devede-3.21.0/devede.py @@ -35,117 +35,37 @@ import cairo print "DeVeDe 3.21.0" -if (sys.platform!="win32") and (sys.platform!="win64"): - try: - print "Locale: "+str(os.environ["LANG"]) - except: - print "Locale not defined" - -# append the directories where we install the devede's own modules -tipo=-1 - +progdir = "__META_PREFIX__/data" +tipo = -1 + try: - fichero=open("./interface/wmain.ui","r") - fichero.close() - tipo=2 - found=True + fichero = open (progdir + "/version.txt", "r") + fichero.close() + tipo = 0 + found = True except: - found=False - -if found==False: - try: - fichero=open("/usr/share/devede/wmain.ui","r") - fichero.close() - tipo=0 - found=True - except: - found=False - -if found==False: - try: - fichero=open("/usr/local/share/devede/wmain.ui","r") - fichero.close() - tipo=1 - found=True - except: - found=False + found = False -if tipo==0: - #gettext.bindtextdomain('devede', '/usr/share/locale') - #Note also before python 2.3 you need the following if - #you need translations from non python code (glibc,libglade etc.) - #there are other access points to this function - #gtk.glade.bindtextdomain("devede","/usr/share/locale") - #arbol=gtk.Builder("/usr/share/devede/devede.glade",domain="devede") - # append the directories where we install the devede's own modules - - share_locale="/usr/share/locale" - glade="/usr/share/devede" - sys.path.append("/usr/lib/devede") - font_path="/usr/share/devede" - pic_path="/usr/share/devede" - other_path="/usr/share/devede" - help_path="/usr/share/doc/devede" - print "Using package-installed files" - -elif tipo==1: - # if the files aren't at /usr, try with /usr/local - #gettext.bindtextdomain('devede', '/usr/share/locale') - #Note also before python 2.3 you need the following if - #you need translations from non python code (glibc,libglade etc.) - #there are other access points to this function - #gtk.glade.bindtextdomain("devede","/usr/share/locale") - #arbol=gtk.Builder("/usr/local/share/devede/devede.glade",domain="devede") - - share_locale="/usr/share/locale" # Are you sure? - # if the files aren't at /usr, try with /usr/local - glade="/usr/local/share/devede" - sys.path.append("/usr/local/lib/devede") - font_path="/usr/local/share/devede" - pic_path="/usr/local/share/devede" - other_path="/usr/local/share/devede" - help_path="/usr/local/share/doc/devede" - print "Using local-installed files" - -elif tipo==2: - # if the files aren't at /usr/local, try with ./ - #gettext.bindtextdomain('devede', './po/') - #Note also before python 2.3 you need the following if - #you need translations from non python code (glibc,libglade etc.) - #there are other access points to this function - #gtk.glade.bindtextdomain("devede","/usr/share/locale") - #arbol=gtk.Builder("./devede.glade",domain="devede") - - # if the files aren't at /usr/local, try with ./ - share_locale="./po/" - glade="./interface" - sys.path.append(os.getcwd())#("./") - font_path=os.getcwd()#"./" - pic_path=os.path.join(font_path, "pixmaps") #pic_path=font_path - other_path=os.path.join(font_path,"pixmaps") - help_path=os.path.join(font_path,"doc") - print "Using direct files" - +if found: + share_locale = progdir + glade = progdir + "/interface" + font_path = progdir + pic_path = progdir + other_path = progdir + help_path = progdir + sys.path.append (progdir) else: - print "Can't locate extra files. Aborting." - sys.exit(1) - + print "Can't locate extra files. Aborting." + sys.exit (1) ##################### # GetText Stuff # ##################### -gettext.bindtextdomain('devede',share_locale) -locale.setlocale(locale.LC_ALL,"") -gettext.textdomain('devede') -gettext.install("devede",localedir=share_locale) # None is sys default locale -# Note also before python 2.3 you need the following if -# you need translations from non python code (glibc,libglade etc.) -# there are other access points to this function -#gtk.glade.bindtextdomain("devede",share_locale) - -arbol=gtk.Builder() -arbol.set_translation_domain("devede") +locale.setlocale (locale.LC_ALL,"") +gettext.textdomain ('devede') +arbol = gtk.Builder() +arbol.set_translation_domain ("devede") # To actually call the gettext translation functions # just replace your strings "string" with gettext("string") @@ -194,9 +114,8 @@ # global variables used (they are stored in a single dictionary to # avoid true global variables): -# there are these two that aren't stored in the dictionary because they are very widely used: -# arbol -# structure +# there are these two that aren't stored in the dictionary because they are +# very widely used: arbol and structure global_vars={} @@ -301,10 +220,7 @@ font_path+="devedesans.ttf" global_vars["font_path"]=font_path -print "Entro en fonts" fonts_found=devede_fonts.prepare_devede_font(home,font_path) -print "Salgo de fonts" - devede_other.load_config(global_vars) # load configuration errors="" # check for installed programs --- devede-3.21.0.old/docs/html/menu.html~ +++ devede-3.21.0/docs/html/menu.html~ @@ -1,80 +0,0 @@ - - - - -DeVeDe, a video DVD creator - - -

DeVeDe, a video DVD creator

-

Up: help index

-

Next: Creating the disk image

- -

Menu options

- -

DeVeDe allows to add a menu to the video DVDs. This menu will allow to jump to each title. Here you can see -the default menu, with two titles:

- -

- -

If you click the Menu options button in the main window, you will see this:

- -

- -

The first block allows you to add a title to your menu. This title will be shown at the upper part of the menu, -always centered. You can choose the font type and color, and you can add a shadow under it with the color -you want. You can freely choose the font size too, because the title will never touch the menu entries.

- -

When choosing a color you can set the transparency level using the Opacity option. If this value is -set to 0, that color will be fully transparent, so the element with that color will be invisible. If this value -is 255, that color will be fully opaque. With other values the element will be semitransparent, allowing to -"see through" it. An example: if you don't want DeVeDe to add the black background rectangles under each title, -just set its opacity to 0, rendering it invisible.

- -


When the opacity is set to 0, that color -is transparent, so the element rendered with it will be invisible.

- -

The second block allows you to change the background picture. This way you can create a custom menu -for your DVD. You can use all picture formats supported by Gnome. Clicking the Set default background will -set again the default picture used by DeVeDe: a white background with a DVD disk.

- -

The third block allows to choose a sound file to use as soundtrack for the menu. By default the menus use -a file with 38 seconds of pure silence, but you can change it, having this way menus with music. Again, the -Set menus without sound button will restore the original silence file.

- -

The next block allows you to choose the alignment. You can put the list of titles in the top, middle or bottom -of the screen; you can also choose to put them left, center or right aligned too. In the right part, you can set the -margins for the menus. The value is set as percentage, so a value of 10 in the top margin will mean "10% from the -top of the screen".

- -

In the next block allows you to change the font style and size, and the colors used to render the inactive -text, the active text, the text background color and the shadow color. Again you can use transparency, in order to -remove the elements you don't want.

- -

- -

Here you must be carefull: you can only change the font size, not the button size, so if you make it too big, -you will have a menu like this:

- -


You must be carefull with the font size, or -you will get incorrect results like this.

- -

The optimal font size is 12 points, but maybe for some special fonts it can be different, so always -use the Preview menu button to ensure that everything has the desired size.

- -

Finally the last block allows to decide if you want the menu to be shown when you put the disk in the -player, or only when you press the Menu button in the remote. In the later case, when the disk is inserted -it starts to play the first title.

- -

Let's see an example. Let's create a menu with the following options:

- -

- -

Here we set the background color to fully transparent, added yellow shadows to the titles list, and set a -red ink with a black shadow to the title. We also moved the menu to the left. The result is here:

- -

- -

Up: help index

-

Next: Creating the disk image

- - \ No newline at end of file