Jump to content


Double-click vs. Enter


  • Please log in to reply
4 replies to this topic

#1 misterfoo

misterfoo

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 23 February 2012 - 10:04 PM

I'm trying out the 2012.1 Alpha P4V and am really appreciating the configurable double-click behavior. Thanks for adding that!

One thing that caught me by surprise is that the Enter key does not do the same thing double-click does. For instance, for "File in pending changelist" I've configured double-click to diff my local copy against the head revision. However, if I hit Enter instead of double-clicking, I get the original default action, which is to open the file in the associated editor. It seems like it would make sense to have Enter do the same as double-click, especially for users that prefer to use the keyboard instead of the mouse. Are there any plans to make Enter behave this way?

#2 Striblezz

Striblezz

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 29 May 2012 - 09:50 PM

I would also like to at least have the option to have Enter/Return treated as a Double Click.

That is how P4Win worked... I would set double click to diff, then use the arrow keys to move through the files, Enter to diff, and Esc to close (using Beyond Compare)

Now in P4V when I forget and hit enter on a solution file to see the text diff, and I have to wait for the entire solution to load in VS instead, it is a little jarring.

If nothing else, I would suggest a simple check box at the top of the Double Click options to "Treat Enter as Double Click"  :)

#3 codelurker

codelurker

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 28 June 2012 - 06:36 PM

I've tried out the released p4v with this feature.
I'm pretty surprised to find <enter> and <double-click> different.
Also, if you double-click a file in a change list that was "add", then you just get an error because you cannot diff an add.

I complained about the double-click behavior in previous versions.
Having P4V so easily "run" files from the depot or from shelves is really dangerous.
Imagine, somebody gives you a shelve with a file "Format_C_Drive.bat", and you double-click.
Running a file as the default behavior is a serious security risk.

Beyond that, it seems to me to be nearly always the wrong thing to do for shelvesets.

What I'd like to see is
#1: Enter and double-click should have the same behavior.
#2: The behaviour when you double-click a file should be a lot smarter.

When you double-click a file in a submitted change list or a shelve set the action should be:

  • For "edit" changes: Diff
  • For "add" changes:  View (specifically, *not* run for executable types like *.exe, *.bat, etc).
  • Even better, for "add" and "delete", still run DIFF, but make DIFF smarter - so it shows the file contents on one side and text like "new file" or "deleted file" on the empty side.

#3: When looking at a change list it isn't helpful to have to dig around for the shelved file vs. the change list. Effectively, all files are listed twice, and the most useful ones are hidden by default and at the bottom.

This is crazy. I should be able to double-click on a file and if it is shelved or submitted I should see the diff.
The only time having the two lists makes any sense is when I'm viewing my own change and still have the changelist open in my view.


More on "View" vs "Open".
P4V likes to use the system default "Open" behavior.
This is bad, because for some file types like *.exe, *.bat, this means it will run the file as a program, allowing the program complete access to your machine.

Instead, it should define "View".
  • For text files the default "View" should be something like "Notepad".
  • For images (*.jpg, *.png, etc), "View" should open it in an image viewer, possibly the system default image viewer.
  • For *.exe there should not be a default view/open/run
.

#4 Br.Bill

Br.Bill

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 28 June 2012 - 10:13 PM

I second all of codelurker's suggestions.

#5 P4Nellie

P4Nellie

    Member

  • Staff
  • 12 posts

Posted 03 July 2012 - 05:43 PM

Great to see this thread and most excellent suggestions, thank you all and if anyone has other enhancement ideas would love to hear them here.

The Enter key configuration suggestion makes sense, especially in lists.  I'll log an enhancement request and try out some design variants with your suggestions.  

@codelurker: regarding your suggestions on View vs Open:
there is a way to assign different file types to default editors in the File Editors preference page. I can't think of a way to disable launching of the file for a specific extension such as .exe. We could add an enhancement to do _nothing_ for user-specified file types or an enhancement to show the file in Explorer/Finder. The problem with making a generic assumption to never open the file is that we'll likely have requests from users that do want to open .exe and .bat files.

In the meantime maybe someone else can think of a workaround to this?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users