Commit Graph

5517 Commits

Author SHA1 Message Date
Jérôme Duval
4dc62bba59 FavoritesMenu: don't call the RefFilter when the model's node is NULL. Fixes bug #5871.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-09 12:11:52 +00:00
Stephan Aßmus
da8169406f Don't open context menus right under the mouse so that the first item is
already selected and get's picked when the user releases the mouse right after
the initial click. For model context menus, like right clicking a mounted disk
on the desktop, this somehow worked without selecting the item. But opening
the context menu on an empty part of the desktop always selected the Desktop
entry which resulted in the menu immediately closing without any effect. The
perhaps unwanted side-effect of this change is that navigation menus don't
automatically open unless you move the mouse a bit. Please play with this a bit
before commiting to alpha branch. I remember having to move the mouse a bit
on R5 as well, but could be wrong about it.

The real fix would be in BMenu and BMenuBar tracking code, but the changes
which I would have in mind are too radical to do before the release. I
understand that _IsStickyMode() is supposed to handle this case, but it actually
has too little information, since each menu is tracking the mouse state itself
and doesn't know what another menu already knows. Perhaps this is what the
"start" parameter was for in the original _Track() hook, but why not simply
create an object which is passed from menu to menu and tracks everything of
relevance and maintains state?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36762 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-08 22:41:55 +00:00
Stephan Aßmus
676a46d50b fSelected was accessed unchecked in _UpdateStateOpenSelect(), but the method
can be called without any item being selected yet. In that case, fall back
to just select the item and return (setting fSelected). I've had Tracker
crash with a BT that suggest this was the case, when I invoked some context
menu.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36759 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-08 21:42:30 +00:00
Ithamar R. Adema
a40ec7c51a * Revert my changes to BListView for now
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36758 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-08 20:59:14 +00:00
Ithamar R. Adema
e2e160328b * Revert MinSize() and PreferredSize() to the normal BView variants, since unlike the comment says GetPreferredSize() actually looks at the content of the listview to determine the size.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36756 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-08 19:45:13 +00:00
Ithamar R. Adema
b513501fe4 * When a BMenuItem contains a submenu, and that menu IsLabelFromMarked(), use its preferred width as the content width in GetContentSize().
This fixes problems with the Min/PreferredSize() calculations for BMenuField, with a Menu that IsLabelFromMarked().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36752 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-08 19:03:33 +00:00
Matt Madia
4eb0cbb044 Updated TR_CONTEXT to be B_TRANSLATE_CONTEXT, relating to #5408.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36733 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 20:19:06 +00:00
Oliver Ruiz Dorantes
125183f9e5 - Add possibility yo set a custom friendly name to our device. Which will be seen by remotes devices at discovery
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36729 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 18:25:09 +00:00
Axel Dörfler
96eaa02e8f * Changed BLocaleRoster::GetLanguage() to a signature that makes more sense,
and looks more like the rest of the API.
* Also, it will now return an appropriate error code if the language couldn't
  be allocated (anything else than B_OK is an improvement :-)).
* Several changes in BLanguage:
  - GetName() now gets a BString reference, also
  - it now returns the name in its own language, ie. for German this would
    always be "deutsch", no matter the current language settings, and finally,
  - it now empties the string it gets before adding the name.
  - added GetTranslatedName() that behaves like the previous version.
  - added const where it made sense (ie. almost everywhere).
  - Code() now returns the code of the language only.
  - ID() now returns the full ID of this language, ie. including country,
    variant, and keywords if any.
  - added Country(), and Variant().
  - renamed IsCountry() to IsCountrySpecific().
  - added IsVariant().
* Cleaned up Language.h, minor cleanup in LocaleRoster.cpp.
* Removed the whole move item logic from LanguageListView; while this was not
  only spaghetti code, it doesn't make much sense in the first place.
* Instead of removing stuff from the left, and even worse, moving all countries
  for a language even if only one had been dragged, we now only mark the items
  that are already in the preferred list, and only those.
* Fixed various mixups of FullList*() vs. *() methods that could lead to things
  like bug #5896.
* Pressing the delete key in the preferred list view will now remove the
  language.
* Moved LocaleWindow specific message constants to LocaleWindow.cpp; Locale.h
  is supposed to contain application wide constants.
* The drop logic is now in LocaleWindow.
* We now make sure that each base language can only be in the list once.
* Lots of cleanup, even though I mostly replaced spaghettie code with different
  looking spaghettie code - still, I think things have slightly improved.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36727 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 17:38:40 +00:00
Axel Dörfler
542aff1be0 * Added constructor that takes a name for the view.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36725 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 17:24:22 +00:00
Axel Dörfler
5396d90d16 * Made zooming to full screen center the window when the window cannot be made
full screen (due to size restrictions).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36714 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 11:29:41 +00:00
Axel Dörfler
cac9f196d8 * Added BListItem::SetOutlineLevel() method.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 11:24:25 +00:00
Matt Madia
75eb45a737 Updated to use B_TRANSLATE* macros. relates to #5408.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36678 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-06 22:39:04 +00:00
Axel Dörfler
139aacf406 * The window was now always taken to the new workspace with Ctrl-Alt-arrow;
lazy debugging left over that closes ticket #5675 again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36637 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-06 09:53:33 +00:00
Rene Gollent
bdb32d10a9 Simplify the check for what volumes to show free space bars on. They are
now shown only on read/write volumes that are not CDDA.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-04 15:17:21 +00:00
Rene Gollent
4ab96afd71 Use openAnyways mode instead of click to open rect for tracker context
menus. May help with #3267.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36607 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-04 14:24:12 +00:00
Alexandre Deckner
ecdb5ec668 * Filter out B_INSERT and B_FUNCTION_KEY as they would end up in type ahead "default" case. Fixes #5609. Looking at all the not already caught keycodes, this should cover every cases.
+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-03 00:13:59 +00:00
Alexandre Deckner
08b3ae9bb2 * RemoveFromVSList was failing to actually remove some poses due to a buggy optimisation. This was causing calls on invalid poses in many places in the PoseView code (icon mode). This fixes #4322 (and duplicate #5780). This should also fix #3828. Please test.
I took the conservative approach and the penalty is really minimal if even not at all perceptible as i've measured. I decided to go this way as PoseView code is very fragile and depends on many of those "loose assertions" to be valid. This conservative approach also allows to confidently include the fix in alpha2:
+alphabranch

   Besides those "wise" reasons, the thing is that i've wasted too many hours already this week and in the past due that VSPoseList/PoseList syncing fragility. I'm not willing to fix the optimisation of a broken design that i've already experimentally rewriten two times already, and that i (or any mentally sane person) will finally ditch sooner or later :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-02 23:32:54 +00:00
Axel Dörfler
0a51dbde98 * Unified the Desktop and ServerApp AS_ACTIVATE_WORKSPACE to work in the same
way.
* Use that newly exposed feature of taking the focus window to the new workspace
  when using the Ctrl-Alt-Shift-Arrow shortcut.
* This fixes #5675.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-02 17:15:13 +00:00
Stefano Ceccherini
a8e3f15774 Applied (part of) a patch by Kaliber, attached to ticket #5875. Thanks!
Will commit the rest later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-02 09:58:06 +00:00
Rene Gollent
cd9af8e701 Reverted r35463 and applied a patch by Stefano to handle the Terminal context
menu issue a different way. Should fix #5835.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36575 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-02 01:36:38 +00:00
Stephan Aßmus
59d0c2e45e * Introduced PaletteConverter::IndexForRGBA32() which checks if the alpha
component of a 32 bit color is below 128 and returns the special CMAP8 index
   for indicating transparency.
 * Changed the WriteCMAP() color conversion function to expext a 32bit RGBA
   value and use IndexForRGBA32().
 * Adapted B_CMAP8 target color space case of ConvertBits() to the new
   semantics.

This allows transparency in bitmaps when converting B_RGBA32 bitmaps to
B_CMAP8, tested only for this case and working as expected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-30 11:29:14 +00:00
Rene Gollent
f7cf319589 PoseView::MoveSelectionInto() needs to check for the case that the source
window actually has a selection list to use. Certain actions can render it 
possible to empty out the selection in mid drag-and-drop, which MoveSelectionInto
wasn't taking into account, leading to a crash.

Fixes ticket #5860.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36543 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-29 23:57:50 +00:00
Axel Dörfler
0230fc14ea * Neither ours nor BeOS' find_directory() will return an error if the directory
does not exist yet.
* Therefore, only BDirectory::SetTo() will fail if the trash does not exist
  yet. Changed the code to actually work as expected, now.
* Fixed old and new style violations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-29 07:37:06 +00:00
Rene Gollent
ca34b4221c Only write the icons if we did in fact have to freshly create the Trash directory. Should fix #5827 completely.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36522 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-28 20:17:30 +00:00
Rene Gollent
0872569da9 Temporarily comment out writing the vector icon since it currently appears to be broken somehow. Will look into it tonight.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-28 18:47:47 +00:00
Rene Gollent
63ebfa8d08 When creating Trash directories, Tracker would only set the hidden and/or icon attributes at startup for volumes mounted at that point in time. Volumes mounted later would have the directory created, but not marked hidden or otherwise attributed, which would lead to confusing situations where the root Trash dirs would appear randomly while browsing the filesystem.
Instead, Tracker now always writes those attributes when calling FSGetTrashDir(), which is reused by FSCreateTrashDirs(). Fixes ticket #5827.




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-28 18:30:04 +00:00
Alexandre Deckner
ab5fb573e5 * Removed what finally looks like an old (and not needed anymore) workaround. That is, the sending of a message when dropping a pose over another one while its context menu is still showing. That was causing #4757 since poseview was receiving the dropped message two times.
I've been investigating the issue in depth, it's there since the first opentracker revision, so i even installed R5 and built/debugged opentracker to confirm it was indeed needed on R5. That would be another case of undocumented (misdocumented) workaround for an R5 bug, ie: BMenu would steal the drop message although the mouse isn't over it anymore (Stefano idea?). Heh if only i could reach the original Tracker devs :-D 

  I don't like when i don't understand a problem up to the last bit, but it should be reasonably safe for alpha2 +alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-28 13:37:27 +00:00
Stephan Aßmus
6e1c9c648a Adjusted the resolving algorithm such that when the preferred handler of the
super type is among the handlers with direct support for the sub-type, that this
handler is at the beginning of the list of fall-back handlers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36507 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-27 17:51:11 +00:00
Stephan Aßmus
da72ff2672 Changed the resolving of the best handler for a MIME type to consider other
supporting apps of the sub-type only when there is a preferred handler for the
sub-type configured at all. In this case, it is assumed that the super-type
preferred handler is not really suitable. In the case when no sub-type
preferred handler is configured, the super-type preferred handler will always
get precedence, even if there are applications installed that declare direct
support for the sub-type. This makes the behavior more consistent/deterministic
and the "Open With" menu that Tracker displays will have the checkmark at
the app again that will really be used to open the type by default. Should
fix #5821 for good, as suggested by Axel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-27 10:24:00 +00:00
Stephan Aßmus
be1c10ae19 If the BMailChain does not contain a setting for the path for storing out-going
mail, fall back to using $HOME/mail/out. Otherwise mails would be stored in
the current directroy. I have no idea why the default BMailChain would not
contain the setting, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-26 13:58:32 +00:00
Oliver Tappe
fd49f4844b * removed debug output
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-26 13:27:27 +00:00
Stephan Aßmus
713c42c523 Adapted BRoster::FindApp() documentation which outlines the retrieval process
of preferred and supporting applications to the new behavior. Other methods
affected by the new behavior already refer to the documentation for FindApp().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36478 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-26 08:30:16 +00:00
Stephan Aßmus
da24e53cf8 Changed the behavior for BRoster::FindApp(), Launch() and related functionality:
Instead of only checking the preferred applications of a given MIME type and its
super type (i.e. "text/html" and "text"), build a list of all supporting apps,
where the preferred types of the sub and super type lead the respective
sections of the list. Then try to find the first valid application in the list.

