Hello community,

here is the log from the commit of package cherrytree for openSUSE:Factory 
checked in at 2012-01-25 12:18:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cherrytree (Old)
 and      /work/SRC/openSUSE:Factory/.cherrytree.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cherrytree", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/cherrytree/cherrytree.changes    2012-01-17 
16:04:35.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.cherrytree.new/cherrytree.changes       
2012-01-25 12:18:04.000000000 +0100
@@ -1,0 +2,13 @@
+Tue Jan 24 10:26:20 UTC 2012 - [email protected]
+
+- Update to version 0.25.2:
+  + Bug fixes.
+
+-------------------------------------------------------------------
+Sat Jan 21 09:48:04 UTC 2012 - [email protected]
+
+- Update to version 0.25.1:
+  + Middle click on the tree expands/collapses
+  + Bug fixes.
+
+-------------------------------------------------------------------

Old:
----
  cherrytree-0.25.tar.gz

New:
----
  cherrytree-0.25.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cherrytree.spec ++++++
--- /var/tmp/diff_new_pack.1RKdyO/_old  2012-01-25 12:18:05.000000000 +0100
+++ /var/tmp/diff_new_pack.1RKdyO/_new  2012-01-25 12:18:05.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           cherrytree
-Version:        0.25
+Version:        0.25.2
 Release:        0
 Summary:        A hierarchical note taking application
 License:        GPL-2.0+

++++++ cherrytree-0.25.tar.gz -> cherrytree-0.25.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cherrytree-0.25/debian/changelog 
new/cherrytree-0.25.2/debian/changelog
--- old/cherrytree-0.25/debian/changelog        2012-01-13 22:51:37.000000000 
+0100
+++ new/cherrytree-0.25.2/debian/changelog      2012-01-22 21:55:42.000000000 
+0100
@@ -1,4 +1,4 @@
-cherrytree (0.25-2) stable; urgency=low
+cherrytree (0.25.2-1) stable; urgency=low
 
   * Fellow upstream.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cherrytree-0.25/debian/debhelper.log 
new/cherrytree-0.25.2/debian/debhelper.log
--- old/cherrytree-0.25/debian/debhelper.log    2012-01-14 16:39:44.000000000 
+0100
+++ new/cherrytree-0.25.2/debian/debhelper.log  2012-01-24 01:12:26.000000000 
+0100
@@ -26,3 +26,45 @@
 dh_gencontrol
 dh_md5sums
 dh_builddeb
+dh_prep
+dh_installdirs
+dh_installchangelogs
+dh_installdocs
+dh_installexamples
+dh_installman
+dh_link
+dh_compress
+dh_fixperms
+dh_pycentral
+dh_installdeb
+dh_gencontrol
+dh_md5sums
+dh_builddeb
+dh_prep
+dh_installdirs
+dh_installchangelogs
+dh_installdocs
+dh_installexamples
+dh_installman
+dh_link
+dh_compress
+dh_fixperms
+dh_pycentral
+dh_installdeb
+dh_gencontrol
+dh_md5sums
+dh_builddeb
+dh_prep
+dh_installdirs
+dh_installchangelogs
+dh_installdocs
+dh_installexamples
+dh_installman
+dh_link
+dh_compress
+dh_fixperms
+dh_pycentral
+dh_installdeb
+dh_gencontrol
+dh_md5sums
+dh_builddeb
Files old/cherrytree-0.25/modules/clipboard.pyc and 
new/cherrytree-0.25.2/modules/clipboard.pyc differ
Files old/cherrytree-0.25/modules/codeboxes.pyc and 
new/cherrytree-0.25.2/modules/codeboxes.pyc differ
Files old/cherrytree-0.25/modules/config.pyc and 
new/cherrytree-0.25.2/modules/config.pyc differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cherrytree-0.25/modules/cons.py 
new/cherrytree-0.25.2/modules/cons.py
--- old/cherrytree-0.25/modules/cons.py 2012-01-13 22:51:37.000000000 +0100
+++ new/cherrytree-0.25.2/modules/cons.py       2012-01-22 21:55:28.000000000 
+0100
@@ -22,7 +22,7 @@
 import os, sys
 
 
