* src/gramps_main.py (on_faq_activate): Add function.

* src/gramps.glade: Add faq window.


svn: r2391
This commit is contained in:
Alex Roitman 2003-11-26 19:15:24 +00:00
parent 0167e2eb51
commit b901a0afa0
3 changed files with 143 additions and 20 deletions

View File

@ -1,3 +1,7 @@
2003-11-26 Alex Roitman <shura@alex.neuro.umn.edu>
* src/gramps_main.py (on_faq_activate): Add function.
* src/gramps.glade: Add faq window.
2003-11-26 Don Allingham <dallingham@users.sourceforge.net>
* src/gramps_main.py: handle update_after edit properly, so that
name changes will put entry in the correct category

View File

@ -51,7 +51,7 @@
<accelerator key="N" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1626">
<widget class="GtkImage" id="image1705">
<property name="visible">True</property>
<property name="stock">gtk-new</property>
<property name="icon_size">1</property>
@ -73,7 +73,7 @@
<accelerator key="O" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1627">
<widget class="GtkImage" id="image1706">
<property name="visible">True</property>
<property name="stock">gtk-open</property>
<property name="icon_size">1</property>
@ -95,7 +95,7 @@
<accelerator key="S" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1628">
<widget class="GtkImage" id="image1707">
<property name="visible">True</property>
<property name="stock">gtk-save</property>
<property name="icon_size">1</property>
@ -116,7 +116,7 @@
<signal name="activate" handler="on_save_as_activate" last_modification_time="Tue, 01 Apr 2003 03:50:28 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1629">
<widget class="GtkImage" id="image1708">
<property name="visible">True</property>
<property name="stock">gtk-save-as</property>
<property name="icon_size">1</property>
@ -150,7 +150,7 @@
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1630">
<widget class="GtkImage" id="image1709">
<property name="visible">True</property>
<property name="stock">gtk-convert</property>
<property name="icon_size">1</property>
@ -171,7 +171,7 @@
<signal name="activate" handler="on_revert_activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1631">
<widget class="GtkImage" id="image1710">
<property name="visible">True</property>
<property name="stock">gtk-revert-to-saved</property>
<property name="icon_size">1</property>
@ -192,7 +192,7 @@
<signal name="activate" handler="on_reload_plugins_activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1632">
<widget class="GtkImage" id="image1711">
<property name="visible">True</property>
<property name="stock">gtk-refresh</property>
<property name="icon_size">1</property>
@ -220,7 +220,7 @@
<accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1633">
<widget class="GtkImage" id="image1712">
<property name="visible">True</property>
<property name="stock">gtk-quit</property>
<property name="icon_size">1</property>
@ -256,7 +256,7 @@
<accelerator key="Insert" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1634">
<widget class="GtkImage" id="image1713">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon_size">1</property>
@ -279,7 +279,7 @@
<accelerator key="Delete" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1635">
<widget class="GtkImage" id="image1714">
<property name="visible">True</property>
<property name="stock">gtk-remove</property>
<property name="icon_size">1</property>
@ -317,7 +317,7 @@
<accelerator key="F" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1636">
<widget class="GtkImage" id="image1715">
<property name="visible">True</property>
<property name="stock">gtk-find</property>
<property name="icon_size">1</property>
@ -339,7 +339,7 @@
<accelerator key="M" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1637">
<widget class="GtkImage" id="image1716">
<property name="visible">True</property>
<property name="stock">gtk-convert</property>
<property name="icon_size">1</property>
@ -366,7 +366,7 @@
<signal name="activate" handler="on_preferences1_activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1638">
<widget class="GtkImage" id="image1717">
<property name="visible">True</property>
<property name="stock">gtk-preferences</property>
<property name="icon_size">1</property>
@ -387,7 +387,7 @@
<signal name="activate" handler="on_default_person_activate" last_modification_time="Sat, 16 Aug 2003 01:58:26 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1639">
<widget class="GtkImage" id="image1718">
<property name="visible">True</property>
<property name="stock">gtk-home</property>
<property name="icon_size">1</property>
@ -473,7 +473,7 @@
<accelerator key="D" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1640">
<widget class="GtkImage" id="image1719">
<property name="visible">True</property>
<property name="stock">gtk-index</property>
<property name="icon_size">1</property>
@ -495,7 +495,7 @@
<accelerator key="B" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1641">
<widget class="GtkImage" id="image1720">
<property name="visible">True</property>
<property name="stock">gnome-stock-book-open</property>
<property name="icon_size">1</property>
@ -560,7 +560,7 @@
<accelerator key="F1" modifiers="0" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1642">
<widget class="GtkImage" id="image1721">
<property name="visible">True</property>
<property name="stock">gtk-help</property>
<property name="icon_size">1</property>
@ -573,6 +573,27 @@
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="faq1">
<property name="visible">True</property>
<property name="label" translatable="yes">_FAQ</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_faq_activate" last_modification_time="Wed, 26 Nov 2003 17:59:23 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1722">
<property name="visible">True</property>
<property name="stock">gnome-stock-book-open</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="separator7">
<property name="visible">True</property>
@ -587,7 +608,7 @@
<signal name="activate" handler="on_gramps_home_page_activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1643">
<widget class="GtkImage" id="image1723">
<property name="visible">True</property>
<property name="stock">gtk-jump-to</property>
<property name="icon_size">1</property>
@ -608,7 +629,7 @@
<signal name="activate" handler="on_gramps_mailing_lists_activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1644">
<widget class="GtkImage" id="image1724">
<property name="visible">True</property>
<property name="stock">gnome-stock-mail</property>
<property name="icon_size">1</property>
@ -662,7 +683,7 @@
<signal name="activate" handler="on_about_activate" last_modification_time="Tue, 01 Apr 2003 03:44:24 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1645">
<widget class="GtkImage" id="image1725">
<property name="visible">True</property>
<property name="stock">gnome-stock-about</property>
<property name="icon_size">1</property>
@ -7984,4 +8005,85 @@
</child>
</widget>
<widget class="GtkWindow" id="faq">
<property name="width_request">650</property>
<property name="height_request">400</property>
<property name="visible">True</property>
<property name="title" translatable="yes">FAQ - GRAMPS</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="icon">gramps.xpm</property>
<child>
<widget class="GtkVBox" id="vbox78">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow77">
<property name="border_width">6</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
<widget class="GtkTextView" id="faq_view">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
<property name="justification">GTK_JUSTIFY_LEFT</property>
<property name="wrap_mode">GTK_WRAP_NONE</property>
<property name="cursor_visible">True</property>
<property name="pixels_above_lines">0</property>
<property name="pixels_below_lines">0</property>
<property name="pixels_inside_wrap">0</property>
<property name="left_margin">0</property>
<property name="right_margin">0</property>
<property name="indent">0</property>
<property name="text" translatable="yes"></property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkHButtonBox" id="hbuttonbox33">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<property name="spacing">0</property>
<child>
<widget class="GtkButton" id="button168">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-close</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<signal name="clicked" handler="on_faq_close_clicked" object="faq" last_modification_time="Wed, 26 Nov 2003 18:10:30 GMT"/>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface>

