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

Please accept odot 1.0.3-1 for Sarge



Hi,

After our successful libgimp-perl migration to testing, i want to get a
new odot in, fixing bug #307239. At the moment, odot 1.0.1-1 is in
sarge, with two important bugs:
  * Adding a new item before finishing editing another one leads to a
    crash (that's #307239)
  * Quitting after editing a new list leads to data loss: odot presents
    a "Save | Discard | Cancel" menu, but clicking on "Save" leads to
    another crash. (not reported in the BTS)

The first bug was fixed by upstream in 1.0.2, the second one in
1.0.3. The diff between the two versions isn't very long (though the
code is a bit ... complicated).
1.0.3-1 also contains nice ChangeLog/NEWS files that weren't included
until now, so I'd be quite happy if the new version could be approved.

OK, the usual changelog blob:

odot (1.0.3-1) unstable; urgency=low

  * New upstream release:
    + Fix save_on_quit to work with completly new files
    + Fix ugly Gtk-Warning if dragging an item to the top-level

 -- Marc 'HE' Brockschmidt <he@debian.org>  Fri,  6 May 2005 17:40:30 +0200

odot (1.0.2-1) unstable; urgency=low

  * New upstream release, also fixing the crash when using the "Add" button
    before finishing the last item. (Closes: #307239)

 -- Marc 'HE' Brockschmidt <he@debian.org>  Wed,  4 May 2005 23:21:56 +0200

I've attached a full diff.

Marc

diff -Nwru archiv/odot-1.0.1/ChangeLog odot-1.0.3/ChangeLog
--- archiv/odot-1.0.1/ChangeLog	1970-01-01 01:00:00.000000000 +0100
+++ odot-1.0.3/ChangeLog	2005-05-06 16:23:22.000000000 +0200
@@ -0,0 +1,303 @@
+2005-05-06 16:22  torsten
+
+	* NEWS: Version 1.0.3.
+
+2005-05-06 16:12  torsten
+
+	* odot: Fix another issue found by Marc: Avoid an assertion when
+	  dragging a node to the toplevel by checking if the depth of the
+	  path of the node is greater than zero.
+
+2005-05-06 16:05  torsten
+
+	* odot: Fix the save-on-quit error that occured when you were
+	  editing a new file, which had no backend associated with it yet.
+
+2005-05-04 18:27  torsten
+
+	* odot: Fix adding a new node when another is already being edited.
+	  Reported by a Debian user and brought to my attention by Marc
+	  Brockschmidt.
+
+2005-04-10 17:15  torsten
+
+	* odot: When a due node is dropped into a collapsed node, highlight
+	  it.
+
+2005-02-26 20:27  torsten
+
+	* odot: Optimize check_due_date by adding a due_data parameter that
+	  can be used if callers already fetched the due date.
+
+2005-02-20 20:39  torsten
+
+	* NEWS: Version 1.0.1.
+
+2005-02-20 20:27  torsten
+
+	* odot: Fix various small and huge bugs that cropped up due to
+	  changes in gtk+ 2.6.
+
+2004-10-17 16:33  torsten
+
+	* NEWS: Version 1.0.0.
+
+2004-10-17 16:33  torsten
+
+	* odot: Remember the maximized state.  Get rid of setup_clipboard()
+	  by inlining its contents.  Speed up startup slightly by moving
+	  some signal_connect()s.
+
+2004-09-20 21:59  torsten
+
+	* odot: Make [Ctrl]+[Return] add a new child, and [Shift]+[Return]
+	  a new sibling.  Split an edit() out of the backend's add()
+	  method, to support this.  Handle undef in
+	  Odot::CellEditableText::set_text.
+
+2004-09-13 14:48  torsten
+
+	* odot: Move the generate_* stuff to a separate package:
+	  Odot::Serializer.  Add it as a property to the general and the
+	  xml backend.	Fix replace_path_with_parent to work when $parent
+	  is undef, i.e. the "root" node.
+
+2004-09-13 14:30  torsten
+
+	* odot: Redo the generate_* methods to use a manual algorithm
+	  instead of $model->foreach.
+
+2004-09-01 09:41  torsten
+
+	* NEWS, README, odot, odot.pod: Fix initial file loading: Use
+	  $ARGV[0] if it's set; use ~/.odot if it exists; use nada in all
+	  other cases.	Version 0.9.4.
+
+2004-09-01 09:17  torsten
+
+	* odot: Fix undo/redo support for indent/unindent.  Add undo/redo
+	  support for node movement.
+
+2004-09-01 08:12  torsten
+
+	* odot: Get rid of -w and use warnings instead.  Save the column
+	  view widgets in the backends, to make it possible to hide the due
+	  date column.	Implement Odot::CellEditableText::select_all
+	  manually to make it work under gtk+ 2.2 as well.  Use a
+	  preferences key in the xml data structure, instead of a separate
+	  key for every preference.  Remove the unused
+	  [sg]et_show_headings_widget.
+
+2004-08-18 05:51  torsten
+
+	* odot: Use strict and warnings everywhere.  Implement node moving
+	  and (un)indenting via the cursor keys and tab/backspace.  Create
+	  a separate package for the XML::Parser handling; use it
+	  everywhere.  Remove a confirmation dialog; undo/redo makes it
+	  needless.
+
+2004-08-14 21:40  torsten
+
+	* NEWS: Version 0.9.3.
+
+2004-08-14 21:31  torsten
+
+	* odot: Use delta_days instead of in_units("days"), since the
+	  latter is not available in all versions of DateTime.
+
+2004-08-14 02:13  torsten
+
+	* odot: Use 0 instead of 3 for the button of keyboard popups.
+
+2004-08-14 00:13  torsten
+
+	* odot: Fix the keyboard popup by falling back to alternative
+	  values for button and time in case there's no event object.
+
+2004-08-13 05:25  torsten
+
+	* odot: When filling, use insert instead of append to fix undo'ing
+	  removals.
+
+2004-08-09 14:04  torsten
+
+	* odot: Alter some comments.  Speed up a loop by not using a
+	  lexical.  Fix an error message.
+
+2004-08-07 17:23  torsten
+
+	* NEWS: Version 0.9.2.
+
+2004-08-07 17:22  torsten
+
+	* odot: Fix bug introduced by using low-precedence logic operators.
+
+2004-08-07 16:07  torsten
+
+	* NEWS: Version 0.9.1.
+
+2004-08-07 14:30  torsten
+
+	* odot: Make us work with GTK+ 2.2 by adding some version checks
+	  around new things and reworking some undo/redo logic.  Add
+	  undo/redo support for removing nodes.  Fix und/redo for modifying
+	  nodes.
+
+2004-08-02 21:49  torsten
+
+	* odot: Intercept all relevant signals directly in the backend and
+	  update the changed state there.  Gets rid of all those scattered
+	  set_changed(TRUE) calls.
+
+2004-08-02 20:24  torsten
+
+	* README, odot: Use DateTime instead of Date::Calc.  Implement
+	  keyboard navigation for the popup calendar.
+
+2004-08-02 03:32  torsten
+
+	* odot: Use TRUE and FALSE instead of 1 and 0.
+
+2004-08-02 02:20  torsten
+
+	* odot: Make unde/redo work for changing the contents of a node.
+
+2004-08-02 01:50  torsten
+
+	* odot: Recognize drag-and-drop and set the internal changed state
+	  accordingly.
+
+2004-08-02 00:45  torsten
+
+	* odot: After deleting a node, select the one that replaced it.
+
+2004-08-02 00:24  torsten
+
+	* odot: Require GTK+ 2.4.0 for various tree view enhancements.
+	  Change the semantics of the popup: Connect to button_press_event
+	  so you can also keep the button pressed to choose an item.  Fix
+	  d'n'd stuff happening after the popup by returning TRUE if we
+	  handled the event.
+
+2004-04-26 21:32  torsten
+
+	* NEWS: Version 0.9.
+
+2004-04-26 20:50  torsten
+
+	* README, odot.pod: Update the documentation to reflect recent
+	  changes.
+
+2004-04-26 20:42  torsten
+
+	* odot: Move Odot::Accessors to the top so the CHECK blocks can be
+	  replaced with BEGIN blocks.  Use caller() to get the correct
+	  package name.  Implement undo and redo via Odot::Stack.
+	  Desensitize the db related menu enties when DBI is not available.
+	  Remove a newly added row if its editing has been canceled.
+
+2004-04-12 16:38  torsten
+
+	* odot: Whitespace and comment fixes.  Use $buffer->get_bounds
+	  instead of ->get_start_iter and ->get_end_iter.
+
+2004-04-12 10:45  torsten
+
+	* odot: Added an Id tag.
+
+2004-04-10 01:06  torsten
+
+	* odot: And a nifty Odot::Accessors class that generates accessors.
+	  Use it all over the place.  Get rid of most direct object data
+	  accesses.
+
+2004-04-09 19:35  torsten
+
+	* odot: Fix recursive sorting.	When saving, only popup an error
+	  dialog if the data wasn't written *and* there was an error.  Ask
+	  before overwriting files.
+
+2004-04-09 17:04  torsten
+
+	* odot: If there is an argument, try to open it -- default to
+	  $HOME/.odot.	Make the renderer creation more generic, supply
+	  types and modes in COLUMNS.  Add an $INSTANCES counter that is
+	  used for multi-session support: In the constructor, increment it
+	  and start the main loop if it was 0.	In the destructor,
+	  decrement it and stop the main loop if it is 0.  Remove the About
+	  stock icon code.  Create a new class Odot::Backend that handles
+	  pretty much everything that deals with the data being displayed
+	  and delegates GUI operations to the appropriate backend.  Create
+	  a new subclass Odot::Backend::XML for the xml-specific code.	Add
+	  innitial database support via Odot::Backend::DB.  Add a /File/New
+	  menu entry that opens a new Odot.  Add ellipsis to /File/Open and
+	  /File/Save As.  Make those menu widgets that are needed later on
+	  available as object data.  Handle the delete-event response on
+	  all dialogs.	Reuse the selection object in popup().
+
+2004-03-18 01:21  torsten
+
+	* NEWS: Version 0.8.
+
+2004-03-18 01:21  torsten
+
+	* Makefile: Make the install rule depend on the all rule so the
+	  manpage is generate if you just use "make install".
+
+2004-03-18 01:20  torsten
+
+	* README: Provide Makefile installation instructions.
+
+2004-03-18 01:10  torsten
+
+	* odot: Comment out the new view column click implementation until
+	  the corresponding gtk+ deficiencies get fixed.  Use "Ok" instead
+	  of "Close" in the generic error dialog.  Put the "Cancel" button
+	  in the save dialog on the right.  Add a return value to file_save
+	  so that file_quit can know if saving was succesful.  Change
+	  file_quit to not automatically save changes.	Make it ask for
+	  confirmation if there are unsaved changes.
+
+2004-03-17 20:32  torsten
+
+	* odot: Add a View menu with one entry "Column Headings".  Store
+	  the menu item widget as object data.	Make the parser and the
+	  load and save routines recognize show_headings.  Change the
+	  version checks to look out for 2.4.0 instead of 2.3.0.  Make the
+	  parser check for the most common tags first.
+
+2004-03-15 13:46  torsten
+
+	* Makefile, odot.pod: Initial import of a Makefile and a POD file
+	  that is used to generate a manpage.
+
+2004-03-15 13:45  torsten
+
+	* README: Small grammatical correction.
+
+2004-03-14 23:54  torsten
+
+	* odot: Remove the global version check again.	Protect the call to
+	  Gtk2::TreeViewColumn::set_expand with version guards.  Implement
+	  a custom clicked handler for the column headings.  Fall back to
+	  using Gtk2::FileSelection instead of Gtk2::FileChooserDialog when
+	  we're not running gtk+ >= 2.3.0.
+
+2004-03-13 18:09  torsten
+
+	* odot: Add a gtk+ version check.  Change the COLUMNS constant to
+	  be a reference to a list of hash references.	Make the task
+	  column take up all the available width.  Set the min. size of all
+	  visible columns to 75px.  Make the headers visible/clickable,
+	  thus introducing sorting.  Save and restore the sorting
+	  preferences (column and order).  Only display the Sort and Sort
+	  Recursively popup menu items if no sorting is active.
+
+2004-03-12 23:49  torsten
+
+	* COPYING, NEWS, README, odot: Initial import
+
+2004-03-12 23:49  torsten
+
+	* COPYING, NEWS, README, odot: Initial revision
+
diff -Nwru archiv/odot-1.0.1/debian/changelog odot-1.0.3/debian/changelog
--- archiv/odot-1.0.1/debian/changelog	2005-04-30 19:22:29.000000000 +0200
+++ odot-1.0.3/debian/changelog	2005-05-06 17:41:39.000000000 +0200
@@ -1,3 +1,18 @@
+odot (1.0.3-1) unstable; urgency=low
+
+  * New upstream release:
+    + Fix save_on_quit to work with completly new files
+    + Fix ugly Gtk-Warning if dragging an item to the top-level
+
+ -- Marc 'HE' Brockschmidt <he@debian.org>  Fri,  6 May 2005 17:40:30 +0200
+
+odot (1.0.2-1) unstable; urgency=low
+
+  * New upstream release, also fixing the crash when using the "Add" button
+    before finishing the last item. (Closes: #307239)
+
+ -- Marc 'HE' Brockschmidt <he@debian.org>  Wed,  4 May 2005 23:21:56 +0200
+
 odot (1.0.1-1) unstable; urgency=low
 
   * New upstream release fixing the weird bug experienced with Gtk+2.6.
diff -Nwru archiv/odot-1.0.1/debian/rules odot-1.0.3/debian/rules
--- archiv/odot-1.0.1/debian/rules	2005-04-30 19:22:29.000000000 +0200
+++ odot-1.0.3/debian/rules	2005-05-06 17:59:26.000000000 +0200
@@ -31,9 +31,9 @@
 binary-indep: build install
 	dh_testdir
 	dh_testroot
-	dh_installdocs
+	dh_installdocs NEWS
 	dh_installmenu
-	dh_installchangelogs
+	dh_installchangelogs ChangeLog
 	dh_compress
 	dh_fixperms
 	dh_installdeb
diff -Nwru archiv/odot-1.0.1/NEWS odot-1.0.3/NEWS
--- archiv/odot-1.0.1/NEWS	2005-04-30 19:22:29.000000000 +0200
+++ odot-1.0.3/NEWS	2005-05-06 16:23:22.000000000 +0200
@@ -1,3 +1,18 @@
+		       Overview of changes in odot 1.0.3
+		      -----------------------------------
+
+* Fix the crash that occured when you tried to save-on-quit a new file.
+* Avoid an assertion that appeared when dragging a node to the toplevel.
+  [Marc Brockschmidt]
+
+		       Overview of changes in odot 1.0.2
+		      -----------------------------------
+
+* Fix the highlighting bug that occurred when dragging a due node and dropping
+  it into a collapsed one.
+* Fix the crash that happened when trying to add a new node while another was
+  being edited.
+
 		       Overview of changes in odot 1.0.1
 		      -----------------------------------
 
diff -Nwru archiv/odot-1.0.1/odot odot-1.0.3/odot
--- archiv/odot-1.0.1/odot	2005-04-30 19:22:29.000000000 +0200
+++ odot-1.0.3/odot	2005-05-06 16:23:22.000000000 +0200
@@ -3,7 +3,7 @@
 ###############################################################################
 #                                                                             #
 # Odot - A task list manager                                                  #
-# Copyright (C) 2003-2004 Torsten Schoenfeld                                  #
+# Copyright (C) 2003-2005 Torsten Schoenfeld                                  #
 #                                                                             #
 # 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 the Free  #
@@ -21,7 +21,7 @@
 #                                                                             #
 ###############################################################################
 
-# $Id: odot,v 1.34 2005/02/20 19:27:16 torsten Exp $
+# $Id: odot,v 1.39 2005/05/06 14:12:57 torsten Exp $
 
 package main;
 
@@ -460,6 +460,41 @@
     $self -> unhighlight_row($iterator);
   });
 
