GEPS008: Moved QuestionDialog module

svn: r19771
This commit is contained in:
Nick Hall 2012-06-05 23:49:12 +00:00
parent 77f621ac2a
commit 33f45cb087
83 changed files with 106 additions and 106 deletions

View File

@ -11,7 +11,6 @@ src/ExportOptions.py
src/gramps.py
src/LdsUtils.py
src/PlaceUtils.py
src/QuestionDialog.py
src/QuickReports.py
src/Relationship.py
src/Reorder.py
@ -335,6 +334,7 @@ src/gui/columnorder.py
src/gui/configure.py
src/gui/dbloader.py
src/gui/dbman.py
src/gui/dialog.py
src/gui/displaystate.py
src/gui/filtereditor.py
src/gui/grampsbar.py

View File

@ -60,7 +60,7 @@ import config
from gui.pluginmanager import GuiPluginManager
import Utils
from gui.managedwindow import ManagedWindow
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from gui.user import User
#-------------------------------------------------------------------------

View File

@ -641,7 +641,7 @@ class WriterOptionBox(object):
the_filter, filterdb,
lambda : self.edit_filter_save(filterdb, namespace))
else: # can't edit this filter
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
ErrorDialog(_("Cannot edit a system filter"),
_("Please select a different filter to edit"))

View File

@ -30,7 +30,6 @@ gdir_PYTHON = \
ListModel.py\
Lru.py\
MacTransUtils.py\
QuestionDialog.py\
RecentFiles.py\
Relationship.py\
Reorder.py\

View File

