Differences between revisions 10 and 11
Revision 10 as of 2008-08-12 20:11:06
Size: 7142
Comment: Added minimal changes to be done in some widgets
Revision 11 as of 2008-08-13 16:33:07
Size: 7438
Comment: Add another issue in history widget.
Deletions are marked like this. Additions are marked like this.
Line 163: Line 163:
 * It allows the status bar received is None. Hence, it is optional.
 * I
t tries to access the methods begin() and end() of the status bar, but if the status bar is None it will fail.
 1. It allows the status bar received is None. Hence, it is optional.  However, it tries to access the methods begin() and end() of the status bar, but if the status bar is None it will fail.
 1. It fails if the repo given is None. It is needed if there is an application that browse directories through the system. No every directory has a repo.
Line 168: Line 168:
A simple workaround is to validate if status bar is not None before using any method.

The final solution is not using any status bar in the History view and emit signal any time some action happens ('begin' and 'end').
 1. A simple workaround is to validate if status bar is not None before using any method.
   * The final solution is not using any status bar in the History view and emit signal any time some action happens ('begin' and 'end').
 1. Make the repo calls conditional and add a method to set a new repo later. If repo is None, the view should be cleaned.

File Manager Integration for Linux (TortoiseHG)

Summary

Last milestone: Packages for Ubuntu/Debian.

Current development: Polishing the UI and exploring the use of libglade.

Current implementation

Source code

Ubuntu packages

There are packages available for Ubuntu at [https://launchpad.net/~gpoo/+archive Personal Package Archive]:

  • nautilus. A fixed version with support for submenus working fine in extensions.

  • mercurial-tortoisehg. A version to use hgtk from the shell.

  • nautilus-mercurial-tortoisehg. A plugin for working

It is possible to use those packages to build them for Debian or any other Debian based distribution.

These packages have some caveats:

  • hgtk about doesn't work, because it has problems to load the COPYING.txt file. As a document file, it is stored compressed, in a different directory whic

  • Icons are not shown in Nautilus' menus.

Observations

Packages and distributions:

  • The paths used to load icons and files should not be hardcoded, because packages must be relocalatables. The same is applied for distutils (setup.py).
  • The hard part is the use of the environment variables TORTOISEHG_PATH and THG_ICON_PATH. Probably having a single file (init.py) could be helpful.

Nautilus menus:

  • There is no order to load the menu items.
    • It doesn't matter the order the menuitems are created.
    • I thought it was sorted according the name of each menuitem, but using names such as 10foo, 20bar, ... neither seems to work.

Milestones

  1. Improve the integration between Nautilus and TortoiseHG
    1. Make the plugin stable (./)

    2. Enable the plugin works not only in debug mode (./)

    3. Fix/Enable support for submenus (./)

    4. Enable other options still hidden for Nautilus
  2. Provide a consistent GUI to follow a project using Mercurial
    1. Get possible reusable widgets out each dialog
    2. Propose an integrate UI with the refactores widgets
    3. Improve the UI
  3. Other improvements
    1. Provide packages for a Debian based distribution (./)

User Interface Improvements

From a technical point of view, it seems it is not clearity when a GtkDialog and/or a GtkWindow is used in TortoiseHG. Some of them are GtkDialog and some of them GtkWindow without any clear distinction.

The following diagram shows the relation between dialogs/windows. There are two windows that can be invoked from the shell (hgtk) or from another window (history). Please note that history is also invoked from the shell (hgtk log) but for simplicity doesn't appear linked in the diagram.

Because both update and datamine can be invoked directly or indirectly from hgtk is needed to know how to close the dialog (hide it or destroy it) according the circunstances.

Cloning repositories

The following screenshot show the current user interface of hgtk clone:

  • attachment:current-hgtk-clone.png

The usability may be improved just agruping common items and using proper buttons instead of a toolbar. The button 'X' in the upper right corner is reduntant, because the window managar provides such button and in a dialog a button 'Cancel' or 'Close' could give better feedback.

  • attachment:new-hgtk-clone.png

Merging repositories

The same criteria as Cloning repositories may be applied in this dialog. The current one is:

  • attachment:current-hgtk-merge.png

and the proposal:

  • attachment:new-hgtk-merge.png

It worth noting that the former window has two different behaviors: merge and undo a merge. The button in the toolbar is activated/deactivated according to that. The same happen with the label "Merge with revision".

It could be confusing having two dialogs in one. One possible change could be:

  • attachment:new-hgtk-merge-unmerge.png

Updating repositories

  • attachment:current-hgtk-update.png attachment:new-hgtk-update.png

Selecting a changeset

The actions merge and update allows to select the changeset to be used, which may be choosen by the user filling the entry field or browsing the logs. The logging browsing is a common window:

  • attachment:current-hgtk-log.png

The data is the same shown as hgtk log, but shorter. It would be nicer to share the same widget to choose the current.

Widgets

Notes about internal changes that need to be improved to reuse some widgets.

History

This widget, implemented under hggtk/vis/treeview.py, can receive as parameter another widget: a status bar.

The status bar is not a standar Gtk.StatusBar, it is a custom one. The status bar is not directly related to an history viewer. It is used to give feedback about a working in progress.

Issues:

  1. It allows the status bar received is None. Hence, it is optional. However, it tries to access the methods begin() and end() of the status bar, but if the status bar is None it will fail.
  2. It fails if the repo given is None. It is needed if there is an application that browse directories through the system. No every directory has a repo.

Solution:

  1. A simple workaround is to validate if status bar is not None before using any method.
    • The final solution is not using any status bar in the History view and emit signal any time some action happens ('begin' and 'end').
  2. Make the repo calls conditional and add a method to set a new repo later. If repo is None, the view should be cleaned.

LinuxFileManagerIntegrationStatus (last edited 2012-11-11 13:05:58 by abuehl)