* src/gramps_main.py (on_save_as_activate): Make dialog modal and
transient; (on_open_activate): likewise; (on_new_clicked): pass main window to set the transient. * src/gramps.glade (fileselection dialog): Remove auto_estroy and modal. * src/revision.glade (dbopen dialog): Add modal and set responses. svn: r2138
This commit is contained in:
parent
552fdfbcfa
commit
08b8f46c4a
@ -16,6 +16,12 @@
|
|||||||
* src/plugins/Makefile.am: Ship writefree.glade.
|
* src/plugins/Makefile.am: Ship writefree.glade.
|
||||||
* src/plugins/Makefile.in: Likewise.
|
* src/plugins/Makefile.in: Likewise.
|
||||||
|
|
||||||
|
* src/gramps_main.py (on_save_as_activate): Make dialog modal and
|
||||||
|
transient; (on_open_activate): likewise; (on_new_clicked): pass
|
||||||
|
main window to set the transient.
|
||||||
|
* src/gramps.glade (fileselection dialog): Remove auto_estroy and modal.
|
||||||
|
* src/revision.glade (dbopen dialog): Add modal and set responses.
|
||||||
|
|
||||||
2003-09-14 Alex Roitman <shura@alex.neuro.umn.edu>
|
2003-09-14 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||||
* src/SourceView.py (button_press,on_add_clicked,on_delete_clicked,
|
* src/SourceView.py (button_press,on_add_clicked,on_delete_clicked,
|
||||||
on_edit_clicked): Pass parent window to the child dialog.
|
on_edit_clicked): Pass parent window to the child dialog.
|
||||||
|
@ -3594,7 +3594,7 @@
|
|||||||
<property name="title" translatable="yes"></property>
|
<property name="title" translatable="yes"></property>
|
||||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||||
<property name="modal">True</property>
|
<property name="modal">False</property>
|
||||||
<property name="resizable">True</property>
|
<property name="resizable">True</property>
|
||||||
<property name="destroy_with_parent">False</property>
|
<property name="destroy_with_parent">False</property>
|
||||||
<property name="show_fileops">True</property>
|
<property name="show_fileops">True</property>
|
||||||
@ -3604,6 +3604,8 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_default">True</property>
|
<property name="can_default">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label">gtk-cancel</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
<signal name="clicked" handler="destroy_passed_object" object="fileselection"/>
|
<signal name="clicked" handler="destroy_passed_object" object="fileselection"/>
|
||||||
</widget>
|
</widget>
|
||||||
@ -3665,7 +3667,7 @@
|
|||||||
<property name="label">gtk-ok</property>
|
<property name="label">gtk-ok</property>
|
||||||
<property name="use_stock">True</property>
|
<property name="use_stock">True</property>
|
||||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
<property name="response_id">0</property>
|
<property name="response_id">-5</property>
|
||||||
<signal name="clicked" handler="on_select_spouse_clicked" object="spouseDialog"/>
|
<signal name="clicked" handler="on_select_spouse_clicked" object="spouseDialog"/>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
|
@ -850,7 +850,7 @@ class Gramps:
|
|||||||
'discarding any unsaved changes. You will then be prompted '
|
'discarding any unsaved changes. You will then be prompted '
|
||||||
'to create a new database'),
|
'to create a new database'),
|
||||||
_('_Create New Database'),
|
_('_Create New Database'),
|
||||||
self.new_database_response)
|
self.new_database_response,self.topWindow)
|
||||||
|
|
||||||
def new_database_response(self):
|
def new_database_response(self):
|
||||||
import DbPrompter
|
import DbPrompter
|
||||||
@ -989,7 +989,6 @@ class Gramps:
|
|||||||
dbname = obj.get_data("dbname")
|
dbname = obj.get_data("dbname")
|
||||||
getoldrev = obj.get_data("getoldrev")
|
getoldrev = obj.get_data("getoldrev")
|
||||||
filename = dbname.get_full_path(0)
|
filename = dbname.get_full_path(0)
|
||||||
Utils.destroy_passed_object(obj)
|
|
||||||
|
|
||||||
if filename == "" or filename == None:
|
if filename == "" or filename == None:
|
||||||
return
|
return
|
||||||
@ -1740,10 +1739,6 @@ class Gramps:
|
|||||||
|
|
||||||
if not Utils.wasModified():
|
if not Utils.wasModified():
|
||||||
wFs = gtk.glade.XML(const.revisionFile, "dbopen","gramps")
|
wFs = gtk.glade.XML(const.revisionFile, "dbopen","gramps")
|
||||||
wFs.signal_autoconnect({
|
|
||||||
"on_ok_button1_clicked": self.on_ok_button1_clicked,
|
|
||||||
"destroy_passed_object": Utils.destroy_passed_object
|
|
||||||
})
|
|
||||||
|
|
||||||
fileSelector = wFs.get_widget("dbopen")
|
fileSelector = wFs.get_widget("dbopen")
|
||||||
|
|
||||||
@ -1759,7 +1754,12 @@ class Gramps:
|
|||||||
|
|
||||||
fileSelector.set_data("getoldrev",getoldrev)
|
fileSelector.set_data("getoldrev",getoldrev)
|
||||||
getoldrev.set_sensitive(GrampsCfg.usevc)
|
getoldrev.set_sensitive(GrampsCfg.usevc)
|
||||||
|
fileSelector.set_transient_for(self.topWindow)
|
||||||
fileSelector.show()
|
fileSelector.show()
|
||||||
|
button = fileSelector.run()
|
||||||
|
if button == gtk.RESPONSE_OK:
|
||||||
|
self.on_ok_button1_clicked(fileSelector)
|
||||||
|
fileSelector.destroy()
|
||||||
|
|
||||||
def on_revert_activate(self,obj):
|
def on_revert_activate(self,obj):
|
||||||
|
|
||||||
@ -1793,14 +1793,14 @@ class Gramps:
|
|||||||
|
|
||||||
def on_save_as_activate(self,obj):
|
def on_save_as_activate(self,obj):
|
||||||
wFs = gtk.glade.XML (const.gladeFile, "fileselection","gramps")
|
wFs = gtk.glade.XML (const.gladeFile, "fileselection","gramps")
|
||||||
wFs.signal_autoconnect({
|
|
||||||
"on_ok_button1_clicked": self.on_ok_button2_clicked,
|
|
||||||
"destroy_passed_object": Utils.destroy_passed_object
|
|
||||||
})
|
|
||||||
|
|
||||||
fileSelector = wFs.get_widget("fileselection")
|
fileSelector = wFs.get_widget("fileselection")
|
||||||
fileSelector.set_title('%s - GRAMPS' % _('Save database'))
|
fileSelector.set_title('%s - GRAMPS' % _('Save database'))
|
||||||
|
fileSelector.set_transient_for(self.topWindow)
|
||||||
fileSelector.show()
|
fileSelector.show()
|
||||||
|
button = fileSelector.run()
|
||||||
|
if button == gtk.RESPONSE_OK:
|
||||||
|
self.on_ok_button2_clicked(fileSelector)
|
||||||
|
fileSelector.destroy()
|
||||||
|
|
||||||
def on_save_activate(self,obj):
|
def on_save_activate(self,obj):
|
||||||
"""Saves the file, first prompting for a comment if revision
|
"""Saves the file, first prompting for a comment if revision
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
<property name="label">gtk-cancel</property>
|
<property name="label">gtk-cancel</property>
|
||||||
<property name="use_stock">True</property>
|
<property name="use_stock">True</property>
|
||||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
<property name="response_id">0</property>
|
<property name="response_id">-6</property>
|
||||||
<signal name="clicked" handler="destroy_passed_object" object="dbopen"/>
|
<signal name="clicked" handler="destroy_passed_object" object="dbopen"/>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
@ -48,7 +48,7 @@
|
|||||||
<property name="label">gtk-ok</property>
|
<property name="label">gtk-ok</property>
|
||||||
<property name="use_stock">True</property>
|
<property name="use_stock">True</property>
|
||||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
<property name="response_id">0</property>
|
<property name="response_id">-5</property>
|
||||||
<signal name="clicked" handler="on_ok_button1_clicked" object="dbopen"/>
|
<signal name="clicked" handler="on_ok_button1_clicked" object="dbopen"/>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
@ -130,7 +130,7 @@
|
|||||||
<property name="max_saved">10</property>
|
<property name="max_saved">10</property>
|
||||||
<property name="browse_dialog_title" translatable="yes">Open a database</property>
|
<property name="browse_dialog_title" translatable="yes">Open a database</property>
|
||||||
<property name="directory_entry">True</property>
|
<property name="directory_entry">True</property>
|
||||||
<property name="modal">False</property>
|
<property name="modal">True</property>
|
||||||
|
|
||||||
<child internal-child="entry">
|
<child internal-child="entry">
|
||||||
<widget class="GtkEntry" id="combo-entry2">
|
<widget class="GtkEntry" id="combo-entry2">
|
||||||
|
Loading…
Reference in New Issue
Block a user