Skip to content

Commit

Permalink
Fixed screenshot shortcut features
Browse files Browse the repository at this point in the history
  • Loading branch information
pnprog committed Jul 27, 2018
1 parent a64ed65 commit e2b498c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
14 changes: 11 additions & 3 deletions dual_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -2369,6 +2369,7 @@ def new_right_goban(self,event=None):
new_tab.goban.wood=self.left_game_goban.wood
new_tab.goban.black_stones=self.left_game_goban.black_stones_style
new_tab.goban.white_stones=self.left_game_goban.white_stones_style
new_tab.goban.bind("<Enter>",lambda e: self.set_status(_("<Ctrl+W> to save the goban as an image.")))

self.right_side_opened_tabs.append(new_tab)

Expand All @@ -2393,6 +2394,7 @@ def new_left_goban(self,event=None):
new_tab.goban.wood=self.left_game_goban.wood
new_tab.goban.black_stones=self.left_game_goban.black_stones_style
new_tab.goban.white_stones=self.left_game_goban.white_stones_style
new_tab.goban.bind("<Enter>",lambda e: self.set_status(_("<Ctrl+Q> to save the goban as an image.")))

self.left_side_opened_tabs.append(new_tab)

Expand Down Expand Up @@ -2532,6 +2534,7 @@ def initialize(self):

left_notebook=Notebook(gobans_frame)
left_notebook.bind("<Enter>",lambda event: self.set_active(left_notebook))
self.left_notebook=left_notebook

left_game_tab=Frame(left_notebook)
left_notebook.add(left_game_tab, text=_("Actual game"))
Expand All @@ -2545,7 +2548,8 @@ def initialize(self):

right_notebook=Notebook(gobans_frame)
right_notebook.bind("<Enter>",lambda event: self.set_active(right_notebook))

self.right_notebook=right_notebook

right_game_tab=Frame(right_notebook)
right_notebook.add(right_game_tab, text=_("Actual game"))

Expand Down Expand Up @@ -2780,7 +2784,9 @@ def initialize(self):
self.left_map_button.bind("<Enter>",lambda e: self.set_status(_("Keep pressed to show map.")))
self.right_map_button.bind("<Enter>",lambda e: self.set_status(_("Keep pressed to show map.")))
self.left_game_goban.bind("<Enter>",lambda e: self.set_status(_("<Ctrl+Q> to save the goban as an image.")))
self.left_bot_goban.bind("<Enter>",lambda e: self.set_status(_("<Ctrl+Q> to save the goban as an image.")))
self.right_bot_goban.bind("<Enter>",lambda e: self.set_status(_("<Ctrl+W> to save the goban as an image.")))
self.right_game_goban.bind("<Enter>",lambda e: self.set_status(_("<Ctrl+W> to save the goban as an image.")))

self.comment_box2.bind("<Configure>",self.redraw_panel)

Expand Down Expand Up @@ -2893,12 +2899,14 @@ def clear_status(self):
self.status_bar.config(text="")

def save_left_as_png(self,event=None):
goban=self.left_game_goban
filename = save_png_file(parent=self,filename='move'+str(self.current_move)+'.png')
canvas2png(self.goban1,filename)
canvas2png(goban,filename)

def save_right_as_png(self,event=None):
goban=self.right_game_goban
filename = save_png_file(parent=self,filename='move'+str(self.current_move)+'.png')
canvas2png(self.goban2,filename)
canvas2png(goban,filename)

if __name__ == "__main__":
if len(sys.argv)==1:
Expand Down
1 change: 1 addition & 0 deletions live_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ def new_goban(self,event=None):
new_tab.goban.wood=self.goban.wood
new_tab.goban.black_stones=self.goban.black_stones_style
new_tab.goban.white_stones=self.goban.white_stones_style
new_tab.goban.bind("<Enter>",lambda e: self.set_status(_("<Ctrl+Q> to save the goban as an image.")))

self.opened_tabs.append(new_tab)

Expand Down
4 changes: 2 additions & 2 deletions tabbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,9 @@ def initialize(self):
goban3.space=1
goban3.pack(fill=BOTH,expand=1)

self.bind('<Control-q>', self.save_as_png)
"""self.bind('<Control-q>', self.save_as_png)
goban3.bind("<Enter>",lambda e: self.set_status(_("<Ctrl+Q> to save the goban as an image.")))
goban3.bind("<Leave>",lambda e: self.clear_status())
goban3.bind("<Leave>",lambda e: self.clear_status())"""

grid3=[[0 for row in range(dim)] for col in range(dim)]
markup3=[["" for row in range(dim)] for col in range(dim)]
Expand Down

0 comments on commit e2b498c

Please sign in to comment.