imdiff 0.2.8__tar.gz → 0.2.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {imdiff-0.2.8 → imdiff-0.2.10}/PKG-INFO +1 -1
  2. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/gui/dir_diff_main_window.py +16 -6
  3. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/gui/file_list_frame.py +2 -2
  4. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/gui/image_frame.py +7 -3
  5. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/version.py +1 -1
  6. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff.egg-info/PKG-INFO +1 -1
  7. {imdiff-0.2.8 → imdiff-0.2.10}/LICENSE +0 -0
  8. {imdiff-0.2.8 → imdiff-0.2.10}/README.md +0 -0
  9. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/__init__.py +0 -0
  10. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/__main__.py +0 -0
  11. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/cli/__init__.py +0 -0
  12. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/cli/dir_diff.py +0 -0
  13. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/cli/image_diff.py +0 -0
  14. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/cli/main.py +0 -0
  15. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/gui/__init__.py +0 -0
  16. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/gui/image_canvas.py +0 -0
  17. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/gui/image_diff_main_window.py +0 -0
  18. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/gui/image_scaling.py +0 -0
  19. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/gui/status_bar.py +0 -0
  20. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/gui/transient_menu.py +0 -0
  21. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/gui/zoom_menu.py +0 -0
  22. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/image_comparator.py +0 -0
  23. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/list_files.py +0 -0
  24. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff/util.py +0 -0
  25. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff.egg-info/SOURCES.txt +0 -0
  26. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff.egg-info/dependency_links.txt +0 -0
  27. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff.egg-info/entry_points.txt +0 -0
  28. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff.egg-info/requires.txt +0 -0
  29. {imdiff-0.2.8 → imdiff-0.2.10}/imdiff.egg-info/top_level.txt +0 -0
  30. {imdiff-0.2.8 → imdiff-0.2.10}/pyproject.toml +0 -0
  31. {imdiff-0.2.8 → imdiff-0.2.10}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: imdiff
3
- Version: 0.2.8
3
+ Version: 0.2.10
4
4
  Summary: Compare image files in different directories
5
5
  Author-email: "John T. Goetz" <theodore.goetz@gmail.com>
6
6
  Project-URL: homepage, https://gitlab.com/johngoetz/imdiff
@@ -25,11 +25,7 @@ class DirDiffMainWindow(ttk.Window):
25
25
  right_label=right_label,
26
26
  )
27
27
  self.image_frame = ImageFrame(self.pane_window, update_item=self.update_item)
28
- self.image_frame.add_operate_buttons(
29
- ttk.Button(self.image_frame, text='Delete', command=self.delete),
30
- ttk.Button(self.image_frame, text='⟵', command=self.copy_right_to_left),
31
- ttk.Button(self.image_frame, text='⟶', command=self.copy_left_to_right),
32
- )
28
+ self.image_frame.add_standard_operate_buttons()
33
29
  self.status_bar = StatusBar(self)
34
30
  self.layout()
35
31
  self.bind_events()
@@ -55,7 +51,6 @@ class DirDiffMainWindow(ttk.Window):
55
51
 
56
52
  def bind_events(self):
57
53
  self.bind_all('<Control-q>', self.destroy)
58
- self.bind_all('<Control-c>', self.destroy)
59
54
  self.bind_all('<Down>', self.file_list_frame.on_down)
60
55
  self.bind_all(
61
56
  '<Shift-Down>', lambda evt: self.file_list_frame.on_down(evt, add=True)
@@ -89,6 +84,21 @@ class DirDiffMainWindow(ttk.Window):
89
84
  self.file_list_frame.leftdir = leftdir
90
85
  self.file_list_frame.rightdir = rightdir
91
86
  if leftdir and rightdir:
87
+
88
+ # find first unique path component starting from the end
89
+ for i in range(len(leftdir.parts)):
90
+ try:
91
+ l = leftdir.parts[-i]
92
+ r = rightdir.parts[-i]
93
+ if l != r:
94
+ self.image_frame.left_label.set(l)
95
+ self.image_frame.right_label.set(r)
96
+ break
97
+ except IndexError:
98
+ # just give up, defaults to "left" and "right"
99
+ break
100
+
101
+
92
102
  self.file_list_frame.after_idle(self.file_list_frame.load_files)
93
103
 
94
104
  def delete(self, evt=None):
@@ -83,14 +83,14 @@ class FileListFrame(ttk.Frame):
83
83
  self.treeview_frame, orient=tk.HORIZONTAL, variable=self.progress_var
84
84
  )
85
85
  self.file_treeview = ttk.Treeview(self.treeview_frame, columns=('stat',))
86
- self.file_treeview.heading('#0', text='File')
86
+ self.file_treeview.heading('#0', text='File (▲)')
87
87
  self.file_treeview.heading('stat', text='Stat')
88
88
  w = tk.font.Font().measure(' Stat (▲) ')
89
89
  self.file_treeview.column(
90
90
  'stat', width=w, minwidth=w, stretch=False, anchor='center'
91
91
  )
92
92
 
93
- self.file_treeview.tag_configure('identical', foreground='black')
93
+ self.file_treeview.tag_configure('identical', foreground='gray')
94
94
  self.file_treeview.tag_configure('missing', foreground='orange')
95
95
  self.file_treeview.tag_configure('not-found', foreground='violet')
96
96
  self.file_treeview.tag_configure('failed-to-load', foreground='violet')
@@ -24,8 +24,8 @@ class ImageFrame(ttk.Frame):
24
24
  ):
25
25
  super().__init__(parent)
26
26
  self.update_item_command = update_item
27
- self.left_label = left_label
28
- self.right_label = right_label
27
+ self.left_label = tk.StringVar(value=left_label)
28
+ self.right_label = tk.StringVar(value=right_label)
29
29
 
30
30
  self.high_contrast = tk.BooleanVar()
31
31
  self.high_contrast.set(False)
@@ -99,10 +99,14 @@ class ImageFrame(ttk.Frame):
99
99
  self.layout()
100
100
 
101
101
  def add_standard_operate_buttons(self):
102
+ self.left_text_label = ttk.Label(self, textvariable=self.left_label)
103
+ self.right_text_label = ttk.Label(self, textvariable=self.right_label)
102
104
  self.add_operate_buttons(
103
- ttk.Button(self, text='Delete', command=self.delete),
105
+ ttk.Button(self, text='Delete', command=self.delete, bootstyle=ttk.DANGER),
106
+ self.left_text_label,
104
107
  ttk.Button(self, text='⟵', command=self.copy_right_to_left),
105
108
  ttk.Button(self, text='⟶', command=self.copy_left_to_right),
109
+ self.right_text_label,
106
110
  )
107
111
 
108
112
  def layout(self):
@@ -1,2 +1,2 @@
1
- __version__ = '0.2.8'
1
+ __version__ = '0.2.10'
2
2
  version_info = __version__.split('.')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: imdiff
3
- Version: 0.2.8
3
+ Version: 0.2.10
4
4
  Summary: Compare image files in different directories
5
5
  Author-email: "John T. Goetz" <theodore.goetz@gmail.com>
6
6
  Project-URL: homepage, https://gitlab.com/johngoetz/imdiff
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes