Commit Graph

321 Commits

Author SHA1 Message Date
Philippe Saint-Pierre
14347545f3 Now it also considers the MimeType of symlinks targets when proposing add-ons in tracker.
This fixes ticket #2775.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32246 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-11 11:53:12 +00:00
Rene Gollent
a9218c9c2e Oops, check was reversed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32211 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-08 19:39:33 +00:00
Rene Gollent
d726fd50a2 When picking file destinations via the slow context popup, also do the copy vs move check based on device. Fixes ticket 4202.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-08 19:36:27 +00:00
Rene Gollent
2d6de22fb5 An Open With window has no target model. PoseView's drop target handling code didn't take this into account, causing a crash. Fixes ticket #4200.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32209 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-08 18:08:07 +00:00
Axel Dörfler
249efd04b3 * Fixed basic layout issues, and therefore bug #4138. This panel needs a serious
usability redesign, though, so I didn't bother letting it use the layout
  engine for now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32022 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-31 14:30:15 +00:00
Rene Gollent
c9d9b2da7e Remove old BeOS-era hack to prevent NavMenus from containing > 500 items. This fixes missing items when right click browsing large directories.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-28 20:31:49 +00:00
Axel Dörfler
7e1f710f27 * Removed the superfluous Ctrl-Alt-Up shortcut from Tracker that clashed with
the new workspace navigation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31829 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-27 20:58:11 +00:00
Axel Dörfler
d219b1fcfc * Let AddMimeMenu() check if the MIME type is valid, otherwise BMimeType::Type()
could return NULL. This fixes the crashing part of #4037.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31777 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-26 16:46:05 +00:00
Michael Lotz
63d557f06f Fixing random GCC4 warnings. Mostly missing consts, some parentheses, some braces... Should all be harmless and not change anything.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31600 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-16 02:42:03 +00:00
Stephan Aßmus
5422febd0b Fixed a few coding style violations and GCC4 warnings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-14 11:26:15 +00:00
Rene Gollent
a41067fcb4 When initializing a file panel, check if the view is being targetted at the desktop. If so we need to flag appropriately as we need a different iterator which will also return the volume poses. Fixes ticket #4073.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-08 23:22:38 +00:00
Alexandre Deckner
f207162e07 * In single window navigation mode, when navigating into a directory which had no viewstate yet (new folder) or if
fViewState didn't change, fTitleView wouldn't be reset and updated to the new column set. (unfortunately the column
 state is managed separately from the rest of the view state). That would cause crashes for example when switching
 to a directory with fewer columns and triggering a redraw of a column that shouldn't be there anymore. 
 Fixes #3710.

* TitleView::Reset didn't invalidate the view and would leave the old columns there until a redraw was
 triggered externally.

* Minor cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31378 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-03 00:11:19 +00:00
Stephan Aßmus
f3797c5ae5 Patch by Jeroen Oortwijn: Improve the tab-key focus-cycle ordering of the
Tracker Settings window. Thanks a lot! Fixes ticket #4051.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31339 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-30 16:34:13 +00:00
Rene Gollent
254d2b2d1a Fix a number of problems in PoseView:
1) If a node was filtered out by the ref filter, PoseView effectively wiped out all evidence that it ever knew the node existed and stopped listening for changes on it. Consequently, it would never notice if an attribute change such as updating the file's type made the file now eligible to be viewed. Now we keep watching the node and keep it on the zombie list until such time as it passes the filter (if ever).
2) Refresh() cleared the pose list, but not the inserted nodes list. Consequently, any nodes that were already visible before calling Refresh() would not be readded.

This fixes various problems seen in the file panels in WonderBrush (and probably others), such as the file panel initially coming up empty sometimes, and also it not noticing new screenshots,

This closes ticket #1717.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31307 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-29 00:06:00 +00:00
Rene Gollent
2688837424 Fix assertion when using Tracker in debug mode. This closes ticket #1636.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31286 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-28 02:27:59 +00:00
Ingo Weinhold
6668455281 * Use public functionality instead of private BeOS syscalls.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31039 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-14 10:57:09 +00:00
Philippe Saint-Pierre
de81e90c0b Replaces NodeMonitor by PathMonitor in the InfoWindow to update the calculated size of the directory when a change happen.
This implement the suggestion in ticket #2868.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30894 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 14:02:41 +00:00
Ingo Weinhold
bcfe344c53 * Made our struct stat POSIX compliant again -- the time_t fields have been
replaced by timespec fields. Via macros the structure is still source
  compatible with the old one.
* Introduced header <compat/sys/stat.h> that defines the old stat structure
  (as stat_beos) and conversion functions
* Introduced versions for [l,f]stat().
* Added symbol versions for BDirectory::GetStatFor() for sake of binary
  compatibility.
* BStatable::GetStat(): Renamed the old method, changed its parameter to
  stat_beos*, and and made it private. Added a new version (using up a
  reserved vtable slot). It remains source and binary compatible.
* BRefFilter::Filter(): Changed the struct stat* parameter to struct stat_beos*
  for sake of binary compatibility. This breaks source compatibility, though,
  which we can't help, since the class doesn't have reserved vtable slots.
* Fixed several issues with the stat structure change, mostly adjusted uses of
  BRefFilter.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-22 15:15:16 +00:00
Stephan Aßmus
0c7085458e Make the partition ID check more flexible, if partitions just pop up out of
nowhere, we still want to be able to automount them, even though the
notification is not for a device.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-12 18:35:31 +00:00
Stephan Aßmus
be5788f81c Fixed a number of remaining problems with the AutoMounter:
* During boot, the mount mode was ignored for any removable volumes, they
  simply got mounted always.
* When automounting later, all partitions on all removable devices would
  be mounted, not only the ones on the newly inserted device.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30719 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-12 18:32:11 +00:00
Stephan Aßmus
3908951b11 * When inserting USB sticks, the read-only mount suggestion was completely
bypassed, same for invoking "Mount All". Now, the "initial scan" parameter
  is used to decide if the user should be alarmed. Basically, it means you
  get to decide for every mounted volume if you want it rather read-only.
In the old code:
- If you wanted a stick mounted read-only, you had to go to "Tracker Settings"
  and disabled auto-ejecting, unmount the stick, then re-mount to get it to
  ask you for read-only mounting.
- But then, it would remember this setting, so when you unplugged the stick
  and then replugged it, it would mount it read-only again. This may be nice
  for later, but for now, I want to decide if I am willing to take the risk
  each time.
* The new code also has the implication that when you plug a drive with more
  than one partition, you are being asked for each one. I extended the alert
  to also mention the partition name.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-12 18:03:36 +00:00
Jérôme Duval
7a282f3b28 * combine MovePenTo() with DrawString()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30530 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-01 08:39:02 +00:00
Philippe Saint-Pierre
838eca4665 Allows "Icon Label Outline" to be disabled when no background bitmaps are chosen.
It complements r29190 and fixes ticket #2395.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30495 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-29 23:43:23 +00:00
Bruno G. Albuquerque
107d2b333b Only try to add the preferred app if it can be found, otherwise the Open With
menu would be completelly empty.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30430 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-26 15:52:01 +00:00
Stefano Ceccherini
33ce19159d if opening a document failed because the system is shutting down, don't ask the user if he wants to open the document with another application, since that would fail as well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30358 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-24 05:11:56 +00:00
Stephan Aßmus
8baeb63aa2 Probably not good to invalidate the layout in the destructor...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30350 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-23 18:31:22 +00:00
Stephan Aßmus
5d2a1fb46e More style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30349 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-23 18:29:58 +00:00
Stephan Aßmus
3e3d7acb90 In some ways, this is unrelated, but I had to combine this anyhow:
* Extend the PaneSwitch BControl from Tracker, so it can draw on/off labels.
  This has the added benefit that you can click the label to expand/collapse,
  like for example in the Get Info window (Permissions).
* I also added font-sensitivity features to PaneSwitch, and it can be used
  in layouted windows (untested).
* This made the "DrawButton" in the Installer superfluous.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30348 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-23 18:25:37 +00:00
Stephan Aßmus
5e71c7b1e5 Patch by Obaro Ogbo (nastee) with small changes by myself:
* Added "Close All in Workspace" menu item in the Window menu. The shortcut
  is 'Q', which is usually the Quit shortcut. Since Tracker prevents quitting
  via this shortcut, overriding it like this is ok, this was also discussed
  in the ticket #2833. I've tested that the existing functionality is not
  disturbed (ie Quit in the Settings panel still works, as does quitting
  Tracker via "hey Tracker quit"). I did not add the "Close All" menu item,
  since that feature is already available via DeskBar and when pressing the
  shift key before opening the Window menu.
* I did change the additional short cut. As with "Clean Up" versus "Cleanup Up
  All", it's now consistently the shift key, which you have to press.

Note to Obaro: The only other change was that one can set the target of the
menu item to be "be_app", that way one avoids dispatching the message in the
window. Thanks a lot for your work, Obaro!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30205 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-16 19:32:11 +00:00
Rene Gollent
979786f1e6 Don't show the total number of items if 0 (as will happen in the case of move operations since we skip the pre-flight count for those). Fixes ticket #3722.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30140 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-12 22:33:21 +00:00
Ingo Weinhold
4fba3522e0 * Removed src/kits/tracker/OpenHashTable.h. The shared version in
headers/private/shared is newer, though with small interface changes.
* Removed the unnecessary Debug.h include in
  headers/private/shared/ObjectList.h.
* Adjusted sources using these headers, mostly by adding missing includes.
* Lots of automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30123 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-11 21:24:32 +00:00
Stephan Aßmus
4024eadfda My previous fixes had an oversight and the very last fix introduced new drawing
problems. Basically, forceDraw was set to false which then prevented any new
items to be drawn when there was no scrolling necessary. Now we use a local
variable "needToDraw" that starts with "true" on each iteration. I don't really
know why forceDraw is even passed to the function in the first place. Maybe
it should be called "disabledDrawing" with reversed meaning and should be used
for windows that open on another workspace....


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-10 08:58:13 +00:00
Stephan Aßmus
039878c152 * Set forceDraw to false when we have already drawn the pose, not when
there is only some pending scrolling.
* Fixed my previous ScrollTo() change to actually scroll in the two directions
  in two steps...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30078 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-09 19:24:45 +00:00
Stephan Aßmus
72cd1c7726 Fixed some weird fallback code, I don't think it's used and added a TODO
for whoever stumbles there next...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-09 14:05:31 +00:00
Stephan Aßmus
080385d599 Fixed logic to detect and warn about changes in the system folder. Merged
the "system" folder and "system folder or it's contents" case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-09 09:30:33 +00:00
Stephan Aßmus
000f19e226 Small coding style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30056 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-09 09:29:33 +00:00
Stephan Aßmus
61d107c8a7 Fix hardcoded paths for this *test* component.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30055 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-09 09:29:07 +00:00
Stephan Aßmus
6a71afb0d1 Sorry for mixing some cleanups into this patch...
* When changing icon sizes, invalidate before scrolling. This causes silent
  scrolling in app_server and avoids a visual jerk. Everything needs to be
  re-drawn at the new icon size anyways.
* Removed the fUpdateRegion member from BPoseView. It was supposed to make
  drawing quicker, but it only made it slower. Checking for intersection with
  the update rect passed to Draw() should be much more straight forward and
  does not involve app_server communication...
* Refactored some misnamed methods, ScrollIntoView() would always draw and
  only sometimes scroll - I couldn't agree with that.
* There is a very confusing mix of "fullDraw" and "minimalRect" booleans which
  seem to be used with wrong semantics. The minimalRect flag passed to BPose::
  CalcRect() means to get the pose rect for the icon and the first column only,
  not all columns. Contrary to that, some pose rect calculation happens with
  minimalRect == fullDraw... I tried to fix some of that.
* The visible changes of this patch are when adding poses. The
  SynchronousUpate() wasn't working so well, I made it work reliably by invoking
  Invalidate() and Window()->UpdateIfNeeded(), which also takes care of any
  drawing that the app_server has to do for the background. And it's flicker
  free in double buffered mode...
  -> This fixes poses being drawn multiple times and the text getting darker.
* And there was another bug when adding poses. The extent (bottom of last item
  in list view for example) can be just above the current view bounds. When the
  next item is added above the view bounds, then the extent scrolls into view,
  but there is nothing to be scrolled in this case. srcRect is still invalid
  and so is dstRect. But destRect should be valid in this case.
  -> This fixes some poses being cut off at the bottom when opening Tracker
  windows.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30033 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-08 15:28:53 +00:00
Axel Dörfler
1f904d1e03 * If you do something, please try to do it right, or at least test it.
* The alert escape check was broken in several ways. First of all, the buttons
  can be NULL which suddenly crashed apps. Second of all, the check didn't even
  work as it was reversed.
* Also, I disabled the code for now, as I really don't think string comparison
  heuristics are the way to solve this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30018 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-08 08:23:07 +00:00
Stephan Aßmus
7dc5caf242 When changing icon size, pose locations need saving. That's not so nice, but
pose locations are always in view coordinates from the perspective of BPoseView,
even if the unscaled location wouldn't change from the perspective of BPose.
This could be removed when storing and restoring unscaled location. I was just
not sure were all this happens.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30010 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-07 21:34:27 +00:00
Stephan Aßmus
96da4b41b0 * Fix the completely broken desktop icon size changing which I introduced
yesterday. It needs to auto-place icons which go out of view or underneath
  the deskbar or a replicant. Also it obviously cannot scroll to keep the
  view "centered" as normal Tracker windows.
* Fix/improve the desktop context menu with regards to icon size options. It
  also displays the shortcuts, which now work on the desktop too.
* When doing an icon cleanup on the desktop, not only the deskbar is avoided,
  but also replicant views.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30009 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-07 21:09:10 +00:00
Rene Gollent
e419aeed10 If drag and drop with the context menu is used (right click drag / control + drag), treat "Copy Here" as a request to duplicate the item if the destination is the same folder.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29988 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-07 03:31:33 +00:00
Stephan Aßmus
7cdbeb0e13 * Changing the icon size will now work more like simply scaling/zooming the
view. BPose converts the scale in SetLocation() and Location(), which does
  _not_ affect performance for list mode, BTW. So that should be fine.
* The center of the pose view is now locked when changing the icon size.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29974 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-06 19:46:01 +00:00
Stephan Aßmus
e70b6d957a * Cleanup in the icon mode stuff. kScaleIconMode is gone. There is simply
kIconMode and it can have different sizes.
* The "Icon Mode" super menu item is marked, when in icon mode, as well as
  the size item in it's sub menu.
* When switching from mini icon mode or list mode back into icon mode, the
  previous icon size is now restored. This also works when the folder has
  been closed meanwhile. (The on-disk format for view state has changed, so
  your folders will open with default values.)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29971 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-06 18:18:12 +00:00
Stephan Aßmus
f5bdd55475 Patch by Maxime Simon with small changes by myself: Change the icon size
menu as discussed in ticket #2431. There are only three main shortcuts for
icon, mini icon and list mode. Additional short cuts have been added to
increase and decrease the icon size. I've moved the shortcut from the 32
icon size to the menu item for the icon size menu itself. Unfortunately,
icon placement does not scale with the size (as before) and switching to
icon mode from one of the other modes does not restore the previous icon
size. Looking into it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29967 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-06 13:50:24 +00:00
Jonas Sundström
019f90e634 Setting the escape key as shortcut for the Cancel options of Tracker's dialogs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-05 23:47:58 +00:00
Rene Gollent
0f617d4476 Fix several cases of forgetting to include libstdc++ in the libs. This allows a successful build of Haiku on gcc4 Haiku, though it's presently unclear to me why this didn't prevent linking on any other platform (gcc2 haiku, and gcc2/4 cross compilers from FBSD had no issues here).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29957 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-05 22:33:53 +00:00
Alexandre Deckner
561b5d977b * Implements enhancement #2829, ie: change the modifier key (now shift) to force identify on
already identified files and change the menu item label accordingly so that the 'feature' is 
not hidden anymore.
 The identification mechanism will probably be automated in the future, forcing 
identification would then become the only use of this menu item.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29940 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-05 15:29:56 +00:00
Stephan Aßmus
4d16240245 * Should fix the default desktop background (Haiku logo) since the move of the
artwork folder.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29922 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-05 08:41:48 +00:00
Stephan Aßmus
86e64a7355 Patch by Maxime Simon: Add short cuts ot the icon modes. Thanks a lot! Fixes
ticket #2431.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29905 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-04 17:26:52 +00:00