Commit Graph

36195 Commits

Author SHA1 Message Date
Oliver Tappe
803a1f70aa * Refresh() should make sure to try and load both "locale" and "timezone"
settings, not give up when one is missing (like on a fresh image)
* try harder to fallback to proper default values when loading the locale
  settings file fails

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 22:48:00 +00:00
Oliver Tappe
dbe1e23aa8 Optimised passing around of timezone a bit
* _kern_[sg]et_timezone() now accepts/passes out the timezone name, too
* adjust Time preflet and clockconfig to pass the timezone name into the kernel
  when calling _kern_set_timezone()
* ajust implementation of tzset() to fetch the timezone name from the kernel
  via _kern_get_timezone() instead of reading 'libroot_timezone_info'
* the Time preflet no longer writes 'libroot_timezone_info'


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38164 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 22:01:28 +00:00
Oliver Tappe
a096bb6509 * adjust Time preflet to write only the name of the timezone into
libroot_timezone_info (will change again, soon)
* when formatting the preview/current time, the difference between old and
  new timezone offset has to be taken into account if the RTC is set to
  local time

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38163 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 21:17:57 +00:00
Oliver Tappe
560b10ff88 Implement tzset(), gmtime(), localtime() and mktime() on top of ICU
* no longer keep a separate time-backend, since the implementation needs to
  access (data of) the locale backend anyway
* moved more stuff from localtime_fading_out.c to localtime.cpp
* added respective tests to locale_test
* added two more tests copied from glibc, test_time.c and tst-mktime.c


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38162 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 21:14:23 +00:00
Rene Gollent
6e23be561a Fix build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 20:58:35 +00:00
Oliver Tappe
7a4000a8ea Largish overhaul of the DateTimeEdit-view in the Time preflet:
* instead of fetching the field data every time something needs to be drawn,
  we now fetch all the data whenever the date or time changes - simpler and
  faster, too
* adjusted date layout to match time layout, i.e. left-adjusted
* lots of cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38160 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 20:30:37 +00:00
Oliver Tappe
23b14f2d32 * yep - even more debug output removed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38159 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 20:28:02 +00:00
Oliver Tappe
80d59712ae * we need to initialize ICU's default timezone, as the date formatting
implementation in BLocale assumes this matches the system's timezone
This little bugger should fix #6277, #6370 and #6396.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38158 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 20:24:51 +00:00
Oliver Tappe
ee33862568 * dropped one more instance of debug output
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38157 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 20:20:45 +00:00
Oliver Tappe
c639a77808 * moved BDateElement from BCountry to BLocale, as that's where it's being used
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38156 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 20:19:51 +00:00
Stephan Aßmus
119e788a15 Corrected outdated comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38155 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 19:34:15 +00:00
Stephan Aßmus
b6865b963b Rewrote the fake font overlay support, as the previous implementation
had several problems: First of all it duplicated the FontCacheEntry
retrieval and locking code. Second it was really slow to do the whole
lookup for every single glyph. Third is used the FontManager without
locking, which could result to app_server crashes, mostly at startup,
while the FontManager thread was scanning the fonts and the glyph
layout was already using it. Forth it dereferenced a FontStyle
pointer without checking it against NULL. And lastly it didn't use
the font size of the original font for the fallback font.

The new algorithm addresses not only these, but also puts the glyphs
which are unsupported by a font and retrieved from the alternative
font, into the FontCacheEntry of the original font, so that the
HasGlyphs() check succeeds the next time around and does not need to
use the fallback algorithm anymore. There is also less manual management
of locking and FontCacheEntry recycling, this is now taking care of by
FontCacheReference objects on the stack.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 19:24:20 +00:00
Stephan Aßmus
e404b4ed2a * The Glyph() method takes an optional FontCacheEntry* parameter
which can do an alternative lookup of the glyphCode to glyphIndex
  and who's FontEngine is used to retrieve the GlyphCache object.
  The glyph however is inserted into the Cache of the original entry.
* GlyphCache objects are no longer looked up by index, but by charCode,
  which should not be a functional change, but allows to lookup glyphs
  from the cache for which the underlying FontEngine does not have
  a code to index mapping.
* Fixed an operator precedence bug in the signature generation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38153 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 19:17:11 +00:00
Oliver Tappe
a9f371c057 * renamed settings file for Time preflet window position from 'Time_settings'
to 'Time_preflet_window' in order to be less confusable with the other
  'Time settings', which contain the actual selected values (timezone, etc.)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38152 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 17:27:20 +00:00