-VERSION = "0.25"
+VERSION = "0.25.2"
 APP_NAME = "cherrytree"
 NEWER_VERSION_URL = "http://www.giuspen.com/software/version_cherrytree";
 if sys.platform[0:3] == "win":
Files old/cherrytree-0.25/modules/cons.pyc and 
new/cherrytree-0.25.2/modules/cons.pyc differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cherrytree-0.25/modules/core.py 
new/cherrytree-0.25.2/modules/core.py
--- old/cherrytree-0.25/modules/core.py 2012-01-13 22:51:37.000000000 +0100
+++ new/cherrytree-0.25.2/modules/core.py       2012-01-24 01:08:48.000000000 
+0100
@@ -1027,6 +1027,7 @@
             support.add_recent_document(self, filepath)
             self.update_window_save_not_needed()
             
self.state_machine.update_state(self.treestore[self.curr_tree_iter][3])
+            self.objects_buffer_refresh()
 
     def filepath_extension_fix(self, filepath):
         """Check a filepath to have the proper extension"""
@@ -1055,7 +1056,9 @@
                     if not exporting:
                         if "db" in dir(self): self.db_old = self.db
                         self.db = self.ctdb_handler.new_db(filepath_tmp)
-                        if "db_old" in dir(self): self.db_old.close()
+                        if "db_old" in dir(self):
+                            self.db_old.close()
+                            del self.db_old
                     elif exporting in ["a", "s", "n"]:
                         print "exporting", exporting
                         exp_db = self.ctdb_handler.new_db(filepath_tmp, 
exporting)
@@ -1068,7 +1071,9 @@
                     if not exporting:
                         if "db" in dir(self): self.db_old = self.db
                         self.db = self.ctdb_handler.new_db(filepath)
-                        if "db_old" in dir(self): self.db_old.close()
+                        if "db_old" in dir(self):
+                            self.db_old.close()
+                            del self.db_old
                     elif exporting in ["a", "s", "n"]:
                         print "exporting", exporting
                         exp_db = self.ctdb_handler.new_db(filepath, exporting)
@@ -1077,6 +1082,10 @@
         if xml_string:
             file_descriptor.write(xml_string)
             file_descriptor.close()
+            if first_write and not exporting:
+                if "db" in dir(self) and self.db:
+                    self.db.close()
+                    del self.db
         if self.password:
             if sys.platform[0:3] == "win":
                 filepath_4win = support.windows_cmd_prepare_path(filepath)
@@ -1091,10 +1100,13 @@
                                                         re.escape(filepath),
                                                         
re.escape(filepath_tmp))
             #print bash_str
+            if not xml_string and not exporting: self.db.close()
             ret_code = subprocess.call(bash_str, shell=True)
             #print ret_code
             if xml_string: os.remove(filepath_tmp)
-            else: self.ctdb_handler.remove_at_quit_set.add(filepath_tmp)
+            elif not exporting:
+                self.db = 
self.ctdb_handler.get_connected_db_from_dbpath(filepath_tmp)
+                self.ctdb_handler.remove_at_quit_set.add(filepath_tmp)
 
     def file_write(self, filepath, first_write):
         """File Write"""
@@ -1406,12 +1418,18 @@
             ctd_filepath = ctd_handler.get_single_ct_filepath(proposed_name)
             if ctd_filepath:
                 
ctd_handler.node_and_subnodes_export_to_ctd(self.curr_tree_iter, ctd_filepath)
+                if restore_filetype in ["b", "x"] and self.curr_tree_iter:
+                    
self.state_machine.update_state(self.treestore[self.curr_tree_iter][3])
+                    self.objects_buffer_refresh()
         else:
             # all nodes
             proposed_name = self.file_name[:-1] + self.filetype
             ctd_filepath = ctd_handler.get_single_ct_filepath(proposed_name)
             if ctd_filepath:
                 ctd_handler.nodes_all_export_to_ctd(ctd_filepath)
+                if restore_filetype in ["b", "x"] and self.curr_tree_iter:
+                    
self.state_machine.update_state(self.treestore[self.curr_tree_iter][3])
+                    self.objects_buffer_refresh()
         self.password = restore_passw
         self.filetype = restore_filetype
 
@@ -1456,10 +1474,16 @@
             folder_name = support.get_node_hierarchical_name(self, 
self.curr_tree_iter)
             if self.html_handler.prepare_html_folder(folder_name):
                 self.html_handler.nodes_all_export_to_html(self.curr_tree_iter)
+                if self.filetype in ["b", "x"] and self.curr_tree_iter:
+                    
self.state_machine.update_state(self.treestore[self.curr_tree_iter][3])
+                    self.objects_buffer_refresh()
         else:
             # all nodes
             if self.html_handler.prepare_html_folder(self.file_name):
                 self.html_handler.nodes_all_export_to_html()
+                if self.filetype in ["b", "x"] and self.curr_tree_iter:
+                    
self.state_machine.update_state(self.treestore[self.curr_tree_iter][3])
+                    self.objects_buffer_refresh()
 
     def export_print_page_setup(self, action):
         """Print Page Setup Operations"""
@@ -1742,14 +1766,9 @@
 
     def treeview_safe_set_cursor(self, tree_iter):
         """Set Cursor being sure the Node is Expanded"""
-        nodes_to_expand = []
-        father_iter = self.treestore.iter_parent(tree_iter)
-        while father_iter:
-            nodes_to_expand.insert(0, father_iter)
-            father_iter = self.treestore.iter_parent(father_iter)
-        for element_iter in nodes_to_expand:
-            self.treeview.expand_row(self.treestore.get_path(element_iter), 
open_all=False)
-        self.treeview.set_cursor(self.treestore.get_path(tree_iter))
+        tree_path = self.treestore.get_path(tree_iter)
+        self.treeview.expand_to_path(tree_path)
+        self.treeview.set_cursor(tree_path)
 
     def on_table_column_rename_radiobutton_toggled(self, radiobutton):
         """Table Column Rename Toggled"""
@@ -1984,6 +2003,12 @@
         """Catches mouse buttons clicks"""
         if event.button == 3:
             self.menu_tree.popup(None, None, None, event.button, event.time)
+        elif event.button == 2:
+            path_at_click = self.treeview.get_path_at_pos(int(event.x), 
int(event.y))
+            if path_at_click:
+                if self.treeview.row_expanded(path_at_click[0]):
+                    self.treeview.collapse_row(path_at_click[0])
+                else: self.treeview.expand_row(path_at_click[0], False)
         elif event.button == 1 and event.type == gtk.gdk._2BUTTON_PRESS:
             self.node_edit()
 
@@ -2249,20 +2274,29 @@
         self.update_window_save_needed()
         self.sourceview.grab_focus()
 
-    def switch_buffer_text_source(self, buffer, iter, new_syntax_highl):
-        """Switch TextBuffer -> SourceBuffer or SourceBuffer -> TextBuffer"""
-        self.user_active = False
-        node_text = buffer.get_text(*buffer.get_bounds())
-        self.treestore[iter][2] = self.buffer_create(new_syntax_highl)
-        self.treestore[iter][2].set_text(node_text)
-        self.sourceview.set_buffer(self.treestore[iter][2])
-        self.treestore[iter][2].connect('modified-changed', 
self.on_modified_changed)
-        if new_syntax_highl == cons.CUSTOM_COLORS_ID:
-            self.treestore[iter][2].connect('insert-text', 
self.on_text_insertion)
-            self.treestore[iter][2].connect('delete-range', 
self.on_text_removal)
+    def sourceview_set_properties(self, tree_iter, syntax_highl):
+        """Set sourceview properties according to current node"""
+        if syntax_highl == cons.CUSTOM_COLORS_ID:
+            self.treestore[tree_iter][2].connect('insert-text', 
self.on_text_insertion)
+            self.treestore[tree_iter][2].connect('delete-range', 
self.on_text_removal)
+            self.treestore[tree_iter][2].connect('mark-set', 
self.on_textbuffer_mark_set)
             self.sourceview.modify_font(pango.FontDescription(self.text_font))
+            self.sourceview.set_draw_spaces(0)
+            self.sourceview.set_highlight_current_line(False)
         else:
             self.sourceview.modify_font(pango.FontDescription(self.code_font))
+            if self.show_white_spaces: 
self.sourceview.set_draw_spaces(codeboxes.DRAW_SPACES_FLAGS)
+            if self.highl_curr_line: 
self.sourceview.set_highlight_current_line(True)
+
+    def switch_buffer_text_source(self, text_buffer, tree_iter, 
new_syntax_highl):
+        """Switch TextBuffer -> SourceBuffer or SourceBuffer -> TextBuffer"""
+        self.user_active = False
+        node_text = text_buffer.get_text(*text_buffer.get_bounds())
+        self.treestore[tree_iter][2] = self.buffer_create(new_syntax_highl)
+        self.treestore[tree_iter][2].set_text(node_text)
+        self.sourceview.set_buffer(self.treestore[tree_iter][2])
+        self.treestore[tree_iter][2].connect('modified-changed', 
self.on_modified_changed)
+        self.sourceview_set_properties(tree_iter, new_syntax_highl)
         self.user_active = True
 
     def on_node_changed(self, *args):
@@ -2282,17 +2316,7 @@
         self.sourceview.set_buffer(self.curr_buffer)
         self.syntax_highlighting = self.treestore[self.curr_tree_iter][4]
         self.curr_buffer.connect('modified-changed', self.on_modified_changed)
-        if self.syntax_highlighting == cons.CUSTOM_COLORS_ID:
-            self.curr_buffer.connect('insert-text', self.on_text_insertion)
-            self.curr_buffer.connect('delete-range', self.on_text_removal)
-            self.curr_buffer.connect('mark-set', self.on_textbuffer_mark_set)
-            self.sourceview.modify_font(pango.FontDescription(self.text_font))
-            self.sourceview.set_draw_spaces(0)
-            self.sourceview.set_highlight_current_line(False)
-        else:
-            self.sourceview.modify_font(pango.FontDescription(self.code_font))
-            if self.show_white_spaces: 
self.sourceview.set_draw_spaces(codeboxes.DRAW_SPACES_FLAGS)
-            if self.highl_curr_line: 
self.sourceview.set_highlight_current_line(True)
+        self.sourceview_set_properties(self.curr_tree_iter, 
self.syntax_highlighting)
         self.sourceview.set_sensitive(True)
         self.sourceview.set_editable(not 
self.treestore[self.curr_tree_iter][7])
         
self.header_node_name_label.set_text("<big><b><i>"+cgi.escape(self.treestore[self.curr_tree_iter][1])+"</i></b></big>")
@@ -2500,6 +2524,7 @@
 
     def objects_buffer_refresh(self):
         """Buffer Refresh (Needed for Objects)"""
+        if not self.curr_tree_iter: return
         refresh = 
self.state_machine.requested_current_state(self.treestore[self.curr_tree_iter][3])
         # refresh is [ [rich_text, pixbuf_table_vector, cursor_position],... ]
         pixbuf_table_vector = refresh[1]
Files old/cherrytree-0.25/modules/core.pyc and 
new/cherrytree-0.25.2/modules/core.pyc differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cherrytree-0.25/modules/ctdb.py 
new/cherrytree-0.25.2/modules/ctdb.py
--- old/cherrytree-0.25/modules/ctdb.py 2012-01-13 22:51:37.000000000 +0100
+++ new/cherrytree-0.25.2/modules/ctdb.py       2012-01-24 01:08:48.000000000 
+0100
@@ -97,7 +97,7 @@
                 dom_row.appendChild(dom_cell)
                 text_iter = table_dom.createTextNode(cell)
                 dom_cell.appendChild(text_iter)
