Commit Graph

4091 Commits

Author SHA1 Message Date
Karsten Heimrich
78092ae789 * move DateTime and CalendarView into shared
* adjust Time preflet to take that into account



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-29 19:26:58 +00:00
Karsten Heimrich
70bf426b8c * gcc4 build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27227 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 19:32:18 +00:00
Karsten Heimrich
1678a1dd2c * if the given buffer size is to big, we will know we handle it in Attach
this should fix LinkSender usage like as in Stroke/ FillPolygon in BView



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27226 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 18:43:33 +00:00
Bruno G. Albuquerque
837057611d - Better be safe than sorry. Check MIME type and super type after
constructiuon. Thanks Rene for reminding me that BMimeType actually has a
  InitCheck() method. :)




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 17:38:52 +00:00
Stephan Aßmus
e2bc27448f Could have been part of r27221. Added BColorQuantizer to libshared.so. Should
be useful for the GIF Translator for example, maybe even for PNG.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27222 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 16:38:27 +00:00
Stephan Aßmus
740fe892ac Added a BColorQuantizer class to the "shared kit" based on a patch by David
Powel. The functionality was written by Jeff Prosise and Davide Pizzolato and
has been cleaned up and adopted to the Haiku coding style by David Powell and
myself. The class can perform a color quantization for generating the optimal
color index palette (with given maximum size) from a given RGBA image.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27221 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 16:33:12 +00:00
Stefano Ceccherini
910c4a0106 the Link* api supports sending large messages through areas, thanks to Julun, and this TODO can be removed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27220 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 15:32:26 +00:00
Stephan Aßmus
3f2dd98c88 This fixes a bad feeling in my stomache:
* When mounting a non-BFS volume, suggest to the user to mount it read-only.
* Store the mount flags with each volume in the automounter settings, restore
  mount settings on next boot.
The second part is probably nice to have anyways und should prevent bad surprises,
the first part should be removed again when we have absolute confidence in all
our file system implementations as well as the kernel itself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27219 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 13:26:45 +00:00
Karsten Heimrich
4e61552ecd * first implementation of passing data via area to app_server
this makes printing of large images work, fixes task #1067



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-27 13:39:16 +00:00
Stephan Aßmus
0cafe2dfb9 * Fixed a race condition in BWindow::Show(). If it was the first time Show()
was called, the calling thread could be preempted, or simply be blocked on
  calling Lock() after running the window thread. The window thread in turn
  could be processing messages. In that case, fShowLevel would still have the
  wrong value. For example, MediaPlayer would call IsHidden() on one of it's
  views, which would then return true for this case. The result was that the
  video view was not hidden and a black rectangle was showing on top of the
  controls. This may also have caused other similar problems of course.
* fRunCalled was accessed without holding the lock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27209 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-26 18:30:47 +00:00
Bruno G. Albuquerque
dcf3842b09 - Changed the well-known "Downloads" dir to be named "downloads" for
consistency.

All well-known directories in the home dir ("mail", "people", "config") are all
lowercase. The only exception was the "Downloads" one.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27199 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-25 16:58:47 +00:00
Fredrik Modeen
6ecf7db5fd Code cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27172 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 11:16:40 +00:00
Alexandre Deckner
07c052f765 - Simplified the logic in Draw, and other small fixes, thanks Karsten!
- Disabled_off picture wasn't archived/unarchived in one_state_mode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 21:06:12 +00:00
Axel Dörfler
d262deae17 * The MIME type menu in the find panel now shows the MIME type icons, if any.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27146 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 12:30:00 +00:00
Axel Dörfler
d125d984a6 * IconMenuItem now falls back to the icon of the super type, if a MIME type
didn't have one.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27144 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 12:06:50 +00:00
Axel Dörfler
206c62f036 * Got rid of the "count" parameter and maintenance altogether - makes the code
much simpler.
* Simplified code to compute "start", ie. the index of the first MIME type menu
  item.
* Promote MIME types to the top-level if their super type don't add any
  attributes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27143 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 12:01:27 +00:00
Axel Dörfler
090da60b27 * Renamed CreateMimeMenu() to AddMimeMenu(), as it now also adds the menu to
its parent. The item count of the parent is now actually adjusted, so that
  additional entries are found.
* AddMimeMenu() now returns the menu of an already existing MIME type. Hence,
  we don't add the supertype menu twice anymore for each type, or don't add
  the second type at all when called again.
* Cleaned up naming, consistent use of "* " vs. " *".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27142 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 11:46:50 +00:00
Axel Dörfler
15a27c4d5b * Whitespace cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27141 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 11:22:52 +00:00
Bruno G. Albuquerque
e51479d912 - Creates the supertype menu when only supertype attributes are present.
- *NOW* it works.
 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27126 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 04:10:30 +00:00
Bruno G. Albuquerque
be8c87abf6 - Added a new CreateMimeMenu() method that creates the menu with attributes
for a specific MIME type. 
- Attribute menus now display a hierarchy with type and supertype attributes.

This looks a bit ugly but mostly because not all types and supertypes have icons and descriptions. Anyone up to do a MIME database cleanup? :)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27125 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 03:57:57 +00:00
Alexandre Deckner
009aa366c6 - Changed Alt/Ctrl mode handling in Menu prefs, BMenu and Appearance
prefs as discussed in #2139 comments. This allow using Alt-Gr in either 
Ctrl or Alt mode. Appearance needs a serious style cleanup, comming next 
:)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-21 00:59:30 +00:00
Alexandre Deckner
5aa001b423 - Switch BListView selection modifiers as was done for Tracker in my previous commit. It now
even conforms to the bebook! BOutlineListView needs no special change. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 16:42:13 +00:00
Alexandre Deckner
7f1535c0d2 - BPictureButton didn't account for the disabled state. Fixes #2410
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27063 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 13:54:42 +00:00
Alexandre Deckner
c56a21ed62 - Made multi-selection modifier semantics consistent with most OS's out there. See #1255,
please shout if you've got anything against that :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27059 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 10:59:10 +00:00
Stephan Aßmus
1dfa5a7d2a size is actually icon_size, not data size, thanks Axel for pointing out!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27053 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 22:55:03 +00:00
Jérôme Duval
13b2ca0205 updated mesa to 7.0.4
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27047 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 20:19:01 +00:00
Stephan Aßmus
986677575d * Puh, there was quite a confusion with variable names here, Axel.
Don't we have this "blah shadows a parameter" warning enabled?
* data was leaked in the error code path when allocating the bitmaps
  failed.
* I've added a check if the provided buffer even has the right
  size before copying the B_CMAP8 bitmap data into it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27044 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 18:53:29 +00:00
Axel Dörfler
0d37df6412 * The old Be version of get_device_icon() now also supports retrieving the
vector icon in case B_GET_ICON is not supported by the device anymore.
  (This makes B_GET_ICON deprecated API.)
* Use B_BITMAP_NO_SERVER_LINK flag, as our bitmap is only used internally.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27036 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 11:50:08 +00:00
Axel Dörfler
d9b93b821a * The bitmap variant of get_device_icon() should now support getting all sizes
even if the icon is not available in that size (ie. is not a vector icon).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27034 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 11:38:53 +00:00
Stephan Aßmus
aac7507616 * r27001 left some parameter checks which need to be ommited
for vector icons. Simplified the checks and moved them to
  where the old B_CMAP8 icon is retrieved. The bitmap is allowed
  to have another color space, in which case the icon data is
  converted (code was already in place).