Oliver Tappe
371c5afd88 * remove one more superfluous include (probably from some older debug output)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38151 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 16:15:20 +00:00
Oliver Tappe
2eefb8f0b9 * drop debug output
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38150 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 16:13:52 +00:00
Adrien Destugues
2c1c7b49f4 CID 1499 : Access to NULL pointer.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38149 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 15:19:46 +00:00
Adrien Destugues
eb7595ebbd CID 1457 : dead code (we know pressed is true at this point).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38148 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 15:17:00 +00:00
Adrien Destugues
6e24fc677f CID 1498 (and others) : when deleting a NULL pointer, operator delete is actually called. So, it must not dereference the
given pointer without checking first.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38147 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 15:07:29 +00:00
Oliver Tappe
f23b9d8a72 * added possibility to pass in the timezone when formatting the time
* added TODOs about the need to get rid of some of the date/time-formatting
  shortcut methods

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38146 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 15:03:54 +00:00
Axel Dörfler
3f2a18bd30 * The UDP protocol was deleting a received error buffer twice in the case that
everything went okay. This finally fixes #6446.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38145 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 15:01:26 +00:00
Oliver Tappe
795ff7d3d4 * removed some useless code and protect against localtime() possibly returning
NULL

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38144 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 14:59:14 +00:00
Oliver Tappe
559cf371bc * fix oversight that gmtime() and localtime() may return NULL, which would lead
to a crash


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38143 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 14:52:37 +00:00
Adrien Destugues
306fdb5b98 Missing call to B_TRANSLATE.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38142 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 14:36:04 +00:00
Adrien Destugues
59c2d19e1e * Rewrite the parsing of xterm extension so that it doesn't touch ANSI standard things
* Some adjustements to the color table to have less duplicate colors


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38141 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 14:28:12 +00:00
Adrien Destugues
a20769b39c CID 1500 : Potential NULL poiner dereference.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38140 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 13:37:10 +00:00
Adrien Destugues
3eedbbbf0e Handle more pseudoÃ-graphic characters and ways of using them. This gets aptitude (from debianÃ) displaying properly and should also fix midnight commander.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38139 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 13:11:51 +00:00
Stephan Aßmus
397fd7f5d0 A better fix than r38136: Remove the useless iostream include from Shell.cpp,
perhaps a left-over from debugging output? Thanks to Axel for reviewing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38138 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 10:32:44 +00:00
Adrien Destugues
8627cb38c1 CID 1515 : Wrong pointer type.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 10:19:02 +00:00
Stephan Aßmus
30160db489 Fixed the build. Perhaps it's not needed for the GCC2 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38136 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 10:10:58 +00:00
Adrien Destugues
da0db45d95 CID 1555 : Wrong cast type
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38135 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 09:42:13 +00:00
Adrien Destugues
e414da37a1 CID 1584 : NULL dereference on low memory situations (get_window_info does a malloc that may fail)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38134 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 09:31:38 +00:00
Adrien Destugues
3ea58911f9 Explicitly start bash when opening a new tab, since other shells may not handle the "--login" option.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38133 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 09:12:34 +00:00
Adrien Destugues
fbebcdd42d CID 1743 : Memory leak on error.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38132 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 08:14:34 +00:00
Adrien Destugues
8e13f13e5c CID 1744 : memory leak on error
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 08:11:47 +00:00
Adrien Destugues
0d858bd391 Add documentation for the BTimeZone class.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38130 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 07:23:42 +00:00
Rene Gollent
606e627e76 Remove unnecessary NULL check (the view in question is created in all cases in InitCommon(), and is already dereferenced several times prior to the check in the function anyways).
Fixes CID 1078.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38129 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 02:45:08 +00:00
Andreas Färber
0d6a8357f4 Generic: Type fixes for atomic op
Cast uint32* arguments for atomic_or() to int32*.

Resolves warnings treated as errors for Big Endian targets.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38128 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 22:38:41 +00:00
Andreas Färber
994f861dfc Generic: Type fixes for byte swapping
Cast further pointer arguments for B_HOST_TO_LENDIAN_INT32 to uint32.

Resolves warnings treated as errors for Big Endian targets.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38127 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 22:32:58 +00:00
François Revol
ef855c9edb Remove unwanted compatibility aliases before I get beaten by the Dano hunters...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38126 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 21:08:59 +00:00
Oliver Tappe
3045206f61 * style adjustments - no functional change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38125 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 17:58:06 +00:00
Oliver Tappe
80519a9d1f * style adjustments - no functional change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38124 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 17:53:04 +00:00
François Revol
6b26291d7b Force reloading the current decorator on -r until they handle color changes correctly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38123 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 17:13:12 +00:00
François Revol
8e8634bf54 Add synonyms for tootip ui_color constants. Fix WindowShade to use the new official ones.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38122 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 16:33:00 +00:00
François Revol
def864c05d Fix some blatantly missing uses of ui_color(), but there is a lot of work to do here... BControlLook itself doesn't even respect those correctly either...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38121 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 15:49:09 +00:00
Jérôme Duval
e6bffa0b5f Fixed #6450. "application type" string is not translated.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38120 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 15:30:42 +00:00
Axel Dörfler
df2895e0f8 * Automatic whitespace cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38119 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 13:24:41 +00:00
Axel Dörfler
44a3d0d1f6 * Spotted a few reference counting bugs that were probably responsible for
#6446, although I could not reproduce the exact problem.
* net_datalink::is_local_[link_]address() now releases a previous reference if
  the _interfaceAddress arguments does not point to NULL.
* When a buffer is received from a device, it's interface_address should be NULL
  already.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 13:21:42 +00:00
Axel Dörfler
11eccb54e2 * Added ability to be able to dump a net_interface by name.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38117 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 13:17:52 +00:00
Stefano Ceccherini
5574811008 CID 1653. symbolTable could be leaked in certain error cases.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 12:46:10 +00:00