-        txt = table_dom.toxml()
+        txt = (table_dom.toxml()).decode('utf-8')
         return (node_id, offset, justification, txt, col_min, col_max)
     
     def get_codebox_db_tuple(self, codebox_element, node_id):
@@ -117,7 +117,9 @@
     
     def get_connected_db_from_dbpath(self, dbpath):
         """Returns DB connection descriptor given the dbpath"""
-        return sqlite3.connect(dbpath)
+        db = sqlite3.connect(dbpath)
+        db.row_factory = sqlite3.Row
+        return db
     
     def new_db(self, dbpath, exporting=""):
         """Create a new DataBase"""
@@ -281,7 +283,7 @@
                     db.executemany('INSERT INTO image VALUES(?,?,?,?,?)', 
images_tuples)
                 else: has_image = 0
                 # retrieve xml text
-                txt = self.dom.toxml()
+                txt = (self.dom.toxml()).decode('utf-8')
             else:
                 # not richtext
                 has_codebox = 0
@@ -421,6 +423,7 @@
             except:
                 print "** failed to parse **"
                 print node_row['txt']
+                raise
                 return
             dom_node = dom.firstChild
             if not dom_node or dom_node.nodeName != "node":
@@ -524,7 +527,6 @@
         if not discard_ids:
             self.dad.xml_handler.reset_nodes_names()
             self.dad.bookmarks = []
-        db.row_factory = sqlite3.Row
         # tree nodes
         node_sequence = 0
         children_rows = self.get_children_rows_from_father_id(db, 0)
Files old/cherrytree-0.25/modules/ctdb.pyc and 
new/cherrytree-0.25.2/modules/ctdb.pyc differ
Files old/cherrytree-0.25/modules/exports.pyc and 
new/cherrytree-0.25.2/modules/exports.pyc differ
Files old/cherrytree-0.25/modules/findreplace.pyc and 
new/cherrytree-0.25.2/modules/findreplace.pyc differ
Files old/cherrytree-0.25/modules/imports.pyc and 
new/cherrytree-0.25.2/modules/imports.pyc differ
Files old/cherrytree-0.25/modules/lists.pyc and 
new/cherrytree-0.25.2/modules/lists.pyc differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cherrytree-0.25/modules/machines.py 
new/cherrytree-0.25.2/modules/machines.py
--- old/cherrytree-0.25/modules/machines.py     2012-01-13 22:51:37.000000000 
+0100
+++ new/cherrytree-0.25.2/modules/machines.py   2012-01-23 00:28:35.000000000 
+0100
@@ -307,7 +307,7 @@
         # allocate and init the rich text attributes
         self.curr_attributes = {}
         for tag_property in cons.TAG_PROPERTIES: 
self.curr_attributes[tag_property] = ""
-        curr_buffer = self.dad.treestore[tree_iter][2]
+        curr_buffer = self.dad.get_textbuffer_from_tree_iter(tree_iter)
         start_iter = curr_buffer.get_start_iter()
         end_iter = curr_buffer.get_end_iter()
         if programming_language == cons.CUSTOM_COLORS_ID:
Files old/cherrytree-0.25/modules/machines.pyc and 
new/cherrytree-0.25.2/modules/machines.pyc differ
Files old/cherrytree-0.25/modules/main.pyc and 
new/cherrytree-0.25.2/modules/main.pyc differ
Files old/cherrytree-0.25/modules/printing.pyc and 
new/cherrytree-0.25.2/modules/printing.pyc differ
Files old/cherrytree-0.25/modules/support.pyc and 
new/cherrytree-0.25.2/modules/support.pyc differ
Files old/cherrytree-0.25/modules/tablez.pyc and 
new/cherrytree-0.25.2/modules/tablez.pyc differ

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to