def auto_execute(self, widget, data=None):
# ???????? ????, ???? ?? ??????
self.window.hide()
gimp.context_push()
# ????????? ?????? ?????????? UNDO
self.image.undo_group_start()
# ???????? "????-??????"
if self.autolevels_check.get_active():
auto_levels = True
else:
auto_levels = False
# ???? ???????? gtk.RadioButton
for format_id in self.format_radio:
if format_id.get_active():
# ????????? ??????? ??????? ? ??????? ? ???????
tmp_dict = self.data['formats'][self.format_radio.index(format_id)]
tmp_dict['resolution'] = self.data['properties']['resolution']
shelf['format'] = tmp_dict
# ???? gtk.RadioButton ??????? ???????? ???????, ??????? ????????? ????
# ? ???????? ?????????? ???????? ?? ????????? ?? ???????????
# ? ?????? ? ??????????? ????????? ???????
self.create_id_foto(self.image, self.drawable, shelf['format'], auto_levels)
if data == 'auto_execute':
# ?????? ???????
self.image.scale(self.mm_in_px(shelf['format']['width'], shelf['format']['resolution']), self.mm_in_px(shelf['format']['height'], shelf['format']['resolution']))
if self.data['formats'][self.format_radio.index(format_id)]['angle']:
self.angle(self.image, self.drawable, self.data['formats'][self.format_radio.index(format_id)]['angle'])
if self.data['formats'][self.format_radio.index(format_id)]['oval']:
self.oval(self.image, self.drawable)
if self.data['formats'][self.format_radio.index(format_id)]['to_grayscale']:
self.to_grayscale(self.image, self.drawable)
if self.data['formats'][self.format_radio.index(format_id)]['gray_frame']:
self.gray_frame(self.image)
copys = self.data['formats'][self.format_radio.index(format_id)]['copys']
paper = self.data['formats'][self.format_radio.index(format_id)]['paper']
print_photo = self.data['formats'][self.format_radio.index(format_id)]['print_photo']
self.print_functon(self.image, self.drawable, paper, copys, print_photo)
break
# ????????? ???????????? ?? ???????
gimp.displays_flush()
# ????????? ?????? ?????????? UNDO
self.image.undo_group_end()
gimp.context_pop()
gtk.main_quit()
# ??? ??????? ?????? ????????? ???????? ?????????
# ? ??? ??????? ??????????? ?? ????????? ??????? ???? ??????????
评论列表
文章目录