From ae19d72d6d58d5af52029e12ae3b68ce5253be6b Mon Sep 17 00:00:00 2001 From: "Romain F. T" Date: Sun, 28 Jul 2019 22:57:37 +0200 Subject: [PATCH] Remove print statements --- src/image.py | 5 ----- src/selection_manager.py | 4 ---- src/tools/classic_tools/tool_paint.py | 1 - src/tools/selection_tools/tool_select.py | 2 -- src/utilities.py | 11 ----------- src/window.py | 3 --- 6 files changed, 26 deletions(-) diff --git a/src/image.py b/src/image.py index 6a152b04..498a172e 100644 --- a/src/image.py +++ b/src/image.py @@ -287,11 +287,6 @@ def update_history_actions_labels(self): self.window.update_history_actions_labels(undo_label, redo_label) def add_operation_to_history(self, operation): - # print('add_operation_to_history') - # print(operation['tool_id']) - # if operation['tool_id'] == 'select': - # print(operation['operation_type']) - # print('-----------------------------------') self._is_saved = False self.undo_history.append(operation) self.update_history_sensitivity() diff --git a/src/selection_manager.py b/src/selection_manager.py index d8ea7f69..f72da33e 100644 --- a/src/selection_manager.py +++ b/src/selection_manager.py @@ -33,7 +33,6 @@ def __init__(self, image): self.l_popover = Gtk.Popover.new_from_model(self.image.window.notebook, menu_l) def init_pixbuf(self): - print('⇒ init pixbuf') self.selection_pixbuf = GdkPixbuf.Pixbuf.new(GdkPixbuf.Colorspace.RGB, True, 8, 1, 1) self.set_coords(True, 0, 0) @@ -83,7 +82,6 @@ def load_from_path(self, new_path): print(self.selection_x, xmin, self.selection_y, ymin) # Actually store the pixbuf - print('⇒ load pixbuf') self.selection_pixbuf = Gdk.pixbuf_get_from_surface(surface, \ int(xmin), int(ymin), int(xmax - xmin), int(ymax - ymin)) # XXX PAS_SOUHAITABLE ?? passer par set_pixbuf est-il plus sain ? @@ -100,7 +98,6 @@ def set_pixbuf(self, pixbuf, use_import_param, is_imported_data): if use_import_param: self.is_imported_data = is_imported_data self.temp_path = None - print('⇒ set pixbuf') self.selection_pixbuf = pixbuf self._create_path_from_pixbuf(not self.is_imported_data) @@ -108,7 +105,6 @@ def get_pixbuf(self): return self.selection_pixbuf def reset(self): - print('⇒ reset pixbuf') self.selection_pixbuf = None self.selection_path = None self.set_coords(True, 0, 0) diff --git a/src/tools/classic_tools/tool_paint.py b/src/tools/classic_tools/tool_paint.py index a48f9802..f8cda777 100644 --- a/src/tools/classic_tools/tool_paint.py +++ b/src/tools/classic_tools/tool_paint.py @@ -27,7 +27,6 @@ def get_edition_status(self): return self.label def on_press_on_area(self, area, event, surface, tool_width, left_color, right_color, event_x, event_y): - print("press") if event.button == 1: self.new_color = left_color if event.button == 3: diff --git a/src/tools/selection_tools/tool_select.py b/src/tools/selection_tools/tool_select.py index 6b4d8b9c..befbdce2 100644 --- a/src/tools/selection_tools/tool_select.py +++ b/src/tools/selection_tools/tool_select.py @@ -324,7 +324,6 @@ def op_delete(self, operation): self.get_selection().delete_temp() def op_drag(self, operation): - # print('drag to : ', operation['pixb_x'], operation['pixb_y']) self.get_selection().set_coords(False, \ operation['pixb_x'], operation['pixb_y']) self.non_destructive_show_modif() @@ -364,7 +363,6 @@ def do_tool_operation(self, operation): if operation['tool_id'] != self.id: return self.restore_pixbuf() - print(operation['operation_type']) if operation['operation_type'] == 'op-delete': # Opération instantanée (sans preview), correspondant à une action # de type "clic-droit > couper" ou "clic-droit > supprimer". diff --git a/src/utilities.py b/src/utilities.py index 54655863..8c631e65 100644 --- a/src/utilities.py +++ b/src/utilities.py @@ -54,8 +54,6 @@ def utilities_get_magic_path(surface, x, y, window, coef): (first_x, first_y) = (x, y) - print(str(x) + ' ' + str(y)) - # 0 1 2 # 7 3 # 6 5 4 @@ -86,24 +84,16 @@ def utilities_get_magic_path(surface, x, y, window, coef): x = new_x+x_shift[direction] y = new_y+y_shift[direction] end_circle = True - else: - print('cas emmerdant') j = j+1 direction = (direction+4) % 8 - # print('direction:') - # print(direction) if (new_x != -10): cairo_context.line_to(x, y) - # else: - # print('TENTATIVE ABUSIVE D\'AJOUT') - # should_stop = True if (i > 10) and (first_x-5 < x < first_x+5) and (first_y-5 < y < first_y+5): should_stop = True i = i + 1 - # print('----------') if i == 2000: dialog, continue_id = launch_infinite_loop_dialog(window) @@ -115,7 +105,6 @@ def utilities_get_magic_path(surface, x, y, window, coef): return cairo_context.close_path() - # print('i: ' + str(i)) return cairo_context.copy_path() def launch_infinite_loop_dialog(window): diff --git a/src/window.py b/src/window.py index a124b08f..dc95cd83 100644 --- a/src/window.py +++ b/src/window.py @@ -976,9 +976,6 @@ def action_rebuild(self, *args): # XXX image method ? h = self.get_active_image().undo_history.copy() self.get_active_image().undo_history = [] for op in h: - # print() - # print(op) - # print() self.tools[op['tool_id']].apply_operation(op) self.get_active_image().update() self.get_active_image().update_history_sensitivity()