115
115
CFG_KEY_groups_collapse = 'groups_collapse'
116
116
CFG_KEY_include_hidden = 'include_hidden'
117
117
118
-
119
118
cfg_defaults = {
120
119
CFG_KEY_SINGLE_DEVICE :True ,
121
120
CFG_KEY_CDE_SETTINGS :[],
@@ -388,7 +387,7 @@ def __init__(self,cwd):
388
387
self .hg_index = 0
389
388
hg_indices = ('01' ,'02' ,'03' ,'04' ,'05' ,'06' ,'07' ,'08' , '11' ,'12' ,'13' ,'14' ,'15' ,'16' ,'17' ,'18' , '21' ,'22' ,'23' ,'24' ,'25' ,'26' ,'27' ,'28' , '31' ,'32' ,'33' ,'34' ,'35' ,'36' ,'37' ,'38' ,)
390
389
self .hg_ico = { i :self_ico [str ('hg' + j )] for i ,j in enumerate (hg_indices ) }
391
- #self_hg_ico = self.hg_ico
390
+
392
391
self .hg_ico_len = len (self .hg_ico )
393
392
394
393
self .ico_record_new = self_ico ['record_new' ]
@@ -580,7 +579,7 @@ def __init__(self,cwd):
580
579
581
580
self .status_find = Label (status_frame ,image = self .ico_find ,relief = 'flat' ,state = 'disabled' ,borderwidth = 1 ,bg = self .bg_color ,width = 18 )
582
581
self .status_find .pack (fill = 'x' ,expand = 0 ,side = 'right' )
583
- self_status_find_configure = self . status_find . configure
582
+
584
583
self .status_find .bind ("<ButtonPress-1>" , lambda event : self .finder_wrapper_show () )
585
584
self .status_find_tooltip = lambda message : self .widget_tooltip (self .status_find ,message )
586
585
@@ -653,15 +652,10 @@ def __init__(self,cwd):
653
652
#######################################################################
654
653
655
654
def file_cascade_post ():
656
- item_actions_state = ('disabled' ,'normal' )[self .sel_item is not None ]
657
-
658
655
self .file_cascade .delete (0 ,'end' )
659
656
if not self .block_processing_stack :
660
657
self_file_cascade_add_command = self .file_cascade .add_command
661
658
self_file_cascade_add_separator = self .file_cascade .add_separator
662
- state_on_records = 'normal' if librer_core .records else 'disabled'
663
-
664
- state_has_cd = ('disabled' ,'normal' )[ self .sel_item is not None and self .item_has_cd (self .sel_item ) ]
665
659
666
660
self_file_cascade_add_command (label = STR ('New Record ...' ),command = self .scan_dialog_show , accelerator = "Ctrl+N" ,image = self .ico_record_new ,compound = 'left' )
667
661
@@ -767,7 +761,6 @@ def help_cascade_post():
767
761
#############################
768
762
self_progress_dialog_on_load = self .progress_dialog_on_load
769
763
self_progress_dialog_on_load_lab = self_progress_dialog_on_load .lab
770
- self_progress_dialog_on_load_area_main_update = self_progress_dialog_on_load .area_main .update
771
764
772
765
self_progress_dialog_on_load_progr1var = self_progress_dialog_on_load .progr1var
773
766
self_progress_dialog_on_load_progr2var = self_progress_dialog_on_load .progr2var
@@ -951,7 +944,7 @@ def help_cascade_post():
951
944
self_main .mainloop ()
952
945
953
946
def main_drop (self , data ):
954
- dialog = self .get_scan_dialog ()
947
+ self .get_scan_dialog ()
955
948
self .path_to_scan_entry_var .set (data )
956
949
self .scan_label_entry_var .set ("dropped_path" )
957
950
@@ -1170,18 +1163,11 @@ def get_scan_dialog(self):
1170
1163
if not self .scan_dialog_created :
1171
1164
self .status (STR ("Creating dialog ..." ))
1172
1165
1173
- self_ico_librer = self .ico_librer
1174
-
1175
1166
self .scan_dialog = dialog = GenericDialog (self .main ,(self .ico_record_new ,self .ico_record_new ),self .bg_color ,'---' ,pre_show = self .pre_show ,post_close = self .post_close ,min_width = 800 ,min_height = 550 )
1176
1167
1177
1168
dialog .area_main .drop_target_register (DND_FILES )
1178
1169
dialog .area_main .dnd_bind ('<<Drop>>' , lambda e : self .scan_dialog_drop (e .data ) )
1179
1170
1180
- self_ico = self .ico
1181
-
1182
- #self.log_skipped_var=BooleanVar()
1183
- #self.log_skipped_var.set(False)
1184
-
1185
1171
dialog .area_main .grid_columnconfigure (0 , weight = 1 )
1186
1172
dialog .area_main .grid_rowconfigure (3 , weight = 1 )
1187
1173
@@ -1305,7 +1291,6 @@ def get_scan_dialog(self):
1305
1291
min_tooltip = 'Minimum file size.' + '\n \n ' + size_common_tooltip
1306
1292
exec_tooltip = STR ('EXEC_TOOLTIP' )
1307
1293
pars_tooltip = STR ('PARS_TOOLTIP' )
1308
- shell_example = '"C:\\ Program Files\\ 7-Zip\\ 7z.exe" l % | more +13' if windows else "7z l % | tail -n +14"
1309
1294
shell_tooltip = STR ('SHELL_TOOLTIP' )
1310
1295
open_tooltip = STR ('OPEN_TOOLTIP' )
1311
1296
timeout_tooltip = STR ('TIMEOUT_TOOLTIP' )
@@ -2057,9 +2042,6 @@ def ver_number(var):
2057
2042
(find_size_min_label := Label (find_size_frame ,text = 'min: ' ,bg = self .bg_color ,anchor = 'e' ,relief = 'flat' ,bd = 2 )).grid (row = 0 , column = 0 , sticky = 'we' ,padx = 4 ,pady = 4 )
2058
2043
(find_size_max_label := Label (find_size_frame ,text = 'max: ' ,bg = self .bg_color ,anchor = 'e' ,relief = 'flat' ,bd = 2 )).grid (row = 0 , column = 2 , sticky = 'we' ,padx = 4 ,pady = 4 )
2059
2044
2060
- def validate_size_str (val ):
2061
- return bool (val == "" or val .isdigit ())
2062
-
2063
2045
find_size_min_entry = Entry (find_size_frame ,textvariable = self .find_size_min_var )
2064
2046
find_size_min_entry .grid (row = 0 , column = 1 , sticky = 'we' ,padx = 4 ,pady = 4 )
2065
2047
find_size_max_entry = Entry (find_size_frame ,textvariable = self .find_size_max_var )
@@ -2109,6 +2091,9 @@ def validate_size_str(val):
2109
2091
self .info_dialog_on_find = LabelDialog (self .find_dialog .widget ,self .main_icon_tuple ,self .bg_color ,pre_show = lambda new_widget : self .pre_show (on_main_window_dialog = False ,new_widget = new_widget ),post_close = lambda : self .post_close (on_main_window_dialog = False ))
2110
2092
self .text_dialog_on_find = TextDialogInfo (self .find_dialog .widget ,self .main_icon_tuple ,self .bg_color ,pre_show = lambda new_widget : self .pre_show (on_main_window_dialog = False ,new_widget = new_widget ),post_close = lambda : self .post_close (on_main_window_dialog = False ))
2111
2093
2094
+ self .text_dialog_on_find .cancel_button .configure (text = STR ('Cancel' ),compound = 'left' )
2095
+ self .text_dialog_on_find .copy_button .configure (text = STR ('Copy' ),compound = 'left' )
2096
+
2112
2097
self .fix_text_dialog (self .text_dialog_on_find )
2113
2098
2114
2099
self .results_on_find = LabelDialogQuestion (self .find_dialog .widget ,self .main_icon_tuple ,self .bg_color ,pre_show = lambda new_widget : self .pre_show (on_main_window_dialog = False ,new_widget = new_widget ),post_close = lambda : self .post_close (on_main_window_dialog = False ))
@@ -2316,7 +2301,7 @@ def record_import_wii(self):
2316
2301
self_main_wait_variable = self .main .wait_variable
2317
2302
2318
2303
dialog_update_lab_text = dialog .update_lab_text
2319
- dialog_area_main_update = dialog .area_main .update
2304
+ # dialog_area_main_update = dialog.area_main.update
2320
2305
2321
2306
while wii_import_thread_is_alive ():
2322
2307
dialog_update_lab_text (0 ,f'disks:{ fnumber (librer_core .wii_import_known_disk_names_len ).rjust (14 )} ' )
@@ -2398,7 +2383,7 @@ def record_import_wii(self):
2398
2383
#@restore_status_line
2399
2384
@block
2400
2385
def record_import (self ):
2401
- initialdir = self .last_dir if self .last_dir else self .cwd
2386
+ # initialdir = self.last_dir if self.last_dir else self.cwd
2402
2387
2403
2388
group = None
2404
2389
if self .current_group :
@@ -3187,8 +3172,6 @@ def find_items(self):
3187
3172
wait_var = BooleanVar ()
3188
3173
wait_var .set (False )
3189
3174
3190
- self_hg_ico = self .hg_ico
3191
-
3192
3175
#############################
3193
3176
3194
3177
self_progress_dialog_on_find .lab_l1 .configure (text = 'Records:' )
@@ -3322,7 +3305,6 @@ def find_items(self):
3322
3305
3323
3306
def get_child_of_name (self ,record ,item ,child_name ):
3324
3307
self_tree = self .tree
3325
- self_tree_item = self_tree .item
3326
3308
3327
3309
self_item_to_data = self .item_to_data
3328
3310
record_filenames = record .filenames
@@ -3570,8 +3552,6 @@ def context_menu_show(self,event):
3570
3552
self .tree_on_mouse_button_press (event )
3571
3553
tree .update ()
3572
3554
3573
- item_actions_state = ('disabled' ,'normal' )[self .sel_item is not None ]
3574
-
3575
3555
item = self .tree .focus ()
3576
3556
3577
3557
is_group = bool (self .tree .tag_has (self .GROUP ,item ))
@@ -3593,7 +3573,6 @@ def context_menu_show(self,event):
3593
3573
pop .delete (0 ,'end' )
3594
3574
3595
3575
pop_add_separator = pop .add_separator
3596
- pop_add_cascade = pop .add_cascade
3597
3576
pop_add_command = pop .add_command
3598
3577
3599
3578
state_on_records = 'normal' if is_record else 'disabled'
@@ -3875,8 +3854,6 @@ def scan_wrapper(self):
3875
3854
compression_level = self .scan_compr_var_int .get ()
3876
3855
threads = self .scan_threads_var_int .get ()
3877
3856
3878
- include_hidden = self .cfg .get (CFG_KEY_include_hidden )
3879
-
3880
3857
try :
3881
3858
if self .scan (compression_level ,threads ,group ):
3882
3859
self .scan_dialog_hide_wrapper ()
@@ -3992,8 +3969,6 @@ def scan(self,compression_level,threads,group=None):
3992
3969
3993
3970
self_progress_dialog_on_scan .show (STR ('Creating new data record (scanning)' ))
3994
3971
3995
- self_hg_ico = self .hg_ico
3996
-
3997
3972
local_bytes_to_str = bytes_to_str
3998
3973
3999
3974
self_progress_dialog_on_scan_progr1var .set (0 )
@@ -4076,8 +4051,6 @@ def scan(self,compression_level,threads,group=None):
4076
4051
4077
4052
creation_thread_is_alive = creation_thread .is_alive
4078
4053
4079
- self_hg_ico = self .hg_ico
4080
-
4081
4054
#############################
4082
4055
4083
4056
self_progress_dialog_on_scan_progr1var_set = self .progress_dialog_on_scan .progr1var .set
0 commit comments