* Added a NOTE comment to how the new B_GET_VECTOR_ICON ioctl
  knows about the correct buffer size for the icon data.
I've tested setting the desktop icon size to something else than
16x16 or 32x32 and it works fine now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27032 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 11:05:15 +00:00
Axel Dörfler
8ce6cfc999 * Added two more public functions: get_named_icon().
* Implemented B_GET_ICON_NAME in get_device_icon().
* Comments welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27004 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 14:32:33 +00:00
Maurice Kalinowski
0eddadb922 fix gcc4 build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27002 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 13:20:45 +00:00
Axel Dörfler
06ba3f0acb * Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
    a predefined location on disk (not yet implemented). This would also allow
    to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
    icons for those.
  - B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
  variants that can also retrieve the icon data directly (like
  BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
  Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
  special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 11:27:07 +00:00
Axel Dörfler
9ad1415ecb * Use addr_t instead of int32, since we're dealing with addresses here, and this
way it wouldn't work on 64 bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27000 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 10:31:31 +00:00
David McPaul
ac847fc895 Don't call Reader methods with invalid cookies
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26986 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-16 02:24:19 +00:00
Michael Lotz
f75add6173 Obviously noone ever really used BFlattenable objects with our BMessage, as it
was pretty broken. It would store the address of the buffer in the message
instead of the actual data. Funnily, since it was completely stack based before,
it would have stored the address plus the actual data (minus 4 bytes) as that
did reside directly after the address on the stack and the original buffer
length was still used. This corrupted the data, but still "worked" for MDR
because it has fault tolerance, loosing only part of its flattened StringList.
This broke however when switching to a heap allocated buffer for large sizes,
as then the heap address plus some random heap data was added to the message
instead of the actual buffer. Sure interesting that nobody noticed that before...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26984 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-15 20:55:06 +00:00
Axel Dörfler
55585cfa0d * truncate_middle() could eat the whole string if it was as large as the
ellipsis. This was visible in missing window titles for short names like
  "bin".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26960 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-13 12:52:14 +00:00
Axel Dörfler
ae0606be74 * Added two more private InterfaceDefs functions: get_application_order(), and
get_window_order() will retrieve the application respectively window order
  on the selected workspace.
* Moved private BeOS compatible functions (as used by the Deskbar) into the
  private WindowInfo.h header.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26951 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 17:39:42 +00:00
Stephan Aßmus
3f953c833c Added clarifying comment for something that puzzled me at first.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26946 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 15:15:02 +00:00
Stephan Aßmus
8a0be4edeb * I misunderstood the previous of adding fPath.Path() to the message. It was
meant to be able to tell which monitor the message came from. So I added it
  back in. Since I used "path" already for the entry, I renamed the field to
  "watched_path". No code was using it yet, so this should be ok and the
  purpose more clear anyways.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26945 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 14:49:30 +00:00
Stephan Aßmus
2bf5ba0562 Minor style cleanups.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26944 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 14:43:46 +00:00
Stephan Aßmus
edc51252d3 * A few versions of BMessage::AddXXX and ReplaceXXX did not check the argument
passed to the function against NULL.
* Made BMessage::AddFlat() use an optionally heap allocated buffer versus always
  a stack allocated one.
* Small simplification in BMessage::AddMessage(), we can simply compare the
  buffer with the stack based buffer to know whether we need to free() it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26943 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 14:38:31 +00:00
Stephan Aßmus
afbd081a6f * TRACE macro no longer needs double parenthesis.
* The global BPathMonitor looper is now always used, no more optional looper
  and no more BApplication looper usage. This way we know how the looper behaves
  and PathHandler::Quit() can be synchronous. In the end, the bug I was
  observing was not caused by the previous asynchronous node monitor stopping,
  but this should be safer anyways. When BPathMonitor::StopWatching() returns,
  you have really stopped watching and not some time later.
* Introduced "FileEntry" which is an entry_ref plus node id. This is now used
  instead of the node_ref for the "watched files set". The whole point
  is to really be able to add the "path" field to the B_PATH_MONITOR message.
  Previously, the initial path that was passed to StartWatching() was added,
  regardless if the message was for an entry somewhere down the hierarchy when
  watching recursively. The downside of the new method is that it uses a lot
  more RAM per entry. Another option would be to store the node id of the parent
  directory and iterate the directory always when in need to construct the path.
* Watching a folder recursively now really adds all the existing subfolders
  as well as all the files if not watching for folders only. The tests for the
  old implementation only tested what happens when the watched folder was newly
  created and then subfolders were created. Those where already added by the
  code. Now it also adds the subfolders of folder that appear in a watched
  folder.
TODO: Remove folders and files recursively when they dissappear. More testing
for B_ENTRY_MOVED. Optimizations are possible when some information is
retrieved twice. I am also planning to add a way for the BPathMonitor user to
filter the automatically watched files/folders in B_WATCH_RECURSIVELY mode.

I grepped the entire Haiku tree for usage of BPathMonitor. Only net_server
and Mail were using it, but both in a way that is not affected by these
changes. Anyways, TextSearch works more reliable now, even for entries in
subfolders.

Feedback very welcome! :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26936 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 20:02:59 +00:00
Axel Dörfler
872c3d3f6a * Fixed the broken nodeFlags semantics in BDirectory::Contains() (they are
flags, after all).
* This fixes the "Command-Tab" ie. switch to source/header command in Pe.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 18:16:33 +00:00
Axel Dörfler
8f38768e65 * Don't define DEBUG in public headers!!! Doing it this way will break the
build for others, namely those that also include <Debug.h>
* This fixes the remaining problems of building Pe under Haiku.
* Those files need a giant style cleanup... Fredrik, time to have a look at
  our style guide :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26931 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 16:45:26 +00:00
Karsten Heimrich
4b7da592ee * first steps towards a new printer api...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26925 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-10 23:26:38 +00:00
David McPaul
086dbe90c8 limit no of retries to prevent infinite loop
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26914 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-10 13:54:03 +00:00
Stephan Aßmus
5ef86fce1f * Rename the private structs to use the same scheme as for classes, which seems
to be the habbit now.
* Improve PathHandler::Quit() to delete the object in case the BMessenger was
  not valid or failed to send the Quit message. This should handle the corner
  case that the PathHandler's looper was already Quit(). There could still be
  a race condition, although I don't know if it affects local message targets
  in Haiku. I added a TODO note for that, but I believe it can be neglected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26877 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-08 14:22:00 +00:00
Stephan Aßmus
f72ed717b4 The previous loop to remove all the BHandlers in the destructor was really quite
inefficient. And while it did check if the handler was not NULL, it would have
resulted in an endless loop if it was. I think we can safely assume we have no
NULL BHandlers in that list though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-07 21:42:02 +00:00
Stephan Aßmus
f7c226f467 * StartWatching() now takes an optional BLooper pointer. This looper will
then be used for receiving node monitoring messages.
* Reenabled using be_app as default BLooper if the API user does not provide
  one. I think the problem that Stefano needed to work aroung in r23995 was
  actually caused by the incorrect locking (an never unlocking) of the looper
  before calling PathHandler::Quit().
->If I understand correctly, this code as supposed to work around the possible
  situation that the looper holding those PathHandlers may have already quit,
  leaving stale PathHandler pointers behind. But that case was not prevented
  by the old code anyways, since one would have had to access freed memory to
  even get the stale BLooper pointer. The real fix would be to store the
  BLooper pointer with each PathHandler so that the possible gone-ness of
  those loopers could be checked independent of accessing the PathHandler
  pointer. (The whole problem is that PathHandler adds itself to the BLooper
  and if the looper quits, it will free all its attached handlers.)
* Introduced a global fallback BLooper for the case that no BApplication is
  running, which resolves a TODO.

All this is yet untested, but should have a good chance of working.
(Famous last words...)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26843 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-06 16:56:24 +00:00
Karsten Heimrich
1a74e75248 * replace some whitespaces
* return error in case we could not get all values from JobConfig



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26822 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 20:40:49 +00:00
Stephan Aßmus
a9ab16e27c * Move the LockLooper() call before PathHandler::Quit() into Quit().
* The B_QUIT_REQUESTED message never arrived for me unless I unlock the
  BLooper again, then it works as expected.
* The B_QUIT_REQUESTED handling accessed fOwnsLooper after deleting the
  object.
(Review much welcome - I don't understand the purpose of locking the BLooper
at all before trying to use a BMessenger to send it a message.)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26805 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 21:16:11 +00:00
Oliver Ruiz Dorantes
20a5113818 - Proper const use
- Styling



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 19:10:43 +00:00
Oliver Ruiz Dorantes
af9ccaf254 Use const reference as input parameter as suggested by julun
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26801 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 17:58:09 +00:00
Stephan Aßmus
e8f39ce96a Don't choke in BPathMonitor::StopWatch(...) if the client never called
StartWatching() before and the BPathMonitor stuff is therefor not initialized.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 14:25:26 +00:00
Stephan Aßmus
b5bc41debf * Use new header layout in PathMonitor.h
* Honor 80 char/line limit in PathMonitor.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26788 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 13:04:45 +00:00
Fredrik Modeen
b555dcbd39 comment fix and fixed some return error from BeBook
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 05:45:52 +00:00
François Revol
34f723cdc8 gcc4 fix. my->beers--;
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26769 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 19:43:59 +00:00
Fredrik Modeen
19143948df Forgot a file
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26765 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 18:25:08 +00:00
Fredrik Modeen
a14895cc90 Read's the joystick description file
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26764 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 18:22:21 +00:00
Axel Dörfler
518056893e * BWindow::Activate() now also unminimizes a window if necessary.
* Removed superfluous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26757 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 15:49:02 +00:00
Stephan Aßmus
59e13a3f06 Patch by Andrej Spielmann (GSoC):
* Simplified the subpixel related methods for the AGG "pixel format" template
  interface, the ones for the solid cover simply pass through the existing
  methods, so only one subpixel blending function is left which does the actual
  work (this removes a lot of the previously added code)
* Implemented a new rasterizer based on the original AGG rasterizer which
  implements subpixel anti-aliasing for any generic AGG vector pipelines. It
  is now optionally used in Painter and AGGTextRenderer (for vector fonts, ie
  rotated, sheared or big enough fonts) depending on the global subpixel
  setting.
* Put all subpixel variables into the new GlobalSubpixelSettings.h|cpp
* Simplified DesktopSettings related classes a bit and renamed previous
  FontSubpixelAntialiasing to just SubpixelAntialiasing.
* The private libbe functions for subpixel related settings moved from Font.cpp
  to InterfaceDefs.cpp where other such functions live. They are not related
  to fonts only anymore.
* Removed the subpixel related settings again from the Fonts preflet and added
  them to the Appearance preflet instead.

All of the above implements subpixel anti-aliasing on a global scale, which
to my knowledge no other OS is doing at the moment. Any vector rendering
can optionally use subpixel anti-aliasing in Haiku now. The bitmap cached fonts
are still affected by the Freetype complile time #define to enable the patented
subpixel rasterization (three times wide glyphs). Vector fonts and shapes are
not affected though at the moment.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26755 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 13:40:41 +00:00
Stephan Aßmus
d666a89e8f Check for index < 0 too for B_BAD_INDEX. This fixes for example Tracker-Grep
which does

message->GetInfo("field", &type, &count);
while (message->FindBlah("field", --count, &...) == B_OK)
	...;



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26695 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-31 10:54:08 +00:00
Stephan Aßmus
162a7f5f8e * Implemented new BView drawing functions DrawBitmap[Async](
const BBitmap* bitmap, BRect bitmapRect, BRect viewRect, uint32 options).
  Only option so far is B_FILTER_BITMAP_BILINEAR.
* BView::DrawBitmap[Async](const BBitmap* bitmap, BRect viewRect) was accessing
  the bitmap pointer without checking it. Would therefore crash when passing
  NULL, unlike the other methods.
* The BPicture code already reserved room for the BBitmap flags, but did not
  store the actual flags and neiter use them for anything. Since the bitmap
  data is stored anyways, the bitmap creation flags do not matter. So I reused
  this for the new bitmap drawing options.
* Rewrote Bitmap.h and removed the B_BITMAP_SCALE_BILINEAR flag again.
* Tried to optimize Painter::_DrawBitmapBilinearCopy32() a little by giving
  the compiler better hints. There seems to be a marginal, possibly imagined
  speed increase < 0.05 ms. ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 18:58:30 +00:00
Stephan Aßmus
3c7dd7c346 Added const versions of the methods that should have been declared like
that from the start. Please review for possible binary compatibility problems!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26663 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 18:50:07 +00:00
Stephan Aßmus
749a3c1ee3 Scrollbars do not need a pointer history.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 18:43:47 +00:00
Stephan Aßmus
1c111165b0 Cleanup only.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 16:27:13 +00:00
Stephan Aßmus
dcd70f0e39 * Introduced new BBitmap flag B_BITMAP_SCALE_BILINEAR.
* When drawing BBitmaps with scaling in the app_server, use a bilinear
  filter when a bitmap has this flag set. (Hope nobody objects, otherwise
  I can revert or improve this. Performance can certainly be improved, since
  the AGG implementation is too generic. But that goes for the nearest
  neighbor implementation as well.)
* Flags are uint32, fix app_server side code to declare them correctly. Use
  appropriate link methods in BBitmap and ServerApp.
* Enable the BeOS compatibility mode for B_RGB32 (works just like B_RGBA32
  in B_OP_ALPHA mode).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-26 23:40:13 +00:00
Karsten Heimrich
0ca6b749f4 * merge parts of libprint and libprintutils to make both indepentend
* adjust all drivers to take that into account
* fix UpdateText() signature in JSDSlider to avoid warning



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26648 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-26 22:36:01 +00:00
Stephan Aßmus
ad50b122b9 Use same structure of whitespace as in rest of comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-26 19:08:47 +00:00
Stephan Aßmus
d970f8e4c5 Extended the doxygen method comment of CommitModifications() to mention
that BPartition children are recreated.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-26 19:03:53 +00:00
Stephan Aßmus
316bce45fe Small simplification.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26644 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-26 19:02:37 +00:00
Oliver Ruiz Dorantes
585f2ec681 In some cases the remote name request is never returning us the event containing the name. It fails, the reason could be that the command has some differences in the fields depending on the BT version. This is handling the error code properly in this fail case avoiding the wait.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26637 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-25 19:37:19 +00:00
Oliver Ruiz Dorantes
3205e523cd Implement pairing with a remote bluetooth device
- Fix PincodeWindow to send the pincode commands dissapear after clicking 
- Improve the debug output of bluetooth_server
- Handle all needed events for the pairing
- Simple request could send and receive the event before adding the request to the events wanted list. Inverted the order of this sequence.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26614 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-24 20:50:49 +00:00
Axel Dörfler
489075a3b4 * Renamed _ForceUnmount() to _SuggestForceUnmount() to clarify what it does.
* Factored an _UnmountAndEjectVolume() method that takes a partition and mount
  path out of the method with the same name that gets a BMessage.
* Remove the mount point only if it's in rootfs.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26604 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-24 11:25:16 +00:00
Rene Gollent
7a1c09b66a Only try to rmdir in the case of success.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26595 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 23:09:08 +00:00
Rene Gollent
5c4fff2ef1 Tracker and DriveSetup now attempt to clean up the mount point after successfully unmounting the volume.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 22:55:00 +00:00
Karsten Heimrich
12fd6cc2e7 * move libprint sources into libs, as it is a 3rdparty lib
* move libprint headers into libs headers folder accordingly
* merge all shared folders sources into kits print, we might build later on a
  real print kit, propably also to access cups from an nicely API, atm static
* move all shared headers into private print, also pr_server.h from interface
* adjust build to work with the changed folder layout



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 20:30:14 +00:00
Stephan Aßmus
ebdb1a612b Just small white space cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 11:03:03 +00:00
Stephan Aßmus
ea021c679f Clicking on a menu item that already has an open submenu will close the
sub menu and quit menu tracking. This closes #1826. I tested a bit with
various different menu situations and there seem to be no negative side
effects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 10:50:34 +00:00
Ingo Weinhold
f974514476 BString::Append(, int32) methods have been broken in r26378. A local
variable "length" shadowed the "length" parameter.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26554 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 23:21:47 +00:00
Stephan Aßmus
a86d99e0da Opening previously open windows on non-boot partitions obviously only worked if the
automounter already mounted these partitions. Since this happens asynchronously,
it sometimes worked and sometimes not. The very simply and non-hacky fix for this
problem is to send a message from the automounter to the application looper to
have it open the previous windows after the initial mount scan is done.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 16:01:51 +00:00
Stephan Aßmus
499c81036f * Fixed automounting all BFS disk when Tracker starts.
* Fixed mounting previously mounted partitions. fSettings was never initialized when restoring
  the settings. The code I removed earlier didn't do that either.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 15:44:45 +00:00
Stephan Aßmus
df7697df96 Do not shoot ourselves in the foot and remove the previously mounted partitions
from the settings message just after having restored it. This should fix
restoring the previously mounted partitions, but I have not tested it yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 13:18:17 +00:00
Stephan Aßmus
54badb1f36 mmlr + stippi:
Fixed more controls to handle a B_TRANSPARENT_COLOR as view coloe of the
parent view. Some controls would not initialize their LowColor() at all
if they were the only control in a window.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26515 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-19 21:28:33 +00:00
Stephan Aßmus
4f2fc580b8 The BStringView is not a BControl but suffered from the same problem in
AttachedToWindow(). Maybe there are more non-BControls yet, I didn't
have a look.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-19 17:49:45 +00:00
Stephan Aßmus
5fe54dee09 If the parent view color is B_TRANSPARENT_COLOR,
fallback to ui_color(B_PANEL_BACKGROUND_COLOR) in AttachedToWindow(). Most
controls don't paint their background and rely on the app_server painting it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-19 17:09:54 +00:00
Stephan Aßmus
b66837d4cd Better debug output, print the error string when failing to get a Reader or Decoder.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26504 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-19 15:30:29 +00:00
Stephan Aßmus
85db8e8380 In my BSlider changes, I changed the behavior of GetPreferredSize(), which
previously did never shrink the slider horizontally. This broke a couple
apps, so I added it back, although I don't quite agree that this is the correct
behavior. Apps using the new layout system are not affected though, so I
guess it is alright. Should fix #2530, although I didn't test it yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-19 12:39:14 +00:00
Stephan Aßmus
fa55277509 In BeOS, BView::Bounds() does the owner lock check. In Haiku, it does now
too. Removed the check in Frame() accordingly, because that uses Bounds().
Removed some code left overs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-19 12:36:26 +00:00
Stephan Aßmus
84c9d73d7d In the B_MOUSE_MOVED message, "where" is supposed to be in window coordinates
while "be:view_where" is in view coordinates. We made the mistake of having
them both be in view coordinates. This caused a problem for example in Vision.
(#2460)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-18 22:34:38 +00:00
Stephan Aßmus
f779adc692 mmlr + stippi:
In my last row of changes I removed a call to ResizeToPreferred()
in SetLimitLabels(). It is confirmed that the BeOS implementation
is doing it and some applications rely on it, like our own Mouse preflet.
This closes #2526.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-18 00:06:28 +00:00
Michael Lotz
741b3d9004 Use B_RGBA32 instead of B_RGB32 when getting vector icons. Should fix bug #2525.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26474 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-17 19:32:57 +00:00
Stephan Aßmus
3cd9fb7518 * Calculate correct invalidation rect in SetBarThickness()
* Improved ThumbFrame() for B_TRIANGLE_THUMB, too high horizontal slider
  had the thumb along the bottom and not on the bar.
* Improved triangel thumb drawing, the vertical drawing did look so good
  yet, I also put the triangle on the right side, it looked weird on the
  left and it reverted the hashmark meaning too.
* Small code cleanups.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26458 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-16 23:49:28 +00:00
Oliver Ruiz Dorantes
6e82afcc18 -Update copyright
-whitespaces cleanups 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26452 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-16 19:30:45 +00:00
Oliver Ruiz Dorantes
7434b76048 Add to the command manager the connection accept and reject commands
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26451 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-16 19:25:44 +00:00
Oliver Ruiz Dorantes
870ae24a6d Resolve allocation of multiple Messengers,(Mika Lindqvist)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26449 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-16 19:04:53 +00:00
Stephan Aßmus
1ae794159a * Changed the signature of UpdateText() to return a "const char*" (char*
really makes no sense if the pointer belongs to the derived class and
  only confuses). Note this change does not affect binary compatibility.
* Introduced a new MaxUpdateTextWidth() virtual method which is really
  necessary to handle the update text correctly in the layout.
* Introduced a new UpdateTextChanged() method which can be called to
  notify the control of a changed update text. Internally, SetValue()
  also uses it.
* Handle the width or height of the UpdateText() correctly in the layout.
  For horizontal layout, the width was forgotten to be included in
  GetPreferredSize(), for vertical layout, it was completely broken before.
* Handle invalidation correctly when the UpdateText() changes.
* Remove the arbitrary insets for labels from the border the control. This
  makes it easier to align the control's labels with other controls.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-16 18:37:44 +00:00
Stephan Aßmus
8995071f07 The vertical slider is now at least functionally working, although the rendering
code needs some love.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26444 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-16 15:55:58 +00:00
Stephan Aßmus
f898f8af47 If the user specified a hashmark location other than B_HASH_MARKS_NONE, draw
at least two hash marks, even if the hash mark count has never been configured.
Also means the minimum hashmark count is 2 instead of 1 as before. I think this
behavior is more what one would expect, I turned on hashmarks and wondered
why nothing happened until I realized I needed to configure the count as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-16 15:15:24 +00:00
Stephan Aßmus
423b124450 First round of BSlider fixes to be more layout friendly:
* Improve the minimum size calculation and cache it.
* Invalidate the layout on various property changes that require it.

Vertical BSliders are very broken... that's up next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26441 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-16 14:41:10 +00:00
Stephan Aßmus
cdcfa5945d * Added layout friendly constructor
* Use constructor lists for initializing members
* Simplified initial SetBarColor()
* Update the offscreen view with ViewColor() and LowColor(), someone might
  have changed it after AttachedToWindow() was called.
* Cleanup here and there


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26440 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-16 13:46:05 +00:00
Stephan Aßmus
e87506af4d * Implement SetFont() and invalidate the layout. More controls should probably
do this.
* Fix build, appearantly I made a last minute change in Draw()...

BTW, confirmed that adding virtuals declared in the base class is ok for
binary compatibility.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-15 13:55:44 +00:00
Stephan Aßmus
4d2baf30df * Small coding style improvements.
* fPreferredSize was not initialized for the archive constructor.
* Added comment to archive constructor, because I was wondering how
  the default button status was reconstructed or the archive code path.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-15 13:23:29 +00:00
Stephan Aßmus
ee2a347385 Minor cleanup again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-15 13:22:29 +00:00
Stephan Aßmus
d3fe87ce70 * Cache a fPreferredSize following the example of BButton. Changed
GetPreferredSize() accordingly.
* No longer adds margins to the left/right side and top/bottom. These will
  make it difficult to make exact visual alignments with other controls and
  labels.
* Invalidate the layout in SetText().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26422 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-15 13:20:26 +00:00
Stephan Aßmus
52daa631a5 Added comment about possibly invalidating the layout when changing the font.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26421 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-15 13:17:52 +00:00
Stephan Aßmus
2a739c3115 Insignificant cleanup and comment typo fixes...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26420 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-15 13:17:20 +00:00
Karsten Heimrich
99939029b3 * only delete the popupmenu if we running the async version of BPopUpMenu
This fixes part 3 of task #1987, TaskManager was using the syncronous version of
  of BPopUpMenu wrapped in it's own class to run asyncronous. It did set SetAsyncAutoDestruct
  to true and afterwards calling delete an the already deleted menu.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26406 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-13 20:42:14 +00:00
Oliver Tappe
49a22456dd Overhauled BNetEndpoint implementation (and BNetAddress, too):
* added NetEndpointTest that exposed a couple of bugs
* fixed several bugs in the implementation of BNetEndpoint, some of which kept 
  NetPenguin from working
* fixed a couple of constness issues in BNetEndpoint and BNetAddress


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26405 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-13 19:58:35 +00:00
Ingo Weinhold
3be7d0090c Don't fail, when no userland add-on could be found for partition. We
won't be able to edit the partition in any way, but we shouldn't cause
the whole BDiskDevice::PrepareModifications() to fail. Should fix bug
#2470 -- haven't tested this, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-12 22:28:04 +00:00
Karsten Heimrich
731b9ac77c * If a handler goes away that has an looper, we should remove us from the
loppers fHandlers list, otherwise we might end up with a dangeling pointer.

  This should fix the crashes seen in Cortex and Icon-O-Matic on app close.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26383 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-11 20:07:00 +00:00
Stephan Aßmus
ea1b25f5d1 Calling BStatusBar::Update() with NULL as either string argument should
keep the current string. (Untested)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26379 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-11 11:38:51 +00:00
Stephan Aßmus
2cbb2916a7 * _DoAppend() no longer checks the string and the string length, which resulted
in duplicate work/checks. Instead the length is checked in the calling
  functions.
* operator=(const char*) now checks if the passed pointer is the strings
  own data pointer. I think it would have freed the memory before, not
  sure though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26378 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-11 11:32:07 +00:00
Oliver Tappe
aebcc506e2 Corrected by previous assumption, since gethostbyname() has nothing to do with
struct sockaddr_in - the real culprits were BNetAddress::GetAddr(sockaddr_in&)
and BNetAddress::SetTo(const sockaddr_in&):
* moved check_r5_compatibility() into r5_compatibility.h to make that function
  available to BNetAddress, too
* adjusted sockaddr_in-handling methods of BNetAddress to deal with R5-addresses
  if in compatibility mode
* removed is_r5_sockaddr() again, since it is no longer needed

With this less hacky solution, Beam, NetPositive, NetworkTime and Vision still work. So, there's hope that the R5 compatibility layer is now complete.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26377 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-10 21:25:19 +00:00
Stephan Aßmus
1d6aab3303 Patch by Andrej Spielmann (GSOC):
* Add a private BFont API that sets/gets the subpixel and hinting configuration
  of the app_server. Currently, the options are boolean, but may be changed
  to modes later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26363 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-10 08:31:48 +00:00
Stephan Aßmus
674c8bc8bb Added TODO about a problem that the late mouse moved message dropping code
may have.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-10 07:35:47 +00:00
Stephan Aßmus
dde9faab86 * Made the mouse moved message dropping code slightly nicer to read.
* Don't drop messages which carry an important transit value. (Thanks, Axel!)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26352 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-10 07:21:16 +00:00
Stephan Aßmus
bb73c05fd7 * Introduced a new view event mask flag: B_FULL_POINTER_HISTORY which,
when set, prevents any old mouse moved message discarding.
* BWindow::DispatchMessage(B_MOUSE_MOVED) checks the event time of the
  message and discards too old events, but only if there is another event
  in the queue and the view does not specify B_FULL_POINTER_HISTORY.
* BView::GetMouse() ignores the checkHistory flag passed to the function
  in case the event mask specifies B_NO_POINTER_HISTORY.
  B_FULL_POINTER_HISTORY on the other hand prevents the dropping of old
  messages.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26341 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-09 14:13:03 +00:00
Stephan Aßmus
fe3d5b3083 Implemented a simple fix for the message-pile-up problem of
BView::GetMouse( , ,useHistory = true) in case the application
calls GetMouse() in a loop with a longer delay then mouse
messages arrive at the queue. The "when" field of the messages
is used to discard old mouse moved messages. This also fixes
the possible problem of finding the same message over and over
in case it is not removed from the queue for other reasons.
This fix makes selecting text in Pe for example usable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26337 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-09 10:03:28 +00:00
Stephan Aßmus
f3312751b9 honor 80 char limit in comment
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26331 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-08 22:31:26 +00:00
Stephan Aßmus
bafcc63bcc This is either a fix or a workaround for a problem in Pe, where the
application modifies the scrollbars one by one and the changes would
have some weird cyclic effect where the constrains of one scrollbar
affected the scrolling already while they would be lifted afterwards.
It sounds weird, but maybe it is simply a resulting behavior of the
BeOS implementation which does not check the scrollbar restrictions
in the BView code. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26322 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-08 17:21:39 +00:00
Oliver Tappe
a042907733 * removed debuggin leftover
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26311 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 21:06:04 +00:00
Karsten Heimrich
30cf4e6a54 * revert the last change as we can get stop etc. also
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26306 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 19:23:40 +00:00
Karsten Heimrich
7630cacab6 * check against baad as e.g. the epson addon does not return okok on success
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26305 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 19:14:08 +00:00
Karsten Heimrich
f56301c9e8 * maintain our own rect while printing, this makes it possible to print all pages e.g. syslog from StyledEdit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26304 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 19:10:39 +00:00
Oliver Tappe
3ad86c7ff5 Fixed R5 compatibility "layer" in libnetwork:
* instead of always converting from the expected r5_sockaddr_in to haiku's own,
  we now explicitly check whether or not the given sockaddr is an r5_sockaddr_in
  or not, naturally doing the conversion only if it is. This is necessary since
  even R5 applications may not always pass in r5_sockaddr_in structs (as for
  instance gethostbyname() will return a native [haiku-]sockaddr_in)
* cleaned up the confusion between the name r5addr and it's actual meaning
  (holding a haiku sockaddr_in) - renaming it to haikuAddr instead
* undid the part of Ingo's r25489 described as: "Extended R5 compatibility 
  check to also consider calls from libbnetapi" - as I fail to see why this
  would be desirable and in fact it stops at least Beam from working.
  Ingo: if you can remember, please enlighten me what was the reason behind 
  this change.
This finally makes Beam "work" (well: connect to servers and download mails ;-)
Vision, NetworkTime and NetPositive are still working, too, so hopefully there
are no regressions.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26303 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 18:53:01 +00:00
Karsten Heimrich
ba18b05b5d * Fixed broken archive functionality, before we would not archive subitems
and store the archived items in the wrong message field. Verified on R5.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26278 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 14:46:06 +00:00
Oliver Tappe
7da7c45951 * when finding out whether or not R5 compatibility mode is required, we may have
to scan loaded libraries, too, as the dependency on network libraries may not
  be present in the executable image, but may be "hidden" in one of those
  library images (as is the case with Beam).
  


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26277 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 13:50:28 +00:00
Karsten Heimrich
d2805ca9aa * Archive the thread priority as well, it can be found in an R5 archive if Run() was called.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26276 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 10:34:47 +00:00
Karsten Heimrich
cd6265ec4d * don't leak fTrack
* fixed broken while loop
* call _InitObject also from the archive constructor
* just noticed while trying to load the R5 epson printer driver, still not working...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26275 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 10:26:14 +00:00
Karsten Heimrich
f589ec0229 * remove whitespaces, no functional change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26274 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-06 10:21:41 +00:00
Oliver Tappe
1aa3d2e3f3 Resolved a couple of problems in BNetAddress implementation:
* fixed several byte order inconsistencies, it does not make sense to always
  convert the byte order input/output values - no we convert where it can
  be expected and leave it where it is confusing
* fixed size inconsistencies with respect to family and port, both of which
  were sometimes handled as int8, as int16 and as int32 in different places
  (now they are always int16)
These fixes make Beam connect to the correct address and port, but it still doesn't work, as it seems to be using UDP instead of TCP (doh!). Will look into that tomorrow.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26269 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-05 22:37:06 +00:00
Axel Dörfler
dcdf3137e1 * Unnamed volumes now get the disk size instead of "unnamed" in their mount
menu name, ie. "(unnamed Ext2 File System)" could become "(12.5 GB Ext2 File System)".
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26242 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-03 20:44:57 +00:00
Oliver Ruiz Dorantes
9bfe62f9aa Cleapups, Fix memory leaks,
Patch by Mika Lindqvist. Could we give give him Commit access? 
I am getting daily patches from him with fixes and new features.
 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26227 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 19:41:45 +00:00
Oliver Ruiz Dorantes
b94e17518b Implement RemoteDevice contructor by String
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 18:28:00 +00:00
Oliver Ruiz Dorantes
18dbcd22a0 Handle the command status sent before the arrival of a remote name request.
Avoid unhandled event in the bluetooth_server
	by Mika Lindqvist
  


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26196 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 19:15:15 +00:00
Rene Gollent
78163ba34d That should've been eol-style :/
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26194 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-01 17:31:11 +00:00
Oliver Ruiz Dorantes
5e53139393 Make the BWindows die in a proper way as suggested by mmu & stippi
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-30 22:16:23 +00:00
Rene Gollent
fa366cbe40 Accidentally broke CountItemsUnder() for invalid items with previous commit. This fixes
VLC, which for some reason calls CountItemsUnder(NULL) quite a few times on startup.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26167 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-29 18:54:28 +00:00
Rene Gollent
84d75fa444 Rewrote SwapItems() so as to not fail in various cases.
Fixed logic error in CountItemsUnder() that would sometimes 
return the wrong count. This would result in issues such as
Vision's network reordering failing to reorder down due to
retrieving the wrong item based on the count.

This fixes ticket #2447.
 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26149 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-28 03:03:56 +00:00
Alexandre Deckner
8a588970c7 - HiliteDropTarget was broken, it used a trick to avoid unselecting already selected items but assumed every
call to HiliteDropTarget(true) and HiliteDropTarget(false) would come in pair on the same target.

 Fixes #2453 and #1793


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-25 16:46:03 +00:00
Alexandre Deckner
96f8dfaec8 - Some view mode transitions had to be handled specially: kScaleIconMode -> kScaleIconMode,
kMiniIconMode -> kScaleIconMode, kIconMode -> kScaleIconMode.

  Switching the mode to kScaleIconMode uses a special code path that resets the view origin, 
which wouldn't get a chance to be stored/restored. Other icon mode don't need to save/restore 
their origin except when going to or coming from kListMode.

This fixes #2441, although i just discovered the same problem when using SwitchDir() (single 
window navigation)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26121 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-24 11:19:12 +00:00
Rene Gollent
4079af86ca gcc4 build fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26091 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-23 00:54:54 +00:00
Rene Gollent
fa83a2a121 These files were in CR/LF newline format for some reason.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26084 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-22 19:49:08 +00:00
Stephan Aßmus
188ba2f72a * SetTarget((BView*)NULL) needs to unset the previous target's pointer to
the scrollbar.
* Added notes about BeOS behavior to SetTarget(const char*).
* Reuse SetTarget(NULL) in the destructor.
* Initialize fTarget and fTargetName in the archive constructor.
* Added TODO about possibly restoring the target in the archive constructor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 08:39:14 +00:00
Alexandre Deckner
1c4b7e9e01 - revert my last changes to ScrollBy, this temporarily bring back #2312
and the previously mentioned ResizeToFit issue.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26047 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 20:04:10 +00:00
Alexandre Deckner
d511a89a8a - Since r21336, BView::ScrollBy was checking the values against the ScrollBar ranges but ScrollBy is often called before
updating the scroll range (ie: in ContainerWindow.cpp). IMO, the programatic ScrollBy method shouldn't depend on the 
ScrollBars ranges or state. The original fix in r21336 was apparently hiding other BScrollBar or BView bugs that have been 
fixed in the mean time.
  The content was offseted when going back to list mode after moving icons on the left/up in icon mode. This fixes Tracker bug 
#2312.

- Revert and fix changes to ContainerWindow.cpp in r18481 (cvs 1.37). The condition was broken, but it wouldn't ScrollBy() 
anyway due to the previous problem. Fixing BView made the content autoscroll even if the lefttop corner of the extent was 
already visible.

- Probably unrelated, fix changes to ContainerWindow.cpp in r18993 (cvs 1.38). PoseView()->Bounds().left/top < 0 is expected, 
if for example in icon mode you move an icon close or crossing the left side of the window and then scroll left to adjust. 
This fix ResizeToFit that wouldn't scroll the view correctly in some cases.

So we had a Tracker Bug uncovering a BView fix that was hiding another Tracker bug, everything is fixed hopefully, phew :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 02:39:33 +00:00
Stephan Aßmus
eaa6da1ef7 Use a flag in BWindow to store whether an update to a view (Invalidate()) has
been requested. The first call to a BView::Invalidate() will flush the link
so that app_server is notified as soon as possible. It makes no sense for
further calls to Invalidate() to flush also, since Flush() is not cheap. This
trick makes Invalidate() about 3.2 times faster, making it a cheaper operation.
I could not see any negative effects, I tested with apps that invalidate
multiple different parts inside a window in reaction to something. Thanks go to
Ingo who had the idea.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26020 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-19 13:07:44 +00:00
Ingo Weinhold
ae50fc51bb Fixed libbe_test build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26017 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-19 00:06:50 +00:00
Oliver Ruiz Dorantes
24f4a20d25 Add UI classes to the build.
Adding some helper methods to the Local and remote devices



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26011 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-18 21:01:26 +00:00
Oliver Ruiz Dorantes
b12daa5f08 Add UI classes for handling incoming connections and pincode requests
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26010 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-18 20:57:27 +00:00
Oliver Ruiz Dorantes
0df89492fb -Wrong header for function,
indenting...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26008 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-18 19:17:35 +00:00
Karsten Heimrich
9c95cbf21f * update the chart as the first one was not entirely right
Thanks Michael for pointing this out :)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26002 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-17 20:00:51 +00:00
Jérôme Duval
4498384dd3 added support for dumping B_RGB15 and B_CMAP8 colorspaces
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25976 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-16 18:41:31 +00:00
Karsten Heimrich
6af681d7e6 * update year in copyright
* added a bit more (visual)  information about the spool file format
* rename Configuration to PrintServerMessenger (still not the best name)
* remove ConfigPage{Job}Thread as both share the same code and make it privte in PrintServerMessenger



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25966 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-15 17:37:07 +00:00
Oliver Ruiz Dorantes
91f7786bc3 test
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25963 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-15 14:40:03 +00:00
Jérôme Duval
3b6336e41c PNGDump supports B_RGB16 now
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25950 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-13 06:54:03 +00:00
Alexandre Deckner
c3f006deb0 - initialize the variable, we never know :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-13 00:36:06 +00:00
Alexandre Deckner
709ef82757 - BMenu caches the preferred size (since r21396) but didn't recompute it if the ResizingMode changed, it did it only in
InvalidateLayout().

  This fixes #1461, the bug appeared because DraggableContainerIcon uses a special trick, involving changing the resizing 
mode, to get the total width of the menu items. (see tracker/ContainerWindow.cpp line 479)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25948 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-13 00:24:01 +00:00
Rene Gollent
fe83a98715 Remove unneeded header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-12 21:33:13 +00:00
Rene Gollent
0c8bdbafd5 Revamp BList somewhat to further optimize the resizing behavior.
We now keep track of a lower bound as to when the list should scale
itself back down. When increasing the list size, we double the current,
with the lower bound set to 1/4 of the current size, not allowing it to
go any smaller than the block size. These combined allow us to do very
cheap tests to see if an operation requires a resize at all, and minimize
how often the list actually needs to be resized, since the difference in upper
and lower bounds prevents bouncing back and forth between a size in the case
of adding/removing an item while close to a boundary. All in all this should
make BList noticably more scalable when doing large numbers of add/remove
operations.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25946 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-12 21:30:28 +00:00
Oliver Ruiz Dorantes
350458a6ba - Add PinCode command replies
- Add CancelInquiry command


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25942 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-12 19:18:32 +00:00
Alexandre Deckner
491a329330 - AddPoses didn't check for the ShowDiskIcon() option when deciding to AddRootPoses.
When changing to icon mode with a size other than 32 (ie: kScaleIconMode) PoseView calls Refresh() and all the poses are 
removed and loaded again (PoseView.cpp line 1995). This called AddPoses but didn't check for ShowDiskIcon(). The Disks icon 
was shown on startup though, since Tracker uses another code path when starting (caching?).

  This fixes #1833.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25941 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-12 18:22:27 +00:00
Alexandre Deckner
82adcce2b7 - BView::MoveBy was letting BView::MoveTo do the rounding after adding
the delta.
  For example, MoveBy(-0.5, 0.0) would do nothing in this case: 
roundf(150.0 - 0.5) = 150.0, when rounding the delta it gives the 
expected value: roundf(150.0 + roundf(-0.5)) = 149. 

  On the other hand, BView::ResizeBy was doing it right, and this 
explains the bug in Cortex (#333). Cortex was doing 
scrollBar->MoveBy(-0.5,0) then scrollBar->ResizeBy(0.5,0) and the 
inconsistency lead to the visual bug. (see StatusView::MouseMoved())

  This fixes #333. The bug was strange to reproduce since sometimes the 
point received in MouseMoved would be "some_integer+0.5" values 
sometimes just integral. This has still to be investigated though not 
problematic here anymore. See cortex/RouteApp/StatusView.cpp line 222.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25930 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-11 19:43:36 +00:00
Rene Gollent
819eb21bbf Remove (invalid) TODO note. Rename variable more meaningfully. Remove stray whitespace that crept into previous commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-11 14:29:59 +00:00
Alexandre Deckner
abe0b5c858 - MakeViewFor didn't return a view with a good default size when no hintRect was provided (as
in Cortex). This happened only when needing a tabbed view. It will now return a view with the 
most fitting size. This fixes #597



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25923 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-11 01:47:49 +00:00
François Revol
f57b802a6e Debugger stubs for m68k.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25922 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-11 01:26:02 +00:00
Rene Gollent
34380ac48c Tracked down issue with previous commit. For some reason, modifying the passed in parameter's value directly results in a segfault in registrar, and I cannot see why. Thoughts?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25920 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-11 00:32:48 +00:00
Rene Gollent
22aef42481 Revert this change until I determine why it now crashes the app_server when it didn't during my tests.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25919 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-10 23:25:33 +00:00
Rene Gollent
864ace1845 Rework BList's Resize() functionality: instead of altering the size of the list a block at a time,
we now double/halve the current size of the list, starting with the constructor blocksize as a baseline.
This has the net effect that when doing large numbers of inserts/removes, the number of resize operations 
needed scales logarithmically to the number of operations, which should yield a decent performance 
improvement in such cases.

Review welcome. This does not yet affect ticket #2363 that I'm aware of, as I'm currently in the process
of attempting to find a copy of said app to test with.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25916 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-10 22:10:13 +00:00
Karsten Heimrich
e8991ce3ac * fill the view with it's high color, BPrintJob behaves now like on R5
fixes printing from e.g Scooby (missing header color)

  finally found the missing peace here:
  http://www.freelists.org/archives/haiku-development/06-2008/msg00086.html
  thanks Stephan  :)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-10 18:42:47 +00:00
Alexandre Deckner
6d4ab8b00e - The bug in Tracker (previous commit) uncovered a bug in BScrollBar's thumb positioning. The + 1.0 was well intented and produced the right effect unless fMax-fMin was too close to 1.0. It could
leave a unusable gap on the right (or down) of the thumb.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25897 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-10 00:53:16 +00:00
Alexandre Deckner
ed27e7aef6 - Scrollbar proportions computation was wrong in icon mode. The problem showed when a folder contained few icons regrouped in a small area (Extent() smaller than Bounds()). The viewable extent is
always Bounds() now.

 This fixes #361, again we're better than R5! Although in this test case, the scrollbars shouldn't be activated in the first place. In icon mode the poseview is still putting too much white space on 
the left (x<0) and make the scrollbars show. Fix is almost ready :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-10 00:52:01 +00:00
François Revol
9c1328f0a2 gcc4 fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-09 18:08:24 +00:00
Stephan Aßmus
80f4a4f272 The given updateRect in screen coords (_Draw()/_DrawAfterChildren()) should
no longer extend outside the view after r25879.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-09 16:09:20 +00:00
Stephan Aßmus
581e67867c * Change the protocol for sending the affected view tokens during an update
session to also include each view's individual update rect (in screen coords).
  Should actually not be mush slower than the old version, and hopefully makes
  it possible to have smarter BView::Draw() implementations which should make
  more than up for any potential speed loss.
