From: Serge N. <Ser...@fr...> - 2010-03-19 18:20:15
|
Benny Malengier a écrit : > > > 2010/3/19 Serge Noiraud <Ser...@fr... > <mailto:Ser...@fr...>> > > Hi, > > sorry, for the delay, I was at linux solutions in Paris and had no > internet for 3 days. > > Duncan Lithgow a écrit : > > On 18 March 2010 12:56, Benny Malengier > <ben...@gm... <mailto:ben...@gm...>> > wrote: > ... > > > Gramps starts up on the last used view. So if you have > crash on geographic > > > > Firefox has the nice feature that it doesn't try to reopen all > tabs > after a crash. Could gramps benefit from something similar? > Maybe a > key=>value pair somewhere like shutdown=bad which gets set to > shutdown=clean during a clean shutdown? Then gramps could check if > there was a reason to load cautiously after a crash. > > > Geoview doesn't need this as we always start a session from zero. > The only thing we can do in this case is to remove the library > which is > at the origin of the crash. This is often webkit but sometimes it > is gecko > depending on the distribution. > > > Moved to devel. > > Actually, I like the idea of Duncan. On startup set shutdown=False, > and on close shutdown=True. > On startup, if shutdown=True, don't reopen on last view. Can be > usefull with all those views in the addons. OK. it's a good Idea. I'm trying to test this. Either I solved that the bad way or someting is missing in src/gui/viewmanager.py or src/gui/grampsgui.py At the beginning of __init__ I do that : if config.get('geoview.startup'): config.set('geoview.startup',False) else: # Last geoview doesn't finished correctly : crash ? raise RendererKitProblem So normaly geoview should not be loaded. The problems : 1 - What error can we raise in this case ? 2 - In this case, gramps doesn't load because this kind of error is not managed ( I suppose ). The trace : 1842: WARNING: viewmanager.py: line 887: View 'geoview' failed to load. Traceback (most recent call last): File "/home/gramps/trunk/src/gui/viewmanager.py", line 884, in __create_pages page = page_def(self.dbstate, self.uistate) File "/home/gramps/trunk/src/plugins/view/geoview.py", line 325, in __init__ raise RendererKitProblem NameError: global name 'RendererKitProblem' is not defined 2087: ERROR: grampsgui.py: line 356: Gramps failed to start. Traceback (most recent call last): File "/home/gramps/trunk/src/gui/grampsgui.py", line 336, in __startgramps Gramps(argparser) File "/home/gramps/trunk/src/gui/grampsgui.py", line 263, in __init__ self.vm.init_interface(vieworder) File "/home/gramps/trunk/src/gui/viewmanager.py", line 579, in init_interface self.__create_pages() File "/home/gramps/trunk/src/gui/viewmanager.py", line 968, in __create_pages self.buttons[current_cat].set_active(True) IndexError: list index out of range > > Also, add a _hidden_ config option in the htmlview ini file to > overrule the default backend, something like: > custom_backend ='None', 'Webkit' or 'Gecko' . Yes, this is a htmlview > thing, not geoview! Then it still needs to be checked if those are > actually installed or not. We don't have this problem with htmlview as we don't use javascript intensively at startup. So perhaps only the startup flag is necessary and no other options. However, we could have an option to reset the startup flag to True to retry loading : the problem is where ? edit the config file manually ? It can be documented. > > There is no use in showing this option to the user in the > configuration dialog, our default is good. It is however good to have > an ini option we can say people to change when they have a problem > with a package. That is, we don't want option overload for things > users should not change, which does not mean we cannot offer an ini > file option for it. > > Benny > > > > Just a thought, I haven't even gotten around to installing > Gramps 3.2, > been a bit busy. > > Duncan > > > > |