View File

@ -283,6 +283,7 @@ class Gramps:
"on_arrow_left_clicked" : self.pedigree_view.on_show_child_menu,
"on_canvas1_event" : self.pedigree_view.on_canvas1_event,
"on_contents_activate" : self.on_contents_activate,
"on_faq_activate" : self.on_faq_activate,
"on_default_person_activate" : self.on_default_person_activate,
"on_delete_person_clicked" : self.delete_person_clicked,
"on_delete_place_clicked" : self.place_view.on_delete_clicked,
@ -838,6 +839,22 @@ class Gramps:
"""Display the GRAMPS manual"""
gnome.help_display('gramps-manual','index')
def on_faq_activate(self,obj):
"""Display FAQ"""
faqtop = gtk.glade.XML(const.gladeFile, "faq", "faq")
faqWindow = faqtop.get_widget("faq")
faqView = faqtop.get_widget("faq_view")
faqtop.signal_autoconnect({
"on_faq_close_clicked" : Utils.destroy_passed_object
})
# FIXME: filename is bogus, waiting for install policy decision
faq_file = open('/home/shura/gramps2/FAQ')
faq_text = faq_file.read()
faq_file.close()
faq_buffer = faqView.get_buffer()
faq_buffer.set_text(faq_text)
faqWindow.show()
def on_new_clicked(self,obj):
"""Prompt for permission to close the current database"""