diff --git a/data/codepages.lst b/data/codepages.lst new file mode 100644 index 0000000..526f8b6 --- /dev/null +++ b/data/codepages.lst @@ -0,0 +1,65 @@ +ASCII +UTF-8 +ARMSCII-8 +BIG5 +BIG5-HKSCS +CP850 +CP862 +CP866 +CP874 +CP932 +CP949 +CP950 +CP1133 +CP1250 +CP1251 +CP1252 +CP1253 +CP1254 +CP1255 +CP1256 +CP1257 +CP1258 +EUC-CN +EUC-JP +EUC-KR +EUC-TW +GBK +GB18030 +Georgian-Academy +Georgian-PS +HZ +ISO-2022-CN +ISO-2022-CN-EXT +ISO-2022-JP +ISO-2022-JP-2 +ISO-2022-JP-1 +ISO-2022-KR +ISO-8859-1 +ISO-8859-2 +ISO-8859-3 +ISO-8859-4 +ISO-8859-5 +ISO-8859-6 +ISO-8859-7 +ISO-8859-8 +ISO-8859-9 +ISO-8859-10 +ISO-8859-13 +ISO-8859-14 +ISO-8859-15 +ISO-8859-16 +JOHAB +KOI8-R +KOI8-T +KOI8-U +KOI8-RU +MuleLao-1 +SHIFT_JIS +TCVN +TIS-620 +UTF-8 +UTF-16 +UTF-16BE +UTF-16LE +VISCII diff --git a/data/interface/wask_subtitles.ui b/data/interface/wask_subtitles.ui new file mode 100644 index 0000000..d4d8af1 --- /dev/null +++ b/data/interface/wask_subtitles.ui @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + 480 + False + False + True + center + dialog + False + False + + + False + vertical + 2 + + + False + end + + + gtk-cancel + True + True + True + True + + + False + True + 0 + + + + + gtk-ok + True + True + True + True + + + False + True + 1 + + + + + False + True + end + 0 + + + + + True + False + vertical + + + True + False + + + True + False + 4 + File: + + + False + True + 0 + + + + + True + False + + + + True + True + 1 + + + + + False + True + 0 + + + + + True + False + + + True + False + 4 + Encoding: + end + + + False + True + 0 + + + + + True + False + list_encodings + 0 + 0 + + + + 0 + + + + + True + True + 1 + + + + + False + True + 1 + + + + + True + False + + + True + False + 4 + Language: + + + False + True + 0 + + + + + True + False + list_languages + 0 + 0 + + + + 0 + + + + + True + True + 1 + + + + + False + True + 2 + + + + + Put subtitles upper + True + True + False + 0 + True + + + True + True + 3 + + + + + True + True + 1 + + + + + + cancel + accept + + + diff --git a/data/interface/wfile_properties.ui b/data/interface/wfile_properties.ui index 695da1f..73d2545 100644 --- a/data/interface/wfile_properties.ui +++ b/data/interface/wfile_properties.ui @@ -37,6 +37,8 @@ + + @@ -66,111 +68,64 @@ vertical 4 - + True False - vertical + 0 + none - + True False + 12 - + True False - 0 - none - + True - False - 12 - - - True - True - - + True + True + + False + True + 0 + - - + + + Show this title in the menu True - False - <b>Title</b> - True + True + False + 12 + 0 + True + True + + False + True + 1 + - - True - True - 0 - - - - - True - False - 0 - none - - - True - False - 12 - - - True - False - 0 - end - - - - - - - True - False - <b>File</b> - True - - - - - True - True - 1 - - - True - True - 0 - - - - Show this title in the menu + + True - True - False - 12 - 0 - True - True + False + <b>Title</b> + True - - False - True - 1 - - False + True True 0 @@ -201,7 +156,7 @@ 0 - 0 + 1 1 1 @@ -214,7 +169,7 @@ 1 - 0 + 1 1 1 @@ -230,7 +185,7 @@ 2 - 0 + 1 1 1 @@ -244,7 +199,7 @@ 0 - 1 + 2 1 1 @@ -257,7 +212,7 @@ 1 - 1 + 2 1 1 @@ -272,7 +227,7 @@ 2 - 1 + 2 1 1 @@ -285,7 +240,7 @@ 3 - 0 + 1 1 1 @@ -299,7 +254,7 @@ 3 - 1 + 2 1 1 @@ -314,7 +269,7 @@ 4 - 0 + 1 1 1 @@ -329,7 +284,7 @@ 4 - 1 + 2 1 1 @@ -342,7 +297,7 @@ 5 - 0 + 1 1 1 @@ -355,11 +310,40 @@ 5 - 1 + 2 1 1 + + + True + False + 0 + Path: + + + 0 + 0 + 1 + 1 + + + + + True + False + True + 0 + middle + + + 1 + 0 + 5 + 1 + + @@ -959,33 +943,547 @@ - + True False - 16 + 12 - + True False - 0 - none + vertical - + True False - 12 + 0 + none - + True False - vertical + 12 - + + True + False + vertical + + + True + False + + + Automatic + True + True + False + 0 + True + True + + + 0 + 0 + 1 + 1 + + + + + 1920x1080 + True + True + False + 0 + True + size_auto_ntsc + + + 1 + 0 + 1 + 1 + + + + + 1280x720 + True + True + False + 0 + True + size_auto_ntsc + + + 2 + 0 + 1 + 1 + + + + + 720x480 + True + True + False + 0 + True + size_auto_ntsc + + + 0 + 1 + 1 + 1 + + + + + 704x480 + True + True + False + 0 + True + size_auto_ntsc + + + 1 + 1 + 1 + 1 + + + + + 480x480 + True + True + False + 0 + True + size_auto_ntsc + + + 2 + 1 + 1 + 1 + + + + + 352x480 + True + True + False + 0 + True + size_auto_ntsc + + + 0 + 2 + 1 + 1 + + + + + 352x240 + True + True + False + 0 + True + size_auto_ntsc + + + 1 + 2 + 1 + 1 + + + + + True + False + + + 2 + 2 + 1 + 1 + + + + + False + True + 0 + + + + + True + False + + + Automatic + True + True + False + 0 + True + True + + + 0 + 0 + 1 + 1 + + + + + 1920x1080 + True + True + False + 0 + True + size_auto + + + 1 + 0 + 1 + 1 + + + + + 1280x720 + True + True + False + 0 + True + size_auto + + + 2 + 0 + 1 + 1 + + + + + 720x576 + True + True + False + 0 + True + size_auto + + + 0 + 1 + 1 + 1 + + + + + 704x576 + True + True + False + 0 + True + size_auto + + + 1 + 1 + 1 + 1 + + + + + 480x576 + True + True + False + 0 + True + size_auto + + + 2 + 1 + 1 + 1 + + + + + 352x576 + True + True + False + 0 + True + size_auto + + + 0 + 2 + 1 + 1 + + + + + 352x288 + True + True + False + 0 + True + size_auto + + + 1 + 2 + 1 + 1 + + + + + True + False + + + 2 + 2 + 1 + 1 + + + + + False + True + 1 + + + + + + + + + True + False + <b>Final size</b> + True + + + + + False + True + 0 + + + + + True + False + 0 + none + + + True + False + 12 + + + True + False + vertical + + + Automatic + True + True + False + 0 + True + True + + + False + True + 0 + + + + + 4:3 + True + True + False + 0 + True + aspect_auto + + + + False + True + 1 + + + + + 16:9 + True + True + False + 0 + True + aspect_auto + + + False + True + 2 + + + + + + + + + True + False + <b>Aspect ratio</b> + True + + + + + False + True + 1 + + + + + True + False + 0 + none + + + True + False + 12 + + + True + False + vertical + + + Horizontal mirror + True + True + False + 0 + True + + + False + True + 0 + + + + + Vertical mirror + True + True + False + 0 + True + + + False + True + 1 + + + + + + + + + True + False + <b>Mirror</b> + True + + + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + vertical + + + True + False + 0 + none + + + True + False + 12 + + True False - - Automatic + + No rotation True True False @@ -1001,14 +1499,14 @@ - - 1920x1080 + + 90 degrees (clockwise) True True False 0 True - size_auto_ntsc + rotation_0 1 @@ -1018,31 +1516,14 @@ - - 1280x720 + + 180 degrees True True False 0 True - size_auto_ntsc - - - 2 - 0 - 1 - 1 - - - - - 720x480 - True - True - False - 0 - True - size_auto_ntsc + rotation_0 0 @@ -1052,14 +1533,14 @@ - - 704x480 + + 90 degrees (counter-clockwise) True True False 0 True - size_auto_ntsc + rotation_0 1 @@ -1068,83 +1549,43 @@ 1 - - - 480x480 - True - True - False - 0 - True - size_auto_ntsc - - - 2 - 1 - 1 - 1 - - - - - 352x480 - True - True - False - 0 - True - size_auto_ntsc - - - 0 - 2 - 1 - 1 - - - - - 352x240 - True - True - False - 0 - True - size_auto_ntsc - - - 1 - 2 - 1 - 1 - - - - - True - False - - - 2 - 2 - 1 - 1 - - - - False - True - 0 - + + + + + True + False + <b>Rotation</b> + True + + + + + False + True + 0 + + + + + True + False + 0 + none + + + True + False + 12 - + True False - - Automatic + + Add black bars True True False @@ -1160,14 +1601,14 @@ - - 1920x1080 + + Scale picture True True False 0 True - size_auto + add_black_bars 1 @@ -1177,14 +1618,14 @@ - - 1280x720 + + Cut picture True True False 0 True - size_auto + add_black_bars 2 @@ -1194,510 +1635,68 @@ - - 720x576 - True - True - False - 0 - True - size_auto - - - 0 - 1 - 1 - 1 - - - - - 704x576 - True - True - False - 0 - True - size_auto - - - 1 - 1 - 1 - 1 - - - - - 480x576 - True - True - False - 0 - True - size_auto - - - 2 - 1 - 1 - 1 - - - - - 352x576 - True - True - False - 0 - True - size_auto - - - 0 - 2 - 1 - 1 - - - - - 352x288 - True - True - False - 0 - True - size_auto - - - 1 - 2 - 1 - 1 - - - - + True False + gtk-missing-image + + + 0 + 1 + 1 + 1 + + + + + True + False + gtk-missing-image + + + 1 + 1 + 1 + 1 + + + + + True + False + gtk-missing-image 2 - 2 + 1 1 1 - - False - True - 1 - - - - - - True - False - <b>Final size</b> - True - - - - - 0 - 0 - 1 - 1 - - - - - True - False - 0 - none - - - True - False - 12 - - + + True False - vertical - - - Automatic - True - True - False - 0 - True - True - - - False - True - 0 - - - - - 4:3 - True - True - False - 0 - True - True - aspect_auto - - - False - True - 1 - - - - - 16:9 - True - True - False - 0 - 0.52999997138977051 - True - True - aspect_auto - - - False - True - 2 - - + <b>Scaling mode</b> + True - - - - True - False - <b>Aspect ratio</b> - True - + + False + True + 1 + - 1 - 0 - 1 - 1 - - - - - True - False - 0 - none - - - True - False - 12 - - - True - False - - - Add black bars - True - True - False - 0 - True - True - - - 0 - 0 - 1 - 1 - - - - - Scale picture - True - True - False - 0 - True - True - add_black_bars - - - 1 - 0 - 1 - 1 - - - - - Cut picture - True - True - False - 0 - True - True - add_black_bars - - - 2 - 0 - 1 - 1 - - - - - True - False - gtk-missing-image - - - 0 - 1 - 1 - 1 - - - - - True - False - gtk-missing-image - - - 1 - 1 - 1 - 1 - - - - - True - False - gtk-missing-image - - - 2 - 1 - 1 - 1 - - - - - - - - - True - False - <b>Scaling mode</b> - True - - - - - 0 - 1 - 2 - 1 - - - - - True - False - 0 - none - - - True - False - 12 - - - True - False - - - No rotation - True - True - False - 0 - True - True - - - 0 - 0 - 1 - 1 - - - - - 90 degrees (clockwise) - True - True - False - 0 - True - rotation_0 - - - 0 - 1 - 1 - 1 - - - - - 180 degrees - True - True - False - 0 - True - rotation_0 - - - 0 - 2 - 1 - 1 - - - - - 90 degrees (counter-clockwise) - True - True - False - 0 - True - rotation_0 - - - 0 - 3 - 1 - 1 - - - - - - - - - True - False - <b>Rotation</b> - True - - - - - 2 - 1 - 1 - 1 - - - - - True - False - 0 - none - - - True - False - 12 - - - True - False - vertical - - - Horizontal mirror - True - True - False - 0 - True - - - False - True - 0 - - - - - Vertical mirror - True - True - False - 0 - True - - - False - True - 1 - - - - - - - - - True - False - <b>Mirror</b> - True - - - - - 2 - 0 - 1 - 1 + False + True + 1 diff --git a/data/languages.lst b/data/languages.lst new file mode 100644 index 0000000..d47ef24 --- /dev/null +++ b/data/languages.lst @@ -0,0 +1,136 @@ +AA (AFAR) +AB (ABKHAZIAN) +AF (AFRIKAANS) +AM (AMHARIC) +AR (ARABIC) +AS (ASSAMESE) +AY (AYMARA) +AZ (AZERBAIJANI) +BA (BASHKIR) +BE (BYELORUSSIAN) +BG (BULGARIAN) +BH (BIHARI) +BI (BISLAMA) +BN (BENGALI;BANGLA) +BO (TIBETAN) +BR (BRETON) +CA (CATALAN) +CO (CORSICAN) +CS (CZECH) +CY (WELSH) +DA (DANISH) +DE (GERMAN) +DZ (BHUTANI) +EL (GREEK) +EN (ENGLISH) +EO (ESPERANTO) +ES (SPANISH) +ET (ESTONIAN) +EU (BASQUE) +FA (PERSIAN (farsi)) +FI (FINNISH) +FJ (FIJI) +FO (FAROESE) +FR (FRENCH) +FY (FRISIAN) +GA (IRISH) +GD (SCOTS GAELIC) +GL (GALICIAN) +GN (GUARANI) +GU (GUJARATI) +HA (HAUSA) +HI (HINDI) +HR (CROATIAN) +HU (HUNGARIAN) +HY (ARMENIAN) +IA (INTERLINGUA) +IE (INTERLINGUE) +IK (INUPIAK) +IN (INDONESIAN) +IS (ICELANDIC) +IT (ITALIAN) +IW (HEBREW) +JA (JAPANESE) +JI (YIDDISH) +JV (JAVANESE) +KA (GEORGIAN) +KK (KAZAKH) +KL (GREENLANDIC) +KM (CAMBODIAN) +KN (KANNADA) +KO (KOREAN) +KS (KASHMIRI) +KU (KURDISH) +KY (KIRGHIZ) +LA (LATIN) +LN (LINGALA) +LO (LAOTHIAN) +LT (LITHUANIAN) +LV (LATVIAN;LETTISH) +MG (MALAGASY) +MI (MAORI) +MK (MACEDONIAN) +ML (MALAYALAM) +MN (MONGOLIAN) +MO (MOLDAVIAN) +MR (MARATHI) +MS (MALAY) +MT (MALTESE) +MY (BURMESE) +NA (NAURU) +NE (NEPALI) +NL (DUTCH) +NO (NORWEGIAN) +OC (OCCITAN) +OM (AFAN (OROMO)) +OR (ORIYA) +PA (PUNJABI) +PL (POLISH) +PS (PASHTO;PUSHTO) +PT (PORTUGUESE) +QU (QUECHUA) +RM (RHAETO-ROMANCE) +RN (KURUNDI) +RO (ROMANIAN) +RU (RUSSIAN) +RW (KINYARWANDA) +SA (SANSKRIT) +SD (SINDHI) +SG (SANGHO) +SH (SERBO-CROATIAN) +SI (SINGHALESE) +SK (SLOVAK) +SL (SLOVENIAN) +SM (SAMOAN) +SN (SHONA) +SO (SOMALI) +SQ (ALBANIAN) +SR (SERBIAN) +SS (SISWATI) +ST (SESOTHO) +SU (SUNDANESE) +SV (SWEDISH) +SW (SWAHILI) +TA (TAMIL) +TE (TELUGU) +TG (TAJIK) +TH (THAI) +TI (TIGRINYA) +TK (TURKMEN) +TL (TAGALOG) +TN (SETSWANA) +TO (TONGA) +TR (TURKISH) +TS (TSONGA) +TT (TATAR) +TW (TWI) +UK (UKRAINIAN) +UR (URDU) +UZ (UZBEK) +VI (VIETNAMESE) +VO (VOLAPUK) +WO (WOLOF) +XH (XHOSA) +YO (YORUBA) +ZH (CHINESE) +ZU (ZULU) diff --git a/data/pixmaps/barras.png b/data/pixmaps/barras.png deleted file mode 100644 index 354ffe2..0000000 Binary files a/data/pixmaps/barras.png and /dev/null differ diff --git a/data/pixmaps/estira.png b/data/pixmaps/estira.png deleted file mode 100644 index ed7b2ff..0000000 Binary files a/data/pixmaps/estira.png and /dev/null differ diff --git a/data/pixmaps/to_classic_blackbars.png b/data/pixmaps/to_classic_blackbars.png new file mode 100644 index 0000000..304dc66 Binary files /dev/null and b/data/pixmaps/to_classic_blackbars.png differ diff --git a/data/pixmaps/to_classic_cut.png b/data/pixmaps/to_classic_cut.png new file mode 100644 index 0000000..01ab56b Binary files /dev/null and b/data/pixmaps/to_classic_cut.png differ diff --git a/data/pixmaps/to_classic_scale.png b/data/pixmaps/to_classic_scale.png new file mode 100644 index 0000000..e60e9c5 Binary files /dev/null and b/data/pixmaps/to_classic_scale.png differ diff --git a/data/pixmaps/to_wide_blackbars.png b/data/pixmaps/to_wide_blackbars.png new file mode 100644 index 0000000..00119ce Binary files /dev/null and b/data/pixmaps/to_wide_blackbars.png differ diff --git a/data/pixmaps/to_wide_cut.png b/data/pixmaps/to_wide_cut.png new file mode 100644 index 0000000..0e88806 Binary files /dev/null and b/data/pixmaps/to_wide_cut.png differ diff --git a/data/pixmaps/to_wide_scale.png b/data/pixmaps/to_wide_scale.png new file mode 100644 index 0000000..deae632 Binary files /dev/null and b/data/pixmaps/to_wide_scale.png differ diff --git a/setup.py b/setup.py index 2d67292..1fa6bfa 100755 --- a/setup.py +++ b/setup.py @@ -19,6 +19,8 @@ def get_data_files(): (os.path.join('share', 'devede_ng'), glob("data/interface/*")), (os.path.join('share', 'devede_ng'), glob('data/pixmaps/*g')), (os.path.join('share', 'devede_ng'), ['data/devede.svg']), + (os.path.join('share', 'devede_ng'), ['data/codepages.lst']), + (os.path.join('share', 'devede_ng'), ['data/languages.lst']), (os.path.join('share', 'devede_ng'), ['data/devedesans.ttf']), (os.path.join('share', 'devede_ng', 'backgrounds'), glob('data/pixmaps/backgrounds/*')), (os.path.join('share', 'doc', 'devede_ng', 'html'), glob('docs/html/*')) diff --git a/src/devede/ask_subtitles.py b/src/devede/ask_subtitles.py new file mode 100644 index 0000000..308a694 --- /dev/null +++ b/src/devede/ask_subtitles.py @@ -0,0 +1,99 @@ +# Copyright 2014 (C) Raster Software Vigo (Sergio Costas) +# +# This file is part of DeVeDe-NG +# +# DeVeDe-NG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# DeVeDe-NG is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see + +from gi.repository import Gtk +import os +import devede.configuration_data + +class ask_subtitles: + + def __init__(self): + + self.config = devede.configuration_data.configuration.get_config() + + def run(self): + + builder = Gtk.Builder() + builder.set_translation_domain(self.config.gettext_domain) + + builder.add_from_file(os.path.join(self.config.glade,"wask_subtitles.ui")) + builder.connect_signals(self) + wask_window = builder.get_object("ask_subtitles") + self.wfilename = builder.get_object("subtitle_file") + self.waccept = builder.get_object("accept") + wlist_encodings = builder.get_object("list_encodings") + wlist_languages = builder.get_object("list_languages") + wencoding = builder.get_object("encoding_l") + wlanguage = builder.get_object("language_l") + + lang_selection = 0 + enc_selection = 0 + + self.language = None + self.encoding = None + self.put_upper = False + self.filename = None + + counter = 0 + encodings = open(os.path.join(self.config.other_path,"codepages.lst")) + for element in encodings: + element = element.strip() + if (element == self.config.sub_codepage): + enc_selection = counter + wlist_encodings.append([element]) + counter += 1 + encodings.close() + + counter = 0 + languages = open(os.path.join(self.config.other_path,"languages.lst")) + for element in languages: + element = element.strip() + if (element == self.config.sub_language): + lang_selection = counter + wlist_languages.append([element]) + counter += 1 + languages.close() + + + wencoding.set_active(enc_selection) + wlanguage.set_active(lang_selection) + + wask_window.show_all() + self.on_subtitle_file_set(None) + retval = wask_window.run() + if (retval == 2): # accept + self.put_upper = builder.get_object("put_subtitles_upper").get_active() + self.config.sub_codepage = wencoding.get_active_id() + self.config.sub_language = wlanguage.get_active_id() + self.encoding = wencoding.get_active_id() + self.language = wlanguage.get_active_id()[:2] + self.filename = self.wfilename.get_filename() + + wask_window.destroy() + if (retval == 2): + return True + else: + return False + + + def on_subtitle_file_set(self,b): + + f = self.wfilename.get_filename() + if (f == None) or (f == ""): + self.waccept.set_sensitive(False) + else: + self.waccept.set_sensitive(True) \ No newline at end of file diff --git a/src/devede/configuration_data.py b/src/devede/configuration_data.py index 2904ab9..fb75aa7 100644 --- a/src/devede/configuration_data.py +++ b/src/devede/configuration_data.py @@ -86,6 +86,8 @@ class configuration(GObject.GObject): self.film_converter = None self.menu_converter = None self.subtitles_font_size = 28 + self.sub_language = None + self.sub_codepage = None config_path = os.path.join(os.environ.get("HOME"),".devede") try: @@ -176,6 +178,10 @@ class configuration(GObject.GObject): config_data.write("film_converter:"+str(self.film_converter)+"\n") if (self.menu_converter != None): config_data.write("menu_converter:"+str(self.menu_converter)+"\n") + if (self.sub_codepage != None): + config_data.write("sub_codepage:"+str(self.sub_codepage)+"\n") + if (self.sub_language != None): + config_data.write("sub_language:"+str(self.sub_language)+"\n") config_data.write("subtitle_font_size:"+str(self.subtitles_font_size)+"\n") config_data.close() except: diff --git a/src/devede/file_movie.py b/src/devede/file_movie.py index e8328ab..a7671f0 100644 --- a/src/devede/file_movie.py +++ b/src/devede/file_movie.py @@ -21,6 +21,7 @@ import os import devede.configuration_data import devede.interface_manager import devede.converter +import devede.ask_subtitles class file_movie(devede.interface_manager.interface_manager): @@ -180,6 +181,10 @@ class file_movie(devede.interface_manager.interface_manager): self.wframe_audio_rate = self.builder.get_object("frame_audio_rate") self.wframe_division_chapters = self.builder.get_object("frame_division_chapters") + # elements in page SUBTITLES + self.wsubtitles_list = self.builder.get_object("subtitles_list") + self.wdel_subtitles = self.builder.get_object("del_subtitles") + # elements in page VIDEO OPTIONS self.wsize_1920x1080 = self.builder.get_object("size_1920x1080") self.wsize_1280x720 = self.builder.get_object("size_1280x720") @@ -187,6 +192,10 @@ class file_movie(devede.interface_manager.interface_manager): self.wsize_1280x720_ntsc = self.builder.get_object("size_1280x720_ntsc") self.wframe_final_size = self.builder.get_object("frame_final_size") self.wframe_aspect_ratio = self.builder.get_object("frame_aspect_ratio") + self.waspect_classic = self.builder.get_object("aspect_classic") + self.wadd_black_bars_pic = self.builder.get_object("add_black_bars_pic") + self.wscale_picture_pic = self.builder.get_object("scale_picture_pic") + self.wcut_picture_pic = self.builder.get_object("cut_picture_pic") # elements in page AUDIO self.wsound5_1 = self.builder.get_object("sound5_1") @@ -244,6 +253,19 @@ class file_movie(devede.interface_manager.interface_manager): self.wnotebook.remove_page(5) self.update_ui(self.builder) + self.on_aspect_classic_toggled(None) + + def on_aspect_classic_toggled(self,b): + + status = self.waspect_classic.get_active() + if (status): + self.wadd_black_bars_pic.set_from_file(os.path.join(self.config.pic_path,"to_classic_blackbars.png")) + self.wcut_picture_pic.set_from_file(os.path.join(self.config.pic_path,"to_classic_cut.png")) + self.wscale_picture_pic.set_from_file(os.path.join(self.config.pic_path,"to_classic_scale.png")) + else: + self.wadd_black_bars_pic.set_from_file(os.path.join(self.config.pic_path,"to_wide_blackbars.png")) + self.wcut_picture_pic.set_from_file(os.path.join(self.config.pic_path,"to_wide_cut.png")) + self.wscale_picture_pic.set_from_file(os.path.join(self.config.pic_path,"to_wide_scale.png")) def on_button_accept_clicked(self,b): @@ -256,3 +278,9 @@ class file_movie(devede.interface_manager.interface_manager): self.wfile_properties.destroy() self.wfile_properties = None self.builder = None + + def on_add_subtitles_clicked(self,b): + + subt = devede.ask_subtitles.ask_subtitles() + if (subt.run()): + self.wsubtitles_list.append([subt.filename, subt.encoding, subt.language, subt.put_upper]) \ No newline at end of file diff --git a/src/devede/interface_manager.py b/src/devede/interface_manager.py index a06bbde..d7e2186 100644 --- a/src/devede/interface_manager.py +++ b/src/devede/interface_manager.py @@ -278,6 +278,11 @@ class interface_manager(GObject.GObject): for element in self.interface_lists: exec('self.'+element+' = []') the_liststore = builder.get_object(element) + ncolumns = the_liststore.get_n_columns() for row in the_liststore: - exec('self.'+element+'.append(row.model[row.iter])') + final_row = [] + for c in range(0,ncolumns): + final_row.append(row.model[row.iter][c]) + print (final_row) + exec('self.'+element+'.append(final_row)') \ No newline at end of file