Commit Graph

4091 Commits

Author SHA1 Message Date
Alexandre Deckner
3704f31d73 * AddPosesCompleted could be called actually before all the poses were added.
The method was called after _sending_ all the messages, not after receiving
  them all. This fixes the scroll validity check in AddPosesCompleted in list
  mode (bug mentioned in my last commit).

 We can now close #2441, tracker windows should now be completely persistant
with regard to scrolling now, in all modes (spatial mode, single window 
mode in list or icon mode). \o/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 09:52:09 +00:00
Alexandre Deckner
e85ca56c7d * Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28209 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 08:57:24 +00:00
Alexandre Deckner
3d7584da5c * Rewrote the way BViewState checks if changes needs to be saved on quiting a navigation window (icon mode and
list mode) or switching dir in single window navigation. Fixes the other half of the problem in #2441. Left some 
todos.
  I discovered an other bug that can add a random offset after finishing adding poses.  


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28205 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 01:41:43 +00:00
Bruno G. Albuquerque
2cb8652f55 - The Trash context menu was using a checkmark to keep track of the last
selected item which does not make much sense. Disabled the checkmark.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 00:33:38 +00:00
Oliver Tappe
9f3fce1eac Stippi + zooey:
* fixed LineHeight() for the case when the textview does not yet contain
  anything - instead of returning 0 we now return the lineheight of the
  default style (or the textview's font).
Fixes #2231


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28194 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:40:12 +00:00
Michael Lotz
60a068c8a4 Fix build. The deep version did use the CompareData of course.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28184 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 20:54:40 +00:00
Michael Lotz
3c6372b44a Rename BMessage::CompareData() to HasSameData() as this makes more sense for the
bool return type. Did I mention this was an unstable Haiku extension?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28181 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 20:45:12 +00:00
Axel Dörfler
49ad25b392 * The type ahead mechanism did not work correctly in list view mode: instead
of taking the contents of the columns, it would always use the file name
  instead.
* That uncovered another bug, though: WidgetText::Text() tried to cast everything
  to StringAttributeText, but GenericAttributeText is actually used for most
  columns.
* Therefore, GenericAttributeText is now a subclass from StringAttributeText.
* Extended the type ahead to take other columns into account, and made it also
  find strings in the middle (like a filter) as a second choice.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28180 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 20:18:20 +00:00
Stephan Aßmus
21f11263f6 aldeck + stippi:
* Improved the naming of the menu entry that removes a replicant from a shelf
  to be less frightning.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28177 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 19:21:01 +00:00
Stephan Aßmus
11c5023a77 Applied patch by Stephen Deken:
* Added a new class BAffineTransform, currently in the BPrivate namespace
  and the inofficial "shared kit".
* Extended BPolygon to be transformable by a BAffineTransform.

Thanks a lot!

Minor fixes by myself:
* The class accidentally still derived from agg::trans_affine.
* Added then missing comparator operators.
* Swapped the BPoint* and count arguments of Apply(), since that seems
  to be the more common order in the other Be API.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28176 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 19:10:10 +00:00
Michael Lotz
5b25b917f9 Introduce BMessage::CompareData() which is a Haiku API extension. It compares
the data of two BMessages and allows recursive comparison (BMessage inside
BMessage). Note that using this API might require you to recompile your app in
the path to R1.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 15:55:36 +00:00
Alexandre Deckner
e522ba55ba * In single window navigation, tracker wasn't restoring the view origin (current scrolling) properly. It was reseting the origin even after
successfully loading the saved state. Reworked the logic to make that work properly (this also needed checking if the state read succeeded). This 
fixes part of #2441. There is still an issue when sometimes the view state is not saved properly, more tomorrow! 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28158 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 01:41:45 +00:00
Alexandre Deckner
404bf9d1ab * Simply check if fTrashContextMenu->Window() is non NULL. This should be the definitive
solution :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28152 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-15 21:14:16 +00:00
Stephan Aßmus
1cbca49a83 zooey + stippi:
* Fix the calculation of the fTextRect member. The BeOS behavior (and also the
  previous Haiku behavior) was to recalculate the "bottom" always. This was not
  taken care of in SetTextRect() (needs to override the passed bottom).
* The insets are already tracked in fLayoutData, use this in
  _UpdateScrollBars() to calculate the correct data width/height (an
  improvement over the BeOS behavior it seems).
* Try to minimize the need to call _Refresh(), which reduces flickering a whole
  lot.
* Fix several instances where fTextRect was recalculated based on Bounds() and
  the saved insets, where it was broken when the BTextView was scrolled.

Fixes #2784.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28151 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-15 21:07:37 +00:00
Stephan Aßmus
431dc47dde Patch by Artur Wyszynski with some changes by myself:
* Resolved TODO: The type of the gradient is no longer encoded twice in the
  app_server link protocoll.
* Moved instantiation of the BGradient into the LinkReceiver::ReadGradient()
  method.
* Check success for (at least) ReadGradient() in ServerWindow.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28150 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-15 19:47:00 +00:00
Stephan Aßmus
b355a208d1 patch by Artur Wyszynski:
* Fixed some bugs in the archiving code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28146 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-15 16:14:41 +00:00
Rene Gollent
8cca2102aa Fix build (ShowingAwarePopupMenu was not added to libtracker's build, resulting in undefined sym errors).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28144 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-15 15:43:05 +00:00
Alexandre Deckner
618c7ffa85 * There was indeed a problem with my previous attempt at fixing #353. This should be much
better!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28139 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-15 15:35:59 +00:00
Oliver Tappe
39fbf5509b bonefish + zooey:
* Fixed a general problem with respect to overriding of the reserved
  virtual function slots: instead of statically invoking the method
  that corresponds to the reserved slot on the class that contains the
  slot, we now invoke the virtual Perform() method. Perform() then dispatches 
  the method invocation to the "proper" class, i.e. the highest class in the 
  hierarchy that  actually implements the requested method.
  This fixes a crash in apps that use liblayout's MSlider class and
  should fix one or other spurious bug with old apps or libraries, too.
* added new header folder 'binary_compatibility' that contains files that
  define the method codes and data structures required by Perform()
* looked for and implemented all used reserved virtual slot functions to
  invoke Perform() where necessary or to pass on the method call statically
  (for slots that were already maintained by Be)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28124 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-15 09:29:06 +00:00
Rene Gollent
1138737b87 Fix regression introduced in r28116: Due to the change in variable names, the
wrong version of ConvertFromScreen() was now used, resulting in the calculation
being computed and thrown away. This broke BMenu, probably amongst other things.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-15 01:59:39 +00:00
Axel Dörfler
0945268d80 * GetMouse() now survives being called with NULL parameters for location or
buttons.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-15 00:02:54 +00:00
Stephan Aßmus
991547ef6c Patch by Artur Wyszynski:
* Implemented BGradient, BGradientLinear, BGradientRadial,
  BGradientDiamond, BGradientConic and BGradientRadialFocus
  new Interface Kit classes.
* Implemented all the (AGG-based) backend necessary in
  the app_server to render gradients (Painter, DrawingEngine)
* app_server/View can convert a BGradient layout to screen
  coordinates.
* Added BGradient methods of the Fill* methods in BView.
* Implemented a test app and added it to the image as a
  demo.
* Adopted Icon-O-Matic and libs/icon in order to avoid
  clashing with the new BGradient class. Re-use some
  parts where possible.

Awesome work, Artur! Thanks a lot. Now a more modern
looking GUI has just become much easier to implement! :-)

TODO:
* Remove the need to have gradient type twice in the
  app_server protocol.
* Refactor some parts of the patch to remove duplicated
  code (Painter, DrawingEngine).
* Adopt the BPicture protocol to know about BGradients.
* Review some parts of the BArchivable implementation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28109 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-14 21:27:42 +00:00
Alexandre Deckner
e400b7d395 * DeskWindow wasn't checking if the context menu for the trash was already open and showing. We do it like in ContainerWindow now. Fixes #353
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28089 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-14 14:46:47 +00:00
Michael Lotz
57f8452b78 Rather use UsePublicObjectHeaders instead of using USES_BE_API for the
gen_mattypes build tool, as the latter will try to use BeOS headers on BeOS
compatible host platforms and therefore breaks the build because of missing
files. This should work on all platforms, as with that the headers in the
repository are always used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28076 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-14 11:08:08 +00:00
Axel Dörfler
b16cba7bb5 * The Tracker now makes use of the new B_DISK_SYSTEM_SUPPORTS_WRITING flag,
and will only show the "mount me read-only?" dialog when the file system
  actually supports writing in the first place.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-13 23:49:10 +00:00
Axel Dörfler
c7cf50a4e5 * Added a handy BDiskSystem::SupportsWriting().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-13 23:47:30 +00:00
Stephan Aßmus
350b87c7d2 zooey + axeld + stippi:
Fixed a problem with dispatching B_MOUSE_MOVED messages to views which need
the transit event:
* If the app_server decided to send a B_MOUSE_MOVED to the previous mouse
  containing window, it forgot to add the _feed_focus flag, which was a problem
  if the message actually happened to contain tokens (views that registered
  for events.) On the client side, only those views would receive the message,
  while the regular last mouse moved view would not be notified at all.
* On the client side, never change fLastMouseMovedView if the message is not
  targeted at the preferred handler. In the above situation, any "registered
  for events views" would receive the message first, but viewUnderMouse would
  be NULL and then when the regular last mouse moved view received it, it
  resulted in the wrong transit (B_OUTSIDE_VIEW instead of B_EXITED_VIEW).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28059 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-13 23:16:30 +00:00
Axel Dörfler
38bbc95758 * Made the use of file devices more convenient and complete by adding
the methods IsFile() and GetFilePath() to BDiskDevice, and
  BDiskDeviceRoster::GetFileDeviceForPath().
* Added new syscalls to implement this functionality.
* Added new flag B_DISK_DEVICE_IS_FILE.
* Fixed wrong operator precedence assumption in the BDiskDevice class at
  several places.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28052 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-13 21:51:43 +00:00
Jérôme Duval
42d02ade26 forgot to use HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28051 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-13 21:24:51 +00:00
Jérôme Duval
b9de80bbb8 * updated build opengl headers to 7.2
* added opengl to build be api headers
* define USES_BE_API for gen_matypes
this should fix the build for Linux which don't provide GL headers :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28050 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-13 21:10:52 +00:00
Jérôme Duval
99b5226b87 matypes.h is a generated header
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28047 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-13 20:11:27 +00:00
Jérôme Duval
a9d11d2365 updated mesa to 7.2
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-13 19:37:51 +00:00
Oliver Tappe
adffb3bd7f * fixed build in DEBUG mode
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28039 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-13 15:30:24 +00:00
Michael Lotz
e84abff2bd Fix strange validity check in BDirectory::Contains(). If either path ends up as
invalid it must not be used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28015 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-12 23:02:13 +00:00
Stephan Aßmus
71ea6c9229 * Refactored a method for getting the transit from a mouse moved message.
* In _StealMouseMessage(), don't maintain fLastMouseMovedView, instead,
  prevent B_MOUSE_MOVED message from being stolen that are important for
  detecting transit changes. The point is that some apps (like Tracker) are
  shooting themselves in the foot because they steal mouse messages via
  GetMouse() in one place, but then rely on sane transit values in another
  place. The way it works now, the view in question may get notified of the
  same mouse moved coordinate twice, once via GetMouse() and once via
  MouseMoved().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28002 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-12 19:30:59 +00:00
Stephan Aßmus
260da902db Rewrote BNodeInfo::GetTrackerIcon().
* Exit the function early in case of error, instead of maintaining the error
  until the end.
* Separate more clearly the condition that a file type is available at all
  versus not. This removes a redundancy when falling back to the generic
  file icon.
* Add retrieving the icon from the super type. Even check if there is a
  preferred app for the super type that supplies an icon before using the
  icon of the super type itself.

Hopefully I didn't introduce new errors, but that the super type icon was not
used was the main problem I tried to fix.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27990 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-12 11:12:14 +00:00
Stephan Aßmus
868b22c5f8 Honour line 80 chars per line limit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27989 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-12 11:06:28 +00:00
Karsten Heimrich
fe93c7b3ea * rewrote BTime to operate entirely on microseconds
* added some convenient functions, operator etc...
* reused parts of the patch by Stephen Deken, thanks



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27954 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-10 18:51:15 +00:00
Axel Dörfler
5007e8e478 * Minor cleanup - this stuff really has "reimplement me" written all over it...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-07 11:43:15 +00:00
Stefano Ceccherini
044627ee89 check for NULL in advance (CID 1056)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-07 07:49:36 +00:00
Karsten Heimrich
23f4249171 * should have been part of r27883
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-06 19:51:17 +00:00
Karsten Heimrich
a4da9c8634 * fix of by one bug while moving from front to back
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-05 22:44:33 +00:00
Karsten Heimrich
68f40fccf7 * cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-05 22:41:36 +00:00
Karsten Heimrich
2617261d77 * fix a nasty bug i introduced with 26383, leaving the looper locked
* grab the fLooper pointer in some more functions, just to play save
* remove wrong comment in UnlockLooper, since it's obviously possible to change fLooper

  In case we remove the handler from the loopers handler list, we need to grab the looper
  pointer first, since calling RemoveHandler(...) will call BHandler::SetLooper(...) thus
  setting fLooper to NULL and calling UnlockLooper did nothing, leaving the looper locked.

  Thanks Maurice for pointing out that 26383 broke Cortex, the wires where not draw and the
  app was locked somehow.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-05 01:26:06 +00:00
Karsten Heimrich
17e0fc6b5a * cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-05 00:48:54 +00:00
Axel Dörfler
d881bedfc0 * We must not sort the cached inodes, or else we mess up the order for
CanOpenWithFilter().
* This fixes bug #2795.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-04 20:33:20 +00:00
Axel Dörfler
f28ab87b68 * Added "sortInodes" parameter to CachedEntryIteratorList constructor.
* Moved static CompareInode() to CachedEntryIterator::_CompareInodes().
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-04 20:30:29 +00:00
Axel Dörfler
e58419d391 * White space cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27861 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-03 12:48:59 +00:00
Karsten Heimrich
05ea853598 * fix some mem leaks
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-03 12:36:58 +00:00
Karsten Heimrich
c716766b3d * whitespace cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-03 12:35:57 +00:00