+  # When a drag is initiated, install a one-shot row-inserted handler that
+  # highlights the new parent if necessary.
+  $view -> signal_connect(drag_begin => sub {
+    my ($view) = @_;
+    my $model = $self -> get_model();
+
+    $self -> { _drag_insertion_id } =
+      $model -> signal_connect(row_inserted => sub {
+        my ($view, $path) = @_;
+
+        # $path is the dropped node.  Move it up to the parent and install an
+        # idle handler that highlights it if necessary.
+        if ($path -> up() && $path -> get_depth() > 0) {
+          # We need to use a row reference here because the model might still
+          # change before the idle callback will be invoked.  We need an idle
+          # callback because the model hasn't been fully updated at this point.
+          # We need to copy the path because it would be invalid in the idle
+          # callback if we didn't.
+          my $reference =
+            Gtk2::TreeRowReference -> new($model, $path -> copy());
+
+          Glib::Idle -> add(sub {
+            if ($reference -> valid()) {
+              $self -> highlight_row($reference -> get_path());
+            }
+
+            return FALSE;
+          });
+        }
+
+        $model -> signal_handler_disconnect($self -> { _drag_insertion_id });
+        delete($self -> { _drag_insertion_id });
+      });
+  });
+
   $view -> signal_connect(key_press_event => sub {
     my ($view, $event) = @_;
 
@@ -836,6 +871,7 @@
 sub highlight_row {
   my ($self, $parent_path) = @_;
 
+  my $view = $self -> get_view();
   my $model = $self -> get_model();
   my @due_descendants = ();
 
@@ -856,13 +892,17 @@
   # For every due child, walk up its ancestry and highlight every ancestor
   # which is either a descendant of the collapsed row or that row itself.
   foreach my $iterator (@due_descendants) {
-    while (defined($iterator = $model -> iter_parent($iterator)) and
-           $parent_path -> is_ancestor($model -> get_path($iterator)) ||
+    while (defined($iterator = $model -> iter_parent($iterator))) {
+      my $path = $model -> get_path($iterator);
+
+      if (!$view -> row_expanded($path) and
+          $parent_path -> is_ancestor($path) ||
            0 == $parent_path -> compare($model -> get_path($iterator))) {
       $model -> set($iterator, COLUMN_UNDERLINE, "single");
     }
   }
 }
+}
 
 sub unhighlight_row {
   my ($self, $iterator) = @_;
@@ -1693,7 +1733,7 @@
                   Odot::COLUMN_TASK, $title || "",
                   Odot::COLUMN_DUE_DATE, $due_date || "");
 
-    $self -> check_due_date($iterator);
+    $self -> check_due_date($iterator, $due_date);
 
     # If the current item is due, walk up its ancestry and highlight every
     # collapsed parent.
@@ -1952,13 +1992,14 @@
 }
 
 sub check_due_date {
-  my ($self, $iterator) = @_;
+  my ($self, $iterator, $due_date) = @_;
   my $model = $self -> get_model();
 
   my $weight = "normal";
   my $style = "normal";
 
-  my $due_date = $model -> get($iterator, Odot::COLUMN_DUE_DATE);
+  $due_date = $model -> get($iterator, Odot::COLUMN_DUE_DATE)
+    unless (defined($due_date));
 
   if (defined($due_date) && $due_date ne "") {
     my $difference = $self -> get_difference($due_date);
@@ -2003,6 +2044,14 @@
   my ($model, $parent_iterator) = $view -> get_selection() -> get_selected();
   $model = $self -> get_model() unless (defined($model));
 
+  if (defined($parent_iterator) && $self -> get_stack() -> get_recording()) {
+    my $column = $view -> get_column(Odot::COLUMN_TASK);
+    my $renderer = $column -> get_cell_renderers();
+    my $editable = $renderer -> get("editable-widget");
+
+    $editable -> editing_done() if (defined($editable));
+  }
+
   my $iterator = $model -> append($parent_iterator);
   $model -> set($iterator, Odot::COLUMN_TASK, "",
                            Odot::COLUMN_DUE_DATE, "");
@@ -2360,10 +2409,16 @@
 
 sub save {
   my ($self) = @_;
+  my $implementation = $self -> get_implementation();
 
-  if ($self -> get_implementation() -> save()) {
+  if (defined($implementation)) {
+    if ($implementation -> save()) {
     $self -> set_changed(FALSE);
-
+      return TRUE;
+    }
+  }
+  else {
+    $self -> save_as();
     return TRUE;
   }
 
@@ -2437,8 +2492,9 @@
 
   unless ($old eq $new) {
     $model -> set($iterator, $column => $new);
+
     if ($column == Odot::COLUMN_DUE_DATE) {
-      $self -> check_due_date($iterator);
+      $self -> check_due_date($iterator, $new);
     }
 
     if ($stack -> get_recording()) {

Attachment: pgptbY8wnz7ix.pgp
Description: PGP signature


Reply to: