The following to-do things can be implemented in C, C++ or
Prolog. Except, of course, those that involve modifying existing code.

If you want to do it in another language, ok, but it is up to you to
integrate that with the current program :-)


INDEX
-----

- Things to do before the first release
- Bugs
- things whose introduction must be evaluated
- things that can be done after the first release
- Main things that have been done (kept as a log).


THINGS TO DO BEFORE THE FIRST RELEASE (0.1)
-------------------------------------------

* I need a library to read/write metadata from reiser4, ext3 and other
  filesystems supporting it. I believe also KDE has a metadata system;
  this could be used too.

* I need a c/c++ library that does device detection. It should parse
  /proc/ or /udev/ , or /dev/ or whatever. I don't know really. Maybe
  you could use HAL from freedesktop.org.

  Currently, we have fake devices. :-) 

  Devices that should be detected are: digital cameras, scanners,
  printers, disks, partitions, mice, keyboards, monitors...
  
  DETAILED SPEC:

  As you see in the screenshots, The device panel shows some
  devices. Ideally, these should be the devices you installed on your
  computer. But just the "useful" ones. The actions offered by
  segusoLand are very high-level, so we don't need devices such as,
  say, the VIA controller on the motherboard. :-)

  We absolutely need: keyboards, mice, digital cameras, scanners,
  monitors, joysticks, hard-disks, hard-disk-partitions, floppy-disks,
  cd-readers, cd-writer, dvd-reader, dvd-writer, printers,
  sound-cards, USB memory sticks. And you are free to add what
  you consider to be important. Let's call the above categories
  ATOMIC-TYPES.

  Now, since a single device can be BOTH a cd-reader and a cd-writer, we
  introduce the notion of DEVICE-TYPE. A device-type is a _list_ of
  atomic types. For example, my cd device has the following type:

    [cd-writer, cd-reader, dvd-reader]

  For these devices we need to know a "mnemonic-name", as short as
  possible, such as "HP LaserJect 6L", or "ADI Microscan 5AP".

  Your library should enumerate those devices and return a simple list
  of pairs (DEVICE-TYPE, DEVICE-NAME), where DEVICE-TYPE is itself a
  pair, as I said above.

  For example, your library should have a function

     std::list<TypeAndNamePair>  AvailableDevices();

  which returns a list of pairs like the following:

  [
   ([monitor], "ADI microscan"), 
   ([sound-card], "Soundblaster PRO"), 
   ([cd-reader, cd-writer, dvd-reader], "Plextor a232" )

  ]

  PS: ALso USB devices should be detected.

  PPS: the library could also return the HAL id for the device (in
  addition to the name and the types).

* possible bug: before selecting the concept via recentConcept, see if
  the concept still exists.

* optimize importDirectory: it enumerates dirs twice.

* button "select all visible files".

* optionally see all concepts when no letter is selected. This may be
  too slow... until we do another list widget.

* Predispose code for internationalization. If possible...

* add verbs for developing software, as Henrik suggested.

* the most used concepts must appear with a different color in the
  concept index.

* Henrik asks:

   > Could there be a check-button when you add a new folder, that could make
   > the add recursive. So that all your sub-directories would be added
   > automaticaly.
  
   > Eg. I have 50 directories in my Documents directory, and I would hate to
   > add them all by hand.

   Ok. Note: there could be a problem with metadata... typically the
   files in dir A and the files in dir B need different
   metadata. OTOH, you may want to import them all together and add
   the metadata later. So I guess the recursive import must be
   available.

* add verb for extracting archive with automatic folder creation

* add support for mov files. (icon)

* add koffice, gxine

* add verb create dvi, which requires a tex file and calls latex.

* add programs: kaffeine, amarok, noatun, kmplayer, juk.

* more verbs should be working...

* add tooltips to all verbs.

* very easy: when the Execute button is pressed, we should display "program
  not installed" if you can't find the executable. we need to write
  algos that detect whether the program is installed (parsing /bin ? )

  Currently segusoLand is silent and gives no error.

* when you delete a folder, remove any view which contains that folder
  from the recent views... :-(

* add a toolbar button "save db now". Useful for crashes.

* allow creation of custom times.

* save and restore custom times in the db.

* add kdirstat (calculate size of a directory and its subdirectories)

* save and restore recent views at stratup/shutdown

BUGS
----

* refresh adding a new file. click a letter. Crash.

* the concepts don't become black when deselected.

* create a folder named 

     test dir ) ds - aa [ 1. ] asa ( 0

  import the directory, and add a metadata. View only the files with
  this metadata: you'll see that the files have not been associated
  with the metadata.

* all commands fail if the filename contains an accent? verify.

* can't rename adding a ' char to the name. Rename with glibc? glibc
  doesn't do that across filesystem...

* when you change view sometimes you don't see anything until you
  scroll to the top... does someone know how to fix that? Try
  set_value(get_lower()).

* BUG: segusoLand does not detect two dirs are the same if one is a
  link.

* I extracted an archive with file roller, imported the new dir, then
  tried to delete the compressed archive: segusoLand seems to fail
  without any message.

* BUG: select "to dispatch" view, then select a file, dispatch it,
  then deselect it WITH THE DESELECT ALL BUTTON. The file is not
  hidden.

* BUG: the verb "Mail to... " only sends the first attachment... the
  reason is that the correct syntax would be --attach file1.pdf
  --attach file2.pdf, but currently I do --attach file.pdf file2.pdf ,
  which is wrong.


THINGS WHOSE INTRODUCTION MUST BE EVALUATED
-------------------------------------------

* automatic synchronization of files... freedesktop.org. 

  difficult for remote directories (e.g. ftp)...

* when refreshing files, show the new files in some way? A dialog? An
  entry in the status bar telling "5 new files added and 6 removed".

* TESTED, TOO MESSY: the red arrow should not disappear if you can add
  more files. Maybe it should become smaller or another color.

* concepts narrowing. :-)

* add special virtual folders that make sense only on some Kinds. They
  are grouped at the beginning, together with All X and X to
  dispatch. For verbs, We can have "all verbs beginning with A", "all
  verbs beginning with B", ...

* Consider adding a directories panel, and the verbs:

  - import new directory()   <<this is a zeroary verb

  - move files to dir! (replaces move to...)

  - unwatch this directory(Dirs)

  - Map this directory to one or more folders(Dir, Folders).

  - View files in this dir? No. It discourages from using folders and
    makes you ask why two similar methods of grouping files.
 
  - copy files to dir?

* add support for cvs (update, commit...). How exactly?

* when nothing is selected, group verbs by letter?

