* src/gramps_main.py: pass DisplayState to TipOfDay
* src/TipOfDay.py: Use DisplayState * src/const.py.in: add GRAMPS websites * src/ViewManager.py: Add TipOfDay; Make GRAMPS websites work again svn: r5124
This commit is contained in:
parent
f63b72f734
commit
ff7af5b673
@ -1,3 +1,9 @@
|
||||
2005-08-25 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||
* src/gramps_main.py: pass DisplayState to TipOfDay
|
||||
* src/TipOfDay.py: Use DisplayState
|
||||
* src/const.py.in: add GRAMPS websites
|
||||
* src/ViewManager.py: Add TipOfDay; Make GRAMPS websites work again
|
||||
|
||||
2005-08-19 Don Allingham <don@gramps-project.org>
|
||||
* src/DisplayState.py: fixe some window management syntax errros
|
||||
* src/PageView.py: enable double click to edit
|
||||
|
@ -51,7 +51,7 @@ import GrampsKeys
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class TipOfDay:
|
||||
def __init__(self,parent):
|
||||
def __init__(self,uistate):
|
||||
xml = gtk.glade.XML(const.gladeFile, "tod", "gramps")
|
||||
top = xml.get_widget("tod")
|
||||
tip = xml.get_widget("tip")
|
||||
@ -64,7 +64,7 @@ class TipOfDay:
|
||||
new_index = range(len(tip_list))
|
||||
Random().shuffle(new_index)
|
||||
|
||||
top.set_transient_for(parent.topWindow)
|
||||
top.set_transient_for(uistate.window)
|
||||
|
||||
index = 0
|
||||
rval = 0
|
||||
|
@ -35,6 +35,7 @@ import os
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import gtk
|
||||
import gnome
|
||||
try:
|
||||
from gnomevfs import get_mime_type
|
||||
except:
|
||||
@ -61,6 +62,7 @@ import Utils
|
||||
import QuestionDialog
|
||||
import PageView
|
||||
import Navigation
|
||||
import TipOfDay
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -119,6 +121,7 @@ uidefault = '''<ui>
|
||||
<menu action="HelpMenu">
|
||||
<menuitem action="UserManual"/>
|
||||
<menuitem action="FAQ"/>
|
||||
<menuitem action="TipOfDay"/>
|
||||
<separator/>
|
||||
<menuitem action="HomePage"/>
|
||||
<menuitem action="MailingLists"/>
|
||||
@ -232,6 +235,7 @@ class ViewManager:
|
||||
('About', gtk.STOCK_ABOUT, '_About', None, None, self.about),
|
||||
('FAQ', None, '_FAQ', None, None, self.faq_activate),
|
||||
('UserManual', gtk.STOCK_HELP, '_User Manual', 'F1', None, self.manual_activate),
|
||||
('TipOfDay', None, 'Tip of the day', None, None, self.tip_of_day_activate),
|
||||
])
|
||||
|
||||
self.actiongroup.add_actions([
|
||||
@ -267,13 +271,13 @@ class ViewManager:
|
||||
self.uimanager.insert_action_group(self.actiongroup,1)
|
||||
|
||||
def home_page_activate(self,obj):
|
||||
gnome.url_show(_HOMEPAGE)
|
||||
gnome.url_show( const.url_homepage)
|
||||
|
||||
def mailing_lists_activate(self,obj):
|
||||
gnome.url_show(_MAILLIST)
|
||||
gnome.url_show( const.url_mailinglist)
|
||||
|
||||
def report_bug_activate(self,obj):
|
||||
gnome.url_show(_BUGREPORT)
|
||||
gnome.url_show( const.url_bugtracker)
|
||||
|
||||
def manual_activate(self,obj):
|
||||
"""Display the GRAMPS manual"""
|
||||
@ -289,6 +293,10 @@ class ViewManager:
|
||||
except gobject.GError, msg:
|
||||
ErrorDialog(_("Could not open help"),str(msg))
|
||||
|
||||
def tip_of_day_activate(self,obj):
|
||||
"""Display Tip of the day"""
|
||||
TipOfDay.TipOfDay(self.uistate)
|
||||
|
||||
def about(self,obj):
|
||||
about = gtk.AboutDialog()
|
||||
about.set_name(const.program_name)
|
||||
|
@ -22,6 +22,15 @@
|
||||
|
||||
# $Id$
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard GRAMPS Websites
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
url_homepage = "http://gramps-project.org/"
|
||||
url_mailinglist = "http://sourceforge.net/mail/?group_id=25770"
|
||||
url_burtracker = "http://sourceforge.net/tracker/?group_id=25770&atid=385137"
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard python modules
|
||||
|
@ -190,7 +190,7 @@ class Gramps:
|
||||
# self.date_format_key_update)
|
||||
|
||||
if GrampsKeys.get_usetips():
|
||||
TipOfDay.TipOfDay(self)
|
||||
TipOfDay.TipOfDay(vm.uistate)
|
||||
|
||||
## # FIXME: THESE will have to be added (ViewManager?)
|
||||
## # once bookmarks work again
|
||||
|
Loading…
Reference in New Issue
Block a user