示例#1
0
 def set_fractal(entry, form, order):
     try:
         utils.idle_add(form.set_param, order, entry.get_active())
     except Exception, err:
         msg = "error setting bool param: %s" % str(err)
         print msg
         utils.idle_add(f.warn, msg)
示例#2
0
 def set_fractal(entry,form,order):
     try:
         utils.idle_add(form.set_param,order,entry.get_active())
     except Exception, err:
         msg = "error setting bool param: %s" % str(err)
         print msg
         utils.idle_add(f.warn,msg)
示例#3
0
 def draw_image(self, aa=None, auto_deepen=None):
     try:
         Hidden.draw_image(self, aa, auto_deepen)
     except fracttypes.TranslationError, err:
         advice = _("\nCheck that your compiler settings and formula file are correct.")
         utils.idle_add(self.error, _("Error compiling fractal:"), err.msg + advice)
         return
示例#4
0
 def set_fractal(entry, event, form, order):
     try:
         utils.idle_add(form.set_param, order, entry.get_text())
     except Exception, err:
         # FIXME: produces too many errors
         msg = "Invalid value '%s': must be a number" % entry.get_text()
         print msg
示例#5
0
 def draw_image(self,aa=None,auto_deepen=None):
     try:
         Hidden.draw_image(self,aa,auto_deepen)
     except fracttypes.TranslationError, err:
         advice = _("\nCheck that your compiler settings and formula file are correct.")
         utils.idle_add(self.error,
                        _("Error compiling fractal:"),
                        err.msg + advice)
         return
示例#6
0
 def set_fractal(entry,event,form,order):
     try:
         utils.idle_add(
             form.set_param,order,entry.get_text())
     except Exception, err:
         # FIXME: produces too many errors
         msg = "Invalid value '%s': must be a number" % \
               entry.get_text()
         print msg
示例#7
0
    def set_size(self, new_width, new_height):
        self.interrupt()
        if self.width == new_width and self.height == new_height :
            return
        
        self.width = new_width
        self.height = new_height

        self.image.resize_full(new_width, new_height)
        utils.idle_add(self.changed)
示例#8
0
 def set_fractal(*args):
     try:
         try:
             i = int(widget.get_text())
             self.set_maxiter(i)
         except ValueError, err:
             msg = "Invalid value '%s': must be a number" % widget.get_text()
             utils.idle_add(self.warn, msg)
     except Exception, exn:
         print exn
示例#9
0
    def set_size(self, new_width, new_height):
        self.interrupt()
        if self.width == new_width and self.height == new_height:
            return

        self.width = new_width
        self.height = new_height

        self.image.resize_full(new_width, new_height)
        utils.idle_add(self.changed)
示例#10
0
 def set_fractal(*args):
     try:
         try:
             i = int(widget.get_text())
             self.set_maxiter(i)
         except ValueError, err:
             msg = "Invalid value '%s': must be a number" % \
                   widget.get_text()
             utils.idle_add(self.warn, msg)
     except Exception, exn:
         print exn
示例#11
0
        def set_prefs(*args):
            try:
                try:
                    height = int(entry.get_text())
                except ValueError:
                    utils.idle_add(
                        self.show_error,
                        "Invalid value for height: '%s'. Must be an integer" % \
                        entry.get_text())
                    return False

                width = self.f.width
                if self.fix_ratio.get_active():
                    width = int(height * float(self.f.width)/self.f.height)
                self.prefs.set_size(width, height)
            except Exception, exn:
                print exn
示例#12
0
        def set_prefs(*args):
            try:
                try:
                    height = int(entry.get_text())
                except ValueError:
                    utils.idle_add(
                        self.show_error,
                        "Invalid value for height: '%s'. Must be an integer" % \
                        entry.get_text())
                    return False

                width = self.f.width
                if self.fix_ratio.get_active():
                    width = int(height * float(self.f.width) / self.f.height)
                self.prefs.set_size(width, height)
            except Exception, exn:
                print exn
示例#13
0
 def set_size(self, new_width, new_height):
     try:
         Hidden.set_size(self,new_width, new_height)
         self.widget.set_size_request(new_width,new_height)
     except MemoryError, err:
         utils.idle_add(self.warn,str(err))
示例#14
0
 def adj_changed(adjustment,form,order):
     utils.idle_add(
         form.set_param, order, adjustment.value)
示例#15
0
 def set_size(self, new_width, new_height):
     try:
         Hidden.set_size(self, new_width, new_height)
         self.widget.set_size_request(new_width, new_height)
     except MemoryError, err:
         utils.idle_add(self.warn, str(err))
示例#16
0
 def adj_changed(adjustment, form, order):
     utils.idle_add(form.set_param, order, adjustment.value)