* The recent view could optionally be displayed as a panel. Not by
  default because it has a different semantics from other panels
  (doesn't do narrowing, single selection, etc).

* investigate what freedesktop MIME can do for segusoLand. For sure,
  it can tell segusoLand whether a file is a text file. But what else?

  NOTE: It is not enough for segusoLand to know what file types can
  be edited by a program: segusoLand needs to know the command line of
  programs... for example

      k3b --audio file.mp3 
  
      kmail --attach file.pdf --attach file.zip

  and it needs a readable description of the action. e.g. Burn audio
  CD. However, MIME could be useful for the Edit verb...

* create virtual folder "picture"? No. if we delete it, we can't bring
  it back.

* check out what the .desktop files are and whether they can be useful.


* when the go button is pressed, the red arrow or the mouse pointer
  should transform to a wait icon. But for how long?

* as an advanced option, show go buttons near all selected objects,
  with tooltips. (but maybe the right button is enough?)


* consider a Monitors panel which doesn't do narrowing. Or allow the
  monitors in the device panel not to do narrowing. This is to allow
  you to leave the monitor selected.




THINGS THAT CAN BE DONE AFTER THE FIRST RELEASE
-----------------------------------------------

* all items that have just appeared should flash for a while. Or a
  pointing finger icon should appear beside them for a while.

  Why? For example, if you add a new idea, currently it just
  appears. It is not apparent.

  This is better done at the C/GTK level?


* add a users panel: root, myself, jack... in a dropdownlist like the
  time panel. 

* add splash screens and progress bars... but how? the splash screens
  don't appear until I call sleepUntilEventIsRaised... which is not
  called during the computation...


* add a status bar (maybe on top, not below, and auto-hiding after 5
  seconds, like in Opera). Its purpose is to give instant feedback
  when the go button was pressed. Useful because programs take time
  starting up. Useless if the log is on. So maybe we should hide the
  status bar if the log is on.

* OPTIMIZATION: speed up verbs by not reloading the icon from
  disk. This would speed up each selection/deselection.

* OPTIMIZATION: speed up view change by not loading icons from
  disk. This would speed up view changing, not selection/deselection.

* add a bookmark panel

* add a contacts panel

* the height of the scroll button should depend on the resolution.

* the size of the go buttons should depend on the resolution.


* we COULD add an entry named "text", and narrow to only those verbs
  that require a text: rename folder, rename file, BROWSE WEB SITE,
  SEARCH GOOGLE FOR THIS TEXT...

  We could also automatically synchronize this text with the selected
  text in mozilla etc.


* beside the folders/concepts, add the number of items in the folder. Thanks to
  Wout Mertens for the suggestion.


* add default programs, selected automatically by the AI. But the
  selection does not trigger narrowing (this would e confusing), hence
  it's called "weak selection".  Where does the weakly selected item
  appear? Above or below? Or in the middle, with a different color?

* the defaults should be learned automatically by the program. How?
  Always the last choice? or the most used choice? Add a toolbar
  button to switch the policy.

* add a way for the user to create custom toolbars or panels, in order
  to have the most used verbs always visible on screen. 

* Wout Mertens asks:

  Could you (optionally?) Make the scroll buttons on the panels be
  there all the time? All the jumping around when you reach top/bottom
  is confusing.

  And I think I would like a scrollbar as well, because that gives you
  an idea of the size of the list.

* add a workspaces panel.

* sort verbs by usage.

* I need some gtk expert that rewrites the CheckListBox widget in
  segusoLand.cc, in any language, in order to speed up selection and
  deselection and HIDING of items, yet allowing grouping of selected
  items on top.

  When an item is selected, it should disappear from the lower list
  and appear on the upper list. Currently it appears on the upper list
  but does NOT disappear from the lower list. We are repeating the
  same item twice. Why? Because hiding is a slow operation: when you
  hide an item from a box, on_size_allocate messages are sent to all
  SUBSEQUENT items, which is too slow. So, hiding and showing items
  currently takes O(N), where N is the number of items in the VBox
  such that is_visible()==true.

  In order to speed up, we could exploit the fact that the
  CheckListBox can contain many files, even thousands, but there are
  only a few ACTUALLY VISIBLE files at once (I mean, the ones the user
  can actually see, the ones that are currently in the visible portion
  of the viewport). We would like to develop a CheckListBox widget
  whose selection time is O(K), where K is the number of actualy
  visible items (typically K<20). The idea is that the actual bottom
  GtkBox contains only the _visible_ unselected items, and the top one
  only the selected items.

  In order to speed up, the interface of the new CheckListBox might
  include methods such as "Lock" and "Unlock". This way you can 1)
  lock 2) add many items without the CheckListBox to redraw itself
  each time 3) unlock, and the changes are displayed all at once.

  Also, the new CheckListBox should be able to contain any widget
  (maybe derived from some base class CheckListBox::Item?).

  The new CheckListBox should continue to group selected items on top,
  and keep them always visible.

  The CheckListBox should be able to contain special items, called
  "Separator", that cannot be selected.

  The selectable items (those derived from CheckListBox::Item) should
  have the following possible states: hidden, deselected, strongly-
  selected, weakly-selected. Alternatively, we could merge
  strongly-selected and weakly-selected into one, but then it should
  be possible to set the colour of the selected items.

  The items in the checklistbox should be sortable according to a
  user-defined logic. Maybe the ::Item class should have a pure
  virtual method "comparer".

  Also, the new Checklistbox should not have a scrollbar widget,
  (because with so many items the grabbing area becomes too small and
  sensitive), but it should have buttons for moving one line at a time
  and one screen at a time.  These buttons should be _big_.

* add a semantic search entry. If you enter "isten", it finds "Play
  audio". On the toolbar. Using that, you can avoid to use the
  concepts panel. It is a combo box.

* for advanced users, right click executes action. You can right click
  both on a verb which has the go button and it's like pressing the go
  button. BUT you can also right click on an object: if there is only
  one visible verb with the go button, the action will be executed.

* Attempt to solve the problem that the lists are too long: WHEN NO
  OBJECT IS SELECTED, we could display the verb folders in the verb
  panel... the program folders in the program panel...  then, as soon
  as you select an object/verb, the lists become flat.

  The problem is that I had alread solved the problem with
  folders(=metadata) and views... But this is the same solution, only
  that makes views easier to select.

  I'm also afraid this could be less immediate for newbies. If instead
  of verbs you see metadata, it is not obvious that the panel
  ultimately contains verbs.

* add verb to mount an iso file (open iso file). This should show the
  contents of the ISO in the files view?

* Add an undo button. Difficult.

* treat pdf.gz like a pdf, and so on.

* if the user changes the view and the chosen view is empty, warn the
  user that he hasn't filed anything to appear in this view, and
  return to the previous view. Otherwise newbies could be disoriented.

* if you press a letter, move to the first _file_ with that
  letter. (You never want to do the same thing on verbs, devices, or
  programs)

* hook into the directories you watch, to be aware of files deleted or
  created.

* At startup, when parsing the database, if the database contains info
  about a file which is no more on the disk, display the message "you
  have moved, deleted or renamed the file XXX with an external
  program. All database information about this file has been lost. If
  you ahve deleted it, no problem. If you have moved it or renamed it,
  you need to file it again (with the "edit info" button)"

  But what is the file was on a cdrom that was unmounted? Shouldn't we
  keep the info?

* if I insert a cdrom, should its files be automatically inserted in
  the pool? IMO, this should be done only if segusoDir('/mnt/cdrom/'),
  which is the default.

* allow sorting verbs and programs by usage rate and name. Verbs also
  by relevance.

* add actions for scan picture, transfer picture from digital camera,
  add icon for my laptop, my modem...

* When creating the extension tables, that is, tables like png(X), do
  not create it if the extension ends in ~.

* remove the types that are not made of letters and numbers

* remove duplicates from the recent view list.

* remove current view from the recent view list.

* add a wizard "What do you want to do?" which asks you if 1) you know
  what you want to do, or 2) you just want to browse. 1.1) you must do
  something with a device (e.g. printer) 1.2) you know what program
  you want to use 1.3) you already know what file (or files) you want
  to use and where it is.

* when you import a directory, see if there is a database file within?

* import/export database.

* should the database be saved in each directory separately? And for
  each user?

* difficult: each CheckListBox displaying metadata should have 3
  styles, switchable with radio buttons: 1 normal style:
  maurizio(author), very good, etc. 2) hierarchical level style:
  author, type, quality, etc. and a second listbox would show the
  authors, or the types, or the qualities. 3) alphabetical: a first
  listbox would show the letters, a second the files/metadata with
  that letter.

  THis switchmust be done at the C level, not at the prolog
  level. Prolog doesn't know the style used.

* add the possibility to specify the screen for each action. If one
  has only one screen, simply leaves it always selected, so we don't
  add a click per action? Unfortunately no, because at this point it
  is needed to deselect the screen in order to,say, print a
  pdf. Change this.

* difficult: device independency! If i burn a file and move it to a
   CD, I can still select it and compose actions with it. When I
   execute the action, the system will ask me to insert the cd.

THINGS I WILL NOT DO MYSELF BUT WOULD BE WELCOME
------------------------------------------------

* write an autoconf file. Currently you must edit the Makefile in
  order to compile :-)

* rewriting the whole program using C++ or C# (mono), getting rid of
  prolog. Prolog is such a nice language, I'd say perfect... And I
  believe no big speed improvement would result from rewriting the
  program in C/C++, since I believe the bottleneck to be in GTK
  (hiding and resizing list items is VERY slow). But people are not
  willing to read prolog... :-)

  If you decide to rewrite segusoLand in C++: personally I (Maurizio)
  will not contribute to it if either

  1) the C++ code uses 

    - pointers (unless absolutely necessary);
 
    -  destructors

    - copy constructors. 

  How to avoid them? You could use shared_ptr or similar smart
  pointers. With shared_ptr, C++ becomes like Java and C# (if a bit
  uglier).

  In segusoLand.cc you can see I avoid plain pointers and destructors
  wherever possible (except where GTKmm forces me to).

  2) The C++ version turns out not to be significantly faster.

* rewriting the GUI using QT or GTK# instead of GTK is welcome.

* integrating the program into konqueror/nautilus would be fine, but
  this means a thorough planning.

THINGS THAT HAVE BEEN DONE (kept as a log)
------------------------------------------

