[pybliographer/gtk3: 2/25] ui: Port main window to gtk+3



commit 9654e7cfb3327873aa8af3f359cc787334071ba9
Author: Germán Poo-Caamaño <gpoo gnome org>
Date:   Wed Apr 24 04:49:31 2013 -0700

    ui: Port main window to gtk+3
    
    Makes the main window load

 Pyblio/ConfDir/GnomeUI.py         |    4 +-
 Pyblio/GnomeUI/Common.py          |    1 -
 Pyblio/GnomeUI/Document.py        |   29 +-
 Pyblio/GnomeUI/Editor.py          |    2 -
 Pyblio/GnomeUI/Index.py           |   42 +-
 Pyblio/GnomeUI/Search.py          |    1 -
 Pyblio/GnomeUI/Sort.py            |    1 -
 Pyblio/GnomeUI/Utils.py           |    6 +-
 Pyblio/GnomeUI/__init__.py        |    6 +-
 Pyblio/GnomeUI/glade/pyblio.ui.in |  933 ++++++++-----------------------------
 scripts/pybliographic.py          |    1 -
 11 files changed, 228 insertions(+), 798 deletions(-)
---
diff --git a/Pyblio/ConfDir/GnomeUI.py b/Pyblio/ConfDir/GnomeUI.py
index 8872077..1c18ff1 100644
--- a/Pyblio/ConfDir/GnomeUI.py
+++ b/Pyblio/ConfDir/GnomeUI.py
@@ -58,7 +58,7 @@ Fields.URL.widget         = Editor.URL
 Fields.Reference.widget   = Editor.Reference
 
 Fields.Date.widget        = Editor.Date
