Revision: 8568 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8568&view=rev Author: mdboom Date: 2010年07月23日 13:17:15 +0000 (2010年7月23日) Log Message: ----------- Prevent traceback when window icon can not be loaded in Gtk backend. Modified Paths: -------------- branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py Modified: branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py =================================================================== --- branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py 2010年07月20日 18:29:08 UTC (rev 8567) +++ branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py 2010年07月23日 13:17:15 UTC (rev 8568) @@ -33,6 +33,7 @@ from matplotlib import lines from matplotlib import cbook +from matplotlib import verbose backend_version = "%d.%d.%d" % gtk.pygtk_version @@ -1224,7 +1225,6 @@ window_icon = None verbose.report('Could not load matplotlib icon: %s' % sys.exc_info()[1]) - def error_msg_gtk(msg, parent=None): if parent is not None: # find the toplevel gtk.Window parent = parent.get_toplevel() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 8575 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8575&view=rev Author: weathergod Date: 2010年07月25日 22:24:05 +0000 (2010年7月25日) Log Message: ----------- Fix "graph jumping" issue when rubber-banding a selection in GTK backends. Modified Paths: -------------- branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py Modified: branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py =================================================================== --- branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py 2010年07月24日 22:02:33 UTC (rev 8574) +++ branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py 2010年07月25日 22:24:05 UTC (rev 8575) @@ -616,7 +616,7 @@ self.canvas.window.set_cursor(cursord[cursor]) def release(self, event): - try: del self._imageBack + try: del self._pixmapBack except AttributeError: pass def dynamic_update(self): @@ -640,7 +640,7 @@ rect = [int(val)for val in min(x0,x1), min(y0, y1), w, h] try: - lastrect, imageBack = self._imageBack + lastrect, pixmapBack = self._pixmapBack except AttributeError: #snap image back if event.inaxes is None: @@ -650,9 +650,10 @@ l,b,w,h = [int(val) for val in ax.bbox.bounds] b = int(height)-(b+h) axrect = l,b,w,h - self._imageBack = axrect, drawable.get_image(*axrect) + self._pixmapBack = axrect, gtk.gdk.Pixmap(drawable, w, h) + self._pixmapBack[1].draw_drawable(gc, drawable, l, b, 0, 0, w, h) else: - drawable.draw_image(gc, imageBack, 0, 0, *lastrect) + drawable.draw_drawable(gc, pixmapBack, 0, 0, *lastrect) drawable.draw_rectangle(gc, False, *rect) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 8697 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8697&view=rev Author: ryanmay Date: 2010年09月11日 19:03:52 +0000 (2010年9月11日) Log Message: ----------- Handle multple calls to GTKTimer.start() by stopping any existing gtk timer id. Modified Paths: -------------- branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py Modified: branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py =================================================================== --- branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py 2010年09月11日 19:02:38 UTC (rev 8696) +++ branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py 2010年09月11日 19:03:52 UTC (rev 8697) @@ -101,6 +101,9 @@ functions add_callback and remove_callback can be used. ''' def _timer_start(self): + # Need to stop it, otherwise we potentially leak a timer id that will + # never be stopped. + self._timer_stop() self._timer = gobject.timeout_add(self._interval, self._on_timer) def _timer_stop(self): @@ -109,6 +112,7 @@ self._timer = None def _timer_set_interval(self): + # Only stop and restart it if the timer has already been started if self._timer is not None: self._timer_stop() self._timer_start() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 8913 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8913&view=rev Author: mdboom Date: 2011年01月13日 13:57:12 +0000 (2011年1月13日) Log Message: ----------- [3154456] confirm file overwrite (gtk) Modified Paths: -------------- branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py Modified: branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py =================================================================== --- branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py 2011年01月13日 07:31:48 UTC (rev 8912) +++ branches/v1_0_maint/lib/matplotlib/backends/backend_gtk.py 2011年01月13日 13:57:12 UTC (rev 8913) @@ -993,8 +993,9 @@ filetypes = [], default_filetype = None ): - super (FileChooserDialog, self).__init__ (title, parent, action, - buttons) + super(FileChooserDialog, self).__init__ (title, parent, action, + buttons) + super(FileChooserDialog, self).set_do_overwrite_confirmation(True) self.set_default_response (gtk.RESPONSE_OK) if not path: path = os.getcwd() + os.sep This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.