Merge branch 'master' of git://github.com/lastpoet/fpdb-lastpoet

This commit is contained in:
Worros 2010-10-05 10:52:52 +08:00
commit 7c76c11595
4 changed files with 15 additions and 3 deletions

View File

@ -35,8 +35,10 @@ import Filters
import Charset import Charset
try: try:
calluse = not 'matplotlib' in sys.modules
import matplotlib import matplotlib
matplotlib.use('GTKCairo') if calluse:
matplotlib.use('GTKCairo')
from matplotlib.figure import Figure from matplotlib.figure import Figure
from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar

2
pyfpdb/GuiSessionViewer.py Executable file → Normal file
View File

@ -30,7 +30,7 @@ try:
calluse = not 'matplotlib' in sys.modules calluse = not 'matplotlib' in sys.modules
import matplotlib import matplotlib
if calluse: if calluse:
matplotlib.use('GTK') matplotlib.use('GTKCairo')
from matplotlib.figure import Figure from matplotlib.figure import Figure
from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar

View File

@ -35,8 +35,10 @@ import Filters
import Charset import Charset
try: try:
calluse = not 'matplotlib' in sys.modules
import matplotlib import matplotlib
matplotlib.use('GTKCairo') if calluse:
matplotlib.use('GTKCairo')
from matplotlib.figure import Figure from matplotlib.figure import Figure
from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar

8
pyfpdb/HUD_main.pyw Executable file → Normal file
View File

@ -111,8 +111,16 @@ class HUD_main(object):
self.vb.add(self.label) self.vb.add(self.label)
self.main_window.add(self.vb) self.main_window.add(self.vb)
self.main_window.set_title(_("HUD Main Window")) self.main_window.set_title(_("HUD Main Window"))
cards = os.path.join(os.getcwd(), '..','gfx','fpdb-cards.png')
if os.path.exists(cards):
self.main_window.set_icon_from_file(cards)
elif os.path.exists('/usr/share/pixmaps/fpdb-cards.png'):
self.main_window.set_icon_from_file('/usr/share/pixmaps/fpdb-cards.png')
else:
self.main_window.set_icon_stock(gtk.STOCK_HOME)
self.main_window.show_all() self.main_window.show_all()
gobject.timeout_add(100, self.check_tables) gobject.timeout_add(100, self.check_tables)
except: except:
log.error("*** Exception in HUD_main.init() *** ") log.error("*** Exception in HUD_main.init() *** ")
for e in traceback.format_tb(sys.exc_info()[2]): for e in traceback.format_tb(sys.exc_info()[2]):