|
From: <ef...@us...> - 2010-06-12 23:40:26
|
Revision: 8423
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8423&view=rev
Author: efiring
Date: 2010-06-12 23:40:19 +0000 (Sat, 12 Jun 2010)
Log Message:
-----------
backends: move windowing.py into backends--it is very backend-specific
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/backends/backend_fltkagg.py
trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py
Added Paths:
-----------
trunk/matplotlib/lib/matplotlib/backends/windowing.py
Removed Paths:
-------------
trunk/matplotlib/lib/matplotlib/windowing.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_fltkagg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_fltkagg.py 2010-06-12 23:08:11 UTC (rev 8422)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_fltkagg.py 2010-06-12 23:40:19 UTC (rev 8423)
@@ -26,7 +26,7 @@
NavigationToolbar2, cursors
from matplotlib.figure import Figure
from matplotlib._pylab_helpers import Gcf
-import matplotlib.windowing as windowing
+import matplotlib.backends.windowing as windowing
from matplotlib.widgets import SubplotTool
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py 2010-06-12 23:08:11 UTC (rev 8422)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py 2010-06-12 23:40:19 UTC (rev 8423)
@@ -11,6 +11,7 @@
import matplotlib.backends.tkagg as tkagg
from matplotlib.backends.backend_agg import FigureCanvasAgg
+import matplotlib.backends.windowing as windowing
import matplotlib
from matplotlib.cbook import is_string_like
@@ -21,7 +22,6 @@
from matplotlib.figure import Figure
from matplotlib._pylab_helpers import Gcf
-import matplotlib.windowing as windowing
from matplotlib.widgets import SubplotTool
import matplotlib.cbook as cbook
Copied: trunk/matplotlib/lib/matplotlib/backends/windowing.py (from rev 8419, trunk/matplotlib/lib/matplotlib/windowing.py)
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/windowing.py (rev 0)
+++ trunk/matplotlib/lib/matplotlib/backends/windowing.py 2010-06-12 23:40:19 UTC (rev 8423)
@@ -0,0 +1,26 @@
+"""
+MS Windows-specific helper for TkAgg and FltkAgg backends.
+
+With rcParams['tk.window_focus'] default of False, it is
+effectively disabled.
+
+It uses a tiny C++ extension module to access MS Win functions.
+"""
+from matplotlib import rcParams
+
+try:
+ if not rcParams['tk.window_focus']:
+ raise ImportError
+ from matplotlib._windowing import GetForegroundWindow, SetForegroundWindow
+except ImportError:
+ def GetForegroundWindow():
+ return 0
+ def SetForegroundWindow(hwnd):
+ pass
+
+class FocusManager:
+ def __init__(self):
+ self._shellWindow = GetForegroundWindow()
+
+ def __del__(self):
+ SetForegroundWindow(self._shellWindow)
Deleted: trunk/matplotlib/lib/matplotlib/windowing.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/windowing.py 2010-06-12 23:08:11 UTC (rev 8422)
+++ trunk/matplotlib/lib/matplotlib/windowing.py 2010-06-12 23:40:19 UTC (rev 8423)
@@ -1,26 +0,0 @@
-"""
-MS Windows-specific helper for TkAgg and FltkAgg backends.
-
-With rcParams['tk.window_focus'] default of False, it is
-effectively disabled.
-
-It uses a tiny C++ extension module to access MS Win functions.
-"""
-from matplotlib import rcParams
-
-try:
- if not rcParams['tk.window_focus']:
- raise ImportError
- from matplotlib._windowing import GetForegroundWindow, SetForegroundWindow
-except ImportError:
- def GetForegroundWindow():
- return 0
- def SetForegroundWindow(hwnd):
- pass
-
-class FocusManager:
- def __init__(self):
- self._shellWindow = GetForegroundWindow()
-
- def __del__(self):
- SetForegroundWindow(self._shellWindow)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|