@ -44,7 +44,7 @@ from gen.lib.nameorigintype import NameOriginType
from gen.db.write import _mkname, SURNAMES
from gen.db.dbconst import (PERSON_KEY, FAMILY_KEY, EVENT_KEY,
MEDIA_KEY, PLACE_KEY, REPOSITORY_KEY)
from QuestionDialog import (InfoDialog)
from gui.dialog import (InfoDialog)
def gramps_upgrade_16(self):
"""Upgrade database from version 15 to 16. This upgrade converts all

View File

@ -77,7 +77,7 @@ class ChangedSinceBase(Rule):
time_tup = time.strptime(iso_date_time, "%Y-%m-%d %H:%M:%S")
time_sec = time.mktime(time_tup)
except ValueError:
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(_("Wrong format of date-time"),
_("Only date-times in the iso format of yyyy-mm-dd "
"hh:mm:ss, where the time part is optional, are "

View File

@ -26,6 +26,7 @@ pkgpython_PYTHON = \
dbguielement.py \
dbloader.py \
dbman.py \
dialog.py \
display.py \
displaystate.py \
filtereditor.py \

View File

@ -56,7 +56,7 @@ import gen.lib
from gen.lib import Name, Surname, NameOriginType
from gui.managedwindow import ManagedWindow
from gui.widgets import MarkupLabel, BasicLabel
from QuestionDialog import ErrorDialog, QuestionDialog2, OkDialog
from gui.dialog import ErrorDialog, QuestionDialog2, OkDialog
from gui.glade import Glade
#-------------------------------------------------------------------------

View File

@ -59,7 +59,7 @@ import config
import gen.db
import Utils
from gui.pluginmanager import GuiPluginManager
from QuestionDialog import (DBErrorDialog, ErrorDialog, QuestionDialog2,
from gui.dialog import (DBErrorDialog, ErrorDialog, QuestionDialog2,
WarningDialog)
from gui.user import User
import Errors

View File

@ -70,7 +70,7 @@ import pango
# gramps modules
#
#-------------------------------------------------------------------------
from QuestionDialog import ErrorDialog, QuestionDialog, QuestionDialog2
from gui.dialog import ErrorDialog, QuestionDialog, QuestionDialog2
from gen.db import DbBsddb
from gui.pluginmanager import GuiPluginManager
from cli.clidbman import CLIDbManager, NAME_FILE, time_val

View File

@ -57,7 +57,7 @@ import gen.mime
import ThumbNails
from gui.display import display_help
from gui.managedwindow import ManagedWindow
from QuestionDialog import ErrorDialog, WarningDialog
from gui.dialog import ErrorDialog, WarningDialog
from gui.glade import Glade
#-------------------------------------------------------------------------

View File

@ -168,7 +168,7 @@ class CitationEmbedList(EmbeddedList, DbGUIElement):
callback=self.add_callback,
callertitle=self.callertitle)
except Errors.WindowActiveError:
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(_("Cannot share this reference"),
self.__blocked_text())
elif isinstance(object, Citation):
@ -178,7 +178,7 @@ class CitationEmbedList(EmbeddedList, DbGUIElement):
object, callback=self.add_callback,
callertitle=self.callertitle)
except Errors.WindowActiveError:
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(_("Cannot share this reference"),
self.__blocked_text())
else:
@ -251,7 +251,7 @@ class CitationEmbedList(EmbeddedList, DbGUIElement):
object, callback=self.add_callback,
callertitle=self.callertitle)
except Errors.WindowActiveError:
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(_("Cannot share this reference"),
self.__blocked_text())
else:
@ -271,7 +271,7 @@ class CitationEmbedList(EmbeddedList, DbGUIElement):
callback=self.add_callback,
callertitle=self.callertitle)
except Errors.WindowActiveError:
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(_("Cannot share this reference"),
self.__blocked_text())
else:

View File

@ -481,7 +481,7 @@ class EmbeddedList(ButtonTab):
try:
self.model = self.construct_model()
except AttributeError, msg:
from QuestionDialog import RunDatabaseRepair
from gui.dialog import RunDatabaseRepair
import traceback
traceback.print_exc()
RunDatabaseRepair(str(msg))

View File

@ -256,7 +256,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList):
self.dbstate, self.uistate, self.track,
event, ref, self.object_added)
except Errors.WindowActiveError:
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(_("Cannot share this reference"),
self.__blocked_text())
@ -269,7 +269,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList):
self.dbstate, self.uistate, self.track,
event, ref[1], self.object_edited)
except Errors.WindowActiveError:
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(_("Cannot edit this reference"),
self.__blocked_text())
elif ref and ref[0] != self._WORKGROUP:
@ -310,7 +310,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList):
"""
handle change request of non native data
"""
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(
_("Cannot change Person"),
_("You cannot change Person events in the Family Editor")
@ -333,7 +333,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList):
self.get_ref_editor()(self.dbstate, self.uistate, self.track,
event, obj, self.object_edited)
except Errors.WindowActiveError:
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(
_("Cannot edit this reference"),
_("This event reference cannot be edited at this time. "

View File

@ -246,7 +246,7 @@ class GalleryTab(ButtonTab, DbGUIElement):
obj = self.dbstate.db.get_object_from_handle(handle)
if obj is None :
#notify user of error
from QuestionDialog import RunDatabaseRepair
from gui.dialog import RunDatabaseRepair
RunDatabaseRepair(
_('Non existing media found in the Gallery'))
else :
@ -320,7 +320,7 @@ class GalleryTab(ButtonTab, DbGUIElement):
EditMediaRef(self.dbstate, self.uistate, self.track,
src, sref, self.add_callback)
except Errors.WindowActiveError:
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(_("Cannot share this reference"),
self.__blocked_text())
@ -340,7 +340,7 @@ class GalleryTab(ButtonTab, DbGUIElement):
EditMediaRef(self.dbstate, self.uistate, self.track,
obj, ref, self.edit_callback)
except Errors.WindowActiveError:
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(_("Cannot edit this reference"),
self.__blocked_text())

View File

@ -124,7 +124,7 @@ class PersonEventEmbedList(EventEmbedList):
"""
handle change request of non native data
"""
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(
_("Cannot change Family"),
_("You cannot change Family events in the Person Editor")

View File

@ -163,7 +163,7 @@ class RepoEmbedList(EmbeddedList, DbGUIElement):
self.dbstate, self.uistate, self.track, repo,
ref, self.edit_callback)
except Errors.WindowActiveError:
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(
_("Cannot edit this reference"),
_("This repository reference cannot be edited at this "

View File

@ -143,7 +143,7 @@ class EditAttribute(EditSecondary):
t = self.obj.get_type()
if t.is_custom() and str(t) == '':
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
ErrorDialog(
_("Cannot save attribute"),
_("The attribute type cannot be empty"))

View File

@ -48,7 +48,7 @@ from displaytabs import (NoteTab, GalleryTab, DataEmbedList,
SourceBackRefList, RepoEmbedList, CitationBackRefList)
from gui.widgets import (MonitoredEntry, PrivacyButton, MonitoredMenu,
MonitoredDate)
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from editreference import RefTab
from gui.glade import Glade

View File

@ -48,7 +48,7 @@ from gui.display import display_help
from editprimary import EditPrimary
from objectentries import PlaceEntry
from gui.glade import Glade
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from displaytabs import (CitationEmbedList, NoteTab, GalleryTab,
EventBackRefList, AttrEmbedList)
from gui.widgets import (MonitoredEntry, PrivacyButton,

View File

@ -79,7 +79,7 @@ from displaytabs import (EmbeddedList, EventEmbedList, CitationEmbedList,
from gui.widgets import (PrivacyButton, MonitoredEntry, MonitoredDataType,
MonitoredTagList)
from gen.plug import CATEGORY_QR_FAMILY
from QuestionDialog import (ErrorDialog, RunDatabaseRepair, WarningDialog,
from gui.dialog import (ErrorDialog, RunDatabaseRepair, WarningDialog,
MessageHideDialog)
from gen.utils import get_birth_or_fallback, get_death_or_fallback
from gui.selectors import SelectorFactory

View File

@ -54,7 +54,7 @@ from gui.widgets import (MonitoredDate, MonitoredEntry, PrivacyButton,
from displaytabs import (CitationEmbedList, AttrEmbedList, NoteTab,
MediaBackRefList)
from addmedia import AddMediaObject
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from gui.glade import Glade
#-------------------------------------------------------------------------

View File

@ -369,7 +369,7 @@ class EditName(EditSecondary):
#user wants to group with surname
if self.global_group_set and not self.original_group_set :
#warn that group will revert to surname
from QuestionDialog import QuestionDialog2
from gui.dialog import QuestionDialog2
q = QuestionDialog2(
_("Break global name grouping?"),
_("All people with the name of %(surname)s will no longer "
@ -399,7 +399,7 @@ class EditName(EditSecondary):
#if changed, ask if this has to happen for the entire group,
#this might be creation of group link, or change of group link
if self.global_group_as != group_as:
from QuestionDialog import QuestionDialog2
from gui.dialog import QuestionDialog2
q = QuestionDialog2(
_("Group all people with the same name?"),

View File

@ -55,7 +55,7 @@ from gui.widgets import (MonitoredDataType, MonitoredCheckbox,
MonitoredEntry, PrivacyButton, MonitoredTagList)
from gen.lib import Note
from gen.db import DbTxn
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from gui.glade import Glade
#-------------------------------------------------------------------------

View File

@ -64,7 +64,7 @@ from editprimary import EditPrimary
from editmediaref import EditMediaRef
from editname import EditName
import config
from QuestionDialog import ErrorDialog, ICON
from gui.dialog import ErrorDialog, ICON
from Errors import ValidationError
from displaytabs import (PersonEventEmbedList, NameEmbedList, CitationEmbedList,
@ -926,7 +926,7 @@ class EditPerson(EditPrimary):
obj = self.dbstate.db.get_object_from_handle(handle)
if obj is None :
#notify user of error
from QuestionDialog import RunDatabaseRepair
from gui.dialog import RunDatabaseRepair
RunDatabaseRepair(
_('Non existing media found in the Gallery'))
else :

View File

@ -173,7 +173,7 @@ class EditPersonRef(EditSecondary):
self.callback = None
self.close()
else:
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
ErrorDialog(
_('No person selected'),

View File

@ -52,7 +52,7 @@ from displaytabs import (GrampsTab, LocationEmbedList, CitationEmbedList,
from gui.widgets import MonitoredEntry, PrivacyButton
from Errors import ValidationError
from PlaceUtils import conv_lat_lon
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from gui.glade import Glade
#-------------------------------------------------------------------------

View File

@ -46,7 +46,7 @@ from gen.display.name import displayer as name_displayer
import config
import gui.utils
from gui.display import display_help
from QuestionDialog import SaveDialog
from gui.dialog import SaveDialog
import gen.lib
from gui.dbguielement import DbGUIElement

View File

@ -46,7 +46,7 @@ from gen.db import DbTxn
from gui.widgets import MonitoredEntry, MonitoredDataType, PrivacyButton
from displaytabs import AddrEmbedList, WebEmbedList, NoteTab, SourceBackRefList
from editprimary import EditPrimary
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from gui.glade import Glade
class EditRepository(EditPrimary):

View File

@ -51,7 +51,7 @@ from editprimary import EditPrimary
from displaytabs import (NoteTab, GalleryTab, DataEmbedList,
CitationBackRefList, RepoEmbedList)
from gui.widgets import MonitoredEntry, PrivacyButton
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from gui.glade import Glade
#-------------------------------------------------------------------------

View File

@ -58,7 +58,7 @@ from gen.filters import (GenericFilterFactory, FilterList,
from gen.filters.rules._matchesfilterbase import MatchesFilterBase
import ListModel
from gui.managedwindow import ManagedWindow
from QuestionDialog import QuestionDialog
from gui.dialog import QuestionDialog
import const
from gui.display import display_help
import Errors

View File

@ -58,7 +58,7 @@ from gui.widgets.grampletpane import (AVAILABLE_GRAMPLETS,
GuiGramplet)
from gui.widgets.undoablebuffer import UndoableBuffer
import gui.utils
from QuestionDialog import QuestionDialog
from gui.dialog import QuestionDialog
#-------------------------------------------------------------------------
#

View File

@ -169,7 +169,7 @@ def _display_welcome_message():
Display a welcome message to the user.
"""
if not config.get('behavior.betawarn'):
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(
_('Danger: This is unstable code!'),
_("This Gramps 3.x-trunk is a development release. "
@ -241,7 +241,7 @@ class Gramps(object):
TipOfDay(self.vm.uistate)
def argerrorfunc(self, string):
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
""" Show basic errors in argument handling in GUI fashion"""
ErrorDialog(_("Error parsing arguments"), string)
@ -256,7 +256,7 @@ def __startgramps(errors, argparser):
Main startup function started via gobject.timeout_add
First action inside the gtk loop
"""
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
#handle first existing errors in GUI fashion
if errors:
ErrorDialog(errors[0], errors[1])

View File

@ -34,7 +34,7 @@ from gen.display.name import displayer as name_displayer
import const
from gui.display import display_help
from Errors import MergeError
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from gui.managedwindow import ManagedWindow
from gen.merge import MergePersonQuery, MergeFamilyQuery

View File

@ -45,7 +45,7 @@ import const
from gui.display import display_help
import gen.datehandler
from Errors import MergeError
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from gui.managedwindow import ManagedWindow
from gen.merge import MergePersonQuery

View File

@ -55,7 +55,7 @@ from gui.utils import ProgressMeter
from gui.pluginmanager import GuiPluginManager
from gui import widgets
from gui.managedwindow import ManagedWindow
from QuestionDialog import OptionDialog
from gui.dialog import OptionDialog
from gui.selectors import SelectorFactory
from gen.display.name import displayer as _nd
from gen.filters import GenericFilterFactory, GenericFilter, rules

View File

@ -54,7 +54,7 @@ from gui.utils import open_file_with_default_application
from gui.pluginmanager import GuiPluginManager
import tool
from _guioptions import add_gui_options
from QuestionDialog import InfoDialog
from gui.dialog import InfoDialog
from gui.editors import EditPerson
import Utils
import const

View File

@ -54,7 +54,7 @@ import Errors
from gui.utils import open_file_with_default_application
from gui.plug import add_gui_options
from gui.user import User
from QuestionDialog import ErrorDialog, OptionDialog
from gui.dialog import ErrorDialog, OptionDialog
from gen.plug.report import (CATEGORY_TEXT, CATEGORY_DRAW, CATEGORY_BOOK,
CATEGORY_CODE, CATEGORY_WEB, CATEGORY_GRAPHVIZ,
standalone_categories)

View File

@ -140,7 +140,7 @@ class StyleListDisplay(object):
try:
self.sheetlist.save()
except IOError, msg:
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
ErrorDialog(_("Error saving stylesheet"), str(msg))
except:
log.error("Failed to save stylesheet", exc_info=True)

View File

@ -105,7 +105,7 @@ class BatchTool(Tool):
def __init__(self, dbstate, options_class, name):
# TODO: should we replace this with a callback?
from QuestionDialog import QuestionDialog2
from gui.dialog import QuestionDialog2
warn_dialog = QuestionDialog2(
_('Undo history warning'),
_('Proceeding with this tool will erase the undo history '
@ -134,7 +134,7 @@ class ActivePersonTool(Tool):
if not uistate.get_active('Person'):
# TODO: should we replace this with a callback?
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
ErrorDialog(_('Active person has not been set'),
_('You must select an active person for this '

View File

@ -48,7 +48,7 @@ import os
import const
import config
from gui.managedwindow import ManagedWindow
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from gui.glade import Glade
#-------------------------------------------------------------------------

View File

@ -44,7 +44,7 @@ import gobject
# GRAMPS modules
#
#-------------------------------------------------------------------------
from QuestionDialog import QuestionDialog
from gui.dialog import QuestionDialog
from gui.managedwindow import ManagedWindow
#-------------------------------------------------------------------------

View File

@ -38,7 +38,7 @@ import sys
#-------------------------------------------------------------------------
import gen.user
from gui.utils import ProgressMeter
from QuestionDialog import (WarningDialog, ErrorDialog, DBErrorDialog,
from gui.dialog import (WarningDialog, ErrorDialog, DBErrorDialog,
InfoDialog)
#-------------------------------------------------------------------------

View File

@ -299,7 +299,7 @@ class ProgressMeter(object):
"""
Don't let the user close the progress dialog.
"""
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(
_("Attempt to force closing the dialog"),
_("Please do not force closing this important dialog."),
@ -328,7 +328,7 @@ def open_file_with_default_application( file_path ):
@type file_path: string
@return: nothing
"""
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
norm_path = os.path.normpath( file_path )
if not os.path.exists(norm_path):

View File

@ -82,7 +82,7 @@ import const
import constfunc
import config
import Errors
from QuestionDialog import (ErrorDialog, WarningDialog, QuestionDialog2,
from gui.dialog import (ErrorDialog, WarningDialog, QuestionDialog2,
InfoDialog)
from gui import widgets
from gui.undohistory import UndoHistory
@ -435,7 +435,7 @@ class ViewManager(CLIManager):
if addon_update_list:
self.update_addons(addon_update_list)
elif force:
from QuestionDialog import OkDialog
from gui.dialog import OkDialog
OkDialog(_("There are no available addons of this type"),
_("Checked for '%s'") %
_("' and '").join([_(t) for t in config.get('behavior.check-for-update-types')]),
@ -522,7 +522,7 @@ class ViewManager(CLIManager):
"""
Process all of the selected addons.
"""
from QuestionDialog import OkDialog
from gui.dialog import OkDialog
from gui.widgets.progressdialog import LongOpStatus
self.update_dialog.hide()
model = self.list.model
@ -1475,7 +1475,7 @@ class ViewManager(CLIManager):
"""
Make a quick XML back with or without media.
"""
from QuestionDialog import QuestionDialog2
from gui.dialog import QuestionDialog2
window = gtk.Dialog(_("Gramps XML Backup"),
self.uistate.window,
gtk.DIALOG_DESTROY_WITH_PARENT, None)

View File

@ -60,7 +60,7 @@ from gui.filters import SearchBar
from gui.utils import add_menuitem
import const
import Utils
from QuestionDialog import QuestionDialog, QuestionDialog2
from gui.dialog import QuestionDialog, QuestionDialog2
from gui.filtereditor import FilterEditor
from gen.ggettext import sgettext as _
from DdTargets import DdTargets
@ -410,7 +410,7 @@ class ListView(NavigationView):
if mlist:
self.bookmarks.add(mlist[0])
else:
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(
_("Could Not Set a Bookmark"),
_("A bookmark could not be set because "

View File

@ -250,7 +250,7 @@ class NavigationView(PageView):
self.uistate.push_message(self.dbstate,
_("%s has been bookmarked") % name)
else:
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(
_("Could Not Set a Bookmark"),
_("A bookmark could not be set because "

View File

@ -48,7 +48,7 @@ from gui.dbguielement import DbGUIElement
from ListModel import ListModel, NOSORT, COLOR, INTEGER
import const
from gui.display import display_help
from QuestionDialog import ErrorDialog, QuestionDialog2
from gui.dialog import ErrorDialog, QuestionDialog2
import gui.widgets.progressdialog as progressdlg
#-------------------------------------------------------------------------

View File

@ -73,7 +73,7 @@ import ListModel
import Errors
from gui.pluginmanager import GuiPluginManager
from gen.plug.docgen import StyleSheet, StyleSheetList, PaperStyle
from QuestionDialog import WarningDialog, ErrorDialog
from gui.dialog import WarningDialog, ErrorDialog
from gen.plug.menu import PersonOption, FilterOption, FamilyOption
from gui.managedwindow import ManagedWindow
from gui.glade import Glade
@ -669,7 +669,7 @@ class BookListDisplay(object):
def on_booklist_cancel_clicked(self, obj):
if self.unsaved_changes:
from QuestionDialog import QuestionDialog2
from gui.dialog import QuestionDialog2
q = QuestionDialog2(
_('Discard Unsaved Changes'),
_('You have made changes which have not been saved.'),
@ -1059,7 +1059,7 @@ class BookReportSelector(ManagedWindow):
)
return
if name in self.book_list.get_book_names():
from QuestionDialog import QuestionDialog2
from gui.dialog import QuestionDialog2
q = QuestionDialog2(
_('Book name already exists'),
_('You are about to save away a '

View File

@ -267,7 +267,7 @@ class HtmlDoc(BaseDoc, TextDoc):
if from_fname != dest:
shutil.copyfile(from_fname, dest)
elif self.warn_dir:
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(
_("Possible destination error") + "\n" +
_("You appear to have set your target directory "

View File

@ -59,7 +59,7 @@ from gen.plug import Gramplet
from libmetadata import MetadataView, format_datetime
from gui.widgets import ValidatableMaskedEntry
from Errors import ValidationError
from QuestionDialog import QuestionDialog, OptionDialog
from gui.dialog import QuestionDialog, OptionDialog
from gen.lib import Date

View File

@ -122,7 +122,7 @@ import LdsUtils
import Utils
from gen.datehandler._dateparser import DateParser
from gen.db.dbconst import EVENT_KEY
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
from gen.lib.const import IDENTICAL, DIFFERENT
from gen.lib import (StyledText, StyledTextTag, StyledTextTagType)

View File

@ -52,7 +52,7 @@ from gen.db import DbTxn
from gui.views.listview import ListView
import Utils
from gen.display.name import displayer as name_displayer
from QuestionDialog import ErrorDialog, QuestionDialog
from gui.dialog import ErrorDialog, QuestionDialog
import Errors
import Bookmarks
import config

View File

@ -51,7 +51,7 @@ from gui.utils import add_menuitem
import Errors
import Bookmarks
import config
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from gui.pluginmanager import GuiPluginManager
from DdTargets import DdTargets
from gui.editors import EditPlace, DeletePlaceQuery

View File

@ -59,7 +59,7 @@ from lifewaylayer import LifeWayLayer
from datelayer import DateLayer
from gen.ggettext import sgettext as _
from config import config
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
#-------------------------------------------------------------------------
#

View File

@ -39,7 +39,7 @@ from gen.ggettext import gettext as _
#
#------------------------------------------------------------------------
from libmapservice import MapService
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
# Make upper case of translaed country so string search works later
MAP_NAMES_SWEDEN = [_("Sweden").upper(),

View File

@ -43,7 +43,7 @@ from gui.utils import ProgressMeter
from gui.display import display_help
from gui.managedwindow import ManagedWindow
from QuestionDialog import OkDialog
from gui.dialog import OkDialog
from gui.plug import tool
from gen.ggettext import sgettext as _
from gui.glade import Glade

View File

@ -43,7 +43,7 @@ from gui.managedwindow import ManagedWindow
import AutoComp
from gen.lib import EventType
from gen.db import DbTxn
from QuestionDialog import OkDialog
from gui.dialog import OkDialog
from gui.plug import tool
from gui.glade import Glade

View File

@ -70,7 +70,7 @@ from gui.utils import ProgressMeter
from gui.managedwindow import ManagedWindow
from gui.plug import tool
from QuestionDialog import OkDialog, MissingMediaDialog
from gui.dialog import OkDialog, MissingMediaDialog
from gen.display.name import displayer as _nd
from gui.glade import Glade

View File

@ -47,7 +47,7 @@ import gen.lib
from gen.db import DbTxn
from gui.plug import tool
from gui.utils import ProgressMeter
from QuestionDialog import QuestionDialog
from gui.dialog import QuestionDialog
from gen.datehandler import parser as _dp
from gen.datehandler import displayer as _dd

View File

@ -53,7 +53,7 @@ from docgen import ODSTab
import const
import Errors
import gen.datehandler
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
from gui.plug import tool
from gen.plug.report import utils as ReportUtils
from gui.display import display_help

View File

@ -50,7 +50,7 @@ import Utils
from gui.plug import tool
from gen.display.name import displayer as name_displayer
from QuestionDialog import OkDialog
from gui.dialog import OkDialog
#-------------------------------------------------------------------------
#

View File

@ -506,7 +506,7 @@ class ExtractCity(tool.BatchTool, ManagedWindow):
self.display()
else:
self.close()
from QuestionDialog import OkDialog
from gui.dialog import OkDialog
OkDialog(_('No modifications made'),
_("No place information could be extracted."))

View File

@ -42,13 +42,13 @@ from gui.utils import ProgressMeter
from gui.plug import tool
import soundex
from gen.display.name import displayer as name_displayer
from QuestionDialog import OkDialog
from gui.dialog import OkDialog
import ListModel
import Errors
from gui.merge import MergePerson
from gui.display import display_help
from gui.managedwindow import ManagedWindow
from QuestionDialog import RunDatabaseRepair
from gui.dialog import RunDatabaseRepair
from gen.ggettext import sgettext as _
from gui.glade import Glade

View File

@ -54,7 +54,7 @@ import gc
#------------------------------------------------------------------------
from gui.plug import tool
from gui.managedwindow import ManagedWindow
from QuestionDialog import InfoDialog
from gui.dialog import InfoDialog
from gui.glade import Glade
import gui.utils

View File

@ -49,7 +49,7 @@ from Utils import confidence
import const
from gui.utils import ProgressMeter
from gui.plug import tool
from QuestionDialog import OkDialog
from gui.dialog import OkDialog
from gui.display import display_help
import gen.datehandler
from gui.managedwindow import ManagedWindow

View File

@ -47,7 +47,7 @@ import gobject
import const
from gui.utils import ProgressMeter
from gui.plug import tool
from QuestionDialog import OkDialog
from gui.dialog import OkDialog
from gui.managedwindow import ManagedWindow
from gui.display import display_help
import gen.lib

View File

@ -44,7 +44,7 @@ import gtk
#-------------------------------------------------------------------------
from gui.utils import ProgressMeter
from gui.plug import tool
from QuestionDialog import OkDialog
from gui.dialog import OkDialog
from gui.managedwindow import ManagedWindow
import gen.lib
from gen.db import DbTxn

View File

@ -51,7 +51,7 @@ log = logging.getLogger(".Rebuild")
#
#-------------------------------------------------------------------------
from gui.plug import tool
from QuestionDialog import OkDialog
from gui.dialog import OkDialog
from gen.updatecallback import UpdateCallback
#-------------------------------------------------------------------------

View File

@ -53,7 +53,7 @@ log = logging.getLogger(".RebuildRefMap")
#
#-------------------------------------------------------------------------
from gui.plug import tool
from QuestionDialog import OkDialog
from gui.dialog import OkDialog
from gen.updatecallback import UpdateCallback
#-------------------------------------------------------------------------

View File

@ -50,7 +50,7 @@ from gui.views.treemodels import PeopleBaseModel, PersonTreeModel
from libpersonview import BasePersonView
import Relationship
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from gui.plug import tool
from gui.glade import Glade

View File

@ -53,7 +53,7 @@ import Utils
import Bookmarks
import Errors
from DdTargets import DdTargets
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from gui.editors import EditCitation, DeleteCitationQuery
from gui.filters.sidebar import CitationSidebarFilter
from gui.merge import MergeCitation

View File

@ -54,7 +54,7 @@ import Utils
import Bookmarks
import Errors
from DdTargets import DdTargets
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from gui.editors import EditCitation, DeleteCitationQuery, EditSource, \
DeleteSrcQuery
from gui.filters.sidebar import SourceSidebarFilter
@ -439,7 +439,7 @@ class CitationTreeView(ListView):
EditCitation(self.dbstate, self.uistate, [],
gen.lib.Citation(), source)
except Errors.WindowActiveError:
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(_("Cannot share this reference"),
self.__blocked_text())
else:
@ -494,7 +494,7 @@ class CitationTreeView(ListView):
try:
EditSource(self.dbstate, self.uistate, [], source)
except Errors.WindowActiveError:
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(_("Cannot share this reference"),
self.__blocked_text2())

View File

@ -54,7 +54,7 @@ import Errors
import Bookmarks
import config
from DdTargets import DdTargets
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from gui.editors import EditEvent, DeleteEventQuery
from gui.filters.sidebar import EventSidebarFilter
from gui.merge import MergeEvent

View File

@ -52,7 +52,7 @@ from gui.editors import EditFamily
import Bookmarks
import Errors
import config
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from gui.filters.sidebar import FamilySidebarFilter
from gui.merge import MergeFamily
from gen.plug import CATEGORY_QR_FAMILY
@ -238,7 +238,7 @@ class FamilyView(ListView):
if mlist:
self.bookmarks.add(mlist[0])
else:
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(
_("Could Not Set a Bookmark"),
_("A bookmark could not be set because "
@ -252,7 +252,7 @@ class FamilyView(ListView):
pass
def remove(self, obj):
from QuestionDialog import QuestionDialog2
from gui.dialog import QuestionDialog2
from Utils import data_recover_msg
msg = _('Deleting item will remove it from the database.')
msg = msg + '\n' + data_recover_msg

View File

@ -66,7 +66,7 @@ import Errors
from gui.filters.sidebar import MediaSidebarFilter
from gui.merge import MergeMedia
from DdTargets import DdTargets
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from gen.plug import CATEGORY_QR_MEDIA
#-------------------------------------------------------------------------

View File

@ -53,7 +53,7 @@ import Bookmarks
import config
from gen.lib import Note
from DdTargets import DdTargets
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from gui.filters.sidebar import NoteSidebarFilter
from gui.editors import EditNote, DeleteNoteQuery
from gui.merge import MergeNote

View File

@ -63,7 +63,7 @@ import config
import Bookmarks
import const
import constfunc
from QuestionDialog import RunDatabaseRepair, ErrorDialog
from gui.dialog import RunDatabaseRepair, ErrorDialog
import gui.utils
#-------------------------------------------------------------------------

View File

@ -461,7 +461,7 @@ class RelationshipView(NavigationView):
try:
return self._change_person(obj)
except AttributeError, msg:
from QuestionDialog import RunDatabaseRepair
from gui.dialog import RunDatabaseRepair
RunDatabaseRepair(str(msg))
self.redrawing = False
return True
@ -1299,7 +1299,7 @@ class RelationshipView(NavigationView):
def write_family(self, family_handle, person = None):
family = self.dbstate.db.get_family_from_handle(family_handle)
if family is None:
from QuestionDialog import WarningDialog
from gui.dialog import WarningDialog
WarningDialog(
_('Broken family detected'),
_('Please run the Check and Repair Database tool'))

View File

@ -44,7 +44,7 @@ import Errors
import config
from gui.editors import EditRepository, DeleteRepositoryQuery
from DdTargets import DdTargets
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from gui.filters.sidebar import RepoSidebarFilter
from gui.merge import MergeRepository
from gen.plug import CATEGORY_QR_REPOSITORY

View File

@ -47,7 +47,7 @@ import Utils
import Bookmarks
import Errors
from DdTargets import DdTargets
from QuestionDialog import ErrorDialog
from gui.dialog import ErrorDialog
from gui.editors import EditSource, DeleteSrcQuery
from gui.filters.sidebar import SourceSidebarFilter
from gui.merge import MergeSource