-Fields.Date.justification = Gtk.JUSTIFY_RIGHT
+Fields.Date.justification = Gtk.Justification.RIGHT
 
 for f, w in (('author', 150),
              ('editor', 150),
@@ -73,7 +73,7 @@ for f, w in (('author', 150),
     h [f].width = w
     
 
-Config.set ('gnomeui/default',  (150, gtk.JUSTIFY_LEFT, Editor.Entry))
+Config.set ('gnomeui/default',  (150, Gtk.Justification.LEFT, Editor.Entry))
 
 multi = {}
 
diff --git a/Pyblio/GnomeUI/Common.py b/Pyblio/GnomeUI/Common.py
index 9397f17..ff8f14e 100644
--- a/Pyblio/GnomeUI/Common.py
+++ b/Pyblio/GnomeUI/Common.py
@@ -37,7 +37,6 @@ RESPONSE_COPY = 1
 RESPONSE_VIEW = 2
 
 from gi.repository import GObject, Gtk, Gdk, Pango
-# import gobject, gtk, Gtk.gdk, pango, sys
 import sys
 
 from  Pyblio import Fields, Resource
diff --git a/Pyblio/GnomeUI/Document.py b/Pyblio/GnomeUI/Document.py
index 8d99634..e2728d9 100644
--- a/Pyblio/GnomeUI/Document.py
+++ b/Pyblio/GnomeUI/Document.py
@@ -2,8 +2,8 @@
 #
 # This file is part of pybliographer
 # 
-# Copyright (C) 1998-2004 Frederic GOBRY
-# Email : gobry pybliographer org
+# Copyright (C) 1998-2004 Frederic GOBRY <gobry pybliographer org>
+# Copyright (C) 2013 Germán Poo-Caamaño <gpoo gnome org>
 #         
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -28,10 +28,7 @@ from gi.repository import GObject
 # from gnome import ui
 from gettext import gettext as _
 # import gnome
-from gi.repository import Gtk
-# import Gtk.glade
-
-from gi.repository import Gdk
+from gi.repository import Gtk, Gdk
 
 from Pyblio.GnomeUI import Editor, Entry, FileSelector, Format
 from Pyblio.GnomeUI import Index, OpenURL, Search, Utils
@@ -201,7 +198,7 @@ class Document (Connector.Publisher):
         prev.set_property ('hide-if-empty', False)
 
         view_action = self.actiongroup.get_action ('ViewResource')
-       view_action.set_property ('hide-if-empty', False)
+        view_action.set_property ('hide-if-empty', False)
         self.uim.insert_action_group (self.actiongroup, 0)
         self.uim.add_ui_from_string (uim_content)
 
@@ -213,14 +210,19 @@ class Document (Connector.Publisher):
         self.xml.set_translation_domain('pybliographer')
         self.xml.add_from_file(gp)
         self.xml.connect_signals(self)
-        #self.xml = Gtk.glade.XML (gp, 'main', domain = 'pybliographer')
-        #self.xml.signal_autoconnect (self)
 
         self.w = self.xml.get_object ('main')
         self.paned = self.xml.get_object ('main_pane')
 
-        #self.w.set_menus (self.uim.get_object ('/Menubar'))
-        #self.w.set_toolbar (self.uim.get_object ('/Toolbar'))
+        box = self.xml.get_object ('grid')
+        menubar = self.uim.get_widget ('/Menubar')
+        toolbar = self.uim.get_widget ('/Toolbar')
+        box.attach (menubar, 0, 0, 1, 1)
+        box.attach (toolbar, 0, 1, 1, 1)
+        
+        prev = self.xml.get_object ('previous_documents')
+        prev.set_property ('is-important', True)
+        prev.set_property ('hide-if-empty', False)
 
         self.w.add_accel_group (self.uim.get_accel_group ())
 
@@ -230,7 +232,6 @@ class Document (Connector.Publisher):
         self.w_save_mnu = self.xml.get_object ('_w_save_mnu')
 
         # We manually add a simple search area
-        t = self.uim.get_widget ('/Toolbar')
         h = Gtk.HBox()
 
         i = Gtk.Image()
@@ -250,7 +251,7 @@ class Document (Connector.Publisher):
 
         i = Gtk.ToolItem()
         i.add(h)
-        t.insert(i, -1)
+        toolbar.insert(i, -1)
         
         i.show_all()
         
@@ -361,7 +362,7 @@ class Document (Connector.Publisher):
         for item in history:
             # Display name in the menu
             quoted   = string.replace (item [0], '_', '__')
-        
+
             mid = self.uim.new_merge_id ()
 
             self.recents_mid.append (mid)
diff --git a/Pyblio/GnomeUI/Editor.py b/Pyblio/GnomeUI/Editor.py
index 5839e53..afb55ea 100644
--- a/Pyblio/GnomeUI/Editor.py
+++ b/Pyblio/GnomeUI/Editor.py
@@ -26,9 +26,7 @@
 from gettext import gettext as _
 
 from gi.repository import GObject, Gtk
-# import copy, gobject, gtk, re, string
 import copy, re, string
-# from gnome import ui
 
 from Pyblio import Base, Config, Connector, Exceptions, Fields, Key, Types
 from Pyblio.GnomeUI import Common, Compat, FieldsInfo, FileSelector, Mime, Utils
diff --git a/Pyblio/GnomeUI/Index.py b/Pyblio/GnomeUI/Index.py
index e3629f5..b94154c 100644
--- a/Pyblio/GnomeUI/Index.py
+++ b/Pyblio/GnomeUI/Index.py
@@ -322,35 +322,30 @@ class Index (Connector.Publisher):
         # clear the access table
         self.access = []
 
-        Utils.set_cursor (self.w, 'clock')
+        #Utils.set_cursor (self.w, 'clock')
 
         self.model.clear ()
 
         for entry in iterator:
             row = []
-
             i = 0
 
             for f in self.fields:
-                row.append (i)
-                i = i + 1
+                text = ''
 
                 if f == '-key-':
-                    row.append ((str (entry.key.key)).decode ('latin-1'))
+                    text = str(entry.key.key).decode('latin-1')
 
                 elif f == '-type-':
-                    row.append (str (entry.type.name)) ## ascii
+                    text = str(entry.type.name)
 
                 elif f == '-author/editor-':
-                    row.append (userformat.author_editor_format
-                                (entry).decode ('latin-1'))
+                    text = userformat.author_editor_format(entry).decode ('latin-1')
 
                 elif f == '-author/title-':
-                    row.append (userformat.author_title_format
-                                (entry).decode ('latin-1'))
+                    text = userformat.author_title_format(entry).decode ('latin-1')
 
                 elif entry.has_key (f):
-
                     if Types.get_field (f).type == Fields.AuthorGroup:
                         text = join (map (lambda a: str (a.last), entry [f]), ', ')
                     elif Types.get_field (f).type == Fields.Date:
@@ -358,28 +353,28 @@ class Index (Connector.Publisher):
                     else:
                         text = str (entry [f])
 
-                    row.append (text.decode ('latin-1'))
-                else:
-                    row.append ('')
+                    text = text.decode ('latin-1')
+
+                row.append((i, text))
+                i = i + 1
 
             if True:
-                row.append (i)
                 if Resource.is_viewable (entry):
-                    row.append (self.gvpixbuf)
+                    row.append((i, self.gvpixbuf))
                 else:
-                    row.append (None)
+                    row.append((i, None))
 
             iter = self.model.append  ()
 
-            print [iter], row
-            # apply (self.model.set, [iter] + row)
-            self.model.set([iter] + row)
+            for k, v in row:
+                if v is not None:
+                    self.model.set_value(iter, k, v)
 
-            # self.access.append (entry)
+            self.access.append (entry)
 
             entry = iterator.next ()
 
-        Utils.set_cursor (self.w, 'normal')
+        #Utils.set_cursor (self.w, 'normal')
         return
 
 
@@ -446,7 +441,8 @@ class Index (Connector.Publisher):
         entries = []
 
         def retrieve (model, path, iter, entries):
-            entries.append (self.access [path [0]])
+            indices = path.get_indices ()
+            entries.append (self.access [indices [0]])
 
         self.selinfo.selected_foreach (retrieve, entries)
 
diff --git a/Pyblio/GnomeUI/Search.py b/Pyblio/GnomeUI/Search.py
index 0e116f9..e3b94de 100644
--- a/Pyblio/GnomeUI/Search.py
+++ b/Pyblio/GnomeUI/Search.py
@@ -25,7 +25,6 @@
 import os
 
 # from gnome import ui
-# import gtk, gobject
 from gi.repository import Gtk, GObject
 
 import string, re, sys, traceback, copy
diff --git a/Pyblio/GnomeUI/Sort.py b/Pyblio/GnomeUI/Sort.py
index 03ef6c8..a565aa1 100644
--- a/Pyblio/GnomeUI/Sort.py
+++ b/Pyblio/GnomeUI/Sort.py
@@ -24,7 +24,6 @@
 import os, string
 
 from gi.repository import Gtk, GObject
-# import gtk, gobject
 # from gnome import ui
 
 from Pyblio import Connector, Sort, Config, version
diff --git a/Pyblio/GnomeUI/Utils.py b/Pyblio/GnomeUI/Utils.py
index 9fc7b2e..c47b54c 100644
--- a/Pyblio/GnomeUI/Utils.py
+++ b/Pyblio/GnomeUI/Utils.py
@@ -23,11 +23,7 @@
 
 import os
 
-from gi.repository import Gtk, Pango, Gdk
-# import gtk, pango
-# import Gtk.glade
-
-# from gnome import ui
+from gi.repository import Gtk, Pango, Gdk, GConf
 
 from Pyblio import Config, version
 
diff --git a/Pyblio/GnomeUI/__init__.py b/Pyblio/GnomeUI/__init__.py
index b24f5a3..f842135 100644
--- a/Pyblio/GnomeUI/__init__.py
+++ b/Pyblio/GnomeUI/__init__.py
@@ -43,13 +43,9 @@ def _vnum (t):
     return string.join (map (str, t), '.')
 
 ui_version = _("This is Pybliographic %s [Python %s, Gtk %s]") % (
-    version.version, _vnum (sys.version_info [:3]),
-    _vnum (Gtk._version))
+    version.version, _vnum (sys.version_info [:3]), Gtk._version)
 
 # clean up our garbage
 sys.argv = sys.argv [:2] + files
 
 del sys, files
-
-# Gtk.glade.bindtextdomain ("pybliographer", version.localedir)
-
diff --git a/Pyblio/GnomeUI/glade/pyblio.ui.in b/Pyblio/GnomeUI/glade/pyblio.ui.in
index 1525559..c4eccb8 100644
--- a/Pyblio/GnomeUI/glade/pyblio.ui.in
+++ b/Pyblio/GnomeUI/glade/pyblio.ui.in
@@ -1,6 +1,175 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkActionGroup" id="actiongroup1">
+    <child>
+      <object class="GtkAction" id="file1"/>
+    </child>
+    <child>
+      <object class="GtkAction" id="new1">
+        <property name="label" translatable="yes">_New</property>
+        <signal name="activate" handler="new_document" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="open1">
+        <signal name="activate" handler="ui_open_document" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="merge_with1">
+        <property name="label" translatable="yes">Merge With...</property>
+        <property name="stock_id">gtk-convert</property>
+        <signal name="activate" handler="merge_database" swapped="no"/>
+      </object>
+      <accelerator key="g" modifiers="GDK_CONTROL_MASK"/>
+    </child>
+    <child>
+      <object class="GtkAction" id="medline_query1">
+        <property name="label" translatable="yes">Medline Query...</property>
+        <signal name="activate" handler="query_database" swapped="no"/>
+      </object>
+      <accelerator key="m" modifiers="GDK_CONTROL_MASK"/>
+    </child>
+    <child>
+      <object class="GtkAction" id="_w_save_mnu">
+        <signal name="activate" handler="save_document" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="save_as1">
+        <signal name="activate" handler="save_document_as" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="previous_documents">
+        <property name="label" translatable="yes">Previous Documents</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="close1">
+        <signal name="activate" handler="close_document" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="quit1">
+        <signal name="activate" handler="exit_application" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="edit1"/>
+    </child>
+    <child>
+      <object class="GtkAction" id="cut1">
+        <signal name="activate" handler="cut_entry" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="copy1">
+        <signal name="activate" handler="copy_entry" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="paste1">
+        <signal name="activate" handler="paste_entry" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="clear1">
+        <signal name="activate" handler="clear_entries" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="add1">
+        <property name="label" translatable="yes">_Add...</property>
+        <property name="stock_id">gtk-add</property>
+        <signal name="activate" handler="add_entry" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="edit2">
+        <property name="label" translatable="yes">_Edit...</property>
+        <signal name="activate" handler="edit_entry" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="delete1">
+        <property name="label" translatable="yes">_Delete...</property>
+        <property name="stock_id">gtk-remove</property>
+        <signal name="activate" handler="delete_entry" swapped="no"/>
+      </object>
+      <accelerator key="Delete"/>
+    </child>
+    <child>
+      <object class="GtkAction" id="find1">
+        <signal name="activate" handler="find_entries" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="sort1">
+        <property name="label" translatable="yes">S_ort...</property>
+        <property name="stock_id">gtk-sort-ascending</property>
+        <signal name="activate" handler="sort_entries" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="cite1">
+        <property name="label" translatable="yes">Cite</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="cite2">
+        <property name="label" translatable="yes">Cite...</property>
+        <property name="stock_id">gtk-jump-to</property>
+        <signal name="activate" handler="lyx_cite" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="format1">
+        <property name="label" translatable="yes">Format...</property>
+        <property name="stock_id">gtk-execute</property>
+        <signal name="activate" handler="format_entries" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="settings1">
+        <property name="label" translatable="yes">Settings</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="fields1">
+        <property name="label" translatable="yes">Fields...</property>
+        <signal name="activate" handler="set_fields" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="preferences2">
+        <signal name="activate" handler="set_preferences" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="forget_all_changes1">
+        <property name="label" translatable="yes">Forget all changes</property>
+        <signal name="activate" handler="forget_changes_cb" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="help1"/>
+    </child>
+    <child>
+      <object class="GtkAction" id="documentation_open">
+        <property name="label" translatable="yes">Contents</property>
+        <property name="stock_id">gtk-help</property>
+        <signal name="activate" handler="on_documentation" swapped="no"/>
+      </object>
+      <accelerator key="F1"/>
+    </child>
+    <child>
+      <object class="GtkAction" id="about1">
+        <signal name="activate" handler="about" swapped="no"/>
+      </object>
+    </child>
+  </object>
   <object class="GtkWindow" id="main">
     <property name="can_focus">False</property>
     <property name="title" translatable="yes">Pybliographer</property>
@@ -8,771 +177,49 @@
     <signal name="key-press-event" handler="key_pressed" swapped="no"/>
     <signal name="delete-event" handler="close_or_exit" swapped="no"/>
     <child>
-      <object class="GtkBox" id="box1">
+      <object class="GtkGrid" id="grid">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="orientation">vertical</property>
         <child>
-          <object class="GtkMenuBar" id="menubar1">
+          <object class="GtkStatusbar" id="statusbar">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <child>
-              <object class="GtkMenuItem" id="menuitem1">
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">_File</property>
-                <property name="use_underline">True</property>
-                <child type="submenu">
-                  <object class="GtkMenu" id="menu1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem1">
-                        <property name="label">gtk-new</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">new1</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem2">
-                        <property name="label">gtk-open</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">open1</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem3">
-                        <property name="label">gtk-save</property>
-                        <property name="use_action_appearance">True</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">merge_with1</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem4">
-                        <property name="label">gtk-save-as</property>
-                        <property name="use_action_appearance">True</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                         <property name="related_action">medline_query1</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem41">
-                        <property name="label">gtk-save</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">_w_save_mnu</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem42">
-                        <property name="label">gtk-save-as</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                         <property name="related_action">save_as1</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkSeparatorMenuItem" id="separatormenuitem20">
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem43">
-                        <property name="label">gtk-save-as</property>
-                        <property name="use_action_appearance">True</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                         <property name="related_action">previous_documents</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkSeparatorMenuItem" id="separatormenuitem1">
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem50">
-                        <property name="label">gtk-close</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                         <property name="related_action">close1</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem5">
-                        <property name="label">gtk-quit</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">quit1</property>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkMenuItem" id="menuitem2">
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">_Edit</property>
-                <property name="use_underline">True</property>
-                <child type="submenu">
-                  <object class="GtkMenu" id="menu2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem6">
-                        <property name="label">gtk-cut</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">cut1</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem7">
-                        <property name="label">gtk-copy</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">copy1</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem8">
-                        <property name="label">gtk-paste</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">paste1</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem9">
-                        <property name="label">gtk-clear</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">clear1</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkSeparatorMenuItem" id="separatormenuitem11">
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem91">
-                        <property name="label">gtk-close</property>
-                        <property name="use_action_appearance">True</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                         <property name="related_action">add1</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem92">
-                        <property name="label">gtk-edit</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">edit1</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem93">
-                        <property name="label">gtk-delete</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">delete1</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkSeparatorMenuItem" id="separatormenuitem12">
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem94">
-                        <property name="label">gtk-find</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">find1</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem95">
-                        <property name="label">gtk-sort</property>
-                        <property name="use_action_appearance">True</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">sort1</property>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkMenuItem" id="menuitem3">
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">_View</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkMenuItem" id="menuitem4">
-                <property name="use_action_appearance">True</property>
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">_Help</property>
-                <property name="use_underline">True</property>
-                <property name="related_action">cite1</property>
-                <child type="submenu">
-                  <object class="GtkMenu" id="menu44">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem441">
-                        <property name="label">gtk-about</property>
-                        <property name="use_action_appearance">True</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">cite2</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem442">
-                        <property name="label">gtk-about</property>
-                        <property name="use_action_appearance">True</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">format1</property>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkMenuItem" id="menuitem5">
-                <property name="use_action_appearance">True</property>
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">_Help</property>
-                <property name="use_underline">True</property>
-                <property name="related_action">settings1</property>
-                <child type="submenu">
-                  <object class="GtkMenu" id="menu55">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem551">
-                        <property name="label">gtk-about</property>
-                        <property name="use_action_appearance">True</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">fields1</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem552">
-                        <property name="label">gtk-preferences</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">preferences2</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkSeparatorMenuItem" id="separatormenuitem13">
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem553">
-                        <property name="label">gtk-preferences</property>
-                        <property name="use_action_appearance">True</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">forget_all_changes1</property>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkMenuItem" id="menuitem6">
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">_Help</property>
-                <property name="use_underline">True</property>
-                <child type="submenu">
-                  <object class="GtkMenu" id="menu3">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem61">
-                        <property name="label">gtk-about</property>
-                        <property name="use_action_appearance">True</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">documentation_open</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem62">
-                        <property name="label">gtk-about</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <property name="related_action">about1</property>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
+            <property name="spacing">2</property>
           </object>
           <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
+            <property name="left_attach">0</property>
+            <property name="top_attach">3</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
           </packing>
         </child>
         <child>
-          <object class="GtkToolbar" id="toolbar1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="border_width">2</property>
-            <property name="toolbar_style">both</property>
-            <child>
-              <object class="GtkToolButton" id="button2">
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="tooltip_text" translatable="yes">Open File</property>
-                <property name="use_action_appearance">False</property>
-                <property name="stock_id">gtk-open</property>
-                <signal name="clicked" handler="ui_open_document" swapped="no"/>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="homogeneous">True</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkToolButton" id="_w_save_btn">
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="tooltip_text" translatable="yes">Save File</property>
-                <property name="use_action_appearance">False</property>
-                <property name="stock_id">gtk-save</property>
-                <signal name="clicked" handler="save_document" swapped="no"/>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="homogeneous">True</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkToolItem" id="toolitem1">
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="use_action_appearance">False</property>
-                <child>
-                  <object class="GtkVSeparator" id="vseparator3">
-                    <property name="height_request">20</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkToolButton" id="button4">
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="use_action_appearance">False</property>
-                <property name="stock_id">gtk-add</property>
-                <signal name="clicked" handler="add_entry" swapped="no"/>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="homogeneous">True</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkToolItem" id="toolitem2">
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="use_action_appearance">False</property>
-                <child>
-                  <object class="GtkVSeparator" id="vseparator1">
-                    <property name="height_request">20</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkToolButton" id="button5">
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="use_action_appearance">False</property>
-                <property name="stock_id">gtk-find</property>
-                <signal name="clicked" handler="find_entries" swapped="no"/>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="homogeneous">True</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkToolButton" id="button6">
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="use_action_appearance">False</property>
-                <property name="label" translatable="yes">Cite</property>
-                <property name="use_underline">True</property>
-                <property name="stock_id">gtk-jump-to</property>
-                <signal name="clicked" handler="lyx_cite" swapped="no"/>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="homogeneous">True</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
+          <placeholder/>
         </child>
         <child>
-          <object class="GtkVPaned" id="main_pane">
+          <placeholder/>
+        </child>
+        <child>
+          <object class="GtkPaned" id="main_pane">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
-            <child>
-              <placeholder/>
-            </child>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <property name="orientation">vertical</property>
+            <property name="position">2</property>
+            <property name="position_set">True</property>
             <child>
               <placeholder/>
             </child>
           </object>
           <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkStatusbar" id="statusbar">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">3</property>
+            <property name="left_attach">0</property>
+            <property name="top_attach">2</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
           </packing>
         </child>
       </object>
     </child>
   </object>
-      <object class="GtkActionGroup" id="actiongroup1">
-        <child>
-          <object class="GtkAction" id="file1">
-            <property name="name">file1</property>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="new1">
-            <property name="name">new1</property>
-            <property name="label" translatable="yes">_New</property>
-            <signal handler="new_document" last_modification_time="Sun, 08 Jun 2003 11:32:54 GMT" 
name="activate"/>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="open1">
-            <property name="name">open1</property>
-            <signal handler="ui_open_document" last_modification_time="Mon, 09 Jun 2003 18:56:54 GMT" 
name="activate"/>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="merge_with1">
-            <property name="stock_id">gtk-convert</property>
-            <property name="name">merge_with1</property>
-            <property name="label" translatable="yes">Merge With...</property>
-            <signal handler="merge_database" last_modification_time="Mon, 09 Jun 2003 18:56:54 GMT" 
name="activate"/>
-          </object>
-          <accelerator key="g" modifiers="GDK_CONTROL_MASK"/>
-        </child>
-        <child>
-          <object class="GtkAction" id="medline_query1">
-            <property name="name">medline_query1</property>
-            <property name="label" translatable="yes">Medline Query...</property>
-            <signal handler="query_database" last_modification_time="Mon, 09 Jun 2003 18:56:54 GMT" 
name="activate"/>
-          </object>
-          <accelerator key="m" modifiers="GDK_CONTROL_MASK"/>
-        </child>
-        <child>
-          <object class="GtkAction" id="_w_save_mnu">
-            <property name="name">_w_save_mnu</property>
-            <signal handler="save_document" last_modification_time="Mon, 09 Jun 2003 18:56:54 GMT" 
name="activate"/>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="save_as1">
-            <property name="name">save_as1</property>
-            <signal handler="save_document_as" last_modification_time="Mon, 09 Jun 2003 18:56:54 GMT" 
name="activate"/>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="previous_documents">
-            <property name="name">previous_documents</property>
-            <property name="label" translatable="yes">Previous Documents</property>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="close1">
-            <property name="name">close1</property>
-            <signal handler="close_document" last_modification_time="Mon, 09 Jun 2003 18:50:24 GMT" 
name="activate"/>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="quit1">
-            <property name="name">quit1</property>
-            <signal handler="exit_application" last_modification_time="Mon, 09 Jun 2003 18:50:24 GMT" 
name="activate"/>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="edit1">
-            <property name="name">edit1</property>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="cut1">
-            <property name="name">cut1</property>
-            <signal handler="cut_entry" last_modification_time="Mon, 09 Jun 2003 18:56:54 GMT" 
name="activate"/>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="copy1">
-            <property name="name">copy1</property>
-            <signal handler="copy_entry" last_modification_time="Mon, 09 Jun 2003 18:56:54 GMT" 
name="activate"/>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="paste1">
-            <property name="name">paste1</property>
-            <signal handler="paste_entry" last_modification_time="Mon, 09 Jun 2003 18:56:54 GMT" 
name="activate"/>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="clear1">
-            <property name="name">clear1</property>
-            <signal handler="clear_entries" last_modification_time="Mon, 09 Jun 2003 18:56:54 GMT" 
name="activate"/>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="add1">
-            <property name="stock_id">gtk-add</property>
-            <property name="name">add1</property>
-            <property name="label" translatable="yes">_Add...</property>
-            <signal handler="add_entry" last_modification_time="Mon, 09 Jun 2003 18:56:54 GMT" 
name="activate"/>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="edit2">
-            <property name="name">edit2</property>
-            <property name="label" translatable="yes">_Edit...</property>
-            <signal handler="edit_entry" last_modification_time="Mon, 09 Jun 2003 18:56:54 GMT" 
name="activate"/>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="delete1">
-            <property name="stock_id">gtk-remove</property>
-            <property name="name">delete1</property>
-            <property name="label" translatable="yes">_Delete...</property>
-            <signal handler="delete_entry" last_modification_time="Mon, 09 Jun 2003 18:56:54 GMT" 
name="activate"/>
-          </object>
-          <accelerator key="Delete" modifiers="0"/>
-        </child>
-        <child>
-          <object class="GtkAction" id="find1">
-            <property name="name">find1</property>
-            <signal handler="find_entries" last_modification_time="Mon, 09 Jun 2003 18:56:54 GMT" 
name="activate"/>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="sort1">
-            <property name="stock_id">gtk-sort-ascending</property>
-            <property name="name">sort1</property>
-            <property name="label" translatable="yes">S_ort...</property>
-            <signal handler="sort_entries" last_modification_time="Mon, 09 Jun 2003 18:56:54 GMT" 
name="activate"/>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="cite1">
-            <property name="name">cite1</property>
-            <property name="label" translatable="yes">Cite</property>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="cite2">
-            <property name="stock_id">gtk-jump-to</property>
-            <property name="name">cite2</property>
-            <property name="label" translatable="yes">Cite...</property>
-            <signal handler="lyx_cite" last_modification_time="Mon, 09 Jun 2003 18:56:54 GMT" 
name="activate"/>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="format1">
-            <property name="stock_id">gtk-execute</property>
-            <property name="name">format1</property>
-            <property name="label" translatable="yes">Format...</property>
-            <signal handler="format_entries" last_modification_time="Mon, 09 Jun 2003 18:56:54 GMT" 
name="activate"/>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="settings1">
-            <property name="name">settings1</property>
-            <property name="label" translatable="yes">Settings</property>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="fields1">
-            <property name="name">fields1</property>
-            <property name="label" translatable="yes">Fields...</property>
-            <signal handler="set_fields" last_modification_time="Mon, 09 Jun 2003 19:02:17 GMT" 
name="activate"/>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="preferences2">
-            <property name="name">preferences2...</property>
-            <signal handler="set_preferences" last_modification_time="Mon, 09 Jun 2003 19:02:17 GMT" 
name="activate"/>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="forget_all_changes1">
-            <property name="name">forget_all_changes1</property>
-            <property name="label" translatable="yes">Forget all changes</property>
-            <signal handler="forget_changes_cb" last_modification_time="Wed, 12 Nov 2003 14:32:19 GMT" 
name="activate"/>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="help1">
-            <property name="name">help1</property>
-          </object>
-        </child>
-        <child>
-          <object class="GtkAction" id="documentation_open">
-            <property name="stock_id">gtk-help</property>
-            <property name="name">documentation_open</property>
-            <property name="label" translatable="yes">Contents</property>
-            <signal handler="on_documentation" last_modification_time="Tue, 06 Jan 2004 13:25:15 GMT" 
name="activate"/>
-          </object>
-          <accelerator key="F1" modifiers="0"/>
-        </child>
-        <child>
-          <object class="GtkAction" id="about1">
-            <property name="name">about1</property>
-            <signal handler="about" last_modification_time="Mon, 09 Jun 2003 19:02:17 GMT" name="activate"/>
-          </object>
-        </child>
-      </object>
 </interface>
diff --git a/scripts/pybliographic.py b/scripts/pybliographic.py
index 340a8a7..c269681 100644
--- a/scripts/pybliographic.py
+++ b/scripts/pybliographic.py
@@ -43,7 +43,6 @@ elif pyblio_path:
 else:
     main.new_document ()
 
-# import gtk
 from gi.repository import Gtk
 
 Gtk.main ()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]