* If we are viewing all the files, it is difficult to find the
  selected items. Sometimes you get lost. 

  solution: keep the selected items always visible, and grouped
  otgether, in another panel, above the current file panel.  This also
  removes the need to use togglebuttons! The items in the panel above
  are all selected, the items below are all deselected. We can just
  use boxes and set a common background color! This must be done
  transparently: the CheckListBox class in c++ must create two gtk2
  listboxes, not one.

  discarded solutions: 1: We could supply an alternative toggle
  button: "locate and group selected items". This would simply resort,
  grouping all selected files on top of the list, and moving the
  scrollbar to the top. Difficult because now the sort procedure
  doesn't know which files are selected. 2) supply a "deselect all"
  button. Good, and easy. But does not really solve the problem.

* group verbs by relevance. 

*  Restyle dispatch dialog:

   radio button: 1) assign these metadata to the selected items 2)
   assign metadata to...

   radio button 1) remove these metadata from the selected items 2)
   remove these metadata from...

   we could also show the current metadata in a different window!
   Maybe it is too messy?


* BUG: This is due to setGoButton being called only for some
  verbs. Select a category which contains only hidden files. The list
  is empty, and setGoButton is not called. THen select "show hidden
  files" button. You see go buttons on all verbs.

* allow to mark all the files in a directory (possibly with recursion)
  with a given metadata. THis is only possible if the dir is watched.


* SERIOUS BUG: prolog crash after some hours : reallocation
  failed. Ask Jan Wielemaker, the author of swi-prolog.

* since times aren't involved in narrowing, we COULD put them in a
  dropdown list... but this would make less evident that they can be
  changed... I don't know. 

  Better adding a button to transform nonnarrowing panels to dropdown
  lists.

* sort the recent view list by last access.

* add a button to toggle between strong narrowing and weak narrowing.

* when you select a recent item, it should go on top.


* add virtual folders. Useful because, if you understand that a folder
  A is a subset of another one B, you can avoid to file something into
  B. You just add a rule A IMPLIES B. For example, suppose you have 3
  folders: book, article, document. You understand that book IMPLIES
  document, and that article IMPLIES document. So you decide that
  document is a vritual folder, you add the rules article=>document,
  book=>document, and you don't need to add files to document
  explicitely, still you can ask segusoLand for "the list of all
  documents".

* when nothing is selected, group the complete verbs on top!

* add check button to AND/OR the selected folders in change view
  dialog. Currently it is AND.

* Henrik: 
   > Im also tired of removing the time-panel all
   > the time.

   we must remember this setting.

* I am now going to do this massive change:

  Remove folder panels and the folder-related verbs. 

  put global folder panel, with both segusoLand-defined and
  user-defined concepts:

  segusoLand, 
  cd,
  burning,
  write,
  play,
  listen to,
  music,	
  text,
  spreadsheet,
  configuration,
  setup,
  options,
  email,
  internet,
  mouse,
  speed,
  sensitivity,
  printing,
  browsing,
  internet,
  create,
  empty,
  document,
  file,
  move,
  copy,
  delete,
  remove,	
  clear,
  cancel,
  download,
  format,
  hard disk,
  change,
  shutdown, 
  turn off,
  view,
  edit,
  editor,
  floppy,
  memory,


  The semantics of this panel is as follows:
 
  - this panel narrows everything: verbs, files, etc.

  - this panel is multiselection: if you are at work, you select AT
    WORK and leave it selected. You can still select other things.

  - as soon as you click a folder on this panel, files/verbs/etc are
     IMMEDIATELY narrowed, without having to use a verb "View all"

  - [DISCARDED because I decided to put the letter list:] as soon as
    you select a folder on this panel, the panel itself is
    automatically narrowed, showing only folders intersecting the
    selected one(s). THis implied that the semantics of the new folder
    panel is AND, not OR.


          ------------

  This change also solves the following problems:

  1) The first problem solved is:

         what if the user thinks in terms of "setup" instead of
         "configuration"?  Or of "options"?

  We solve the problem by putting all concepts, with all possible
  names, in the global folder panel. The folder panel will be very
  long BUT THIS IS NOT IMPORTANT because it is not meant to be scanned
  linearly. We could also enforce that by forcing to choose the first
  letter of each word first.

  2) the second problem solved is that narrowing is useful, but
     selecting the FIRST item is too difficult because all panels are
     long. THE PROBLEM OF INITIAL COMPLEXITY IS SOLVED!!!!




  ...
  
  this list must contain ANY concept the user might reasonably think
  of, with ANY possible name: setup, configuration, options... 

  The length of the list is not important since it is ordered
  alphabetically.


