6 DepEntry = collections.namedtuple('DepEntry', 'widget dep enable die hide')
8 DepEntry("title", "queue_add", "none", True, False),
9 DepEntry("title", "queue_add_menu", "none", True, False),
10 DepEntry("title", "show_picture", "none", True, False),
11 DepEntry("title", "show_preview_menu", "none", True, False),
12 DepEntry("title", "preview_frame", "none", True, False),
13 DepEntry("title", "picture_label", "none", True, False),
14 DepEntry("title", "picture_tab", "none", True, False),
15 DepEntry("title", "chapters_label", "none", True, False),
16 DepEntry("title", "chapters_tab", "none", True, False),
17 DepEntry("title", "title", "none", True, False),
18 DepEntry("title", "start_chapter", "none", True, False),
19 DepEntry("title", "end_chapter", "none", True, False),
20 DepEntry("vquality_type_bitrate", "VideoAvgBitrate", "TRUE", False, False),
21 DepEntry("vquality_type_target", "VideoTargetSize", "TRUE", False, False),
22 DepEntry("vquality_type_constant", "VideoQualitySlider", "TRUE", False, False),
23 DepEntry("vquality_type_constant", "constant_rate_factor", "TRUE", False, False),
24 DepEntry("vquality_type_constant", "VideoTwoPass", "TRUE", True, False),
25 DepEntry("vquality_type_constant", "VideoTurboTwoPass", "TRUE", True, False),
26 DepEntry("VideoTwoPass", "VideoTurboTwoPass", "TRUE", False, False),
27 DepEntry("FileFormat", "Mp4LargeFile", "mp4|m4v", False, True),
28 DepEntry("FileFormat", "Mp4HttpOptimize", "mp4|m4v", False, True),
29 DepEntry("FileFormat", "Mp4iPodCompatible", "mp4|m4v", False, True),
30 DepEntry("PictureDecomb", "PictureDeinterlace", "none", False, False),
31 DepEntry("PictureDecomb", "PictureDeinterlaceCustom", "none", False, True),
32 DepEntry("PictureDeinterlace", "PictureDeinterlaceCustom", "custom", False, True),
33 DepEntry("PictureDenoise", "PictureDenoiseCustom", "custom", False, True),
34 DepEntry("PictureDecomb", "PictureDecombCustom", "custom", False, True),
35 DepEntry("PictureDetelecine", "PictureDetelecineCustom", "custom", False, True),
36 DepEntry("PictureAutoCrop", "PictureTopCrop", "FALSE", False, False),
37 DepEntry("PictureAutoCrop", "PictureBottomCrop", "FALSE", False, False),
38 DepEntry("PictureAutoCrop", "PictureLeftCrop", "FALSE", False, False),
39 DepEntry("PictureAutoCrop", "PictureRightCrop", "FALSE", False, False),
40 DepEntry("autoscale", "scale_width", "FALSE", False, False),
41 DepEntry("autoscale", "scale_height", "FALSE", False, False),
42 DepEntry("anamorphic", "PictureKeepRatio", "FALSE", False, False),
43 ## "CHECK" is a dummy value that forces scale_height deps to
44 ## be re-evaluated whenever anamorphic changes
45 DepEntry("anamorphic", "scale_height", "CHECK", True, False),
46 DepEntry("PictureKeepRatio", "scale_height", "FALSE", False, False),
47 DepEntry("VideoEncoder", "x264_tab", "x264", False, False),
48 DepEntry("VideoEncoder", "x264_tab_label", "x264", False, False),
49 DepEntry("VideoEncoder", "Mp4iPodCompatible", "x264", False, False),
50 DepEntry("AudioEncoder", "AudioBitrate", "ac3|dts", True, False),
51 DepEntry("AudioEncoder", "AudioSamplerate", "ac3|dts", True, False),
52 DepEntry("AudioEncoder", "AudioMixdown", "ac3|dts", True, False),
53 DepEntry("AudioEncoder", "AudioTrackDRCSlider", "ac3|dts", True, False),
54 DepEntry("x264_bframes", "x264_weighted_bframes", "0", True, False),
55 DepEntry("x264_bframes", "x264_bpyramid", "<2", True, False),
56 DepEntry("x264_bframes", "x264_direct", "0", True, False),
57 DepEntry("x264_bframes", "x264_b_adapt", "0", True, False),
58 DepEntry("x264_refs", "x264_mixed_refs", "<2", True, False),
59 DepEntry("x264_cabac", "x264_trellis", "TRUE", False, False),
60 DepEntry("x264_subme", "x264_psy_rd", "<6", True, False),
61 DepEntry("x264_subme", "x264_psy_trell", "<6", True, False),
62 DepEntry("x264_cabac", "x264_psy_trell", "TRUE", False, False),
63 DepEntry("x264_trellis", "x264_psy_trell", "0", True, False),
64 DepEntry("ChapterMarkers", "chapters_list", "TRUE", False, False),
65 DepEntry("use_source_name", "chapters_in_destination", "TRUE", False, False),
66 DepEntry("use_source_name", "title_no_in_destination", "TRUE", False, False),
72 depsfile = open("widget.deps", "w")
73 except Exception, err:
74 print >> sys.stderr, ( "Error: %s" % str(err) )
78 revfile = open("widget_reverse.deps", "w")
79 except Exception, err:
80 print >> sys.stderr, ( "Error: %s" % str(err))
89 if jj.widget == ii.widget:
92 plistlib.writePlist(top, depsfile)
102 rec.append(jj.widget)
103 rec.append(jj.enable)
108 plistlib.writePlist(top, revfile)