Commit Graph

5442 Commits

Author SHA1 Message Date
Alex Wilson
5f844af738 Update BTabView for layout-friendly archiving. Added _InitContainerView() method that is called from _InitObject() but also called on its own during unarchival. Implemented BTabView::AllUnarchived() and implemented a case for this in BTabView::Perform().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37796 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 20:03:41 +00:00
Adrien Destugues
8b39afead5 * Fix wrong function call in TimeZone.Code() leading to a localized string being returned instead of the expected code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37790 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 14:57:46 +00:00
Adrien Destugues
1c99030935 * Style fixes pointed out by Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37789 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 14:45:54 +00:00
Adrien Destugues
e88fbde60b * Fix some issues in collators archiving and key computation
* The test now pass. But unarchiving still isn't working and restores the default collator instead of the archved one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 14:23:08 +00:00
Adrien Destugues
2c6ebfaaea * Fix collator text
* Fix archiving/unarchiving to provide at least a valid object. However, ICU archiving system doesn't look like it's working well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 13:16:11 +00:00
Adrien Destugues
110649a1a4 * Collator API now actually uses ICU.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37783 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 11:29:14 +00:00
Rene Gollent
2ad2951ed5 Fix yet another cause of the boot volume icon being mapped incorrectly (as pointed out by a gcc warning): the value chosen for B_BOOT_DISK was well outside of the range of the directory_which enum. Consequently it wound up getting truncated and never correctly being matched in the switch that grabs the icon from resources. Curiously, this bug/warning only showed up with a cross-compiled executable, but not with one compiled with the development toolchain compiler packages. Should hopefully nail this bug once and for all.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37781 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 01:06:58 +00:00
Alex Wilson
5c47e35e2a Updated BTextControl and its custom BLayoutItems. Also a bit of style cleanup. Broke up BTextControl::_InitData() method into _InitData() and _InitText() and moved initialization of the BTextView there.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-27 22:16:46 +00:00
Alex Wilson
7a37b89be9 Updated BMenuField and its custom BLayoutItems for layout-safe archiving. Added an _InitMenu(const BMessage*) method that inits the menu during unarchival.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-27 20:59:47 +00:00
Alex Wilson
4a254e4ddb Generally, clean up new archiving constant names & strings to be consistent in all classes. Modify archiving constants to be const char* const (thanks Ingo). Also modify archiving in many classes to use less fields by storing more data in arrays and structs. The common min, max, and preferred sizes, for example are always stored in an array now. In BTwoDimensionalLayout and BSplitLayout, the insets are archived in a BRect. Also fixed a typo in BGridLayout which caused column info to be incorrect during archival.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37777 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-27 20:17:13 +00:00
Adrien Destugues
1855b44cdf * Set the ICU default time zone from the locale preflet. Unfortunately it looks like this doesn't solve all the problems
yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37768 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-27 09:45:52 +00:00
Philippe Houdoin
b599c219a3 Fixed Volume sizes unit in info window, using string_for_size().
This fix #6395.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37764 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-27 08:40:13 +00:00
Oliver Tappe
c090a0fd84 * updated ICU build packages with newer builds that try a bit harder to avoid
warnings and incorporate some of the ICU-patches we had in our repo before
  we upgraded to 4.4.1
* fixed remaining warnings when building locale kit
* activated EnableWerror for locale kit
* added 'Unicode' license, which is the second license in use by ICU


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37763 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-26 22:05:39 +00:00
Adrien Destugues
4ae5a45220 * Rewrote the timezone selection part of the time preflet to make use of ICU instead of our custom TZData.
* Not completely working yet, hte POSIX API isn't very happy about ICU timezone names.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37758 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-26 13:56:50 +00:00
Adrien Destugues
f700bfd569 * FixStringForSize : without context, the locale kit was in trouble finding the right string.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37753 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-26 09:22:02 +00:00
Alex Wilson
45a167a94d In BUnarchiver::IsInstantiated(), catch a possible NULL dereference, make archive parameter to BUnarchiver::IsArchiveManaged() const.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37751 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-26 08:02:33 +00:00
Alex Wilson
c216fe9d13 Update (de)mangle_class_name() functions to be compiler version aware.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-26 05:10:17 +00:00
Oliver Tappe
8eff03f570 * fixed all build warnings by collectcatkeys that I found
* automatic whitespace cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37747 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-25 22:58:29 +00:00
Oliver Tappe
68018dbe1a * fix lost translation strings of StringForSize
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37745 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-25 22:35:58 +00:00
Oliver Tappe
b891b0acae * broke out locale-related jam rules into their own file, LocaleRules
* made locale build tools shut up about anything except warnings or errors


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37723 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 19:56:24 +00:00
Adrien Destugues
282582c005 * Bcountry : private methods start with underscore. The timezone list isnow actually a list of BTimeZone objects, that holdsall the needed info, not only the code. Also tweak the listing code to
remove duplicatesfromthe list generated by ICU.
 * BTimeZone : remove Code, rename Name to GetName. The class is likely to change again for further optimization.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37719 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 16:25:43 +00:00
Adrien Destugues
2774e142e1 * Add a BTimeZone class for handling time zones.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37718 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 13:19:33 +00:00
Adrien Destugues
6c178e1e73 * Add locking system to BCountry to avoid problems with the formatters being deleted while you use them, or created multiple times.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 11:38:37 +00:00
Adrien Destugues
eaf7045526 * Ensure if ICU formatters allocation fails, we return an empty string
* Use a CheckedArrayByteSink for formatting to a char*, instead of allocating a BString then copying it back to the buffer using strncpy


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37708 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 09:37:49 +00:00
Adrien Destugues
f48ad0d968 * Style fixes (some pointed out by Axel, some others by the vim stylechecker).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 16:52:49 +00:00
Adrien Destugues
d4f3002de9 * BCountry : add error checking in case the system runs out of memory, cleanup function prototypes (we don't need virtual, this was a leftover of
OpenTracker days)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 16:36:36 +00:00
Adrien Destugues
3bdfd7f340 * BCountry : use lazy initialisation for the date and time formatters, since they are not always used. Makes instancaiating a country faster, and
so, loading the locale preflet is also faster and use less memory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37696 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 13:54:53 +00:00
Adrien Destugues
a03aca6e06 WIP Timezone support
* BCountry can list the timezones applicable for the country
 * BCountry can give its name (for example France), or LocaleName (french (France)). The second one will later be moved to BLocale class along with 
most of the locale settings ; but this needs a bit of refactoring.
 * The Locale preflet now uses LocaleName instead of Name, since it deals with locales. The time preflet will want only country names, without te 
language information, for example.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 12:47:00 +00:00
Oliver Tappe
eddec292d5 * applied patch by kaliber that fixes more than 100 warnings - thanks a lot!
Closes #6349

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37670 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 21:43:20 +00:00
Adrien Destugues
9a78a691f8 * Locale Roster : add a function to update the settings from a BMessage
* Locale preference : send such a message broadcast to all applications when the settings are changed
 * Deskbar : receive the message and forward it to the locale roster. This way the time display on the deskbar changes as 
soon as you close the locale preflet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37663 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 17:04:28 +00:00
Adrien Destugues
82a115e8bc * BCountry : add copy constructor and assignment operator
* The locale roster uses them instead of messing with pointers, to avoid ownership problems
 * The Locale preflet works on a copy of the default country instead of altering it directly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 14:09:48 +00:00
Adrien Destugues
5d498edbb5 * Removed registering of non-existing application as preferred for catalogs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37644 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 10:36:32 +00:00
Adrien Destugues
ec9d39b1eb * Locale Roster : exclude the "gcc4" and "gcc2" folders when searching for add-ons. Avoids an useless debug message.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37643 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 10:34:06 +00:00
Adrien Destugues
2aeaae9988 * Locale Roster : store an instance of BCountry instead of replicating all of its intrnals and creating instances on demand
* Locale preflet : save the time formats to the settings file if they are different from the defaut.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 10:12:59 +00:00
Adrien Destugues
2d67f5fcd6 Locale preflet : make the 12/24hr switching system more robust and lossless
* When selecting chinese, the AM/PM stays at the beginning of the string
 * When clicking multiple times on the 12 hours button, the AM/PM indicator is added only once.
 * Only regression : the default format for cherokee (US) uses a 12hour clock without AM/PM indicator, so it is not possible 
to switch it to a 24Hr clock scheme.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-20 17:44:14 +00:00
Adrien Destugues
fe8d7c0225 * Remove the CatalogStub class and put the Gatcatalog function directly in BLocaleRoster,
* Adjust the B_TRANSLATE macros to take this into account
 * Adjust collectkatkeys to take it into account too
Thanks to Ingo for explaining me all the technical details about hiding things in shared objects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37616 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-20 11:38:34 +00:00
Ingo Weinhold
814057885c Patch by Alex Wilson:
* Added support for archiving/unarchiving.
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37613 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-20 08:28:55 +00:00
Ingo Weinhold
12463fa891 Patch by Alex Wilson: Added archiving/unarchiving support to BSplitView.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37612 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-20 08:24:19 +00:00
Adrien Destugues
0e23b87fe4 * Style fixes as pointed out by Ingo. Sorry !
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37603 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-19 16:25:40 +00:00
Adrien Destugues
3047815036 * Fix \x parsing in collectcatkeys again (thanks to Kaliber)
* Hide the CatalogStub::GetCatalog method so that if liblocalestub.a is missing from a localized image, it will not try to steal the catalog of another one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-19 15:47:06 +00:00
Adrien Destugues
e2cc7215e8 * Fix bug spotted by Rimas Kudelis : if an escaped sequence (such as \xA9) was immediately followed by other digits,
collectcatkeys parsed all the digits instead of just the two associated to the \x, leading to wrong characters in thecatkeys 
file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37586 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-19 11:21:11 +00:00
Adrien Destugues
7af097b973 * Add FormatDate variant returning fields positions and associated DateFields returning their identifiers
* Use them in the time preflet to display and edit the date in a local-aware way


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 12:24:57 +00:00
Ingo Weinhold
e5ea208d71 Patch by Alex Wilson:
* Added archiving/unarchiving support.
* Coding style cleanup (some by myself).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 02:04:32 +00:00
Ingo Weinhold
4b20c303bd Patch by Alex Wilson:
* Added archiving/unarchiving support.
* Coding style cleanup (some more by myself).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 01:46:40 +00:00
Ingo Weinhold
39c72631a3 Patch by Alex Wilson:
* Added archiving/unarchving support.
* Coding style cleanup (some more by myself).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 01:05:28 +00:00
Ingo Weinhold
ff626c8e29 Patch by Alex Wilson: Added archiving/unarchiving support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37546 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:46:40 +00:00
Ingo Weinhold
3fb74eb796 Patch by Alex Wilson (with minor changes by myself):
* Added support for archiving/unarchiving.
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:41:56 +00:00
Ingo Weinhold
849e11ad8d Patch by Alex Wilson:
* Implemented archiving/unarchiving support.
* Coding style cleanup (some more by myself).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37543 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:15:31 +00:00
Ingo Weinhold
d1535a45df Patch by Alex Wilson:
* Implemented archiving/unarchiving support.
* Coding style cleanup (some more by myself).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37542 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:09:06 +00:00
Ingo Weinhold
80c2bbd8ae Patch by Alex Wilson (with small style changes by myself): Added support for
archiving/unarchiving.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37541 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-16 18:11:24 +00:00
Ingo Weinhold
7ed1644c55 Patch by Alex Wilson:
* Added archiving/unarchiving support.
* Style cleanup (also some by myself).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-16 17:23:15 +00:00
Ingo Weinhold
cbac1a2355 Patch by Alex Wilson: Added archiving/unarchiving of layout and layout
related data.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37539 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-16 17:06:55 +00:00
Ingo Weinhold
b137ab3eb3 Patch by Alex Wilson (minor changes by myself) related to the new archiving
features:
* Some cosmetic adjustments of the API, like using references instead of
  pointers, argument order, method names, etc.