This makes it possible to double click "Welcome" on the Desktop, even though
the text/html MIME type still has BeZillaBrowser set as preferred application.
Previously it would launch StyledEdit, even though WebPositive was readily
available.

The previous behavior was probably implementing exactly the BeOS behavior, but
I can't see a good reason why we should be compatible here. Until now, my
testing has also not revealed any regression.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-25 16:40:29 +00:00
Stephan Aßmus
5af798836a Make sure to invalidate the region that was previously within the text rect,
but which is outside the new text rect, when changing the text rect. Solves
dirty regions in BTextViews. For example the black bar along the top of the 
URL input in WebPositive after starting it. Or random bits of text left-over
in Beam when switching emails.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36470 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-25 14:29:38 +00:00
Oliver Tappe
3417c110cf Fix #5725, single pixel caret drawing artefact in an empty BTextView:
* _NullStyleHeight() must return the height including the 1 pixel gap between
  the lines, as that's how it's being used

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-25 12:16:50 +00:00
Stephan Aßmus
6a49b9e8a0 Patch by John Scipione: Rename the log and log10 functions in DeskCalc to
ln and log, which is hopefully more in line with expectations of users.
Thanks a lot!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36463 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-25 10:04:53 +00:00
Stephan Aßmus
7fd4194e29 Patch by John Scipione: Allow pi and e constants to have full MAPM precision.
Thanks a bunch!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36462 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-25 10:02:37 +00:00
Rene Gollent
b64b6705ad Factored out initialization of default values into an _Init() function that's now called by all constructors.
The BMessage version of the ViewState constructor was not retrieving the icon/last icon size values.

May fix #4322.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36455 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-24 19:35:53 +00:00
Rene Gollent
f7b6636a8b Don't set releasedOnce unless we actually detect an appropriate change in mouse button states. Otherwise we could mistakenly invoke menu items when not desired. Fixes the other part of #3267.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36453 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-24 17:48:13 +00:00
Oliver Ruiz Dorantes
ddbc9a0f2a - I expected once Haiku sets a connection with a remote device, such connection
was to expire in a couple of minutes, but not, seems to stay forever.
- Implement a Disconnect button in prefrences&kit



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-24 16:01:08 +00:00
Oliver Ruiz Dorantes
37c7d5d83a LocalDevice:
- Implement REading of the default timeouts
- Retrieval of all possible LinkKeys stored inside the dongle
- Provided function to force an authentication process with remote devices
RemoteDevice:
- Allow Haiku initiate a fully authenticated connection



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36445 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-24 11:34:23 +00:00
Oliver Ruiz Dorantes
40c666a5ab - Introduce template methods for single or non parameter commands
- Remove some old legacy command creation functions



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36444 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-24 11:16:49 +00:00
Rene Gollent
8e23974bbe After looking for items/submenus, always update the closed state at least once before mouse polling. Otherwise the click to open sticky setting would sometimes not get evaluated until after the mouse cursor had already moved outside of the click to open rect. Fixes ticket #3267.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-23 23:12:43 +00:00
Rene Gollent
01e63caf83 When creating a new pose, the index offset at which it was inserted in list mode was never passed back. Consequently, when creating a new folder via the cmd+N shortcut (which immediately goes into edit mode), the TextWidget for editing would appear at the wrong location.
Fixes ticket #5774.

+alphabranch



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36408 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-22 02:02:55 +00:00
Stephan Aßmus
d7fcb36f2b * Allow to set the scale (versus multiplication with a scale).
* Added commented versions for translation, rotation and shear, which would
   work similar.
 * Added B_AFFINE_IDENTITY_TRANSFORM constant similar to B_ORIGIN.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36401 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-21 16:46:32 +00:00
Axel Dörfler
b19e758b80 * The Keymap::IsDeadKey() of the Keymap preferences which was the main source
of BKeymap was not compatible with IsDeadKey() of the other Keymap
  incarnations.
* Now, I've renamed IsDeadKey() to DeadKey(), and introduced a new
  ActiveDeadKey() method that works like the other former IsDeadKey().
* This fixes the dead key problems my earlier BKeymap work introduced.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36400 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-21 16:36:54 +00:00
Axel Dörfler
5292aff148 * Reverted the BTextView part of r35731 again - turns out this usually doesn't
do what one would want. This closes ticket #5671.
* I'm not sure if we want to resurrect the pose view part of r35731 again; it
  adds bitmap and text clips to dragged files. At least the bitmap change was
  unrelated, but I'm a bit torn if that is the way this should be handled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36390 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-21 08:01:09 +00:00
Axel Dörfler
a41cc8a74b * Fixed build on the Haiku platform.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36375 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-20 16:18:39 +00:00
Axel Dörfler
4dfce2e401 * We cannot include the SystemKeymap.h with the tool that is supposed to
generate it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-20 12:38:41 +00:00
Stefano Ceccherini
76d5e0641b Partially revert r35962, since the cure is worse than the sickness.
Should fix #5717 (but probably reopens #3103)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-20 12:37:08 +00:00
Axel Dörfler
910f10f2fc * Added libshared_build.a, currently only contains Keymap.cpp.
* keymap and <build>keymap are now using the BKeymap class as a base as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36368 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-20 08:17:07 +00:00
Axel Dörfler
697e17ffcd * The scroll_lock also counts as a modifier; this was obviously not present
in all Keymap variations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36366 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-20 07:49:24 +00:00
Oliver Tappe
71609f7e46 applied a hint given from Ingo during BeGeistert:
* use dlopen() instead of load_add_on() when loading liblocale.so from 
  libbe.so, as otherwise the library could end up in the image more than once.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36357 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-19 17:27:03 +00:00
Ingo Weinhold
cf25e85b0c Update libbe version info.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36347 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-19 12:09:21 +00:00
Axel Dörfler
b44c25de42 * Factored out a single base class out of the three Keymap implementations we
had in our tree.
* Adapted Keymap, <input>keyboard, and consoled to use it - the additional
  functionality is implemented via a subclass in the first two cases.
* "keymap" will come next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36328 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-16 07:47:41 +00:00
Ingo Weinhold
89dc7e4875 Added private BPositionIO derived classes BFileIO and BFileDescriptorIO which
wrap a FILE* respectively a file descriptor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36324 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 22:19:27 +00:00
Ingo Weinhold
f71274580b * Private libroot locking primitives:
- Reimplemented mutex to use the _kern_mutex*() syscalls.
  - The initializer functions cannot fail anymore -- changed their return type
    to void.
  - Changed the initializer function semantics to not copy the name by default
    anymore (as in the kernel). Also added *_etc() versions of them that take an
    additional flags.
  - Added static initializer macros.
  - Made the mutex (and thus recursive_lock) lock functions non-interruptable.
  - Got rid of the "lazy" version. They are no longer needed, since the
    initialization of the standard types can be done statically and cannot fail.
* Adjusted libroot, runtime loader, and other code using the private libroot
  locking primitives to the new semantics.
* pthreads mutexes and condition variables:
  - Reimplemented using the _kern_mutex*() syscalls.
  - Consistently use POSIX error codes.
  - Fixed some not quite POSIX compliant behavior.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36323 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 21:52:49 +00:00
Adrien Destugues
0638c3ab4c * Add some more icons for better testing
* Use the country name instead of the language name to identify each icon
 * Cleanup, fixed copyrights, and some more checks to avoid crashing in case of a missing icon


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 21:34:00 +00:00
Michael Lotz
1da48c4149 Simplify the SetTrigger() code. The trigger is a single byte char anyway, so no
need to convert the looked up label position to a char code. Also actually make
sure that the trigger is lower case by doing an explicit tolower() instead of
assuming that it already is.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36316 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 18:56:34 +00:00
Michael Lotz
bae33cdad5 Automatic whitespace cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36315 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 18:54:30 +00:00
Adrien Destugues
ffbcecd489 Add support for flags in BCountry. The flags are stored as HVIF icon resources in liblocale.so.
Test french flag took from http://www.bastisoft.de/misc/flags/ (licence is very permissive), converted to HVIF with Icon O Matic.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 18:52:20 +00:00
Michael Lotz
8c4c164a91 Make the result a proper const char *.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36313 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 18:51:49 +00:00
Michael Lotz
2272ecea26 zooey+mmlr:
* Ensure that there is still buffer left when 0-terminating the buffer in
  RealText().
* Remove the fExtraCount member and instead make it into a constant as that's
  how it's used and more obvious.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36306 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 17:22:16 +00:00
Michael Lotz
5c4e7641a7 zooey+mmlr:
* Large cleanup in _FindLineBreak(), be a bit more clever by storing the found
  offsets instead of calculating them multiple times, use
  _TabExpandedStyledWidth() instead of _StyledWidth() and manual tab calculation
  which was also broken (it assumed tabs were consequtive which was possibly not
  the case).
* Modified CanEndLine() to also return true when going from non-whitespace to
  whitespace and the other way around which is more logical (so we'd break after
  the word and not after word + whitespace, even though we actually do that
  in the end by eating whitespace after words in _FindLineBreak()).
* The TextGapBuffer is not necessarily 0 terminated, so RealCharAt() needs to
  check if the index is at the end of the string and return 0 in that case.
  Before it would access the buffer "out by one" which could've lead to a crash.
* Simplified the gap moving calculations by removing some no-op calculations.
* Added debugger calls in TextGapBuffer in case of invalid use.
* Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36304 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 16:12:16 +00:00
Adrien Destugues
87158047dd Add a call in BCountry to get an icon for that country.
Untested and not working yet since we don't provide any icon.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36303 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 15:57:30 +00:00
Michael Lotz
ec7d168081 Automatic whitespace cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36301 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 15:48:48 +00:00
Axel Dörfler
24386c2937 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36300 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 15:33:20 +00:00
Axel Dörfler
87e256c2e8 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36299 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 15:32:56 +00:00
Adrien Destugues
e6769b02ce Fix Language::GetName using the system-wide language settings instead of the current application one. Make ReadOnlyBootPrompt localize the list instantly when you select a language in it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36295 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 14:57:39 +00:00
Adrien Destugues
eec1db5a07 Fix language display i ReadOnlyBootPrompt :
* On a simple language like "fr", it will display "French"
 * On more complex things like "pt_BR", it will display "Portuguese (Brazil)"


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 12:21:17 +00:00
Adrien Destugues
0223612e7e Fix bug that crashed ReadOnlyBootPrompt. Basically it would not check the right function in the catalog addons before calling it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36287 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 12:07:56 +00:00
Adrien Destugues
8025477189 * Implement a function to get all the available languages for a given application
* use it in readonlybootprompt instead of previous workaround code.
This makes the readonlybootprompt faster and lighter as it doesn't open and parse all the catalogs anymore, but only checks for their existence.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36276 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-14 23:48:01 +00:00
Adrien Destugues
18383104ce Fix generating en.catalog for the system, it was missing some strings, leading to StringForSize not working properly in english. Sorry !
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36271 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-14 21:09:38 +00:00
Adrien Destugues
e7e7e5b363 Style fix spotted by Jérôme Duval.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36239 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 21:49:11 +00:00
Adrien Destugues
6e41269722 Non-localised applications will not manage to get the system catalog. Provide a fallback in this case.
This allows to use ColorControl in non-localized apps. In that case, it will not be localized either.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 19:56:01 +00:00
Stephan Aßmus
c944d11f7e bonefish+stippi:
All views which cache layout information need to call ResetLayoutInvalidation()
when they have updated the cached information. Otherwise calling
InvalidateLayout() once they are already attached to a layout may not have any
effect.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36217 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 13:36:49 +00:00
Stephan Aßmus
26fe41417d Small coding style fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36216 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 13:35:22 +00:00
Stephan Aßmus
a66b66ff5a * When inside a layouted environment, InvalidateLayout() in MakeDefault()
instead of just resizing.
* When the view thinks it knows the correct size, it needs to
  ResetLayoutInvalidation(). TODO: Actually all views that cache layout size
  info need to do this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 13:19:49 +00:00
Axel Dörfler
d2e28b603d * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36213 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 13:14:10 +00:00
Axel Dörfler
15c81466c4 * Reverted part of r34474 that broke binary compatibility.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36212 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 13:01:56 +00:00
Adrien Destugues
55ed5b8ed9 libbe_test needs the locale backend too.
This make the test_app_server run again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 20:54:06 +00:00
Adrien Destugues
8f2d34d9e0 Fix test_app_server again due to Coding Sprint changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36195 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 20:02:43 +00:00
Adrien Destugues
5608589f03 * Remove leftover debug printf()s
* Fix the layouting of BColorControl so it is now locale aware


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 18:21:59 +00:00
Adrien Destugues
4343960f55 olta+pulkomandy:
* Introduce an add-on system to allow libbe to call things living inside liblocale (as liblocale depends on libbe, it can't be linked the usual way)
 * This allows localizing the BColorControl class that had some text inside it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36190 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 18:07:09 +00:00
Stephan Aßmus
846cb93278 Fix my strlcpy() adventure with a much simpler version of the code that should
also perform better for the usual case of inserting one char at a time. Using
strpbrk() on non-terminated strings was probably also not too healthy.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 14:41:44 +00:00
Axel Dörfler
99e658c3e9 * Accidently replaced the copyright incorrectly; I got the permission from
Marcus to change the copyright to MIT, not to reassign it to someone else.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 14:32:56 +00:00
Stephan Aßmus
a68045b367 strlcpy() takes buffer size and will copy buffer size - 1 chars at max and then
use the remaining byte to terminate the buffer. Thanks for the heads up!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36185 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 14:18:13 +00:00
Axel Dörfler
b289aaf66b * A BBuffer does not know where it came from, so
BBufferConsumer::BufferReceived() cannot know whom to send the "buffer is
  late" notification (unless we only have a single input). To solve this, the
  media_header now contains extra fields that can be used to create a
  media_source object.
* Unfortunately, BBufferProducer::SendBuffer() cannot know the output either in
  case there is more than one. Hence, I deprecated the existing SendBuffer()
  call and moved it into "private" - IOW old sources using it won't compile
  anymore under Haiku.
* I introduced a new SendBuffer() variant that also gets the media_source as
  argument.
* Updated all sources (that are part of the image) to use the new variant.
* Removed some purposely commented out code in the audio mixer.
* Implemented late buffer notification, as well as late buffer handling in the
  audio mixer; this is a bit of work in progress, so the debug output is left
  in there.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36184 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 13:15:46 +00:00
Adrien Destugues
e9024a3be5 * Build tools : allow to run DoCatalogs with a custom regexp for special cases
* Introduce a system-wide localization catalog used for strings hidden deep in some libraries. Add special API to get it.
 * string_for_size is the first to make use of this system wide catalog. This allows to have a fully localized DriveSetup.
 * As a side effect, tracker also uses it. It now requires liblocale.so.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36175 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 23:00:25 +00:00
Stephan Aßmus
954af58694 Bug found by mmlr, since the "inText" is not terminated, strcpy could overwrite
a random amount of memory of the allocated "buffer". If it were terminated, it
would overwrite one byte, since it will also terminate the destination buffer,
which didn't contain the necessary room. Use strlcpy() instead and provide
enough room.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36172 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 21:20:39 +00:00
Jonas Sundström
a2224f75d9 Corrected strace output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 17:04:29 +00:00
Ithamar R. Adema
45428391f9 * Fix missing newline in error message.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36159 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 16:13:53 +00:00
Ithamar R. Adema
b13b0b0f4e * Make sure LinkSender knows team ID of receiving team; this fixes the >64k ServerLink transfers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 14:26:19 +00:00
Oliver Tappe
575625f155 fix drawing artefacts when the caret is being clipped, which lead
to parts of the caret being inverted:
* instead of always inverting the caret rect, we now invalidate when the
  caret should be hidden



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36153 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 14:13:57 +00:00
Stephan Aßmus
8bc3360be8 Hopefully fixed the GCC2 build without changing the workings of the code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36151 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 13:55:18 +00:00
Rene Gollent
a9fb9013e4 Slight simplification and fix gcc2 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36150 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 13:42:45 +00:00
Stephan Aßmus
8cf2d646ba Fixed GCC 4 error about breaking strict aliasing rules. Hope this fix is correct,
but perhaps I am overlooking something, so please review.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36146 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 13:14:27 +00:00
Jérôme Duval
03e6434ec0 * fixes a BSlider issue noticed by Matt on the mailing list:
Invoke() wasn't called the first time you grab a slider and slide it all the way to the left.
Thanks for the test case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36145 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 12:57:58 +00:00
Stefano Ceccherini
9f568b889d NULL check after pointer dereference. CID 1032, btw.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36098 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-08 20:47:48 +00:00
Stefano Ceccherini
9917e1a6b2 Style changes. No functional changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-08 20:38:53 +00:00
Stefano Ceccherini
599a58a6ef Better error checking.
Style changes


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36094 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-08 20:37:15 +00:00
Stefano Ceccherini
393127df0f Use %c to print uint8. This avoids a crash. I'm not sure this is a gcc bug,
or we were using the previous form incorrectly. Anyway, this doesn't change
the functionality and fixes ticket #5676.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36052 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-06 19:06:55 +00:00
Oliver Ruiz Dorantes
62f5ba006a - Read Local features al LocalDevice constructor
- keep record in UL and KL side



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36027 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-02 12:12:29 +00:00
Jérôme Duval
beb0419df1 Patch from Pete Goodeve: add MidiPortGlue to have old midikit endpoints registered in new midikit (#5625).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36019 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-01 18:35:48 +00:00
Ingo Weinhold
320a5686e4 * The CompoundLayouters were leaked before. Made the class BReferenceable and
update references correctly.
* LocalLayouter::SetCompoundLayouter(): Remove the local layouter from the
  previous compound layouter.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35983 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-28 13:28:10 +00:00
Ingo Weinhold
64d5a0a4b7 Added UnhandledDebugMessage() hook which is called by the base class
implementations of the other hooks. This way one can easily detect/handle
otherwise unhandled events.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35964 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-26 21:18:08 +00:00
Ingo Weinhold
1c421b8df4 Added optional "singleStep" parameter to ContinueThread().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35963 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-26 21:16:43 +00:00
Stefano Ceccherini
bb2576f0c8 Removed some code which was added to fix a crash, which was obviously fixed
correctly later in another way.
Removing this code should also fix ticket #3103.
Use the width of the Bitmaps instead of fixed values.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35962 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-26 20:23:30 +00:00
Stephan Aßmus
2789b3911a Rewrote BAffineTransform to not be based on agg::trans_affine, which was pulling
in the AGG header. Reused the AGG code were applicable and implemented a lot
more features. The Multiply and PreMultiply meaning is reversed with respect to
AGG, but follows the mathematical meaning. Added type_code
B_AFFINE_TRANSFORM_TYPE to TypeConstants.h and let BAffineTransform derive from
BFlattenable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-26 17:20:11 +00:00
Stephan Aßmus
abb02bc4a4 Moved BAffineTransform from shared kit into interface kit. Still in BPrivate
namespace. Applied 80 char/line limit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-26 11:20:53 +00:00
Ingo Weinhold
53446ebf80 Added a few classes to the debug kit:
* BDebugMessageHandler: Interface with hooks for handling of debug messages.
* BDebugContext: Essentially a C++ wrapper for struct debug_context, with
  handy methods for controlling a debugged team.
* BTeamDebugger: Proxy for a debugged team. Derived from BDebugContext.
* BDebugLooper: Wraps a main debug message loop. Any number of BTeamDebuggers
  can be added and associated with BDebugMessageHandlers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35953 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-26 00:15:59 +00:00
Stephan Aßmus
9521d5576d Always sync the view cursor immediately, not only when entering the view. Should
fix the remaining issues pointed out in #3198.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35946 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-24 21:02:38 +00:00
Stephan Aßmus
1e16c00279 * Don't store a possibly negative return value in an unsigned size_t, which
is later used as parameter to memcpy(). Should fix r5623 (untested).
 * Fixed coding style for some comments.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35944 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-24 16:48:33 +00:00
Axel Dörfler
fe735fc4c4 * As long as we don't support IPv6, we shouldn't prefer it when AF_UNSPEC is
used in getaddrinfo() (this solves "localhost" being resolved to ::1 by
  default).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35942 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-24 16:26:47 +00:00
Stephan Aßmus
48d796576e * Moved the duplicate "string_for_size()" implementations into libshared.a.
* Adapted libtracker.so, DriveSetup and Installer to use the shared version.
 * The new version uses the correct units (KiB instead of KB and so on).
 * Use the correct units in a few other prominent places, where
   string_for_size() could not be used.

Should resolve a major part of #5378.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35935 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-23 16:49:49 +00:00
Stefano Ceccherini
f0330c4aff Removed AreaLink, not used
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35914 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-19 17:29:10 +00:00
Stefano Ceccherini
e6dc15ca68 int8 and uint8 passed 3 parameters to the printf string,
but only 2 were used, leading to various problems (like bug #5596).
I added another variation of print_type which handles that case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-19 11:51:56 +00:00
Stephan Aßmus
00873f7818 Added BShape::CurrentPoint(), returning the current end point of the path.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-19 00:28:38 +00:00
Stephan Aßmus
76ab3f88df Basically, this changeset implements BShape::ArcTo(). In more detail:
* Added BShape::ArcTo() and BShapeIterator::IterateArcTo(), using a previously
   unused virtual slot. (Added the symbols for binary compatibility for GCC2
   and GCC4.)
 * Added operator=(), operator==() and operator!=() to BShape.
 * Added BShape::BezierTo() version taking three points, which is sometimes
   more convenient.
 * Added the four new shape data ops OP_LARGE_ARC_TO_CW, OP_LARGE_ARC_TO_CCW,
   OP_SMALL_ARC_TO_CW and OP_SMALL_ARC_TO_CCW. For a single arc, provided the
   radius is large enough, there are four possibilities to draw the arc, these
   are controlled by the two boolean flags to ArcTo() and mapped to the new
   commands accordingly.
 * Some style cleanup in Shape.cpp (sorry for mixing it up, but it gets
   worse below...)
 * Added ShapeTest to src/tests/servers/app.
 * Changed the way BShapes are transformed from view to screen space in the
   app_server. For arcs, it would be nontrivial to apply a proper transformation,
   it's much easier to let AGG take care of it. This affects ServerPicture as
   well.
 * Wrapped iterating the BShape into try/catch blocks in ShapeIterator. But
   I really don't understand the purpose of the class in the first place.
   Maybe it can now be dropped, since coordinates don't have to be transformed
   in place anymore.
 * Refactored copy&paste shape iteration code in Painter. The transformation
   to screen space happens there.
 * Since RemoteDrawingEngine needed to be adopted anyway, I also updated
   it for the new DrawString() with offsets version. But the client still needs
   to be adapted.
 * Style cleanup in Painter.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35905 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-18 16:58:19 +00:00
Stephan Aßmus
bbba047c2d * Added copy constructors.
* Let the AddHours(), Add*() return itself, so that they can be chained.
 * Made the previous *Name() methods static and added non-static versions that
   take the day/month of the object.
 * Make BDateTime::Date/Time() return references (const or non-const).
 * Fixed the BDateTime comparison operators.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35894 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-17 18:51:41 +00:00
Stephan Aßmus
991ab2d375 Removed left-over, thanks Axel!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35893 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-17 15:39:28 +00:00
Stephan Aßmus
cc28efee7e Use the new cursors.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-17 12:43:57 +00:00
Stephan Aßmus
769912c87b Use the new cursors.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-17 12:39:24 +00:00
Stephan Aßmus
a5b1cf5973 * Style cleanup.
* Use the new cursors.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35890 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-17 12:31:51 +00:00
Stephan Aßmus
770ebceafa Just realized that BTabViews don't have a BLayout set when not layouted. But
just in case someone calls the BSize methods on such a tab view, provide a fall
back implementation. This one should now also report the correct size, only
less efficient.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-17 12:15:14 +00:00
Stephan Aßmus
7b19a569be The layout on the BTabView already knows the correct necessary size, because
the insets for the border and tab height have already been applied. The old
implementation for the BSize methods did not take border width into account.
It fixes tabviews being layouted too small.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-17 12:10:05 +00:00
Michael Pfeiffer
2367c2d78d Replace each occurence of an invalide character. Before all invalid
characters where omitted and the substitute character was append at the end
of the input text.
Added comment how the continuation of incomplete multibyte sequences
could be solved.
Please review.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-16 09:28:53 +00:00
Stephan Aßmus
a9daf3d911 Improved the DrawString() method that takes offsets per glyph by making the
client provide the array size. Added version that doesn't take a string length
for convenience.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-15 15:08:07 +00:00
Stephan Aßmus
77e5acc0d9 * Extended the BView drawing API by a DrawString() version that takes an array
of locations, one for each glyph.
 * Added a test for the new functionality.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-15 13:59:14 +00:00
Adrien Destugues
f237e4182b * Fix a small bug in BLanguage::GetName
* Use BLanguage in AboutSystem to get the names of the languages in the credit list, no need to add useless work for the translators
 * Add some contributors to the credits for japanese translation


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-15 11:19:21 +00:00
Stefano Ceccherini
8074fdceb9 Set the preferred height of the separator to be always even, since, and center
the horizontal lines which represents it to the actual bounds. Should fix
#5440.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35856 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-14 12:54:53 +00:00
Alexandre Deckner
cfbd755443 * When launching an app by signature, check against the correct device trash when checking if an executable is in the trash.
When using find_directory(B_TRASH_DIRECTORY... to check if an entry is in the trash one should always pass the entry's volume otherwise you might be checking in the wrong trash.
Might happen elsewhere in the tree, will have an opengrok look.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35826 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-12 17:09:36 +00:00
Philippe Houdoin
b19902ae4e Made BGLView by default freely resizable by layout manager. I'm not sure I didn't break binary compatibility, please review.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-10 23:03:03 +00:00
Adrien Destugues
a7764b301c Change the catalog loading so it will crawl up the catalogs even if the rt root one is not found. This will allow to load "fr" even if "fr_FR" is not found. This way the preflet in its current state works again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-09 10:47:03 +00:00
Stephan Aßmus
e59dc33e21 * Added BCursorID enumeration in App Kit's Cursor.h and new constructor which
takes such an id.
 * Reused the existing mechanism to to have hardcoded tokens for the system
   cursors, i.e. removed cursor_which enumeration from ServerProtocol.h and
   used BCursorID where cursor_which was previously used.
 * Reworked CursorManager.h and CursorSet.h accordingly and removed some methods
   that where intended to replace system cursors with client cursors, since
   those would break the reference counting and forget to maintain the cursor
   list.
 * Replaced the cursors in CursorData.h/cpp with the new ones I just designed.
 * Removed HaikuSystemCursor.h and HaikuLogo.h from the source, as those are/were
   no longer used.

I hope I will not get too much beating for this one... :-) I know the new
default cursor is slightly larger, but I believe the old one was just too small.
Also I noticed that the cursor may be slightly too dark, at least the old one
seems noticeably brighter when compared side by side (the new one has a slight
gradient). That is something I may correct at least. Otherwise I hope nothing
is broken, I've tested in QEMU and so far everything works as intended.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-07 23:12:34 +00:00
Stephan Aßmus
a070cf5306 * Indentation update in DateTime.h
* Extended BTime, BDate and BDateTime with archiving functionality.
 * Adjusted code which uses these classes, since including DateTime.h
   already imports the classes from the BPrivate namespace.
 * Moved DateTime.h into Support Kit. It is still in the BPrivate namespace,
   as I am uncertain what to do with time_type and diff_type. I'd favor
   moving the constants into the classes itself. Possibly removing the B_
   prefix from them. Feedback welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-07 12:08:47 +00:00
Stephan Aßmus
8c3d172b46 Fixed hovering over a sub-menu to let it open automatically, which I broke
with my previous commit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35749 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-03 22:46:25 +00:00
Stephan Aßmus
2bcccf5a74 Patch in part by "yourpalal":
* Set the MENU_STATE_CLOSED state upon BMenu initialization.
 * When drawing the label, use the parent bounds, including
   item margins to truncate the label, when the parent menu is
   closed.

Thanks a lot for the patch!

Changes by myself:
 * Cache the MenuPrivate instance in BMenuItem::DrawContent().
 * Use Window()->UpdateIfNeeded() to animate the flashing invoked menu item,
   which makes a lot more sense, the comment about it working in BeOS is
   probably due to item->Select() probably drawing outside of an update cycle.
 * The trigger invokation in keyboard handling didn't break out of the loop
   after invoking an item. Probably didn't matter since triggers are hopefully
   not assigned to more than one menu item. :-)
 * Use the same trick as BMenuBar to avoid interfering with keyboard navigation
   in the BMenu::_Track() hook.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35739 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-03 17:43:31 +00:00
Rene Gollent
7c0f5738b3 Remove Tracker's special DnD handling. Instead, BTextView/BTextControl now
honors drag messages containing entry refs and resolves the path of the first
one contained. Will work on a more sophisticated solution that would allow
optionally extracting the file text instead via right click drag context menu 
when I have more time.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35731 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-03 00:02:02 +00:00
Rene Gollent
ddee094350 Add an extra sanity check to Tracker's automatic text clipping extraction when
drag and dropping text files: before it would blindly read the entirety of the
file's text contents regardless of size, which probably led to more than a few
nasty surprises when someone attempted to drag very large (i.e. multimegabyte)
text files. We now clamp the amount of data we read to 64KB. Though it's
debatable if this feature is at all useful, since it may potentially be better
implemented by handling entry_refs in dropped messages in BTextView directly
(assuming a compatible type). Opinions welcome.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35715 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-02 00:51:17 +00:00
Rene Gollent
fa5956d5f3 Removed obsolete TODO: BMessage is smart enough to already use area transfers if needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-28 23:59:28 +00:00
Rene Gollent
a3cd51c725 Cleanup: BMessage::_Reference never hits the case of having to transfer the area since _SendMessage already takes care of this (and transfer_area doesn't allow it to take an area from another team anyways so this code never could have worked).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35683 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-28 23:28:27 +00:00
Rene Gollent
4f85bc9f18 Cleanup of previous work: whether or not we're talking to app_server is already determined at time of port assignment. As such we don't need to cache or care about that, but rather just cache the target team instead of looking it up from the port info every time.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-28 23:25:23 +00:00
Rene Gollent
099f9551c7 Cache the app_server port lazily so we don't have to look it up every time.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-28 22:55:43 +00:00
Rene Gollent
57dc77bb15 ServerLink tried to use the transfer_area semantics backwards ; this failed since only the owner of an area can transfer ownership elsewhere. As a result, sending messages which contained large enough amounts of data would fail entirely. This was most readily visible in Tracker, where some files (i.e. text/plain files where Tracker would attach the text content to the BMessage for DnD clipping purposes) would be undraggable due to the drag initiation message never getting successfully processed by app_server.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-28 21:58:29 +00:00
Stephan Aßmus
e8e5e0caa0 Strings in BMessages don't necessarily have to be \0 terminated. Use the already
known length to print the stream so printf() doesn't potentially crash when
trying a strlen() on the string. Fixes for example printing B_KEY_DOWN messages,
where such strings are used, in certain conditions.

Review welcome, printf() formatting is not one of my strengths. :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35629 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-27 09:44:30 +00:00
Michael Lotz
a9038d00b4 The withLength variable wasn't initialized properly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35613 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-25 01:50:29 +00:00
Stephan Aßmus
7ee2366644 Fixed regression reported by Axel. If the BStatusBar is not running in layout
mode, revert to the old behavior to include the room for the labels, even if
there aren't any.
Also in layouted mode, trigger a layout invalidation when switching from running
without labels to using labels and vice versa.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-24 20:41:31 +00:00
Alexandre Deckner
2882dba2a1 * remove left-overs of deprecated ClassInfo.h includes (cf. OpenGrok) except in SupportKit.h for backward source compatiblity (although it shouldn't really matter).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35604 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-24 15:10:37 +00:00
Rene Gollent
e4a439b4a0 Fix several problems in BListView:
- SwapItems() did not correctly swap the item tops of the two items being swapped. This would result in quite broken/confusing behavior due to the view having the wrong idea of their current position.
- SwapItems() also did not pass the correct range to _RescanSelection(). This could result in the selection range getting quite confused when swapping items.
- _RescanSelection() did not always correctly reset fLastSelection, though this mostly only would've resulted in unnecessary but harmless work.

Fixes ticket #4253 and possibly some others.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-22 01:40:24 +00:00
Stephan Aßmus
b2e1893c6e Added SetBorder() virtual method and feature. Could also be used by the Terminal
now to polish the tabbed look.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-21 20:15:21 +00:00
Stephan Aßmus
481baf2eef Fix spelling in debugger invokation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35568 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-21 20:14:00 +00:00
Stephan Aßmus
43a7eb6ca5 Add comment explaining why MenusBeginning() is invoked before handling key events
with the command key pressed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35567 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-21 20:13:16 +00:00
Rene Gollent
b1e7ac2a63 When using layout mode, we need to remove the tab from the layout before updating the selection, otherwise the correct view isn't unhidden in some cases.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-21 18:08:38 +00:00
Axel Dörfler
f24e3c9f1e * Fixed warnings and coding style violations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-21 17:22:34 +00:00
Rene Gollent
9546aa512f Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-21 16:31:50 +00:00
Rene Gollent
cf139460f6 Initialize members for all constructors. Otherwise using those constructors can potentially crash in Unset().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-21 15:48:09 +00:00
Rene Gollent
19b31ecf6f BTabView::Select() needs to update the focus tab.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35517 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-19 04:13:15 +00:00
Adrien Destugues
33eead339b * Improve the test for TimeFormat (style and error checking)
* Fix the TimeFormat API, there was a double free. Make it work as expected : you send it a number of seconds and it will format it properly in days, hours, minutes, seconds with proper plural.
 * Cleanup other parts of the Format API from useless things. They may get reintroduced later if we feel the need to do so.
 * AboutSystem now use TimeFormat to display the uptime in properly localized way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-17 15:35:28 +00:00
Adrien Destugues
b2c385c072 -Added new TimeFormat API for formatting and localizing a time (uptime, copy duration, ...)
-Added a very simple test that shows the API is corrupting memory and ends up crashing
-Fixed build of other locale tests


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-17 00:02:50 +00:00
Stephan Aßmus
861e4437b1 If we already figured out the correct low colow to use in AttachedToWindow(),
we might as well use it. Couldn't see any regressions so far.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35457 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-13 11:43:01 +00:00
Stephan Aßmus
4f24f3110b The decision to inform the server about changed flags needs to depend on the
changed flags, not on the new flags! Fixes the server and client going out of
sync when clearing any flag that the server needs to know about.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35451 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-11 13:47:29 +00:00
Artur Wyszynski
c5b26d73a3 Simplified logic for a previous fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35448 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-11 05:05:41 +00:00
Artur Wyszynski
e457eb2a53 Fixed BBox behaviour when it has layout set and BView based class as a label
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-11 04:36:59 +00:00
Rene Gollent
731480e891 Call UpdateTextChanged() in BSlider::AttachedToWindow() instead of updating the text manually. Otherwise when a subclass overrode UpdateText and the value hadn't yet been changed, the text would never be updated correctly which resulted in several problems in the VirtualMemory preflet when localizations used a longer string for "Requested swap file size:".
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35435 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-09 03:55:52 +00:00
Artur Wyszynski
cee04e8074 Fixed various errors/warnings reported by cppcheck:
* memory leaks
* resource leaks
* added const's to getters
* removed a few reundant conditions


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-08 22:50:38 +00:00
Rene Gollent
7438e94206 Fix spacing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35430 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-08 00:47:11 +00:00
Rene Gollent
807bdfdf67 As pointed out by mmlr, we only need to provide the symbol, and only in the case of gcc2.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35429 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-08 00:46:22 +00:00
Rene Gollent
a5c2457fa8 Re-add dev_t version of FSGetDeskDir for bin compat reasons: BeIDE (unfortunately) appears to make use of some of the private FSUtils calls. Reimplemented call to use the normal FSGetDeskDir ignoring the passed in volume argument since we no longer have a desktop directory any place else. Fixes the problem reported in #5135.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35428 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-08 00:36:25 +00:00
Stephan Aßmus
a487da80ba * Make a BStatusBar comfortable to use without any text labels.
* In SetBarHeight(), use InvalidateLayout() when used with layout management.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35418 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-06 09:48:37 +00:00
Stephan Aßmus
85874d8dd3 When a Window is created for holding BViews attached to an offscreen bitmap,
always behave as if within a transaction. Otherwise all drawing calls to such
BViews wait for the server to finish the request. This change gives a tremendous
speed boost for these situations and is compatibly with BeOS, since there you
also had to call Sync() before drawing a bitmap that was painted with attached
views.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35414 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-05 12:06:15 +00:00
Michael Lotz
029f4e9317 * Add an inline CurrentPoseList() that returns either the filtered or normal
pose list and replaced the rather ugly "fFiltering ? ..." everywhere with it.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-02 17:56:52 +00:00
Michael Lotz
cc5b851813 No need to lock out the normal typeahead when filtering doesn't apply (i.e. in
icon mode). And a little automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35388 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-02 17:37:53 +00:00
Axel Dörfler
9fcbc27e27 * Removed the ChainRunnerGetHostByNameHack from libmail.so. Should it still
be needed in Haiku, one could easily fix that.
* Automatic whitespace cleanup.
* Minor other cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35382 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-01 19:11:19 +00:00
Michael Lotz
5bc9fb9d24 * Replace the truncate_string() helper function with a new, simplified version.
* Remove no longer necessary support functions.
* The new version uses a single BString as input/output parameter and only
  modifies that one by removing non-fitting chars and inserting the ellipsis
  where appropriate, so avoids copying around bytes/chars/strings in a few
  places. It uses the new Chars functions of BString so also no need for manual
  multibyte handling.
* Adjusted the BFont and ServerFont usage of truncate_string() which are both
  simplified by using the single BString. It avoids a lot of temprary
  allocations and string copying. The char * version of BFont
  GetTruncatedStrings() now uses the BString version and not the other way
  around anymore which requires us to allocate temporary BString objects, it's
  not worse than before though.
* This fixes a bunch of problems with the previous functions like always
  prepending the ellipsis for B_TRUNCATE_BEGINNING, crashing on short enough
  widths, violating the width in the B_TRUNCATE_END case when the width was
  short enough, non-optimal truncation in a few cases and sometimes truncation
  where none would've been needed. Also fixes #4128 which was a symptom of the
  broken B_TRUNCATE_BEGINNING.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35381 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-01 18:43:03 +00:00
Michael Lotz
0086654c68 Automatic whitespace cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35376 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-01 05:36:59 +00:00
Michael Lotz
b3e4ce5422 Use the multibyte aware string functions for typeahead search and filtering so
that special characters can be used as well (umlauts for example).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35375 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-01 05:30:08 +00:00
Michael Lotz
7acdd03f5e Replaced the sMatchString buffer used for typeahead search by a BString. No
intended functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35373 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-01 05:02:05 +00:00
Michael Lotz
a5b7cbe331 Adding utf-8 aware version of most functions to BString. They are named after
the corresponding normal functions but have a "Chars" in the name like
"MoveCharsInto" or "AppendChars". Also added CountBytes() and CharAt().
This should make everyday string handling with multibyte strings a bit easier.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35371 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-01 04:20:01 +00:00
Rene Gollent
ef9c0b6a51 More cleanups:
- remove some more leftover desktop integration-related code.
	- remove special case that would hide the Desktop folder in file panels.
	- fixed BFilePanel to correctly filter out the trash from the volume root
	  and show it on the desktop like everywhere else.
	- renamed CountView::Add/RemoveFilter so they don't hide
	  BHandler::Add/RemoveFilter (gcc4 warning).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35368 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-31 21:27:14 +00:00
Adrien Destugues
e6a7a30e3b This should have been part of previous commit :
Add Language->IsCountry to tell if a language holds a country specifier (like fr_FR) or not (fr alone). This allows separating them in the preflet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35366 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-31 21:17:39 +00:00
Adrien Destugues
f3c8afe886 Fix a bug in OutlineListView::ItemUnderAt that made it pick totally wrong items when some things in the list were collapsed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35361 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-31 18:06:59 +00:00
Rene Gollent
e917a2404d Fix some selection-related problems in BOutlineListView as well as
broken behavior in _RemoveItem that could potentially result in the wrong 
list items being removed/deleted depending on the expanded/collapsed state 
of higher items in the list.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35360 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-31 17:32:12 +00:00
Michael Lotz
83c03b5698 Missed the re-insertion when exiting early after checking the sort order for a
pose on a non-visible pose list which would cause poses to get lost from the
unfiltered list.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-31 02:28:29 +00:00
Michael Lotz
497aa62c2f * Provide a LaunchLooper that receives launch messages and executes the launch
functions provided with the given arguments.
* Make use of that looper to replace spawning a thread for each launch task.

On the one side this reduces the amount of used threads (and should fix #698)
and on the other side it makes the order in which refs are sent a bit more
predictable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-31 00:25:10 +00:00
Michael Lotz
6a5cf0a1f2 Allow shift-return to discard the filter so you can decided whether or not the
filter shall stay in effect when opening a selection.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35347 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-30 18:17:22 +00:00
Michael Lotz
2932770972 Fix missing check that would cause non-matching poses to show up on attribute
changes (which may also happen on creation of new files).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35346 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-30 17:41:26 +00:00
Michael Lotz
ac53da69c7 When initially starting filtering we need to make sure that non-matching poses
fall out of the selection. The same is later done when removing them from the
matching subset, so moved that to a common EnsurePoseUnselected().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35345 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-30 17:10:46 +00:00
Michael Lotz
beb2e05421 * Renamed CancelFiltering() to ClearFilter() to make it more clear what it does.
* Add UpdateAfterFilterChange() with the update part of FilterModified().
* Add StopFiltering() that clears the filter and updates.
* Make use of these functions where appropriate to fix missing scroll ranges
  after canceling a filter.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35344 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-30 16:53:53 +00:00
Michael Lotz
545ebde00c Implement type ahead filtering (this time for real and without abusing the
vertically sorted pose list). When enabled typing will filter based on the
currently visible attribute columns. Using shift-space as a delimiter
independent filtering strings can be typed, so you can filter based on multiple
attributes at once to refine results while you type. Filtering stays active
until you cancel it using the escape key. While the filtered result is displayed
all normal file operations can be used. Using the return key while filtering
auto-selects and opens the first filter result, allowing for fast traversal
through directories and directly opening the topmost result.

* Introduces fFilteredPoseList which stores the active filter result. The list
  is only used when filtering is currently active, so no syncing is required
  otherwise.
* Some minor adjustments to leave out invalidations where non-visible poses are
  updated.
* Account for the now possible multiple lists throughout BPoseView.
* Add filter string output to the CountView and made that one a bit wider.
* Added all the settings-cruft for type ahead filtering (defaults to off).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35339 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-30 08:08:58 +00:00
Michael Lotz
67df6a72c3 Cleanup, these aren't necessary anymore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35337 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-29 23:31:10 +00:00
Michael Lotz
17ec4668b2 Printing of basic types was broken when they were part of non fixed size fields.
The size instead of the data would be printed. The fixed/non-fixed handling is
generic though, so no need to special case the always non fixed elements.
Since adding of basic types through their Add*() function always generates fixed
size fields, this would only be visible if the data was added through AddData()
with isFixedSize == false. This is the case in compiled resources for example,
hence you would see it when printing the returned messages of BMimeType::Get*()
functions for pre-installed types.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35336 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-29 23:29:51 +00:00
Axel Dörfler
e054bfbf08 * Added missing IPv6 defines and in6addr_any, in6addr_loopback exports.
* This should get most IPv6 applications to link (they just can't open IPv6
  sockets yet, as the protocol is missing).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35326 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-28 09:55:41 +00:00
Stephan Aßmus
5993482bf5 Fixed LowColor() of "background" view. Seems this was always wrong, but now we
are running without offscreen view, and this caused dark slider background,
since LowColor() was unintentionally B_TRANSPARENT_COLOR. Fixes #5323.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35284 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-25 13:53:26 +00:00
Stephan Aßmus
4cdd68e739 * Don't draw/clear the background if the parent view draws on children.
* Make use of the BControlLook method to draw labels.

Both fix ticket #4875.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35261 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-23 12:50:13 +00:00
Stephan Aßmus
c4e211feb6 * Refactored a method to draw a label when the location is already known.
(This one takes care of setting up the correct color.)
 * Added TODO about using either B_CONTROL_TEXT_COLOR, or elliminating that
   constant (which I am in favor of...).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-23 12:48:18 +00:00
Stephan Aßmus
10ddee8d8e Tweaked the alpha values to be more in line with the look when not blending.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35257 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-23 12:27:11 +00:00
Stephan Aßmus
61ac1a850f * Set the BLEND_FRAME flag when detecting that the parent view of the control
renders over children.
 * Support the BLEND_FRAME flag also when drawing BSliders.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35256 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-23 12:13:49 +00:00
Michael Pfeiffer
100dd0cf5c Fixed number with exponent scanner (and simplified that code).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35249 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-23 08:31:15 +00:00
Stephan Aßmus
abc26ba8ad Patch by "stimut": Fixed BMenu to return only enabled BMenuItems when invoking
them via mouse. This will make the mechanism that BSeparatorItems are always
disabled actually work and the behavior correct for other items as well. It also
fixes #4147 (Magnify crashing because it assume all its items have a BMessage).

Thanks a lot!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35248 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-23 07:50:45 +00:00
Stephan Aßmus
86a0da42a5 Fixed spelling mistake.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35245 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-22 21:05:23 +00:00
Stephan Aßmus
f88faf25fb Fix parsing scientific notation in the form of 1E+6 or 1E-6.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35244 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-22 21:02:04 +00:00
Adrien Destugues
a292eb4af2 Removed useless static qualifier on some variables that made them behave weird.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-21 12:04:02 +00:00
Stephan Aßmus
005a5d0bfe Stumbled across some problems while using the Locale Kit and added TODOs
accordingly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-21 11:38:16 +00:00
Adrien Destugues
5570fd11c0 - Locale kit : made the language class live. It now uses ICU as a backend as expected
- Some changes in the locale roster to allow instanciating a language
- Locale preflet : use this new API instead of directly calling ICU
Side effect : all languages in Locale window are now displayed in the current locale. It makes more sense as otherwise the list would be unsortable. However it can get annoying if you mistakenly set a strange language as default.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-20 22:44:34 +00:00
Stephan Aßmus
16940ab877 Now that the speed is displayed right away, increase the number of slots for
calculating the average speed to get a more stable value.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35141 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-18 08:52:42 +00:00
Rene Gollent
89af054816 Employ a similar naming abstraction for the desktop as has been done for Trash to allow that name to be localized visually later (same on-disk location though).
SlowContextPopup also needed to be adjusted to account for trash's new location.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-17 21:35:42 +00:00
Stephan Aßmus
35de4b4862 Implement showing the estimated time to finish a file process. It will toggle
automatically between showing amount copied + speed and estimated finish time
+ time left. It could be implemented to toggle on mouse click, but then it would
be a hidden feature. Comments welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35136 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-17 21:02:50 +00:00
Rene Gollent
b37100b2bf Missed a few instances in the previous cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35134 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-17 20:07:30 +00:00
Jérôme Duval
6aee58a4cb * Revert the reverse the addons iteration of r35121.
* The media_addon_server before unloading addons need to be sure the nodes are deleted.
For instance, applications could keep references on global nodes, thus preventing deletion.
To release all references, the media_addon server uses a new method BMediaRosterEx::ReleaseNodeAll().
* Quit the MediaRoster looper when quitting media_addon server before unloading addons.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35133 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-17 20:05:01 +00:00
Rene Gollent
d9626569fb Model: Add accessor for Trash node property and cleanup spacing between inlines.
Rest: Use the IsTrash() accessor on Model where possible in place of the more expensive FSIsTrashDir() check.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35132 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-17 19:58:46 +00:00
Stephan Aßmus
9589965cbd Change the algorithm that calculates the average copy speed, so it begins to
display much earlier (two seconds).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-17 19:47:22 +00:00
Stephan Aßmus
4e1bbd4d0d Implemented display of current size/total size copied and current copy speed.
It will begin to play after a short time (10 seconds). Estimated finish time
is still a TODO.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35129 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-17 18:40:25 +00:00
Stephan Aßmus
406799c165 Copy and paste bugs prevented the copy progress bar to function properly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35128 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-17 18:39:05 +00:00
Rene Gollent
0e848e2d69 Fix error spotted by Adrien: don't return Trash name for anonymous volumes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35127 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-17 18:27:21 +00:00
Rene Gollent
6abd81fcf0 Add a special node type for the Trash analogous to the one used for the root dir. This allows the model to return an arbitrary name not directly tied to the on-disk name for the Trash directory, which a) makes it localizable in the future, and b) means it's not tied to the on-disk name, which removes the requirement that the Trash dir name be uppercase on disk.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35126 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-17 18:12:39 +00:00
Rene Gollent
782fbf00a7 Overlooked this with my previous Trash-related changes: updated NavMenu to be
behaviorally in sync - it now hides the root volume Trash dir like PoseView,
and adds the Trash entry as needed when navigating down the Desktop.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35125 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-17 17:35:06 +00:00
Rene Gollent
aa61ee48ef Cleaned up legacy icon mappings and add some missing resource definitions to
TrackerIcons.h. Also removed the setup for the folder icon mimetype in 
TrackerInitialState, as it was using a non-existent resource ID to do so with.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-17 16:35:40 +00:00
Stephan Aßmus
3cc5c3ffb1 Further cleanup of TrackerLoopControl. gStatusWindow is now nowhere used anymore
except inside TrackerLoopControl. The only expected change of behavior is when
trying to copy something onto a read-only volume. AFAICS, it would previously
prompt an alert and not already show the status window. Now it will show the
status window and prompt an alert, like in all the other situations when the
operation would be stopped before it even started by an alert. I was able to
remove quite a few code duplications along the way. CopyLoopControl can be
instantiated by itself and provides default implementations which could in turn
be removed from TrackerLoopControl.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35115 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-17 13:32:06 +00:00
Stephan Aßmus
8aad948744 * 80 chars/line limit cleanup
* Fixed one more occurance of "dos" filesystem check.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-17 12:16:22 +00:00
Stephan Aßmus
0bf7f1f8cd When an error occurs to incrase the node monitor limit, reset the current
value and don't keep it at the value we wanted it increased to.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35112 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-17 12:15:50 +00:00
Axel Dörfler
133da790ea * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-16 16:45:27 +00:00
Rene Gollent
7ca5e8873b * PoseView: Re-enabled respecting the invisible pose attribute.
* FSUtils: Mark the root-level Trash directories as invisible. For the time being, 
  this renders the Trash only visible on the Desktop once more, pending 
  further consensus on how to handle it in the future. Note however that 
  this also means that Desktop and/or var directories that still have the 
  old _trk/pinfo_le attribute from prior to the previous visibility changes
  will also be marked invisible again, and those people dual-booting older 
  BeOS will also still see this issue as the Tracker on those will still
  force-write the invisible attribute onto those directories on every volume.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35094 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-15 23:44:39 +00:00
Rene Gollent
a65ec15376 Fix style violations (thanks Axel!).
Update filesystem name in find_directory as our fat filesystem is not named "dos".



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35093 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-15 23:31:45 +00:00
Rene Gollent
01dffd8edd More Tracker refactoring:
* relocated Trash dirs to volume roots by modifying find_directory() to report the trash location as volume/Trash.
 * FSUtils no longer creates /home/Desktop on every volume.
 * TrashWatcher now keeps icons in sync on all volumes.
 * Simplified FSGetDeskDir since it no longer has to worry about getting the desk directory on any volume other than the root.
 * Relocated trash context menu logic to BContainerWindow so it can also be used at the volume roots.
 * DesktopPoseView now creates a virtual Trash pose representing the trash contents as before.
 * Corrected typo: Model::WriteAttrKillForegin() -> Model::WriteAttrKillForeign().

Closes ticket #5245.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35085 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-15 05:12:45 +00:00
Rene Gollent
7b6edf5209 Simplified FSIsDeskDir() as suggested by Axel. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35082 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-14 23:40:13 +00:00
Rene Gollent
167898484d FSIsDeskDir should only consider a path to be the desktop if it lives on the boot volume. Fixes non-boot Desktop dirs still showing the volumes and such in windows and nav menus.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35065 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-13 23:50:53 +00:00
Stephan Aßmus
9869082c8d * First attempt at cleaning up the CopyLoopControl mess. Instantiate one
TrackerCopyLoopControl and pass it on when needed. Avoid access to
   gStatusWindow directly. Later on, I will try to make it possible to drop more
   files/folders onto an ongoing copy process to append it to the job, i.e. copy
   those files to the same target folder.
 * For each updating the status, entry_refs were copied instead of passed by
   reference, which was a bit unnecessary overhead.

 * Some coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35055 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-13 17:20:01 +00:00
Michael Lotz
c126f2f2c4 anevilyak:
* Fix missing parenthesis in r35040 that caused node monitoring not to work.
* Minor automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35053 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-13 15:52:21 +00:00
Stephan Aßmus
2865e5a048 Patch by Humdinger:
Changed strings to sentence case in the rest of the Tracker code.
Remaining part of case-tracker.diff from #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35048 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-13 12:06:51 +00:00
Stephan Aßmus
82d8aaf85a Patch by Humdinger:
Changed strings to sentence case. The changes in StatusWindow and
FSUtils are missing because I have some unfinished work in progress
in those files. Will commit them separately. This is case-tracker.diff
from #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35047 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-13 12:03:25 +00:00
Stephan Aßmus
3e6fa229d8 Patch by Humdinger:
Switched strings to sentence case in servers and kits. This is the
case-servers+kits.diff applied from #5169. Couldn't spot any possibly
problematic changes.
Thanks a lot!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35044 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-13 10:58:34 +00:00
Rene Gollent
671dd80861 Various cleanups:
* Removed dead/obsolete Integrate Non-boot Desktops code.
	* Modified PoseView to ignore the fInvisible attribute of BPoseInfo for now.
	  This has the net effect that the Desktop folder and /boot/var are no longer
	  hidden from the user. To go with this change, Tracker no longer forcibly
	  writes that hidden setting to those folders on access. This feature might
	  be useful again in the future (especially in conjunction with relocating
	  the Trash folder somewhere such as the disk root), but is currently somewhat
	  problematic because those dual-booting with BeOS will still have a Tracker
	  that force writes those attributes which would bring us back to square one
	  with respect to showing the Desktop folder when we start respecting the
	  attribute again. Suggestions welcome. Haiku-only users can remove the
	  _trk/pinfo_le attribute on those folders to remove the invisibility
	  in any case.
	* TrackerSettings: Removed obsolete desktop integration settings. Also
	  modified TrackerSettings parser to skip unrecognized settings instead
	  of aborting the settings file parsing process entirely.

Closes ticket #2872.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35040 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-13 00:41:43 +00:00
Stephan Aßmus
e74e04d656 Added TODO note about making sure that B_FRAWE_EVENTS is part of the flags
as soon as a scroll view is controlling the list view. Otherwise scroll bars
are not updated if FrameEvents() is not called. I can imagine problems, though,
if an application did not set B_FRAWE_EVENTS on purpose and is controlling
the scroll bars itself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35035 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-12 22:09:15 +00:00
Stephan Aßmus
547934cbbd Reverted some of my changes with regards to fCurrentTime and added respective
TODOs. For now, it is easier for applications to work around the status quo
until the TODOs are implemented.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35032 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-12 20:25:59 +00:00
Stephan Aßmus
9728aac6cd Whitespace cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35030 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-12 20:22:38 +00:00
Stephan Aßmus
33671742a5 We definitely don't want a global lock, even when not using the chunk cache.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35029 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-12 20:22:22 +00:00
Jérôme Duval
534bebec39 When BString assignment operator is called with a NULL argument we should use an empty string instead. I checked this against Dano.
This fixed #4713


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34983 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-09 23:06:30 +00:00
Oliver Tappe
cd591a3e00 * BTextView no longer inverts the caret although there is a selection, which
would yield double inversion of the caret position, causing #5006
* cleanup with respect to when the selection can be highlighted and/or the
  caret can be shown/hidden


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34944 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-08 09:35:05 +00:00
Stephan Aßmus
9ea74f6c0b It's late, forgot to remove debugging output...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34924 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 00:56:51 +00:00
Stephan Aßmus
3a57be2aea * Indentation and naming cleanup in the header
* Small coding style cleanups in the .cpp
 * When reading raw chunks, keep fCurrentFrame updated anyway
 * When decoding frames and chunks, don't change the meaning of fCurrentTime,
   it's supposed to be the start time of the next chunk/frame, same as
   CurrentFrame(), not the time of the frame/chunk we just decoded/read.
   BMediaTrack::CurrentFrame() is actually documented like this in the BeBook,
   but CurrentTime() is not. However, when seeking to a specific time, it is
   understood that this is the time of the next frame/chunk. If we decode/read
   it and set fCurrentTime to the start_time as specified in the media_header,
   it would actually not change for the first frame/chunk after seeking.
   To be able to know the duration of chunks, fWriterFormat had to be changed
   to just fFormat and is now used for decoding as well.
* Simplified handling of media_header in some methods, saves one assignment.

These changes are not so well tested, yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34923 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 00:55:55 +00:00
Axel Dörfler
f0a1eb2dba * The static object construction and destruction is no longer random, but takes
the internal dependencies into account. This should fix bugs #5166, #5120,
  and #5150.
* Also, the time source object manager, as well as the dormant node manager
  are now recreated on media roster restart (when the media server is
  restarted).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-05 16:53:55 +00:00
Axel Dörfler
32ac103336 * The Desktop window is no longer zoomable. This fixes ticket #5173.
* Removed no longer used headers (private BeOS device API).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34890 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-04 16:09:15 +00:00
David McPaul
6768fe0d89 Improve IO performance for all media files
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34793 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-29 00:41:08 +00:00
Oliver Ruiz Dorantes
1f37b29b5d CheckStyled
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34776 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-25 18:46:53 +00:00
Axel Dörfler
861f2ade03 * Rewrote header.
* Cleaned up private method names as much as possible (it's probably not a good
  idea to rename BStatable::set_stat() for compatibility reasons).
* Cleaned up sources.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-18 15:05:37 +00:00
Axel Dörfler
505e5a0b57 * Put the old BeOS R3 media kit symbols back to fix #5135. They are no longer
built for GCC4, though.
* Deleted the completely unused OldSoundFile.{cpp|h} files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-17 15:56:11 +00:00
Jérôme Duval
63a275889b gcc4 build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34651 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-13 13:28:28 +00:00
David McPaul
2a9896ce47 switch to use STL containers, limit to 10 cache entries, don't clear cache on findkeyframe, removed inflight list as it was not needed, report error conditions better. This makes video work again
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34650 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-13 12:09:17 +00:00
Ingo Weinhold
6813f2c744 Debug mode build fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-10 16:01:48 +00:00
Axel Dörfler
9d6dc833bd * Made sure the tool tip stays on screen without moving itself below the cursor;
I'm afraid there is nothing left of stippi's earlier solution. This fixes
  bug #5097.
* The alignment as specified in the BToolTip is now respected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34616 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-10 14:31:58 +00:00
Axel Dörfler
d470839990 * The dormant_flavor_info copy constructor was broken, causing bug #5101.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-10 09:54:59 +00:00
Axel Dörfler
4e1e966ad7 * Forgot to check in Beep.cpp. Sorry!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-09 19:06:24 +00:00
Ingo Weinhold
1cab99bc10 Apparently someone forgot to commit something. Build fix hack.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34600 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-09 17:56:51 +00:00
Ingo Weinhold
e973f15a44 Missing includes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-09 17:56:24 +00:00
Axel Dörfler
6cafce94b5 * Moved the port pool into the new request_data.cpp file; it's no longer
accessible from the outside.
* Instead, request_data now retrieves/releases a reply port on its own.
* There were some more places that still used write_port()/read_port() instead
  of QueryServer().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34597 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-09 17:40:45 +00:00
Axel Dörfler
e4c87231a3 * Renamed the xfer_* structures to fit the rest, and let them inherit from the
usual structures.
* Also, they now use the QueryServer()/SendToServer() functions instead of
  duplicating them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34596 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-09 17:17:01 +00:00
Axel Dörfler
5f207b83ae * Moved all server interface definitions from DataExchange.h to
ServerInterface.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34594 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-09 16:57:22 +00:00
Axel Dörfler
1fcbc5470b * More cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-09 16:48:49 +00:00
Axel Dörfler
9c3b4706dd * Cleaned up the node manager, got rid of its use of Map, and List.
* Fixed at least two reference counting problems, but nodes from killed teams
  still remain alive (will look into this at a later point).
* GetLiveNodes() is now using transfer_area() as well.
* Made all sizes in the SendTo*() and Query*() functions size_t.
* Replaced reinterpret_casts with static_casts when casting void pointers.
* Ordered the request/reply structures by target.
* Tried to consolidate the use of add_on vs. addon.
* More cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-09 16:22:24 +00:00
Axel Dörfler
c28dd9fdc3 * Implemented getting/setting the audio gain of media files.
* Renamed "remove_ref_for" command structures and constants to
  "invalidate_item".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-08 19:56:04 +00:00
Axel Dörfler
300b908999 * Also clear the lists after all items/types were iterated over.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-08 15:29:30 +00:00
Axel Dörfler
1fb5b54d2e * Should have been part of r34554.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-08 14:55:14 +00:00
Rene Gollent
bd563c20aa GCC4 build fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-08 00:01:05 +00:00
Axel Dörfler
f4ec236cad * Got rid of Map use in TimeSourceObjectManager.
* Renamed global variable _TimeSourceObjectManager to gTimeSourceObjectManager.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34544 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-07 21:57:45 +00:00
Axel Dörfler
9834d875d0 * Rewrote PortPool, and put it into the BPrivate namespace.
* Renamed global variable _PortPool to gPortPool.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-07 21:28:08 +00:00
Axel Dörfler
29bb91d6e5 * Cleaned up DormantNodeManager.
* Renamed global variable _DormantNodeManager to gDormantNodeManager.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-07 21:11:13 +00:00
Stephan Aßmus
b0850e9ba1 * Code and header indentation cleanup
* Added operator== and !=
 * Added check for list != this in operator=
 * Added HasItem() and IndexOf() versions that take const void*, duplicating
   the code, since I didn't want to introduce another function call in these
   potentially time critical methods.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-06 12:44:38 +00:00
Stefano Ceccherini
503954dcf9 gcc4 build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34513 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 17:06:44 +00:00
Axel Dörfler
125a95f1ef * Reduced default stable time.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 15:03:33 +00:00
Axel Dörfler
fcc7a1cb83 * Since the old R3 media API is not implemented anyway, I've now temporarily
removed it from the build.
* If you encounter any (useful) applications that need it, please file a bug
  report, otherwise those will be removed permanently.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34505 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 13:56:08 +00:00
Axel Dörfler
a1e0f39f45 * Build fix; the Jamfile changes caused those to be broken.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34504 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 13:34:39 +00:00
Axel Dörfler
2f9ed888a2 * The SharedBufferList is now only cloned once in a team, no longer once for
each buffer, and once for each buffer group.
* Also, SharedBufferList::Get() now gets the area to clone from itself, if
  necessary, the caller no longer has to provide it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 11:52:01 +00:00
Axel Dörfler
9dec231042 Sorry for this large commit in advance; it's not really possible to divide this
into smaller parts:

media_addon_server:
* Removed (broken) use of (broken and inefficient) home-brewn Map, and List
  classes. This also fixes a crash on shutdown when used with the malloc_debug
  implementation. It's using stl::vector, and stl::map now instead.

_shared_buffer_list:
* Renamed _shared_buffer_list to SharedBufferList, and put it into the BPrivate
  namespace. Also, made a class out of it.
* Separated shared buffer list creation from cloning.
* Enlarged maximum number of buffers to something that is not that evil, but
  actually uses the space it has (ie. is a useful multiple of
  shared_buffer_info that fills a multiple of B_PAGE_SIZE as much as possible).
* No longer drops into the debugger if the
* The list that is currently used is very inefficient for the features it
  provides though (no change there).

_buffer_id_cache:
* Renamed to BufferCache, and put it into the private namespace
* It now deletes its buffers on deletion; since the BBufferConsumer will be
  gone, too, at this point, there is little chance that there are still buffers
  in use.
* Also, it's now using std::map instead of the (see above) Map class.

BBuffer:
* Got rid of the fBufferID member.

Misc.:
* Got rid of the global "team" variable; the media kit is now using the
  private app kit's current_team() now.
* Added a lot of missing error checks (mostly memory allocations).
* Renamed fields like "flavorid" to flavor_id, renamed "dfi_*" fields to
  something more detailed.
* Moved ServerInterface.h from src/servers/media/ to headers/private/media.
* Notifications.h was not self contained.
* Added missing licenses.
* Lots of cleanups, and coding style fixes.

What this doesn't fix:
* Bug #4954 which started all this (this comes next, though)
* Deinitialization is broken, as the PortPool is uninitialized too early, and
  still used afterwards.
* The strange add-on monitoring code in the media_addon_server


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 11:11:28 +00:00
Axel Dörfler
04c71a2f1d * Removed code duplication, SetBufferGroup() will now use AllocateBuffers()
instead of doing the same manually.
* AllocateBuffers() is now returning a status code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34499 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 10:46:49 +00:00
Rene Gollent
5b41cd61e6 Clear the navigation menu before populating it. Fixes ticket #5079.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34497 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-05 00:06:32 +00:00
Axel Dörfler
4ed344af25 * Moved _SoundPlayNode into the BPrivate namespace and dismissed the '_' prefix.
* Further cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34482 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-03 22:16:54 +00:00
Axel Dörfler
812fde99a1 * When you even already have the typedefs, why wouldn't you want to use them?
* Some cleanup, no functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34474 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-03 19:48:11 +00:00
Axel Dörfler
f331ce2464 * CanContinue() should obviously return "true" before there is a reason to stop,
ie. also before BeginJob() has been called.
* This fixes BePDF and Gobe Productive not being able to print under Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-02 14:10:17 +00:00
Axel Dörfler
e90df81946 * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34445 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-02 13:27:04 +00:00
Axel Dörfler
969279e36c * Removed incorrect execute property.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34444 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-02 13:17:36 +00:00
Axel Dörfler
862508e775 * Turned on widget outline by default.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-02 11:49:06 +00:00
Axel Dörfler
a8af8078a4 * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34442 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-02 11:42:49 +00:00
Axel Dörfler
a288c5a075 * Why have a mutex when you don't use it?
* Ensure that at least a single allocation fits into the buffer spanning over
  the total requested size of the pool. This makes the mixer work again instead
  of crash because of a failed allocation...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-01 22:23:48 +00:00
Rene Gollent
4ae9d7d044 Build fix: missing header needed for memcpy().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-01 18:08:35 +00:00
Axel Dörfler
ebe97b7cee * The ChunkCache is now using the real time memory functions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34420 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-01 17:22:28 +00:00
Axel Dörfler
ccedee2295 * Replaced rtm_* placeholders with a real implementation based on the boot
loader's heap. Unlike the BeBook documents, we always lock their memory,
  though.
* Added Haiku extension rtm_available() that returns how much space is left in
  a pool.
* I've disabled the undocumented functions for now - please open a bug report
  if you encounter them used in applications.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34419 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-01 17:21:46 +00:00
Ingo Weinhold
81eee41edf Don't read() the individual program and section headers, but rather read()
the respective tables at once.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34405 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-01 09:55:33 +00:00
Ingo Weinhold
f8ec4c04a0 Initialize BRoster's MIME messenger lazily.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34402 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-01 09:36:23 +00:00
Ingo Weinhold
bc0693b219 * Construct the MIME data base directories lazily.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-01 08:52:13 +00:00
Axel Dörfler
ec1bcf6243 * Added private methods get_app_server_port() (that stores the server port,
and doesn't have to find it every time), and create_desktop_connection() that
  is now used from BApplication::_ConnectToServer() as well as the DesktopLink.
* Move PortLink::SetTo() into base class ServerLink.
* Eliminated duplicated member fReplyPort in DesktopLink.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-01 07:53:09 +00:00
Axel Dörfler
73bade369c * The DesktopLink class creates a new link to the Desktop, and therefore also
uses the AS_GET_DESKTOP command - but I forgot to update this to the new
  version (it also didn't know the target screen stuff yet).
* This probably fixes bug #5042.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-30 22:07:16 +00:00
Ingo Weinhold
ea3a947109 Should have been part of r34388. be_clipboard initialization.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34390 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-30 21:12:29 +00:00
Ingo Weinhold
4701b640d9 * Give the BClipboard lock a name.
* be_clipboard is no longer created at libbe initialization time. The
  BApplication creates it as done in BeOS. This requires manual
  initialization in the registrar to avoid a deadlock on shutdown.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34388 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-30 17:14:00 +00:00
Ingo Weinhold
3c0c94f81c Give the token space lock a name.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34387 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-30 17:11:19 +00:00
Ingo Weinhold
240a2c89e8 Removed no longer needed gInitializationLock.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34385 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-30 16:34:13 +00:00
Ingo Weinhold
b429df54d2 Use pthread_once() to guard the singleton initialization.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34384 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-30 16:33:41 +00:00
Ingo Weinhold
015943d78f Use pthread_once() to guard the initialization of sPaletteConverter. This
changes the semantics slightly: Previously after a failed initialization
another invocation of InitializeDefault() could theoretically initialize the
converter. Since the only error conditions are out of memory and broken app
server connection, this shouldn't really matter, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34383 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-30 16:26:10 +00:00
Ingo Weinhold
1cbfe2ef6e Moved the static stuff into a singleton.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34376 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-30 14:43:35 +00:00
Ingo Weinhold
0eb45760a7 Turned FontList into a singleton.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34374 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-30 12:48:35 +00:00
Ingo Weinhold
17f68169f2 Turned the screens list into a singleton.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34373 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-30 12:47:59 +00:00
Ingo Weinhold
4b9cf09f14 * Got rid of is_running_on_haiku(). It was used for the test environment,
but wouldn't work when running it on Haiku anyway. At any rate, it was
  relatively expensive (uname()) and used already in the libbe
  initialization.
* Got rid of the non-Haiku support of main_thread_for().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34371 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-30 12:14:02 +00:00
Ingo Weinhold
879f9a0937 Got rid of the static app resources lock. We use pthread_once() now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-30 11:54:30 +00:00
Ingo Weinhold
4a6fb0a865 Turned the loaded images map into a singleton.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34368 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-30 11:40:20 +00:00
Ingo Weinhold
adcb834590 * The WidthBuffer lock was unnecessarily static. Made it an object member.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34367 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-30 11:25:13 +00:00
Ingo Weinhold
4ac097c559 Made the BToolTipManager lock non-static. Create the singleton via
pthread_once().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34366 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-30 11:06:51 +00:00
Philippe Saint-Pierre
5f341c3847 Reverting r34335. Wrong location of my "B_NOT_MINIZABLE" check.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34350 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-29 19:02:47 +00:00
Axel Dörfler
9b606d42db * TabFrame() did not check if the index was valid. This should fix #5051.
* Cleanup, removed commented code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34346 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-29 12:06:13 +00:00
Philippe Saint-Pierre
2c9bea98b9 Make BWindow honor the B_NOT_MINIMIZABLE flag. Fixes ticket #4337.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34335 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-29 02:15:54 +00:00
Stefano Ceccherini
af10de93a4 Changed a comment
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34329 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-28 16:35:30 +00:00
Axel Dörfler
b9d85c1270 * Increased reply timeout considerably: with the amount of debug output the
registrar currently spits out, the net_server, and the debug_server sometimes
  didn't receive a reply in time, causing them not to start.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34304 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-27 11:48:27 +00:00
Axel Dörfler
4fb9da18e0 * Minor cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34303 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-27 11:11:38 +00:00
Axel Dörfler
ea151a7f6a * Initialize your members!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34302 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-27 08:24:00 +00:00
Axel Dörfler
dbba3d21f1 * Fixed wrong preprocessor statement, thanks Jeroen!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-26 21:00:48 +00:00
Axel Dörfler
c668114b36 * Fixed broken FormatMonetary() versions which also fixes a warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34297 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-26 19:48:15 +00:00
Axel Dörfler
0d70a99f23 * Patch by Matt to replace the leaf disk overlay with a bug for non-release
versions. This closes ticket #5036.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34296 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-26 18:54:30 +00:00
Ingo Weinhold
6cb744fecb Fixed debug build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-25 23:44:43 +00:00
Ingo Weinhold
41975f20f0 Fixed gcc 4 32 and 64 bit warnings in the libbe_build code. This time ported
them back to the Haiku versions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34262 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-25 21:52:43 +00:00
Ingo Weinhold
e6604f4804 Don't use ssize_t in structs describing persistent structures.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34258 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-25 21:26:12 +00:00
Ingo Weinhold
d3ed58a7c9 Added ELF64 support to BResources.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34250 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-25 17:14:29 +00:00
Rene Gollent
c48f055b45 Fix ChunkCache build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34245 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-25 15:56:09 +00:00
Ingo Weinhold
ff4d0f1c92 * Style cleanup.
* Removed AutoDeleter class and use the shared one instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34244 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-25 15:00:40 +00:00
Axel Dörfler
4d89dfc712 * Completely rewrote the ChunkCache - the previous version had some issues with
regards to locking and seeking.
* Furthermore, we now not only cache 4 chunks, but chunk up to a certain
  memory size (MediaExtractor uses 1 MB for now).
* Since I still have occasional hickups, it looks like this wasn't the main
  cause for our audio problems. Still, this will reduce drive access
  considerably during play.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34243 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-25 14:24:52 +00:00
Axel Dörfler
608d959d73 * ChunkCache::fLocker is now aggregated.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34239 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-25 11:51:24 +00:00
Axel Dörfler
15fe75b9a0 * Added a protocol version field to AS_GET_DESKTOP. This should be bumped after
incompatible releases, and makes sure clients using the old libbe.so will be
  rejected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-24 17:22:44 +00:00
Rene Gollent
0b0e9179c3 Pass the favorites menu a reference to the file panel's ref filter. This is necessary since favorites are no longer constrained to only being folders, and as such they need to likewise be constrained to only display supported types. Fixes another part of #4916.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34190 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-22 23:43:59 +00:00
Stefano Ceccherini
4ce4d86bc9 The scrollbars need to be constructed before calling
BView::TargetedByScrollView(), otherwise the target view couldn't
access them in that method.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-22 16:04:59 +00:00
Stephan Aßmus
d2b45aa3de Avoid an invalid GCC warning by using a union.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34159 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-20 16:37:47 +00:00
Axel Dörfler
1221df2dd8 * Improved floating point display.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-19 11:53:38 +00:00
Axel Dörfler
09749e95dc * Added a BWindow::InViewTransaction() that determines whether or not the
window is currently updating its drawings as suggested by Stippi.
* Add this method to decide whether to call _FontChanged() in
  BListView::SetFont().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34109 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-18 10:48:44 +00:00
Axel Dörfler
289d85d2ac * BWindow::SendBehind(NULL) will now send the window to back.
* Added shortcuts ctrl-alt-F to get a window to front, and ctrl-alt-b to move it
  to the back.
* Updated the user guide with these shortcuts, and also explained the missing
  "single click to bring window to front" behaviour.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-18 10:33:32 +00:00
Stephan Aßmus
2ecfe97e37 * Some cleanup for 80 chars/line limit
* The target volume block size is passed to the CalcItemsAndSize() function
  to get a more accurate picture of whether items will fit. Before, it would
  assume hard coded 1024 bytes block size.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34107 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-18 10:21:25 +00:00
Stephan Aßmus
d0f1a68746 Added method BlockSize() to get the block size of the underlying file system.
Untested but with good chances to actually work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34106 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-18 09:47:42 +00:00
Stephan Aßmus
1e179f36e2 Seems like I have forgot to commit deleting the AutoMounter code from Tracker
back then?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34105 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-18 08:55:27 +00:00
Stephan Aßmus
78248acdcc The usage of BStatusWindow::HasStatus() was really bogus. First of all
HasStatus() and UpdateStatus() were not run in the same lock, so the job
view could be gone anyway. And secondly, both methods iterate over all status
items to find the one with the correct thread. Doh, if we don't have enough
work to do, lets make some! Of course this was not critical in any case...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34104 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-18 08:54:44 +00:00
Stephan Aßmus
9d6405b724 Code cleanup, no functional change except for changing BWindow::Run() into
a BWindow::Hide()-BWindow::Show() combo.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-17 16:10:18 +00:00
Jonas Sundström
5a0982b580 Spelling
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-16 23:35:34 +00:00
Rene Gollent
f4dc59983b Partially implement ticket #4916:
- Rename "Configure Favorites..." to "Edit Favorites...".
	- Remove the old-style Configure Favorites dialog in favor of simply
	  opening the favorites folder (~/config/settings/Tracker/go) in a
	  Tracker window for the user to manipulate.
	- Rename the "Favorite Folders" section to simply "Favorites" as files
 	  are also allowed (i.e. to easily open a template document).
 	- Removed completely arbitrary (and silent) 20 item limit to favorites
 	  list.
 	- Automatic whitespace cleanup
Still to do: Grab the ref filter from the file panel (if any) and run the
favorites through it as well, since we want to filter out any non-folder
favorites that the app is incapable of handling. Also, the setting for
the favorites menu to show recent documents needs a new home, as it was
previously in the no longer existing Configure Favorites window. Suggestions
welcome, as I'm not currently seeing a spot in the Tracker prefs that would
make good sense.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34071 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-16 01:07:40 +00:00
Axel Dörfler
faf42dfe78 * Disabled calling _FontChanged() on SetFont() - since any item can temporarily
change the font in its DrawItem() method, this is not the way to go.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34023 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-13 16:46:16 +00:00
Axel Dörfler
e629da4a47 * Changed parameter back to socklen_t (which follows POSIX, but not RFC 2553;
obviously POSIX got it wrong, as socklen_t hardly makes sense here).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34004 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-11 17:03:34 +00:00
Axel Dörfler
119371a51e * Rewrote arpa/inet.h header, also dropping the __inet* defines.
* Resurrected the __inet* prefix for binary compatibility with older Haiku
  versions - this could be a temporary solution in case we want to export the
  inet_* functions not just as weak symbols. In that case, the __inet* versions
  would be dropped.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34003 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-11 14:28:18 +00:00
Axel Dörfler
b299a6e9d3 * Moved resolv.conf to /boot/common/settings/network/.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33989 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-10 16:42:03 +00:00
Axel Dörfler
f9a80fec95 * LocaleRoster.h was not self-containing.
* Moved the locale stuff to the data directory as well (some parts were in /etc).
* The DefaultCatalog will now also scan the user directory for catalogs.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33983 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-10 13:44:22 +00:00
Axel Dörfler
d6ac23c010 * Moved the location of the "hosts" file to
B_COMMON_SETTINGS_DIRECTORY/network/hosts.
* Moved the location of the "services" file to
  B_COMMON_DATA_DIRECTORY/network/services.
* Removed headers I forgot to remove.
* Made getnameinfo() use socklen_t internally as well.
* Removed _PATH_* constants from netdb.h that we don't deliver anymore.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-10 10:13:19 +00:00
Axel Dörfler
4bd3cce627 * Ported libbind-6.0 to Haiku, and into our libnetwork.so.
* Got rid of the TLS/multi-thread hacks of the previous port.
* Took over irs/lcl_sv.cpp, and irs/lcl_ho.c, and irs/lcl_pr.c from the previous
  version as they contain customizations.
* Removed unused files from libbind.
* Only barely tested, so beware.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33968 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-09 22:18:34 +00:00
Axel Dörfler
c42474cb03 * Set B_AVOID_FRONT on status windows, this should fix bug #4914.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33939 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-07 11:53:34 +00:00
Ingo Weinhold
4914357d9d Automatic trailing whitespace removal.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-07 08:21:14 +00:00
Oliver Tappe
5f917b22c8 Implement a suggestion of Humdinger in the aftermath of #4785:
* make word-wise navigation via cursor keys match Pe, such that it is consistent
  throughout haiku (unless some applications brew their own)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33913 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-06 14:21:21 +00:00
Ingo Weinhold
76d24e95aa Ugh, forgot to check this in quite a while ago:
If the view doesn't have a tool tip, pass the B_MOUSE_IDLE to the next handler,
so the parent view can show a tool tip. This makes tool tips in a column list
view possible (or at least reasonably easy).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-05 17:29:32 +00:00