Пример #1
0
	def ok(self, *arg):		
		if not 0 <= self.pagenum_spin.get_value()-1 < len(app.mw.document.pages):
			msgDialog(self.top, title = _("Error"), message = _('Incorrect page number!'))
			self.pagenum_spin.entry.focus_set()
			return
		app.mw.document.DeletePage(self.pagenum_spin.get_value()-1)
		self.close_dlg()
Пример #2
0
	def ok(self, *arg):
		is_before=0
		if not 0 <= self.pagenum_spin.get_value()-1 < len(app.mw.document.pages):
			msgDialog(self.top, title = _("Error"), message = _('Incorrect page number!'))
			self.pagenum_spin.entry.focus_set()
			return
		if not 0 < self.numpages_spin.get_value():
			msgDialog(self.top, title = _("Error"), message = _('Incorrect number of pages!'))
			self.numpages_spin.entry.focus_set()
			return
		if self.var_reference.get()=='before':
			is_before=1
		app.mw.document.InsertPages(number=self.numpages_spin.get_value(), 
								index=self.pagenum_spin.get_value()-1, 
								is_before=is_before)
		self.close_dlg()
Пример #3
0
 def ok(self, *arg):
     is_before = 0
     if not 0 <= self.pagenum_spin.get_value() - 1 < len(
             app.mw.document.pages):
         msgDialog(self.top,
                   title=_("Error"),
                   message=_('Incorrect page number!'))
         self.pagenum_spin.entry.focus_set()
         return
     if not 0 < self.numpages_spin.get_value():
         msgDialog(self.top,
                   title=_("Error"),
                   message=_('Incorrect number of pages!'))
         self.numpages_spin.entry.focus_set()
         return
     if self.var_reference.get() == 'before':
         is_before = 1
     app.mw.document.InsertPages(number=self.numpages_spin.get_value(),
                                 index=self.pagenum_spin.get_value() - 1,
                                 is_before=is_before)
     self.close_dlg()