Commit Graph

540 Commits

Author SHA1 Message Date
Philippe Saint-Pierre
9cf506a2bf Tracker:
* Add "Arrange By" submenu in Window menu.
 * You can arrange by the same fields you can sort by in list view. Changing your sorting order in list view will change the Arrange By choice when you enter icon view and vice-versa.
 * Support ReverseSort order.
 * Keep the clean-up feature, but it's now under the Arrange By menu.

Fixing ticket #1349.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42448 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-07-19 03:52:42 +00:00
Alexandre Deckner
def39abd74 * Finally finish implementing proper selection rect autoscroll to work with the
new asynchronous mouse tracking. Sorry for the delay. Up to now it was needing
mouse moves to autoscroll, it now behaves as before.

* Removed check that was disabling regular drag'n'drop auto-scrolling when
inactive. I don't see an obvious reason why that was done, as it's just handy
and is consistent with the other behaviors when inactive.

Note, i gotta love those comments that do anything but help, good example of
how not to comment :) i.e don't comment about what will happen when the
adjacent code won't be executed (especially in a case that can't happen).
My brain almost exploded a second time trying to explain that!

// selection scrolling will also work if the window is inactive
Should read:
// disable drag'n'drop auto scrolling when window is inactive




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-07-17 17:28:29 +00:00
Alexandre Deckner
df1c9e984e * Slight renamings, no functional changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42442 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-07-17 10:31:50 +00:00
Alexandre Deckner
29769e0452 * Don't do anything in MouseIdle if we're not dragging a message.
This especially avoid bringing tracker windows up to front when staying idle
over a tracker window while holding down a button. This could happen when
hovering while still holding a scroll thumb of another overlapping window.

Fixes regression #7829 introduced in r41892

* Also properly reinitialise the cached dragMessage on B_EXITED_VIEW, 
otherwise it would still think it is dragging and thus still pass through my
above fix.

I'd like to cleanup the drag message caching mechanism as it's not 
pretty in my opinion. Possibly even adding it to BView.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42441 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-07-17 09:51:22 +00:00
Philippe Saint-Pierre
cb2f9709c5 The destination directory wasn't stored in the UndoRedo record in the case of a duplication operation, causing issues when trying to redo an undone duplication (couldn't find the volume correctly).
Fixes #2883.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42328 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-27 03:11:35 +00:00
Jérôme Duval
aa56e459e0 revert r42251. Cast the enum to uint32 before use in switchs to please GCC 4.5.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-20 21:12:10 +00:00
Axel Dörfler
dcb652ca5a * Fixed ignoring the result of GetStat() which could cause random values to
be counted (for example already if a directory didn't have its X bit set).
* Instead of doing weird heuristics assuming the size on disk, use the actual
  value the file system reports. This might have side effects on file systems
  that don't report those correctly, which can then be fixed :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-19 18:38:31 +00:00
Jérôme Duval
ad1263fce3 Part of patch from #6840:
* GCC 4.5 complains about switchs with cases not part of the directory_which enum
* Merge FSUtils directory_which values into the enum


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42251 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-19 18:15:25 +00:00
Rene Gollent
2e687c4792 No need to call DragStart() if we have no drag message yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42236 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-18 21:31:07 +00:00
Rene Gollent
7560163d8c * Revert r42223 since it breaks some cases.
* Simplify handling a bit. Instead of more or less duplicating some of the
  move logic from PoseView, simply construct an appropriate target model and
  let PoseView's HandleDropCommon() take care of understanding what to do with
  the drag message. This has the side effect that things like dropping a text
  clipping message onto a target in an x-ray menu actually works as expected
  now.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-18 14:17:17 +00:00
Rene Gollent
f4d44cd47d Remove the monitor item before calling FSNotification() on it. Otherwise,
in some cases PoseView would call back into PoseCreatedOrMoved(), leading
to an infinite recursion.

Fixes #7696.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42229 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-18 03:22:31 +00:00
Rene Gollent
ab6b173770 Slight relocation, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-18 00:48:22 +00:00
Rene Gollent
5e90adf5d7 Fix regression introduced by r41892: DragStart() was called at the wrong time,
leading the drag message to contain nothing more than an empty B_MOUSE_IDLE
message. This broke several other cases of drag and drop which relied on it
containing the dragged refs. Fixes #7705.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42221 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-17 22:56:11 +00:00
Ryan Leavengood
955ffec296 Revert the old change r36762 which added a small offset to tracker right click
menus since it is no longer needed after r40132/r40142. Thanks diver for the
reminder.

#5809 can finally be closed again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42017 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-07 18:08:35 +00:00
Alexandre Deckner
6009abf2bd * One more fix needed for right click dragging. Ignore right mouse up if a drag
or long click happened between the initial mouse down and the present mouse up.
Tried to avoid this solution by other means but wasn't working in a corner case,
at least it's clear what's the code is doing.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-05 13:42:27 +00:00
Alexandre Deckner
f2068166ad * Fix regression spotted by Humdinger. Emulate right click dragging like it
used to work before, i.e right mouse button dragging works and the context
menu shows on mouse up if not dragged. I guess that at some point we'll rethink
all the mouse gestures we support and maybe simplify a bit, like dropping
long click support (as an emulated right button), and possibly
separating some features via user settings if needed.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-05 01:55:52 +00:00
Alexandre Deckner
596bb6891a * Finally rewrote the filthy, busy-looping, mouse tracking in Tracker.
The new asynchronous tracking doesn't lock the view and makes desktop 
replicants happy while clicking and dragging around. Fixes #880, #7241 
and certainly other tickets, that i will revisit, about refresh locks 
on the desktop or mouse related bugs. Based on a reusable MessageFilter and the 
recent B_MOUSE_IDLE message. Some parts are ported from the old code
and could use further simplification.

There should be no intentional user fonctional change, except: 
- slightly bigger threshold radius, shorter duration thresholds
 (= 1.0 x the system-wide doubleclick setting)
- not reimplemented: quickening threshold when holding shift while dragging
 a pose over a destination pose.

Some parts are ported from the old code and could use further simplification.
There is one known minor regression with autoscrolling while 
rect-selecting but that will be better fixed with some changes to the 
autoscroll code. Will address that ASAP. As for the unknown regressions, 
please test :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 21:12:14 +00:00
Alexandre Deckner
d797e0629c * Return a zero width and empty destination string when there's no destination dir. Fixes #7462 +alpha3
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41801 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-29 01:05:18 +00:00
Axel Dörfler
ccb1117c85 * Fixed a bug in BPoseView::CreatePoses() that Ingo found, but was apparently
too lazy to fix?!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-06 20:43:27 +00:00
Jonas Sundström
5987b2a380 Offer a 'Real name' column in Tracker list view mode, when set to show localized names. As discussed a while back. I honestly don't know if this is such a great idea after all. Name + real name is kind of silly. Ideally it would be labeled in a more logical way, or the feature should be dropped.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-04-08 05:11:23 +00:00
Jonas Sundström
edb7106763 Localization of the most user-visible folders. Ignoring subfolders of common/, system/ and home/config/.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41148 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-31 07:31:56 +00:00
Jonas Sundström
8860817432 Disable menu item 'Edit name' for Desktop, Root, Trash and entries with localized names.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41135 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-28 11:05:17 +00:00
Jonas Sundström
2d93b5283f Set Escape as shortcut for BAlert Cancel option.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41132 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-28 07:43:41 +00:00
Jonas Sundström
77e2c2dad3 Have ConfirmChangeIfWellKnownDirectory() protect the folders Common, Desktop, Root and Trash from renames and moves. Shift-key dialog protection added for the Home folder. Attempts on Desktop, Root and Trash are blocked silently. I admitt it's a bit odd to protect these so resolutely, unlike system, common and home, which are truly essential to the system. Would it be patronizing to enforce a stricter regime?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-28 06:44:46 +00:00
Jonas Sundström
ee6a2e5589 * Extend the Model class with a method bool HasLocalizedName().
* Disallow renaming of entries with localized names for now - this is meant to be temporary - and so far only in Tracker's Info window. Renames do not result in a change, visually, as the localized name hides the real name, and results in a bad user experience. One could possibly allow renames of the localized name, writing it back to the catalog. I've experimented with using BCatalogAddOn::SetString() but haven't been able to make it stick yet.
* Disallow renaming Trash in Tracker's Info window via Command-E.
* Adjust the argument order of BLocaleRoster::GetLocalizedFileName().
* Add a BLocaleRoster::GetLocalizedFileName() variant to look up another app's name given its signature and unlocalized, canonical name.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41126 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-27 18:38:05 +00:00
Jonas Sundström
2d5868f8b3 Use short-circuit evaluation to avoid out-of-bounds string access. Thanks Jérôme!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-23 00:47:21 +00:00
Jonas Sundström
7758e371f4 Enable localization of Tracker add-on names and shortcuts, with the canonical name and shortcut as fallback.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41085 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-22 22:09:35 +00:00
Jonas Sundström
6f477364cc Make BLocaleRoster::GetLocalizedFileName() take a const entry_ref& rather than a non-const entry_ref&. Remove private GetLocalizedFileName() from libtracker and make Tracker and Deskbar use the one in BLocaleRoster.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41075 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-22 01:35:38 +00:00
Jonas Sundström
7b3cdb9657 Prepare BFilePanel for localized names.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-16 18:32:25 +00:00
Jonas Sundström
ed7ee7a432 Localization support for filesystem entries in Tracker and Deskbar (leaf menu). (It appears to work, but is likely incomplete and quite possibly incorrect.) Fix issue with RosterData::Refresh() resulting in a B_LOCALE_CHANGED broadcast, and Deskbar looping. Add a global boolean gLocalizedNamePreferred to avoid calling BLocaleRoster::Default()->IsFilesystemTranslationPreferred() too often from Model instances. Following Tracker code style in libtracker, so as to not mix in too much clean-up.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40922 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-12 00:53:30 +00:00
Jonas Sundström
4d15b48647 Reordering for readability.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-05 12:11:45 +00:00
Jonas Sundström
fca835f134 Style fixes. Thanks, Axel!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-04 18:42:48 +00:00
Jonas Sundström
ec3ead230b Style fixes. Doxygen comment. Use standard strchr function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40803 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-04 11:11:03 +00:00
Jonas Sundström
f5c0a9970a Support for showing localized app entries in Deskbar. Just the app entries so far, and not yet the items in the leaf menu. Please review.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40796 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-03 20:58:58 +00:00
Siarzhuk Zharski
53e3cc5227 Some buffers become too small for localized strings. Pointed out by Diver. Thanks.
Fixes #6664 and #6591.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40706 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-26 22:04:38 +00:00
Stephan Aßmus
7d805b2d52 * Fixed unlocking the window before suspending the
tracker task thread, which got broken/removed in r40226.
 * Also fixed a race condition that the previous code
   had, which is that after unlocking the window, the task
   thread could be interrupted, the window could theoretically
   go away and the view be destroyed before the thread continues,
   but we still access/dereference the BView pointer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-26 09:56:48 +00:00
Siarzhuk Zharski
2ee8f3f65f Bunch of localization fixes pointed out by Diver. Thanks!
Notes:
- FileTypes: The "Same as" button label separated to two entities in dependency of 
             context: "Same Type as ..." and "Same Application as ...";
- Tracker:   The sentences like "If you do %action [...]. To do %action [...]"
             now use separately translated verbs for so called
             "ifYouDoAction" and "toDoAction";
- NetworkStatus: NetworkStatusView _ShowConfiguration is fixed back after previous
			 attempt to localize it in r37337: useless code bloating purged out,
             broken quasi-header "ifaceName information:" pulled back from Hell;
- StyledEdit: Menu item "Can't undo" had different casing in some situation. Looks
             like HTA cannot detect such situation, so right lines "Can't undo"
             were masked by wrong one "Can't Undo" and this line stay untranslated
             for most time.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-25 22:18:31 +00:00
Alex Wilson
0611a317da Fix graphical erros in Tracker's status window by truncating the destination path as needed. (Fixes #5914). Also remove fallback drawing code for when be_control_look is NULL, as that shouldn't be the case ever.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40685 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-25 19:28:27 +00:00
Stephan Aßmus
4153964a10 Moved IconUtils.h to Interface Kit and therefor made it an "official" header. Since the class has no
virtual but only static methods, it is not so likely that binary compatibility issues may arrise
from using it in new apps. Adjusted all the Jamfiles that included the private libicon headers. Note
that it was never necessary to link against libicon.a, since it's part of libbe anyway. There was one
instance where that was done. Hopefully it does not break the build, but I did this change a while ago,
tested it and then the harddrive began failing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-25 09:12:38 +00:00
Philippe Saint-Pierre
b754759693 Replace occurences of strcpy and strcat by strlcpy and strlcat. At both places, while improbable, it was possible to get string overflows.
CID 9043, 9044


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40650 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-24 01:23:21 +00:00
Philippe Saint-Pierre
0e952e21c3 If the template name was long enough, we would have exceeded the string size.
CID 9046


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-24 01:09:24 +00:00
Stephan Aßmus
96f9949a2d The parent menu of the attributes menu might be showing, thus it needs
to be locked before its font is retrieved or items are added.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40623 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-22 22:46:48 +00:00
Axel Dörfler
41b9586a0a * Let SelectionWindow::MoveCloseToMouse() also take the current workspace into
account. This fixes bug #7211.
* Also, don't move it that close to the border of the screen (it now keeps an
  offset of 20 pixels).
* Always move the selection window to the mouse position, even if it's already
  on screen.
* Close the window when pressing the escape key.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-12 18:07:20 +00:00
Axel Dörfler
e0971ab8f6 * Restricted the cursor position/selection restoration to the formula mode for
stored queries - it's usually more annoying than helpful for the other modes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40407 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-09 19:20:34 +00:00
Rene Gollent
b2d0aaa9e6 Don't attempt to move the selection to the target window if the latter does not contain a poseview (as is the case for an info window). Resolves #7179.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40338 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-31 23:43:22 +00:00
Oliver Tappe
9daff3323b * moved NaturalCompare() from libtracker.so to libshared.a, in order
to make it available elsewhere


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40307 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-28 11:05:26 +00:00
Rene Gollent
67a473f7d5 CID 10361: Slight code simplification to remove superfluous for loop.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-22 19:06:15 +00:00
Oliver Tappe
915a7b8c24 Make BObjectList<> publically available:
* cleaned up ObjectList.h
* switched several uses of new() to new(std::nothrow)
* moved ugly AsBList() hack into BObjectList<>::Private class and
  adjusted all callers accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-20 12:09:16 +00:00
Rene Gollent
c5b852f95f Patch by Shade: If the volume does not return a valid capacity, don't crash with a division by zero error. Resolves #7103. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40236 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-14 14:06:08 +00:00
Axel Dörfler
9f609ed7c6 * Fixed wrong indentation of the if-clause introduced in r40144.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40147 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-08 12:38:13 +00:00