* Removed unused version of View::AddTokensForViewsInRegion().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25879 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-09 16:07:18 +00:00
Ingo Weinhold
258fd455bc Also do fast mouse wheel scrolling when Command or Control is pressed
(was Option only).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-08 23:47:32 +00:00
Jérôme Duval
631d09ac07 gcc4 build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-08 16:32:07 +00:00
Fredrik Modeen
1ac8a0b5cb Added some part from BSerialPort and some missing things R5 Joystick Pref app reports as missing, with this R5 Joystick Pref App starts in Haiku
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-08 15:42:29 +00:00
Rene Gollent
ef83ae3e0b Remove BOutlineListView's home-brew quicksort implementation in favor of a comparator that hooks into the STL's sort algorithm as suggested by Ingo. Tested and seems to work nicely.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-07 16:14:30 +00:00
Stephan Aßmus
636427b614 Axel!! Since _Thursday_ I am trying to track this down. "MediaPlayer wouldn't
play any more clips." Of course I was searching in my own commits. In the
end, I resorted to binary searching revisions for when this broke. Turns out
it is your change r25793/r25794, in which you forgot to attach the colorspace
to the app_server message. Which of course makes it lock up. Another of those
instances where you think passing data structures between client and app_server
instead of this "protocol" would be the better idea...

* Fixed bitmaps_support_space() retrieving the currently supported overlay
flags for a given color space. This makes MediaPlayer play files again, the
media node connection would time out because of the broken app_server
communication. (I have not tested this change yet, but I will in a minute, on
a different computer.)
* Also retrieve the overlay supported flag for YCbCr colorspaces.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25847 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-07 15:14:00 +00:00
Stephan Aßmus
cf7e57ef10 Small coding style fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25839 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-07 12:39:56 +00:00
Rene Gollent
fed7414a59 A view shouldn't be able to RemoveChild a view that it isn't in fact the parent of.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-07 07:10:08 +00:00
Rene Gollent
bf319ba31d Remove stray debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25832 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-06 21:03:37 +00:00
Rene Gollent
e90b17a854 Fix logic bug in quick sort routine. This would result in infinite recursion such as that in bug #2343.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-06 21:01:51 +00:00
Rene Gollent
642695c2fe Build fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25827 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-06 15:27:28 +00:00
Stephan Aßmus
ae4ebbcca6 * Use NULL instead of 0 for some pointer initializations.
* Slightly more debug output for failed atempts to create a decoder.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25825 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-06 13:07:02 +00:00
Axel Dörfler
6ec21b4ad3 * Implemented retrieving additional bitmap support flags by the app_server.
* Added B_BITMAPS_SUPPORT_OVERLAY flag to indicate overlay support for the
  color space.
