Use constants for Gramps icon and splash file
svn: r19935
This commit is contained in:
parent
508aefea03
commit
d1ac573c51
@ -43,17 +43,9 @@ else:
|
||||
# Gramps modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gen.const import IMAGE_DIR, VERSION
|
||||
from gen.const import VERSION, ICON, SPLASH
|
||||
from gui.display import display_help, display_url
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Constants
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
GRAMPS_PNG = os.path.join(IMAGE_DIR, "gramps.png")
|
||||
SPLASH_JPG = os.path.join(IMAGE_DIR, "splash.jpg")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# ErrorReportAssistant
|
||||
@ -75,8 +67,8 @@ class ErrorReportAssistant(gtk.Assistant):
|
||||
self._error_details_text_buffer = None
|
||||
self._final_report_text_buffer = None
|
||||
|
||||
self.logo = gtk.gdk.pixbuf_new_from_file(GRAMPS_PNG)
|
||||
self.splash = gtk.gdk.pixbuf_new_from_file(SPLASH_JPG)
|
||||
self.logo = gtk.gdk.pixbuf_new_from_file(ICON)
|
||||
self.splash = gtk.gdk.pixbuf_new_from_file(SPLASH)
|
||||
|
||||
self.set_title(_("Error Report Assistant"))
|
||||
self.connect('close', self.close)
|
||||
@ -226,7 +218,7 @@ class ErrorReportAssistant(gtk.Assistant):
|
||||
# Using set_page_side_image causes window sizing problems, so put the
|
||||
# image in the main page instead.
|
||||
image = gtk.Image()
|
||||
image.set_from_file(SPLASH_JPG)
|
||||
image.set_from_file(SPLASH)
|
||||
|
||||
hbox = gtk.HBox()
|
||||
hbox.pack_start(image, False, False, 0)
|
||||
@ -650,7 +642,7 @@ class ErrorReportAssistant(gtk.Assistant):
|
||||
# Using set_page_side_image causes window sizing problems, so put the
|
||||
# image in the main page instead.
|
||||
image = gtk.Image()
|
||||
image.set_from_file(SPLASH_JPG)
|
||||
image.set_from_file(SPLASH)
|
||||
|
||||
hbox = gtk.HBox()
|
||||
hbox.pack_start(image, False, False, 0)
|
||||
|
@ -55,7 +55,7 @@ import gtk
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
from gen.const import IMAGE_DIR, USER_HOME
|
||||
from gen.const import USER_HOME, ICON, SPLASH
|
||||
from gen.config import config
|
||||
from gui.pluginmanager import GuiPluginManager
|
||||
from gen.utils.file import (find_folder, get_new_filename,
|
||||
@ -64,14 +64,6 @@ from gui.managedwindow import ManagedWindow
|
||||
from gui.dialog import ErrorDialog
|
||||
from gui.user import User
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Constants
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
_gramps_png = os.path.join(IMAGE_DIR,"gramps.png")
|
||||
_splash_jpg = os.path.join(IMAGE_DIR,"splash.jpg")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# ExportAssistant
|
||||
@ -140,11 +132,11 @@ class ExportAssistant(gtk.Assistant, ManagedWindow) :
|
||||
self.person = self.dbstate.db.find_initial_person()
|
||||
|
||||
try:
|
||||
self.logo = gtk.gdk.pixbuf_new_from_file(_gramps_png)
|
||||
self.logo = gtk.gdk.pixbuf_new_from_file(ICON)
|
||||
except:
|
||||
self.logo = None
|
||||
try:
|
||||
self.splash = gtk.gdk.pixbuf_new_from_file(_splash_jpg)
|
||||
self.splash = gtk.gdk.pixbuf_new_from_file(SPLASH)
|
||||
except:
|
||||
self.splash = None
|
||||
|
||||
|
@ -46,7 +46,7 @@ from gen.utils.callback import Callback
|
||||
from gen.plug import BasePluginManager, PluginRegister
|
||||
from gen.constfunc import win
|
||||
from gen.config import config
|
||||
from gen.const import IMAGE_DIR
|
||||
from gen.const import ICON
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -86,8 +86,7 @@ def base_reg_stock_icons(iconpaths, extraiconsize, items):
|
||||
pass
|
||||
|
||||
if not pixbuf :
|
||||
icon_file = os.path.join(IMAGE_DIR, 'gramps.png')
|
||||
pixbuf = gtk.gdk.pixbuf_new_from_file (icon_file)
|
||||
pixbuf = gtk.gdk.pixbuf_new_from_file(ICON)
|
||||
|
||||
## FIXME from gtk 2.17.3/2.15.2 change this to
|
||||
## FIXME pixbuf = pixbuf.add_alpha(True, 255, 255, 255)
|
||||
|
@ -49,7 +49,7 @@ import gobject
|
||||
# GRAMPS modules
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
from gen.const import IMAGE_DIR, URL_MANUAL_PAGE
|
||||
from gen.const import URL_MANUAL_PAGE, ICON, SPLASH
|
||||
from gui.display import display_help
|
||||
from gen.lib import MediaObject
|
||||
from gen.db import DbTxn
|
||||
@ -66,8 +66,6 @@ import gen.mime
|
||||
#-------------------------------------------------------------------------
|
||||
WIKI_HELP_PAGE = '%s_-_Tools' % URL_MANUAL_PAGE
|
||||
WIKI_HELP_SEC = _('manual|Media_Manager...')
|
||||
GRAMPS_PNG = os.path.join(IMAGE_DIR, "gramps.png")
|
||||
SPLASH_JPG = os.path.join(IMAGE_DIR, "splash.jpg")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -86,8 +84,8 @@ class MediaMan(tool.Tool):
|
||||
self.build_batch_ops()
|
||||
|
||||
self.assistant = gtk.Assistant()
|
||||
self.logo = gtk.gdk.pixbuf_new_from_file(GRAMPS_PNG)
|
||||
self.splash = gtk.gdk.pixbuf_new_from_file(SPLASH_JPG)
|
||||
self.logo = gtk.gdk.pixbuf_new_from_file(ICON)
|
||||
self.splash = gtk.gdk.pixbuf_new_from_file(SPLASH)
|
||||
|
||||
self.assistant.set_title(_('Gramps Media Manager'))
|
||||
self.assistant.connect('close', self.close)
|
||||
@ -208,7 +206,7 @@ class IntroductionPage(gtk.HBox):
|
||||
# Using set_page_side_image causes window sizing problems, so put the
|
||||
# image in the main page instead.
|
||||
image = gtk.Image()
|
||||
image.set_from_file(SPLASH_JPG)
|
||||
image.set_from_file(SPLASH)
|
||||
|
||||
label = gtk.Label(self.__get_intro_text())
|
||||
label.set_line_wrap(True)
|
||||
@ -367,7 +365,7 @@ class ConclusionPage(gtk.HBox):
|
||||
# Using set_page_side_image causes window sizing problems, so put the
|
||||
# image in the main page instead.
|
||||
image = gtk.Image()
|
||||
image.set_from_file(SPLASH_JPG)
|
||||
image.set_from_file(SPLASH)
|
||||
|
||||
self.label = gtk.Label()
|
||||
self.label.set_line_wrap(True)
|
||||
|
Loading…
Reference in New Issue
Block a user