* Added convenience template methods for archiving and unarchiving to BArchiver
  and BUnarchiver.
* BUnarchiver (respectively the private BUnarchiveManager) explicitly deals with
  object ownership, now. This is necessary since an error while unarchiving
  could leave an already unarchived object without owning object, which would
  result in it being leaked. The BUnarchiver::{Get,Find}Object() methods do now
  have an optional parameter to specify whether object ownership shall be
  transferred.
* Fixed incorrect header guard in headers/private/binary_compatibility/Global.h.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-16 16:49:42 +00:00
Oliver Tappe
7ad694e346 Some more ICU-related improvements:
* updated icu-devel package to 4.4.1
* create appropriate devel lib links when icu-devel is being installed
  (which only works during build, not when using installoptionalpackage)
* dropped ICU headers from repository and instead fetch them from the
  icu-devel package when needed during the build
* adjusted Jamfiles that make use of ICU-headers accordingly (hopefully
  I didn't miss any)
* fixed license in OptionalPackage description of icu packages


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-15 21:23:45 +00:00
Adrien Destugues
a7e183f8e5 BDateField is already used in ColumnListView, so use another name for this enum.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-14 19:43:46 +00:00
Adrien Destugues
57500c639c * Allow use of unicode character in time view
* Some support for languages having an order different than H:M:S:AM (like chinese). Does not seem to work too well, but I can't spot what I missed
 * API to get the infos about the type of each field in a time format


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37517 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-14 16:43:04 +00:00
Alexandre Deckner
1f34e928ac * Removed last remains of the OPEN_TRACKER define.
* Cleanup of unused include.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-14 15:32:00 +00:00
Adrien Destugues
c96d1da735 * Add an API to get a formatted time along with delimiters for the differrent fields, for further parsing/formatting
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-14 13:20:20 +00:00
Stephan Aßmus
b1008df2c2 Patch by Alex Wilson: Added convenience methods for storing BAlignment and BSize
in BMessages. Also added type codes for them in TypeConstants.h. Closes ticket
#6302. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-14 07:02:38 +00:00
Adrien Destugues
5098ba1b94 Update ICU to 4.4
* Remove 4.2 sourcecode
 * ICU is now an optional package (mandatory)
 * Adjust the namespaces and libraries names where needed


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37498 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-13 19:04:40 +00:00
Alexandre Deckner
a111096469 * Minor style fixes, spaces vs tabs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37495 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-13 13:33:49 +00:00
Alexandre Deckner
148f33f206 * More PoseView localization by T.Murai (a.k.a mt). Thanks a lot. (be careful with the 80 chars indenting though ;-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-13 13:19:51 +00:00
Stefano Ceccherini
4dc7415f9f Also remove inclusion of AboutBox.cpp to fix the build. Sorry
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-13 13:17:08 +00:00
Alexandre Deckner
4ed28a571a * Applied libtracker localization patch from T.Murai (a.k.a mt) with some modifications (see below).
* Functional modifications:
     Reworked InfoWindow file size localization, the patch removed number formating (size in bytes) and was too complicated to my taste.
     Replaced the uses of sprintf with the safer snprintf.
     Changed signature to x-vnd.Haiku-libtracker instead of x-vnd.Haiku-libTracker (to be consistent with the binary name)
* Style modifications:
     Reworked lots of 80 char indenting (probably due to the now shorter line lengths since your previous patch that wasn't using the macros)
     Lots of missing brackets when "if's" becomes multiline.
     Other minor fixes.

Noticed a few uses of FindItem on translated names that might become problematic someday. Added some TODO's regarding localization of file sizes. Localization might still be 
optimized a bit regarding the produced en.catkeys

Note to translators: .catkeys files should be placed in haikusource/data/catalogs/kits/tracker though beware as the base en.catkeys might change 
slightly in the next days.
Note to users: As with any other app you need to restart Tracker (or any aother app using libtracker's filepanels) for it to pick the locale setting. E.g: use 'quit an 
application' and 'restart Tracker' from process controller.

Thanks a lot T.Murai 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-13 12:39:53 +00:00
Stefano Ceccherini
4195dda90c Removed unused file
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-13 12:22:56 +00:00
Adrien Destugues
080f483b21 Make locale kit Hybrid build aware, so that the catalog add-ons will be available for gcc4 applications.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-13 10:51:57 +00:00
Stefano Ceccherini
4db1f9f387 Use BMenu::RemoveItems() instead of iterating.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37488 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-13 08:21:19 +00:00
Rene Gollent
140f3bd884 WellKnownEntry used a const char * to store the name of its entry, but didn't actually copy the passed-in string, only its pointer. Since the entries were all populated via strings off the stack, this led to them being overwritten with random garbage during program execution. In the best case, this would result in well known icons such as the ladybug boot volume failing to resolve. In the worst case, this likely led to random corruption/crashes. Fixed by having them store a BString instead.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37476 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-12 02:06:29 +00:00
Matt Madia
aac2f1f73a Fixes build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37453 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-10 08:36:42 +00:00
Matt Madia
db22cdca2f Automatic whitespace cleanup. No functional change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37452 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-10 08:36:16 +00:00
Stefano Ceccherini
acbbf2c0bb Remove unused define
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-09 19:54:35 +00:00
Stefano Ceccherini
51b3623ee6 Fix warnings
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-09 19:54:18 +00:00
Stefano Ceccherini
9b74142851 Move assigments a bit earlier, so they aren't done at every loop.
Thanks to Sean Bailey for watching after me.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37445 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-09 19:53:58 +00:00
Stefano Ceccherini
bbbcf3d61b regex.c is already in libroot
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-09 17:23:09 +00:00
Stefano Ceccherini
821a9b0306 Renamed attachAborted to addAborted
Use fAttachAborted in AttachedToWindow().



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37442 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-09 17:13:34 +00:00
Rene Gollent
852b01198c Fix missing space.
Fix file being in CR/LF format.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37440 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-09 13:57:46 +00:00
Philippe Houdoin
b37fa18bdb Fixed Size() and BytesRemaining() semantics, which was broken.
Revert r33437, which was missing the root cause.
Spotted by Christophe Huriaux, thanks. 
And welcome in contributors list!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37437 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-09 00:24:18 +00:00
Adrien Destugues
27d84b482c Patch by Alex Wilson as part of GSoC 2010 : Archiving of Layouted BViews hierarchy.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 15:40:49 +00:00
Ingo Weinhold
fbb6335d2a Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 15:04:38 +00:00
Ingo Weinhold
e5150e2847 Patch by Alex Wilson (compilation fixes by myself): Extended the archiving/
unarchiving protocol to support archival of arbitrary object graphs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37431 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 14:54:25 +00:00
Adrien Destugues
51145d87bd Support for setting 12/24Hr mode in locale preflet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 09:14:09 +00:00
Adrien Destugues
0cf8c36abb Patch by Alex Wilson, part of GSoC 2010 : fix a "typo" in AbstractLayoutItem.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-05 09:47:48 +00:00
Stefano Ceccherini
4225e5b785 Use the Bfont object to discriminate between fonts (as in Dano)
and not just size and code. Style cleanups.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-03 09:34:59 +00:00
Rene Gollent
fc7c01a114 Fix typo spotted by Clang. Resolves ticket #6253.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37358 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-02 19:48:13 +00:00
Adrien Destugues
1bbf3b889e Patch by Alex Wilson as part of GSoC 2010 : fix a crashing bug in BTwoDimensionalLayout::AlignWith() (ticket #6244).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37348 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-02 17:42:59 +00:00
Adrien Destugues
a67f10cf82 Fix DoCatalogs rule for Bluetooth that I broke earlier. Sorry again!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37346 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-02 17:32:47 +00:00
Adrien Destugues
2f0eb7b11e * Introduce a new method in BCountry to get the first day of week (monday or sunday)
* Localize date in deskbar properly, and use the new API to show the calendar. The "show european date" checkbox is now gone.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37344 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-02 17:15:55 +00:00
Adrien Destugues
6a3bada8dc * Patch by Jorma Karvonnen with updates by me : localize libbluetooth
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37339 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-02 13:37:54 +00:00
Adrien Destugues
757e70593c * Patch by Jorma Karvonnen updated by me : localize NetworkStatus
* Fix a small bug in LocaleRoster : a / was left out in the mimesignature. Didn't cause any harm, but it's cleaner this way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37337 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-02 13:03:33 +00:00
Adrien Destugues
be8fa2fb30 * Update all applications in tree to use the new localizing system
* Remove the old one from the locale librairy, with some cleanup
Known regressions :
 * readonlybootprompt will no longer update the locale settings : the 
method used messed with internal undocumented things
 * external localized apps (webpositive for example) will not run 
anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37336 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-02 11:36:13 +00:00
Rene Gollent
17f902d7c2 Don't leak the time formatter. Fixes ticket #6250.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37329 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-01 23:28:09 +00:00
Adrien Destugues
76a4353b79 Add a new way of using the locale kit with static accessors instead of global variables. This has the following consequences :
* Applications don't have to declare BCatalog fCatalog themselves, it's now done automatically
 * Libs and add-ons can be localized just the same way (except static libraries)
For now this new system is yet disabled as I'm looking for some peer review before going on. To enable it you have to define B_TRANSLATE_USE_NEW_MACROS in each file doing catalog access. This will not stay, I'll update the 
other apps to use it.
The linking in jamfiles must be not only with liblocale.so, but also liblocalestub.a. Not sure how to handle this for user-side applications. Libraries are also required to provide a MIME signature to use any catalog.
The locale preflet is updated to the new system (as a test). Othe rapps will follow if everyone is ok with this approach.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37323 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-01 11:54:09 +00:00
Stefano Ceccherini
8460e00cc0 _AddDynamicItems didn't pass the keyDown parameter to _OkToProceed (noticed
by Ziusudra).
Also removed leftover fDynamicItemsAdded.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-30 14:49:42 +00:00
Wim van der Meer
b3df2c9a87 Fixing BeOS binary compatibility.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37296 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-28 22:16:07 +00:00
Wim van der Meer
e4eb2e7e45 Reverting r37289 because it breaks the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37293 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-28 11:45:04 +00:00
Wim van der Meer
31f2baa4fd Changeset r37275 makes the name parameter in the BGLView class constructor a const char*, which breaks binary compatibility with R5.
This change uses _BEOS_R5_COMPATIBLE_ to determine which function prototype to use.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37289 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-28 09:03:55 +00:00
Wim van der Meer
329e7bd264 Compiler warning fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37275 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-27 09:11:17 +00:00
Stefano Ceccherini
7ecc04177a Removed use of fDynamicItemsAdded, since it can't work like this.
Since a custom BMenu can remove the added items whenever it wants,
they wouldn't never be added back if the menu wasn't destroyed
and recreated


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37262 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-26 12:43:16 +00:00
Stefano Ceccherini
780b76dcf9 Applied patch by Ziusudra in ticket #4930 to avoid a deadlock when
navigating the menus via keyboard.
I also factored some code into functions, in particular the code to
add the dynamic items. Also keep track if the dynamic items have been added
or not (using a new boolean class member).
I tested for regressions but couldn't find any.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37261 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-26 12:29:17 +00:00
Wim van der Meer
0c9f5a026f * Modified PtrScr key behaviour:
- No modifiers: take a screenshot with zero delay and launch the GUI
  - Shift-PrtScr: Silent screenshot using the saved GUI settings
  - Ctrl-PrtScr: Take a screenshot using the saved GUI settings and copy the
    screenshot to the system clipboard
* A few locale related changes (I am not sure how this works when a class is
  shared between two applications, I hope I got everything right)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-25 13:12:15 +00:00
Adrien Destugues
b5e52140e8 * Fixed a typo in filename of Austria flag
* Converted all the flags to rdef and put them in use.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37244 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-24 15:12:50 +00:00
Adrien Destugues
3fc995d101 * Deskbar now uses localized time from locale kit. Thus the "24 hour
clock" setting is not needed anymore.
 * The locale kit now provide a less complete 'full' time format : hour 
minutes seconds, I don't think anyone cares much about the "UTC + 1" or 
other similar stuff.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37243 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-24 13:32:59 +00:00
Ingo Weinhold
7a0dca5c54 Moved SHA256 code to libshared.a.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 17:47:07 +00:00
Stefano Ceccherini
8345d7559d Don't set the width and height of the view in the constructor,
otherwise some other calculation screws up later, and the menu frame ends up
to be offsetted by its height. Fixes ticket #6159.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37149 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-15 11:15:15 +00:00
Oliver Ruiz Dorantes
a5bf12376d *Incorrect endianess handling from bdaddr at parsing from string.
*Remove bluetooth_util deprecated header
*Issue conn_req for socket connect() call



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37132 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-14 20:04:10 +00:00
Axel Dörfler
12c93cc7f8 * Before stippi starts clobbering the sources everywhere with superfluous
work-arounds, I applied the work-around where the problem actually occurs,
  until someone takes the time to look into it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-11 07:56:51 +00:00
Wim van der Meer
3417d2a90f * Rename "ScreenshotApp" to "Screenshot", rename its signature from
"application/x-vnd.haiku-screenshotapp" to "application/x-vnd.haiku-screenshot"
* Rename "Screenshot" to "screenshot", rename its signature from
"application/x-vnd.haiku-screenshot" to "application/x-vnd.haiku-screenshot-cli"
* Move screenshot from /system/apps to /bin


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37059 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-08 13:15:17 +00:00
Stephan Aßmus
c411bbc095 Resolved TODO about recursively removing watched files and folders when a
directory is moved outside the watched hierarchy or deleted entirely. It
involves another TODO, because the generated notifications are B_ENTRY_REMOVED,
while B_ENTRY_MOVED is probably more correct.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37049 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-07 17:37:33 +00:00
Stephan Aßmus
a478859f51 Added liblocale and the ICU libs to the libbe_test target (app_server test
environment). Allows "TARGET_PLATFORM=libbe_test jam install-test-apps" to
build cleanly again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37030 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-06 12:11:43 +00:00
Stephan Aßmus
908967a199 Improved the BNotification API after suggestions from Karsten, thanks! Using
cosnt BString& instead of const char* could potentially save copying the string,
although in most use cases, it will probably ammount to the same thing. It may
provide more flexibility later on, like for example when BString knows its
encoding or something similar. Removed superfluous second version of
AddOnClickRef().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 21:13:11 +00:00
Stephan Aßmus
f33637d9a8 * Improved BNotification API.
- No more manual memory management.
   - Make it clear who keeps or releases ownership of arguments passed.
   - Copy icon, arguments and entry_refs.
   - Do not expose implementation details (What do the BLists contain?!).
   - BRoster takes const BNotification& and bigtime_t timeout.

 * BRoster::Notify():
   - Proper error handling.
   - Fixed documentation.

 * Adjusted notify:
   - Renamed fOk to fHasGoodArguments.
   - The "const char*" members were really "char*" members (self-managed).
   - free() is NULL-safe.
   - fRefs contains BEntries, so passing void* to delete does no good.
   - Adjustments to the changed API.
   - Coding style fixes.

 * notification_server:
   - Adjustment to the new type for timeout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36952 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 17:50:12 +00:00
Stephan Aßmus
de9dcd41f8 Patch by plfiorini: Integration of InfoPopper as a system service. See ticket
#1245. There are some TODOs outlined in the ticket, but they will be much
easier to review as individual patches against trunk, versus as a new version
of the huge patch.

I've messed a lot with src/servers/notification/NotificationsView.cpp in order
to resolve a crash I was getting when testing this thing (rewrote line
wrapping). I've also replaced the icons with the one that zuMi did long ago.

Thanks, plfiorini, for working on this code as much as you did!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 14:48:27 +00:00
Stephan Aßmus
b1784a9dbd Reworded commented out code with regards to not knowing the data size yet,
to decide whether to apply the mini data flag. Helps compilation with clang
according to ticket #5892.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-23 12:34:54 +00:00
Axel Dörfler
d2717a34c6 * Also hide tool tips if a key has been pressed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36885 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-21 12:32:58 +00:00
Stephan Aßmus
2376696dd9 Provide the HVIF version of the printer spool type. These types should really
be moved into the mime database source... but anyway, thanks to Meanwhile for
the icon! Reference: Ticket #1429.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-19 11:17:04 +00:00
Stephan Aßmus
33394b856d Patch by Wim van der Meer: Added get_mouse_bitmap() global method to
InterfaceDefs.h and corresponding implementation in the app_server. Thanks a
bunch! Closes ticket #5978.

A note to those using "update-all" with hybrid builds - the alternative GCC
system libs will not be updated this way, and this and Wim's last patch
change the libbe <-> app_server interface. You need to manually update the
respective libbe.so, or do a clean build, otherwise apps for the other GCC will
not start anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-16 15:51:54 +00:00
Stephan Aßmus
0cf1ecfb29 Patch by Ziusudra: Fixes navigation in to and out of sub menus with the cursor
keys. Thanks! Closes ticket #5996.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-15 12:40:59 +00:00
Rene Gollent
9a708202ac FSCreateTrashDirs mustn't create the directories itself. This breaks the logic in FSGetTrashDir that creates/applies attributes if needed. This most likely explains Axel's random problems with trash directories being visible, since this would cause a fresh Haiku install's /boot/trash to never be marked invisible as it should be.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36816 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-15 02:05:45 +00:00
Stephan Aßmus
5288371864 Rewrote BMenu::_NextItem(), since it could busy loop when there was no item.
The new code should be a little easier to follow. IMHO, there were also problems
with detecting and breaking out of a full cycle, in case there was no start
item passed to the method.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-14 18:14:19 +00:00
Stephan Aßmus
3ddefbc1d4 Fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-14 16:41:58 +00:00
Stephan Aßmus
1c73ffa102 Patch by Wim van der Meer: Implemented global Interface Kit function to retrieve
the current mouse position and pressed buttons. I've changed the return code
to status_t and added anal error checking, most of the rest of the file is not
doing it, though... :-) Thanks, Wim!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-14 15:53:09 +00:00
Ithamar R. Adema
43775be678 * Revert r36316 as there are too many apps broken (Vision, Chart, Tracker Find, etc) in different unexpected ways. I'm sorry for the
trouble :( I'll revisit the change and post a patch with a hopefully better solution soon....


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36795 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-11 22:54:00 +00:00
Stephan Aßmus
6f05b1027f Removed stuff which was completely unused.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36790 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-11 15:38:21 +00:00
Axel Dörfler
1e9e9da389 * I'm not sure why it happens, but the drag bitmap offset was BPoint(2, 1) off
(that should be good enough for the current Tracker).
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-11 08:01:36 +00:00
Axel Dörfler
9c8f23673b * Never choose a target pose in UpdateDropTarget() that is part of the currently
dragged selection. This fixes the context menu popping up when you try to
  move around an icon a few pixels only.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-11 07:46:19 +00:00
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