* Rewrote GraphicsDefs.h - the previous one was obvious a copy of the Be header,
  including typos and strange white space. I was a bit lazy with respect to
  the color space details, and mostly trusted the information provided by the
  Be header else.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25793 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-03 17:44:46 +00:00
Stephan Aßmus
bddb4413d7 Do not remove the plugin from the list if the ref count has not reached
zero, otherwise we leak these plugins, since the ref counting is based
on the plugin still being in the list.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-03 17:09:13 +00:00
Stephan Aßmus
cc4ed3f7e7 Honor the 80 char per line limit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25791 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-03 17:07:47 +00:00
Karsten Heimrich
15c0cece2b * don't print child views with invalid rect, this makes printing e.g.
from Scooby nearly the same as on R5 (still misses the gray header color)
 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25769 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-02 20:21:40 +00:00
Stephan Aßmus
3dd59121c4 Resolved TODO and set the flags for the kind of additional
bitmap support (bitmaps support child views or BViews can
draw them)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25762 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-02 18:18:56 +00:00
Axel Dörfler
9abdb2222c * PoseView waited for 200 ms after a B_META_MIME_CHANGED message was evaluated
to give other windows the opportunity to mark the icon invalid before
  recaching it.
* Since we currently update all app MIME types on first boot, over 400 messages
  are generated, so that delay easily caused the message queue to get full.
* I've now reduced the wait to 10 ms, and also call BWindow::UpdateIfNeeded()
  afterwards, which empties the message port, too. This fixes bug #2212.
* Note though, this should be handled completely different to make it really
  work right.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25719 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-30 09:10:53 +00:00
Axel Dörfler
873066a8e1 A bit of cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25718 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-30 09:07:06 +00:00
François Revol
e26120ae27 Add char * version of ReadFrames, for compatibility with some R5 games.
Patch by genki0. I didn't see any reason not to commit it, so...
This should fix #897.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-25 21:45:32 +00:00
Ingo Weinhold
d2e55e94c0 Memory leak in error case. CID 807.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-24 16:23:22 +00:00
Oliver Ruiz Dorantes
fd585f3c8b Implement/stub the mandatory parent methods from the BluetoothDevice Class
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25595 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-21 21:55:30 +00:00
Karsten Heimrich
75ef87aeb5 * make printing for child views working, noticed while trying to print
from Scooby, it would draw all child views on top of each other...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25580 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-20 20:39:47 +00:00
Rene Gollent
087592136a Moved scroll implementation from ScrollBy into ScrollTo and made ScrollBy simply wrap a call to the former. This
guarantees that the virtual hook is called in all cases, and fixes bugs 1252 and 1838.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25559 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-19 00:16:49 +00:00