Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Missing actions on working directory manifest widget
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Angel Ezquerra  
View profile  
 More options Jul 30 2012, 3:15 am
From: Angel Ezquerra <angel.ezque...@gmail.com>
Date: Mon, 30 Jul 2012 09:15:44 +0200
Local: Mon, Jul 30 2012 3:15 am
Subject: Missing actions on working directory manifest widget
Hi,

one of my users just pointed me to the fact that some file actions are
missing on the manifest widget, particularly when showing the working
directory pseudo-revision. For example, the "copy" and "rename"
commands are not accessible through the manifest dialog.

So I'm wondering if it would make sense to make the manifest widget
use the wctxactions rather than the filectxactions when the manifest
window points to the working directory. Alternatively, we could just
add some of the missing actions to filectxactions, although we'd need
a way to only show some of them when the working directory is being
shown.

Angel


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yuya Nishihara  
View profile  
 More options Aug 1 2012, 12:24 pm
From: Yuya Nishihara <y...@tcha.org>
Date: Thu, 2 Aug 2012 01:24:27 +0900
Local: Wed, Aug 1 2012 12:24 pm
Subject: Re: [thg-dev] Missing actions on working directory manifest widget

On Mon, 30 Jul 2012 09:15:44 +0200, Angel Ezquerra wrote:
> one of my users just pointed me to the fact that some file actions are
> missing on the manifest widget, particularly when showing the working
> directory pseudo-revision. For example, the "copy" and "rename"
> commands are not accessible through the manifest dialog.

> So I'm wondering if it would make sense to make the manifest widget
> use the wctxactions rather than the filectxactions when the manifest
> window points to the working directory. Alternatively, we could just
> add some of the missing actions to filectxactions, although we'd need
> a way to only show some of them when the working directory is being
> shown.

IMHO, manifest widget is not good for modification of working directory.
Since it was implemented to handle read-only static data, it lacks
support for _live_ data.
If you start using manifest as a replacement for commit widget, you'll
soon notice inconsistency between manifest and actual file.

Regards,


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Angel Ezquerra  
View profile  
 More options Aug 5 2012, 6:04 pm
From: Angel Ezquerra <angel.ezque...@gmail.com>
Date: Mon, 6 Aug 2012 00:04:42 +0200
Local: Sun, Aug 5 2012 6:04 pm
Subject: Re: [thg-dev] Missing actions on working directory manifest widget

That is true. However I'd like the workbench to be able to do
everything that you can do with the Windows Explorer (or Nautilus,
etc) context menus. Currently you can call rename for clean files if
you enable them on the commit widget, but that is quite cumbersome. If
you could do that from the manifest widget itself it would be much
cleaner and easier to discover.

Angel


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yuya Nishihara  
View profile  
 More options Aug 7 2012, 9:49 am
From: Yuya Nishihara <y...@tcha.org>
Date: Tue, 7 Aug 2012 22:49:20 +0900
Local: Tues, Aug 7 2012 9:49 am
Subject: Re: [thg-dev] Missing actions on working directory manifest widget

But even if manifest can rename files,

 - use manifest widget to rename known files
 - use commit widget to handle unknown files

which is a bit confusing.

Instead, isn't it nice if we can easily rename files from commit widget,
i.e. making it easily discoverable to show clean files ?

Regards,


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Angel Ezquerra  
View profile  
 More options Aug 7 2012, 10:17 am
From: Angel Ezquerra <angel.ezque...@gmail.com>
Date: Tue, 7 Aug 2012 16:17:58 +0200
Local: Tues, Aug 7 2012 10:17 am
Subject: Re: [thg-dev] Missing actions on working directory manifest widget

I think that is a very good point. However my main concern however is
how to handle "clean" files. Those are not normally shown on the
commit widget, while they are shown on the manifest widget...

Angel


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yuya Nishihara  
View profile  
 More options Aug 11 2012, 6:04 am
From: Yuya Nishihara <y...@tcha.org>
Date: Sat, 11 Aug 2012 19:04:22 +0900
Local: Sat, Aug 11 2012 6:04 am
Subject: Re: [thg-dev] Missing actions on working directory manifest widget

How about this?
It displays "Show unmodified files" link so that you can easily know
there's a way to show clean files by a single action.

If it sounds good, I'll rewrite this clumsy implementation.

diff --git a/tortoisehg/hgqt/status.py b/tortoisehg/hgqt/status.py
--- a/tortoisehg/hgqt/status.py
+++ b/tortoisehg/hgqt/status.py
@@ -241,7 +241,7 @@ class StatusWidget(QWidget):
         if model and model.rowCount(QModelIndex()):
             smodel = self.tv.selectionModel()
             curidx = smodel.currentIndex()
-            if curidx.isValid():
+            if curidx.isValid() and curidx.row() != model.rowCount() - 1:
                 curpath = model.getRow(curidx)[COL_PATH]
             else:
                 curpath = None
@@ -401,6 +401,10 @@ class StatusWidget(QWidget):
     #@pyqtSlot(QModelIndex, QModelIndex)
     def onCurrentChange(self, index, old):
         'Connected to treeview "currentChanged" signal'
