Another bit
svn: r2877
This commit is contained in:
parent
a638a038bc
commit
df121aed48
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2000-2003 Donald N. Allingham
|
||||
# Copyright (C) 2000-2004 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -71,21 +71,42 @@ class UrlEditor:
|
||||
|
||||
self.top.signal_autoconnect({
|
||||
"on_help_url_clicked" : self.on_help_clicked,
|
||||
"on_ok_url_clicked" : self.on_url_edit_ok_clicked,
|
||||
"on_cancel_url_clicked" : self.close,
|
||||
"on_url_edit_delete_event" : self.on_delete_event,
|
||||
})
|
||||
|
||||
if parent_window:
|
||||
self.window.set_transient_for(parent_window)
|
||||
self.val = self.window.run()
|
||||
if self.val == gtk.RESPONSE_OK:
|
||||
self.on_url_edit_ok_clicked()
|
||||
self.parent.child_windows.append(self)
|
||||
self.add_itself_to_menu()
|
||||
self.window.show()
|
||||
|
||||
def on_delete_event(self,obj,b):
|
||||
self.remove_itself_from_menu()
|
||||
|
||||
def close(self,obj):
|
||||
self.remove_itself_from_menu()
|
||||
self.window.destroy()
|
||||
|
||||
def add_itself_to_menu(self):
|
||||
label = _('Internet Address Editor')
|
||||
self.parent_menu_item = gtk.MenuItem(label)
|
||||
self.parent_menu_item.connect("activate",self.present)
|
||||
self.parent_menu_item.show()
|
||||
self.parent.menu.append(self.parent_menu_item)
|
||||
|
||||
def remove_itself_from_menu(self):
|
||||
self.parent_menu_item.destroy()
|
||||
|
||||
def present(self,obj):
|
||||
self.window.present()
|
||||
|
||||
def on_help_clicked(self,obj):
|
||||
"""Display the relevant portion of GRAMPS manual"""
|
||||
gnome.help_display('gramps-manual','gramps-edit-complete')
|
||||
self.val = self.window.run()
|
||||
|
||||
def on_url_edit_ok_clicked(self):
|
||||
def on_url_edit_ok_clicked(self,obj):
|
||||
des = unicode(self.des.get_text())
|
||||
addr = unicode(self.addr.get_text())
|
||||
priv = self.priv.get_active()
|
||||
@ -96,6 +117,7 @@ class UrlEditor:
|
||||
|
||||
self.update_url(des,addr,priv)
|
||||
self.callback(self.url)
|
||||
self.close(obj)
|
||||
|
||||
def update_url(self,des,addr,priv):
|
||||
if self.url.get_path() != addr:
|
||||
@ -109,4 +131,3 @@ class UrlEditor:
|
||||
if self.url.get_privacy() != priv:
|
||||
self.url.set_privacy(priv)
|
||||
self.parent.lists_changed = 1
|
||||
|
||||
|
@ -1006,6 +1006,7 @@
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">gramps.png</property>
|
||||
<property name="has_separator">False</property>
|
||||
<signal name="delete_event" handler="on_attr_edit_delete_event" last_modification_time="Fri, 20 Feb 2004 01:07:01 GMT"/>
|
||||
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="vbox30">
|
||||
@ -1027,6 +1028,7 @@
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="response_id">-6</property>
|
||||
<signal name="clicked" handler="on_cancel_attr_clicked" last_modification_time="Fri, 20 Feb 2004 01:07:39 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
@ -1040,6 +1042,7 @@
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="response_id">-5</property>
|
||||
<signal name="clicked" handler="on_ok_attr_clicked" last_modification_time="Fri, 20 Feb 2004 01:07:57 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
@ -2087,6 +2090,7 @@
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">gramps.png</property>
|
||||
<property name="has_separator">False</property>
|
||||
<signal name="delete_event" handler="on_addr_edit_delete_event" last_modification_time="Fri, 20 Feb 2004 01:16:24 GMT"/>
|
||||
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="vbox34">
|
||||
@ -2108,7 +2112,7 @@
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="response_id">-6</property>
|
||||
<signal name="clicked" handler="destroy_passed_object" object="addr_edit"/>
|
||||
<signal name="clicked" handler="on_cancel_addr_clicked" object="addr_edit" last_modification_time="Fri, 20 Feb 2004 01:16:51 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
@ -2123,7 +2127,7 @@
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="response_id">-5</property>
|
||||
<signal name="clicked" handler="on_addr_edit_ok_clicked" object="addr_edit"/>
|
||||
<signal name="clicked" handler="on_ok_addr_clicked" last_modification_time="Fri, 20 Feb 2004 01:17:10 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
@ -2981,6 +2985,7 @@
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">gramps.png</property>
|
||||
<property name="has_separator">False</property>
|
||||
<signal name="delete_event" handler="on_url_edit_delete_event" last_modification_time="Fri, 20 Feb 2004 01:28:44 GMT"/>
|
||||
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="vbox36">
|
||||
@ -3002,7 +3007,7 @@
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="response_id">-6</property>
|
||||
<signal name="clicked" handler="destroy_passed_object" object="url_edit"/>
|
||||
<signal name="clicked" handler="on_cancel_url_clicked" last_modification_time="Fri, 20 Feb 2004 01:29:27 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
@ -3017,7 +3022,7 @@
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="response_id">-5</property>
|
||||
<signal name="clicked" handler="on_url_edit_ok_clicked" object="url_edit"/>
|
||||
<signal name="clicked" handler="on_ok_url_clicked" last_modification_time="Fri, 20 Feb 2004 01:29:41 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user