Commit bc6fa87b authored by Sergio Costas's avatar Sergio Costas

Renamed module from devede to devedeng

Now it uses the 'locale' folder to create the locales list names.
parent cfb9238a
......@@ -12,7 +12,7 @@
<property name="program_name">Devede NG</property>
<property name="copyright" translatable="yes">2014 Raster Software Vigo</property>
<property name="authors">Sergio Costas Rodríguez</property>
<property name="logo">devede.png</property>
<property name="logo">devedeng.png</property>
<property name="logo_icon_name"/>
<property name="license_type">gpl-3-0</property>
<child internal-child="vbox">
......
......@@ -25,15 +25,11 @@ def get_data_files():
(os.path.join('share', 'doc', 'devede_ng', 'html'), glob('docs/html/*'))
]
try:
for pofile in [f for f in os.listdir('po') if f.endswith('.po')]:
pofile = os.path.join('po', pofile) # po/fr.po
modir, mofile = get_mopath(pofile)
# translations must be always in /usr/share because Gtk.builder only search there. If someone knows how to fix this...
target = os.path.join('/usr','share', modir) # share/locale/fr/LC_MESSAGES/
data_files.append((target, [mofile]))
except:
pass
for lang_name in [f for f in os.listdir('locale')]:
mofile = os.path.join('locale', lang_name,'LC_MESSAGES','devede_ng.mo')
# translations must be always in /usr/share because Gtk.builder only search there. If someone knows how to fix this...
target = os.path.join('/usr','share', 'locale', lang_name, 'LC_MESSAGES') # share/locale/fr/LC_MESSAGES/
data_files.append((target, [mofile]))
return data_files
......@@ -97,9 +93,9 @@ setup(
keywords='dvd video',
packages=['devede'],
packages=['devedeng'],
package_dir={"devede" : "src/devede"},
package_dir={"devedeng" : "src/devedeng"},
#package_data={'devede': ['data/*.ui']},
......
......@@ -22,11 +22,11 @@ import gettext
import locale
from gi.repository import Gtk
import devede.project
import devede.configuration_data
import devede.choose_disc_type
import devedeng.project
import devedeng.configuration_data
import devedeng.choose_disc_type
config_data = devede.configuration_data.configuration.get_config()
config_data = devedeng.configuration_data.configuration.get_config()
if config_data == None:
print ("Can't locate extra files. Aborting.")
......@@ -44,8 +44,8 @@ _ = gettext.gettext
Gtk.init(sys.argv)
mwindow = devede.project.devede_project()
ask_type = devede.choose_disc_type.choose_disc_type()
mwindow = devedeng.project.devede_project()
ask_type = devedeng.choose_disc_type.choose_disc_type()
Gtk.main()
config_data.save_config()
......@@ -17,13 +17,13 @@
from gi.repository import Gtk
import os
import devede.configuration_data
import devedeng.configuration_data
class about_window:
def __init__(self):
self.config = devede.configuration_data.configuration.get_config()
self.config = devedeng.configuration_data.configuration.get_config()
builder = Gtk.Builder()
builder.set_translation_domain(self.config.gettext_domain)
......
......@@ -17,7 +17,7 @@
from gi.repository import Gtk
import os
import devede.configuration_data
import devedeng.configuration_data
class add_files:
......@@ -25,7 +25,7 @@ class add_files:
def __init__(self):
self.config = devede.configuration_data.configuration.get_config()
self.config = devedeng.configuration_data.configuration.get_config()
def run(self):
......
......@@ -17,13 +17,13 @@
from gi.repository import Gtk
import os
import devede.configuration_data
import devedeng.configuration_data
class ask_window:
def __init__(self):
self.config = devede.configuration_data.configuration.get_config()
self.config = devedeng.configuration_data.configuration.get_config()
def run(self,text,title):
......
......@@ -17,14 +17,14 @@
from gi.repository import Gtk
import os
import devede.configuration_data
import devede.add_files
import devedeng.configuration_data
import devedeng.add_files
class ask_subtitles:
def __init__(self):
self.config = devede.configuration_data.configuration.get_config()
self.config = devedeng.configuration_data.configuration.get_config()
def run(self):
......@@ -41,8 +41,8 @@ class ask_subtitles:
wencoding = builder.get_object("encoding_l")
wlanguage = builder.get_object("language_l")
if (devede.add_files.add_files.last_path != None):
self.wfilename.set_current_folder(devede.add_files.add_files.last_path)
if (devedeng.add_files.add_files.last_path != None):
self.wfilename.set_current_folder(devedeng.add_files.add_files.last_path)
lang_selection = 0
enc_selection = 0
......
......@@ -19,11 +19,11 @@
import subprocess
import os
import devede.configuration_data
import devede.executor
import devede.mux_dvd_menu
import devedeng.configuration_data
import devedeng.executor
import devedeng.mux_dvd_menu
class avconv(devede.executor.executor):
class avconv(devedeng.executor.executor):
supports_analize = False
supports_play = False
......@@ -82,16 +82,16 @@ class avconv(devede.executor.executor):
continue
if (mpeg1 and mp2):
devede.avconv.avconv.disc_types.append("vcd")
devedeng.avconv.avconv.disc_types.append("vcd")
if (mpeg2 and mp2):
devede.avconv.avconv.disc_types.append("svcd")
devede.avconv.avconv.disc_types.append("cvd")
devedeng.avconv.avconv.disc_types.append("svcd")
devedeng.avconv.avconv.disc_types.append("cvd")
if (mpeg2 and mp2 and ac3):
devede.avconv.avconv.disc_types.append("dvd")
devedeng.avconv.avconv.disc_types.append("dvd")
if (divx and mp3):
devede.avconv.avconv.disc_types.append("divx")
devedeng.avconv.avconv.disc_types.append("divx")
if (h264 and mp3):
devede.avconv.avconv.disc_types.append("mkv")
devedeng.avconv.avconv.disc_types.append("mkv")
return True
else:
......@@ -101,8 +101,8 @@ class avconv(devede.executor.executor):
def __init__(self):
devede.executor.executor.__init__(self)
self.config = devede.configuration_data.configuration.get_config()
devedeng.executor.executor.__init__(self)
self.config = devedeng.configuration_data.configuration.get_config()
def convert_file(self,file_project,output_file,video_length,pass2 = False):
......@@ -112,7 +112,7 @@ class avconv(devede.executor.executor):
else:
self.text = _("Converting %(X)s (pass 1)") % {"X" : file_project.title_name}
# Prepare the converting process for the second pass
tmp = devede.avconv.avconv()
tmp = devedeng.avconv.avconv()
tmp.convert_file(file_project, output_file, video_length, True)
# it deppends of this process
tmp.add_dependency(self)
......@@ -398,7 +398,7 @@ class avconv(devede.executor.executor):
movie_path = os.path.join(output_path,"menu_"+str(n_page)+".mpg")
self.command_var.append(movie_path)
muxer = devede.mux_dvd_menu.mux_dvd_menu()
muxer = devedeng.mux_dvd_menu.mux_dvd_menu()
final_path = muxer.create_mpg(n_page,output_path,movie_path)
# the muxer process depends of the converter process
muxer.add_dependency(self)
......
......@@ -18,12 +18,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>
import subprocess
import devede.configuration_data
import devede.executor
import devedeng.configuration_data
import devedeng.executor
import os
import json
class avprobe(devede.executor.executor):
class avprobe(devedeng.executor.executor):
supports_analize = True
supports_play = False
......@@ -47,8 +47,8 @@ class avprobe(devede.executor.executor):
def __init__(self):
devede.executor.executor.__init__(self)
self.config = devede.configuration_data.configuration.get_config()
devedeng.executor.executor.__init__(self)
self.config = devedeng.configuration_data.configuration.get_config()
def process_stdout(self,data):
return
......
......@@ -16,10 +16,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>
import subprocess
import devede.configuration_data
import devede.executor
import devedeng.configuration_data
import devedeng.executor
class brasero(devede.executor.executor):
class brasero(devedeng.executor.executor):
supports_analize = False
supports_play = False
......@@ -43,8 +43,8 @@ class brasero(devede.executor.executor):
def __init__(self):
devede.executor.executor.__init__(self)
self.config = devede.configuration_data.configuration.get_config()
devedeng.executor.executor.__init__(self)
self.config = devedeng.configuration_data.configuration.get_config()
def burn(self,file_name):
......
......@@ -19,13 +19,13 @@ from gi.repository import Gtk,GObject
import os
import subprocess
import devede.configuration_data
import devedeng.configuration_data
class choose_disc_type(GObject.GObject):
def __init__(self):
self.config = devede.configuration_data.configuration.get_config()
self.config = devedeng.configuration_data.configuration.get_config()
builder = Gtk.Builder()
builder.set_translation_domain(self.config.gettext_domain)
......@@ -34,7 +34,7 @@ class choose_disc_type(GObject.GObject):
builder.connect_signals(self)
self.wask_window = builder.get_object("wselect_disk")
self.cv = devede.converter.converter.get_converter()
self.cv = devedeng.converter.converter.get_converter()
dvd = True
vcd = True
cvd = True
......
......@@ -15,18 +15,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>
import devede.configuration_data
import devede.mplayer
import devede.avconv
import devede.avprobe
import devede.ffmpeg
import devede.ffprobe
import devede.vlc
import devede.brasero
import devede.k3b
import devede.mkisofs
import devede.genisoimage
import devede.mpv
import devedeng.configuration_data
import devedeng.mplayer
import devedeng.avconv
import devedeng.avprobe
import devedeng.ffmpeg
import devedeng.ffprobe
import devedeng.vlc
import devedeng.brasero
import devedeng.k3b
import devedeng.mkisofs
import devedeng.genisoimage
import devedeng.mpv
class converter:
......@@ -41,10 +41,10 @@ class converter:
def __init__(self):
self.config = devede.configuration_data.configuration.get_config()
self.config = devedeng.configuration_data.configuration.get_config()
# List of classes with conversion capabilities, in order of preference
self.c = [devede.vlc.vlc, devede.mpv.mpv, devede.mplayer.mplayer, devede.ffmpeg.ffmpeg, devede.ffprobe.ffprobe, devede.avconv.avconv, devede.avprobe.avprobe,
devede.brasero.brasero, devede.k3b.k3b, devede.mkisofs.mkisofs, devede.genisoimage.genisoimage]
self.c = [devedeng.vlc.vlc, devedeng.mpv.mpv, devedeng.mplayer.mplayer, devedeng.ffmpeg.ffmpeg, devedeng.ffprobe.ffprobe, devedeng.avconv.avconv, devedeng.avprobe.avprobe,
devedeng.brasero.brasero, devedeng.k3b.k3b, devedeng.mkisofs.mkisofs, devedeng.genisoimage.genisoimage]
self.analizers = {}
self.default_analizer = None
......
......@@ -17,13 +17,13 @@
from gi.repository import Gtk
import os
import devede.configuration_data
import devedeng.configuration_data
class create_disk_window:
def __init__(self):
self.config = devede.configuration_data.configuration.get_config()
self.config = devedeng.configuration_data.configuration.get_config()
def run(self):
......
......@@ -18,20 +18,20 @@
import cairo
from gi.repository import Gtk,Gdk,GdkPixbuf
import os
import devede.configuration_data
import devede.interface_manager
import devede.message
import devede.mux_dvd_menu
import devedeng.configuration_data
import devedeng.interface_manager
import devedeng.message
import devedeng.mux_dvd_menu
class dvd_menu(devede.interface_manager.interface_manager):
class dvd_menu(devedeng.interface_manager.interface_manager):
def __init__(self):
self.entry_vertical_margin = 2.0
self.entry_separation = 2.0
devede.interface_manager.interface_manager.__init__(self)
self.config = devede.configuration_data.configuration.get_config()
devedeng.interface_manager.interface_manager.__init__(self)
self.config = devedeng.configuration_data.configuration.get_config()
self.default_background = os.path.join(self.config.pic_path,"backgrounds","default_bg.png")
self.default_sound = os.path.join(self.config.pic_path,"silence.ogg")
......@@ -80,14 +80,14 @@ class dvd_menu(devede.interface_manager.interface_manager):
def update_music(self,b=None):
self.store_ui(self.builder)
cv = devede.converter.converter.get_converter()
cv = devedeng.converter.converter.get_converter()
film_analizer = (cv.get_film_analizer())()
(video, audio, length) = film_analizer.analize_film_data(self.background_music,True)
if (video != 0):
devede.message.message_window(_("The selected file is a video, not an audio file"),_("Error"))
devedeng.message.message_window(_("The selected file is a video, not an audio file"),_("Error"))
self.on_no_sound_clicked(None)
elif (audio == 0):
devede.message.message_window(_("The selected file is not an audio file"),_("Error"))
devedeng.message.message_window(_("The selected file is not an audio file"),_("Error"))
self.on_no_sound_clicked(None)
else:
self.sound_length = length
......@@ -577,7 +577,7 @@ class dvd_menu(devede.interface_manager.interface_manager):
self.file_list = file_list
self.refresh_static_data()
cv = devede.converter.converter.get_converter()
cv = devedeng.converter.converter.get_converter()
menu_folder = os.path.join(base_path,"menu")
try:
os.makedirs(menu_folder)
......
......@@ -18,15 +18,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>
import os
import devede.configuration_data
import devede.executor
import devedeng.configuration_data
import devedeng.executor
class dvdauthor_converter(devede.executor.executor):
class dvdauthor_converter(devedeng.executor.executor):
def __init__(self):
devede.executor.executor.__init__(self)
self.config = devede.configuration_data.configuration.get_config()
devedeng.executor.executor.__init__(self)
self.config = devedeng.configuration_data.configuration.get_config()
def create_dvd_project (self, path, name, file_movies, menu_entries, start_with_menu):
......
......@@ -17,13 +17,13 @@
from gi.repository import Gtk,Gdk
import os
import devede.configuration_data
import devedeng.configuration_data
class end_window:
def __init__(self):
self.config = devede.configuration_data.configuration.get_config()
self.config = devedeng.configuration_data.configuration.get_config()
def run(self,time_used, do_burn):
......
......@@ -17,13 +17,13 @@
from gi.repository import Gtk,Gdk
import os
import devede.configuration_data
import devedeng.configuration_data
class error_window:
def __init__(self):
self.config = devede.configuration_data.configuration.get_config()
self.config = devedeng.configuration_data.configuration.get_config()
builder = Gtk.Builder()
builder.set_translation_domain(self.config.gettext_domain)
......
......@@ -21,7 +21,7 @@ from gi.repository import GLib,GObject
import subprocess
import os
import signal
import devede.configuration_data
import devedeng.configuration_data
class executor(GObject.GObject):
""" This class encapsulates everything needed for launching processes """
......@@ -32,7 +32,7 @@ class executor(GObject.GObject):
GObject.GObject.__init__(self)
self.config = devede.configuration_data.configuration.get_config()
self.config = devedeng.configuration_data.configuration.get_config()
self.channel_stdin = None
self.channel_stdout = None
self.channel_stderr = None
......
......@@ -19,11 +19,11 @@
import subprocess
import os
import devede.configuration_data
import devede.executor
import devede.mux_dvd_menu
import devedeng.configuration_data
import devedeng.executor
import devedeng.mux_dvd_menu
class ffmpeg(devede.executor.executor):
class ffmpeg(devedeng.executor.executor):
supports_analize = False
supports_play = False
......@@ -82,16 +82,16 @@ class ffmpeg(devede.executor.executor):
continue
if (mpeg1 and mp2):
devede.ffmpeg.ffmpeg.disc_types.append("vcd")
devedeng.ffmpeg.ffmpeg.disc_types.append("vcd")
if (mpeg2 and mp2):
devede.ffmpeg.ffmpeg.disc_types.append("svcd")
devede.ffmpeg.ffmpeg.disc_types.append("cvd")
devedeng.ffmpeg.ffmpeg.disc_types.append("svcd")
devedeng.ffmpeg.ffmpeg.disc_types.append("cvd")
if (mpeg2 and mp2 and ac3):
devede.ffmpeg.ffmpeg.disc_types.append("dvd")
devedeng.ffmpeg.ffmpeg.disc_types.append("dvd")
if (divx and mp3):
devede.ffmpeg.ffmpeg.disc_types.append("divx")
devedeng.ffmpeg.ffmpeg.disc_types.append("divx")
if (h264 and mp3):
devede.ffmpeg.ffmpeg.disc_types.append("mkv")
devedeng.ffmpeg.ffmpeg.disc_types.append("mkv")
return True
else:
......@@ -101,8 +101,8 @@ class ffmpeg(devede.executor.executor):
def __init__(self):
devede.executor.executor.__init__(self)
self.config = devede.configuration_data.configuration.get_config()
devedeng.executor.executor.__init__(self)
self.config = devedeng.configuration_data.configuration.get_config()
def convert_file(self,file_project,output_file,video_length,pass2 = False):
......@@ -112,7 +112,7 @@ class ffmpeg(devede.executor.executor):
else:
self.text = _("Converting %(X)s (pass 1)") % {"X" : file_project.title_name}
# Prepare the converting process for the second pass
tmp = devede.ffmpeg.ffmpeg()
tmp = devedeng.ffmpeg.ffmpeg()
tmp.convert_file(file_project, output_file, video_length, True)
# it deppends of this process
tmp.add_dependency(self)
......@@ -398,7 +398,7 @@ class ffmpeg(devede.executor.executor):
movie_path = os.path.join(output_path,"menu_"+str(n_page)+".mpg")
self.command_var.append(movie_path)
muxer = devede.mux_dvd_menu.mux_dvd_menu()
muxer = devedeng.mux_dvd_menu.mux_dvd_menu()
final_path = muxer.create_mpg(n_page,output_path,movie_path)
# the muxer process depends of the converter process
muxer.add_dependency(self)
......
......@@ -18,12 +18,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>
import subprocess
import devede.configuration_data
import devede.executor
import devedeng.configuration_data
import devedeng.executor
import os
import json
class ffprobe(devede.executor.executor):
class ffprobe(devedeng.executor.executor):
supports_analize = True
supports_play = False
......@@ -47,8 +47,8 @@ class ffprobe(devede.executor.executor):
def __init__(self):
devede.executor.executor.__init__(self)
self.config = devede.configuration_data.configuration.get_config()
devedeng.executor.executor.__init__(self)
self.config = devedeng.configuration_data.configuration.get_config()
def process_stdout(self,data):
return
......
......@@ -18,15 +18,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>
import os
import devede.configuration_data
import devede.executor
import devedeng.configuration_data
import devedeng.executor
class file_copy(devede.executor.executor):
class file_copy(devedeng.executor.executor):
def __init__(self,input_path, output_path):
devede.executor.executor.__init__(self)
self.config = devede.configuration_data.configuration.get_config()
devedeng.executor.executor.__init__(self)
self.config = devedeng.configuration_data.configuration.get_config()
self.text = _("Copying file %(X)s") % {"X": os.path.basename(input_path)}
......
......@@ -18,15 +18,15 @@
from gi.repository import Gtk,GObject
import os
import devede.configuration_data
import devede.interface_manager
import devede.converter
import devede.ask_subtitles
import devede.preview
import devede.file_copy
import devede.subtitles_mux
import devedeng.configuration_data
import devedeng.interface_manager
import devedeng.converter
import devedeng.ask_subtitles
import devedeng.preview
import devedeng.file_copy
import devedeng.subtitles_mux
class file_movie(devede.interface_manager.interface_manager):
class file_movie(devedeng.interface_manager.interface_manager):
__gsignals__ = {'title_changed': (GObject.SIGNAL_RUN_FIRST, None,(str,))}
......@@ -34,12 +34,12 @@ class file_movie(devede.interface_manager.interface_manager):
self.list_files = list_files
devede.interface_manager.interface_manager.__init__(self)
devedeng.interface_manager.interface_manager.__init__(self)
self.wfile_properties = None
self.builder = None
self.config = devede.configuration_data.configuration.get_config()
self.config = devedeng.configuration_data.configuration.get_config()
self.set_type(None, self.config.disc_type)
self.config.connect('disc_type',self.set_type)
......@@ -137,7 +137,7 @@ class file_movie(devede.interface_manager.interface_manager):
self.add_enable_disable("no_reencode_audio_video", [], no_reencode_audio_video_list)
if list_files == None:
cv = devede.converter.converter.get_converter()
cv = devedeng.converter.converter.get_converter()
film_analizer = (cv.get_film_analizer())()
if (film_analizer.get_film_data(self.file_name)):
self.error = True
......@@ -605,7 +605,7 @@ class file_movie(devede.interface_manager.interface_manager):
def on_add_subtitles_clicked(self,b):
subt = devede.ask_subtitles.ask_subtitles()
subt = devedeng.ask_subtitles.ask_subtitles()
if (subt.run()):
self.wsubtitles_list.append([subt.filename, subt.encoding, subt.language, subt.put_upper])
......@@ -641,12 +641,12 @@ class file_movie(devede.interface_manager.interface_manager):
self.converted_filename = output_path
if self.is_mpeg_ps:
converter = devede.file_copy.file_copy(self.file_name,output_path)
converter = devedeng.file_copy.file_copy(self.file_name,output_path)
else:
self.set_final_size_aspect()
self.set_final_rates()
cv = devede.converter.converter.get_converter()
cv = devedeng.converter.converter.get_converter()
disc_converter = cv.get_disc_converter()
converter = disc_converter()
converter.convert_file(self,output_path,duration)
......@@ -668,7 +668,7 @@ class file_movie(devede.interface_manager.interface_manager):
final_aspect = "16:9"
else:
final_aspect = "4:3"
subt_mux = devede.subtitles_mux.subtitles_mux()
subt_mux = devedeng.subtitles_mux.subtitles_mux()
subt_mux.multiplex_subtitles( output_path, subt_file, subt_codepage, subt_lang, subt_upper,
self.subt_font_size,self.format_pal,self.force_subtitles,
final_aspect, duration2, stream_id,
......@@ -688,11 +688,11 @@ class file_movie(devede.interface_manager.interface_manager):
def do_preview(self):
wpreview = devede.preview.preview_window()
wpreview = devedeng.preview.preview_window()
if (wpreview.run() == False):
return
run_window = devede.runner.runner()
run_window = devedeng.runner.runner()
p = self.do_conversion(os.path.join(self.config.tmp_folder,"movie_preview.mpg"),wpreview.lvalue)
run_window.add_process(p)
run_window.connect("done",self.preview_done)
......@@ -702,7 +702,7 @@ class file_movie(devede.interface_manager.interface_manager):
def preview_done(self,o,retval):
if (retval == 0):
cv = devede.converter.converter.get_converter()
cv = devedeng.converter.converter.get_converter()
disc_player = (cv.get_film_player())()
disc_player.play_film(os.path.join(self.config.tmp_folder,"movie_preview.mpg"))
......
......@@ -18,11 +18,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>