+        if index.row() == self.tv.model().rowCount() - 1:
+            # assume that "show unmodified" link clicked
+            self.statusfilter.setStatus(self.statusfilter.status() + 'C')
+            return
         row = index.model().getRow(index)
         if row is None:
             return
@@ -627,10 +631,10 @@ class WctxModel(QAbstractTableModel):
         self.rows = rows
         self.checkable = checkable

-    def rowCount(self, parent):
+    def rowCount(self, parent=QModelIndex()):
         if parent.isValid():
             return 0 # no child
-        return len(self.rows)
+        return len(self.rows) + 1

     def check(self, files, state=True):
         for f in files:
@@ -652,6 +656,8 @@ class WctxModel(QAbstractTableModel):
     def data(self, index, role):
         if not index.isValid():
             return QVariant()
+        if index.row() == len(self.rows):
+            return self._epilogueData(index, role)

         path, status, mst, upath, ext, sz = self.rows[index.row()]
         if index.column() == COL_PATH:
@@ -683,6 +689,23 @@ class WctxModel(QAbstractTableModel):
         '''
         return QVariant()

+    def _epilogueData(self, index, role):
+        if index.column() != COL_PATH_DISPLAY:
+            return
+        if role == Qt.DisplayRole:
+            # XXX should only be available if 'clean' files are hidden
+            return _('Show unmodified files...')
+        if role == Qt.SizeHintRole:
+            return QSize(80, 30)  # XXX just want to increase height
+        # imitate hyper-link style
+        if role == Qt.ForegroundRole:
+            return QBrush(QColor('blue'))
+        if role == Qt.FontRole:
+            font = QFont()
+            font.setItalic(True)
+            font.setUnderline(True)
+            return font
+
     def headerData(self, col, orientation, role):
         if role != Qt.DisplayRole or orientation != Qt.Horizontal:
             return QVariant()
@@ -690,6 +713,8 @@ class WctxModel(QAbstractTableModel):
             return QVariant(self.headers[col])

     def flags(self, index):
+        if index.row() == len(self.rows):
+            return Qt.ItemIsEnabled
         flags = Qt.ItemIsSelectable | Qt.ItemIsEnabled | Qt.ItemIsDragEnabled
         if index.column() == COL_PATH and self.checkable:
             flags |= Qt.ItemIsUserCheckable

  show-unmodified-link.png
5K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Angel Ezquerra  
View profile  
 More options Aug 11 2012, 7:24 am
From: Angel Ezquerra <angel.ezque...@gmail.com>
Date: Sat, 11 Aug 2012 13:24:18 +0200
Local: Sat, Aug 11 2012 7:24 am
Subject: Re: [thg-dev] Missing actions on working directory manifest widget

On Aug 11, 2012 12:06 PM, "Yuya Nishihara" <y...@tcha.org> wrote:

I think that's a quite clever of unconventional solution!

One think I would change is that I would say "Show unmodified (clean)
entries", to make sure people understand that unmodified files are called
"clean" on the Mercurial jargon.

Also, I think that perhaps the link could have a "temporary" effect. That
is, rather than being the same as clicking on the "Clean" entry on the
filter drop down, which has a "permanent" effect (as in "it won't change
until the entry is clicked again"), clicking on that link could take effect
only until the user selects a different widget so that when he comes back
to the commit wisher the clean dukes are hidden again (as they should in
most cases). What do you think?

Cheers,

Angel


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yuya Nishihara  
View profile  
 More options Aug 12 2012, 8:37 am
From: Yuya Nishihara <y...@tcha.org>
Date: Sun, 12 Aug 2012 21:37:59 +0900
Local: Sun, Aug 12 2012 8:37 am
Subject: Re: [thg-dev] Missing actions on working directory manifest widget

Good catch.

> Also, I think that perhaps the link could have a "temporary" effect. That
> is, rather than being the same as clicking on the "Clean" entry on the
> filter drop down, which has a "permanent" effect (as in "it won't change
> until the entry is clicked again"), clicking on that link could take effect
> only until the user selects a different widget so that when he comes back
> to the commit wisher the clean dukes are hidden again (as they should in
> most cases). What do you think?

That may be possible but we'll have to think about how to represent
"temporary" effect on filter drop down menu.
In any case, the implementation won't be much difference. For "temporary"
effect, I guess it just need to restore status filter on reload or refresh.

Regards,


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Angel Ezquerra  
View profile  
 More options Aug 12 2012, 9:06 am
From: Angel Ezquerra <angel.ezque...@gmail.com>
Date: Sun, 12 Aug 2012 15:06:21 +0200
Local: Sun, Aug 12 2012 9:06 am
Subject: Re: [thg-dev] Missing actions on working directory manifest widget

Some programs change the background color of lists when a temporary
filter is applied. My current email client (NEO Pro, which is really
awesome, BTW) works that way and is great.

Cheers,

Angel


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steve Borho  
View profile  
 More options Aug 13 2012, 9:39 pm
From: Steve Borho <st...@borho.org>
Date: Mon, 13 Aug 2012 20:39:10 -0500
Local: Mon, Aug 13 2012 9:39 pm
Subject: Re: [thg-dev] Missing actions on working directory manifest widget
On Sun, Aug 12, 2012 at 8:06 AM, Angel Ezquerra

That would probably be helpful for the graph widget when it is showing
a filtered graph

--
Steve Borho


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »