Commit Graph

36604 Commits

Author SHA1 Message Date
Alex Wilson
0a5e130725 Make SharedSolver BArchivable to save extra user constraints. 2012-05-03 08:45:36 +12:00
Alex Wilson
bad1d6ba7e Make Variable::SetRange() more forgiving. 2012-05-03 08:45:35 +12:00
Alex Wilson
015e5f06d8 Make BALMLayout::BadLayoutPolicy archivable. 2012-05-03 08:45:34 +12:00
Alex Wilson
35bf0b5c1c Add initial support for archiving a BALMLayout.
What's supported:
* basic archive/instantiate
* friend layouts
coming soon:
* saving of custom restraints
* archiving of BadLayoutPolicy
2012-05-03 08:45:32 +12:00
Alex Wilson
f9c58743e3 Fix possible NULL dereference in TabBase::IsInLayout(). 2012-05-03 08:45:31 +12:00
Alex Wilson
4ca2a44779 Make ownership-taking idempotent during unarchiving.
The previous scheme made it hard to deal with reference-counted objects,
which may be owned by many objects.
2012-05-03 08:45:29 +12:00
Alex Wilson
0a408e4992 Make it possible to have a Variable not belonging to any LinearSpec. 2012-05-03 08:45:27 +12:00
Alex Wilson
bc7956c7cf Use const overloading on BALMLayout::{X|Y}TabAt(). 2012-05-03 08:45:26 +12:00
czeidler
d7568eabd2 Add IndexOf methods. 2012-05-03 08:45:25 +12:00
czeidler
15ef732f0d Check first if we own the constraint before deleting it. 2012-05-03 08:45:23 +12:00
Alex Wilson
4878cc70e2 Don't remove ourselves from a BLayoutContext when it is leaving. 2012-05-03 08:45:22 +12:00
czeidler
c4340eab04 Fix row column weight. 2012-05-03 08:45:21 +12:00
czeidler
35babcf06d Allow left and top tab to be NULL. 2012-05-03 08:45:19 +12:00
Alex Wilson
0bd511a331 Avoid use after free in RowColumnManager.cpp
Fixes CID 10862
2012-05-03 08:45:18 +12:00
Alex Wilson
681f48fcbc Replace BALMLayout::Ordered*Tabs() method with *TabAt(int, bool sorted). 2012-05-03 08:45:17 +12:00
Alex Wilson
6169a6e3d1 Minimize the effect invisible items have on a BALMLayout.
There seems to still be some effect on positioning, but invisible items
no longer constrain the layout.
2012-05-03 08:45:16 +12:00
Alex Wilson
af6ddb01df Improve FriendLayout test to test invalidations as well. 2012-05-03 08:45:14 +12:00
Alex Wilson
fbd2dfcf17 Refactor ActiveSetSolver::Find{Min|Max}s(). 2012-05-03 08:45:13 +12:00
Alex Wilson
a9242e3d98 Properly handle unbounded results in SharedSolver::Validate{Min|Max}() 2012-05-03 08:45:12 +12:00
Alex Wilson
1cbe95140a Refactor SharedSolver::Validate*() methods a bit more. 2012-05-03 08:45:10 +12:00
Alex Wilson
3ade12dd15 Make BALMLayout::BasePreferredSize() useful again. 2012-05-03 08:45:09 +12:00
Alex Wilson
ac84362568 Update BadLayout test to sync with OnBadLayout changes. 2012-05-03 08:45:08 +12:00
Alex Wilson
09e87fa352 Pass more information to BadLayoutPolicy.
Also, re-add BadLayoutPolicy invocations, which were lost while creating
SharedSolver.
2012-05-03 08:45:06 +12:00
Alex Wilson
93904ad087 Have SharedSolver return the solver result from Validate*() methods. 2012-05-03 08:45:05 +12:00
Alex Wilson
82a0965357 Improve efficiency when validating an ALM layout. 2012-05-03 08:45:04 +12:00
Alex Wilson
419fe0b8ae Introduce SharedSolver class to improve BALMLayout's friend feature. 2012-05-03 08:45:02 +12:00
Alex Wilson
708a298e22 Refactor XTab and YTab to share a common base, TabBase.
TabBase takes care of layout tracking etc..
2012-05-03 08:45:01 +12:00
Alex Wilson
a9761aedbf Refactor BALMLayout::AddItem to reduce repitition. 2012-05-03 08:45:00 +12:00
Alex Wilson
93977272f4 When adding tabs to a BALMLayout, ensure they are fully added. 2012-05-03 08:44:58 +12:00
Alex Wilson
c640be198b Add a test for ALM's 'friend' behaviour. 2012-05-03 08:44:57 +12:00
Alex Wilson
c761a8a6d4 Let BALM::{X|Y}Tabs be in multiple BALMLayouts, if they are friendly. 2012-05-03 08:44:55 +12:00
Alex Wilson
f9cabdd009 Use BReferenceable properties of LinearSpec in BALMLayout.
This saves us from a potential use-afte-free bug.
2012-05-03 08:44:54 +12:00
Alex Wilson
1c8104a70e Add a test for nested BALMLayouts. 2012-05-03 08:44:51 +12:00
Alex Wilson
f6db102e47 Make BALMLayout respect its position when nested. 2012-05-03 08:44:50 +12:00
Alex Wilson
51b5b66b01 Remove lp_solve as a dependency of the linprog lib.
Really, it hasn't depended on lp_solve for a while, but it was still
linked in in some places.
2012-05-03 08:44:48 +12:00
Alex Wilson
03adc8c767 Add test for BALMLayout's bad layout handling. 2012-05-03 08:44:47 +12:00
Alex Wilson
2bbf8b1fbc Add the ability to handle bad layouts to BALMLayout. 2012-05-03 08:44:45 +12:00
Alex Wilson
57d93f836d Disable debug output by default in linprog. 2012-05-03 08:44:44 +12:00
Alex Wilson
3479e516b7 Compose spacing given to BALMLayout constructor. 2012-05-03 08:44:43 +12:00
Alex Wilson
548c302600 Adjust MusicCollection app for changes in BALMLayout. 2012-05-03 08:44:42 +12:00
Alex Wilson
de245ca017 Adjust IMAP addon for changes in BALMLayout. 2012-05-03 08:44:40 +12:00
Alex Wilson
20cc993ab5 Remove BALM::Area::fConstraints field, which is not needed.
It's easier to just delete all the constraints in the dtor, the ones that
wouldn't have been in fConstraints are NULL at this point anyway.
2012-05-03 08:44:39 +12:00
Alex Wilson
895414da9d In BALM::Area rename fTopLeftInset to fLeftTopInset.
This is consistent with for instance, the BSize ctor.
2012-05-03 08:44:38 +12:00
Alex Wilson
f0307e765e Fix spacing before first header in src/libs/alm.
Also add copyright header in ALMGroup.cpp.
2012-05-03 08:44:36 +12:00
Alex Wilson
324ce2851d Add FBC padding to ALM classes. 2012-05-03 08:44:35 +12:00
Alex Wilson
7e021d45da Make BALM::InsetForTab() methods const. 2012-05-03 08:44:34 +12:00
Alex Wilson
0da6f2e916 Rename BALM::GroupItem to BALM::ALMGroup, and move it to its own files.
Also make ALMGroup totally self-contained, i.e. BALMLayout no longer
does the parsing, and is completely unaware of ALMGroup. A small touch
of refactoring as well.
2012-05-03 08:44:32 +12:00
Alex Wilson
a25ffa4f04 Style cleanup in alm: mostly clean includes. 2012-05-03 08:44:31 +12:00
Alex Wilson
ddb65125f9 In alm test TableDemo: include Row.h and Column.h directly. 2012-05-03 08:44:30 +12:00
Alex Wilson
7dd17203c8 Make Area insets more consistent with other HAIKU inset APIs. 2012-05-03 08:44:29 +12:00
Alex Wilson
b99cf18c18 Remove old implementatoins of ALM tests that used the Add*To* methods. 2012-05-03 08:44:27 +12:00
Alex Wilson
d814593064 Remove BALMLayout::Add*To* methods, which are availabe in the builder. 2012-05-03 08:44:26 +12:00
Alex Wilson
2bf5ded1ed Add BALMLayoutBuilder implementations to ALM tests. 2012-05-03 08:44:25 +12:00
Alex Wilson
50cc24b3f9 Add a Builder for BALMLayout. 2012-05-03 08:44:23 +12:00
Alex Wilson
b50d4ed8bd Add new methods to BALMLayout for adding multiple x/y tabs at once. 2012-05-03 08:44:22 +12:00
Alex Wilson
8b52747974 In Area, remove unused ItemFrame() method.
Also modify Frame() method to return a rect with rounded coordinates.
2012-05-03 08:44:21 +12:00
Alex Wilson
574533ef12 In BALMLayout, make AddView(...) consistent with other layouts.
If a BView is added which has a BLayout, use the layout as a BLayoutItem
to represent that view, as other layouts do.
2012-05-03 08:44:19 +12:00
Alex Wilson
9b0221fd43 In alm tests, replace calls to SetInset() with SetInsets(). 2012-05-03 08:44:18 +12:00
Alex Wilson
75e2dcf8fe In BALMLayout, allow for more flexibility in spacing and insets.
* allow for independent left, top, right and bottom insets
* allow for independent vertical and horizontal spacing between tabs
* allow for the usage of Haiku's spacing constants such as B_USE_WINDOW_INSETS
2012-05-03 08:44:17 +12:00
Alex Wilson
1be46cf584 In ALM Views test, use explicit AddViews() method. 2012-05-03 08:44:15 +12:00
Alex Wilson
fefa17f47e Remove unused 'PerformancePath' stuff. 2012-05-03 08:44:14 +12:00
czeidler
c3e57dc36d Give the area an id. 2012-05-03 08:44:13 +12:00
czeidler
b7630c4c98 Save and restore layout. 2012-05-03 08:44:11 +12:00
Alexander von Gluck IV
5426ff9347 system loader: Initial work on new rasberrypi_arm loader
* Used routerboard loader as a base skel
* May just be temporary if u-boot ever gets Raspberry Pi
  support
2012-05-01 16:57:58 -05:00
Jérôme Duval
2b31b4a88c Work in progress on xHCI bus driver.
* added more traces, coding style
* added xhci_td, xhci_endpoint structs.
* SubmitRequest: this links a 3-stage TD control request into
    the endpoint ring.
* _InsertEndpointForPipe: when a pipe is created, configure the
    endpoint and set up the controller cookie.
* CreateDescriptor and FreeDescriptor: allocates memory for a TD.
* _LinkDescriptorForPipe: link a TD in an endpoint ring.
* _UnlinkDescriptorForPipe: unlink a TD
* AllocateDevice:
    slot number zero isn't valid.
    stick the slot number to the device struct.
    configure the default endpoint before calling SetAddress.
    address is found in the device context instead of the input context.
    device address passed to the USB stack has to begin with 1.
* Ring:
    check for invalid slot/endpoint combination.
    ring the slot doorbell instead of the doorbell 0.
* Root hub: fixed USB version.
* HandleTransferComplete: finds out the TD which submitted a
    transfer.
2012-05-01 22:13:23 +02:00
Jérôme Duval
319a3798bc Work in progress on XHCI bus driver.
* USB Core:
Hub: pass more correct speed, port and address for USB3 devices.
Transfer: doesn't care for bandwidth computation for super speed.
BusManager: Make AllocateDevice() and FreeDevice() virtual, XHCI needs to setup
	a slot and an address for the device.
Add USB_SPEED_WIRELESS usb_speed definition.
Add USB2.0 erratum definition and some USB3 definitions
* XHCI:
Find outs which port supports SuperSpeed or not.
Override AllocateDevice() to configure slot and address for a connected device.
Override FreeDevice() to free ressources associated to a slot.
Add context struct definitions.
2012-05-01 22:13:22 +02:00
Jérôme Duval
d11be97572 XHCI improvements
* remove the xhci cmd complete thread
* creation of the scratchpad area
* wait for running status after starting the controller
* increase delays on controller reset (250ms instead of 100ms)
* use of SpinLocker from AutoLock.h
* add a DoCommand() method to queue a command, ring and wait for the event
  response
* add a method for each command
* XHCI_PORTSC macro was off 1 port
* add definitions for TRB types, Completion Codes.
2012-05-01 22:13:20 +02:00
Siarzhuk Zharski
9930418fd7 Fix the device lookup algorithm
* Fix the device lookup algorithm - sync with correct version used in usb_asix;
* Small code style fix.
2012-05-01 20:32:44 +02:00
Rene Gollent
aa19448875 Make memory menu items 64-bit safe.
Redo the precision levels of various calculations in the memory bar items
so they don't overflow on systems with > 4GB of RAM. Previously one could
see fun results like the kernel using negative amounts of memory on such
systems.
2012-04-30 21:56:30 -04:00
Rene Gollent
119c90fc35 Fix remaining part of #8094.
Set an explicit minimum size on the source path view, in order to prevent it
from unduly influencing the initial size constraints of the window. (Belatedly)
fixes the remaining part of #8094.
2012-04-30 19:08:25 -04:00
czeidler
a937ffd238 Make the menu window not resizable.
Right clicking the menu border showed the resize arrow and sometimes even made it possible to resize the menu.
2012-05-01 11:03:27 +12:00
Axel Dörfler
a2e15b244f Changed the default background color to the system default. 2012-04-30 22:45:38 +02:00
czeidler
99a7ed4d4b Remove lp_solve from the source and from the image.
Its not used anymore and should be an optional package otherwise.
2012-04-30 14:58:14 +12:00
czeidler
d20d29f390 Create MAIL:flags index in Mail. This should fix #8506. 2012-04-30 11:47:44 +12:00
Axel Dörfler
8e2140fa5e Fixed a large client side memory leak for app_server memory.
* The areas allocated for BBitmaps were never deleted, even though the
  app_server deleted its part when the memory got freed.
* This resulted in a constant memory increase if the application in question
  would operate on many changing large bitmaps, like photos.
* Since the bitmaps are reference counted, we don't actually know when to delete
  the areas, so that the app_server now notifies the client whenever that is
  possible.
* This might fix #6824.
2012-04-29 20:26:14 +02:00
Axel Dörfler
7705d517d1 Lock in ClientMemoryAllocator::Allocate(), and Free().
* Since bitmaps are reference counted, it might not be easy (and already not
  the case) that holding the ServerApp lock can be enforced.
* To be on the safe side, allocations and freeing memory now performs its own
  locking.
* Brought the documentation to the status quo.
2012-04-29 20:26:13 +02:00
Jérôme Duval
80ee381a5f ffmpeg: use the cpu count as decoding thread count. 2012-04-29 15:40:14 +02:00
czeidler
dab1609baf Use BSecureSocket and BSocket instead of ServerConnection.
* When sending a new command, drain all leftover data and not only 1025 chars.
2012-04-29 16:53:40 +12:00
czeidler
6eb2e6b47f Use the timeout in poll. 2012-04-29 16:53:40 +12:00
Axel Dörfler
6068e43923 Optimized freeing client memory if it spans the whole area.
* If a block of client memory spans the whole chunk, there is no need to walk
  the free list for adjacent blocks to join.
* Minor cleanup.
2012-04-28 23:35:17 +02:00
Rene Gollent
03b82a629d Fix decorator reload crash.
- SetTopTap() -> SetTopTab().
- When reloading the decor, if the window in question is borderless,
  short circuit. Previously, we wouldn't allocate a decorator for such
  a window, but would then go through the remaining steps of attempting
  to set the focus/top tab, which would obviously crash. Fixes #8500 and
  possibly others.
- Add error check that adding tabs to the decorator actually succeeded.
2012-04-28 16:21:19 -04:00
Axel Dörfler
2f2f3fa042 Moved stable tool tip concept into the BToolManager class.
* This removes the fVisibleToolTip member from BView, and fixes bug #5669;
  BToolTipManager::ShowTip() now gets the owner of the tool tip as an extra
  parameter.
* Removed the work-around to hide that bug.
* Improved ToolTipTest application to include more test cases like a view that
  periodically update its tool tip via SetToolTip(const char*), and one that
  sets a new tool tip every second.
* Furthermore, added a test that shows that inner views inherit the tool tip
  of their parents.
* Fixed another bug in BToolTipManager::ShowTip() that would release an
  extra reference to the tool tip currently shown.
2012-04-28 22:14:03 +02:00
Axel Dörfler
f790fa299e Added a tool tip for the detailed progress info.
* Got rid of the parentheses around the progress text.
* Automatic whitespace cleanup.
2012-04-28 22:14:02 +02:00
Axel Dörfler
254640bfcd Remove the tool tip if an empty or NULL string is set. 2012-04-28 22:14:01 +02:00
Rene Gollent
96493c29bc Handle gcc2 quirks with paths.
When asked to build via a relative path (i.e. from within a generated subdir),
gcc2 was generating a compilation directory attribute pointing to the generated
subdirectory, as well as entering the actual filename attribute as the full
absolute path to the file. This wasn't checked for, leading to the issue
described in ticket #8498. gcc4 does not appear to have the same behavior,
it generates a relative path + filename in all cases.
2012-04-28 15:42:53 -04:00
Jerome Duval
1f5facdbe7 sysinfo: switch to c++ 2012-04-28 09:59:52 +02:00
Fredrik Holmqvist
11ff194b97 Use strnlen instead of own impl, as it probably will have platform specific optimisation. 2012-04-27 22:15:48 +02:00
Alexander von Gluck IV
258d4ef93d kernel arm: Quick style cleanup; No functional change 2012-04-27 12:29:11 -05:00
czeidler
3245d56441 Cleanup POP3 connection code.
* Use the ServerConnection class in POP3 too. This means no #ifdef USE_SSL for the connection anymore.
* I remember from the mailing list that there were problems with to many open connection using POP3. Thus, if there is an error or nothing to retrieve close the connection.
2012-04-27 16:04:23 +12:00
czeidler
e2b24ac4ba Update ralink2860 to Korli's version from ticket #8325. 2012-04-27 16:04:23 +12:00
Fredrik Holmqvist
e5b4a1671d Since we are patching strncpy.c change it over to strncpy.cpp. 2012-04-25 18:47:42 +02:00
Hamish Morrison
7e87b73402 strncpy: pad the destination with NULs
And optimize for word aligned loads/stores

Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2012-04-25 18:17:41 +02:00
John Scipione
f73d1f4f28 Cache the lastMousedOverItem before showing tooltip.
Optimization, only update the tooltip if not the same as the cached
last moused over item. That way the same application name won't
keep getting set over and over again.
2012-04-24 21:14:47 -04:00
John Scipione
1f0c9f183e Set a tooltip with the application name if hidden.
If Deskbar is set to hide application names show the application
name as a tooltip when you hover your mouse over the item.

* Style fixes.
* Save CountItems() into a variable outside the loop so that it only
  gets called once (micro-optimization/best-practice).
* Convert a for loop to a while loop that wasn't really being used
  used as a for loop anyway, the variables are declared and used
  outside the loop.
2012-04-23 23:44:54 -04:00
Yongcong Du
45cf3294b2 x86: add cpuid feature 6 flags
Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2012-04-22 21:03:57 +02:00
John Scipione
9ac6fee13a Rename "deskbar_rt_" back to "Status".
Siarzhuk Zharski informed me that KeymapSwitcher depends on this
view being named "Status" to work, so, renamed it back to that.

Instead of sending the message by name to the replicant tray view,
since the view name "Status" is not very unique and I fear that
there could be collisions, resend the message to BarView which
then passes the message on to the replicant tray which updates the
clock and reflows the icons.

This being said, KeymapSwitcher should probably not send a message
hardcoded to the name of the replicant tray view and instead send
the message to Deskbar and allow it to pass the message on to the
appropriate view.
2012-04-18 22:02:43 -04:00
Alexander von Gluck IV
f4647825e7 radeon_hd: display_info struct style cleanup
* No functional change
2012-04-18 21:55:57 +00:00
Alexander von Gluck IV
c363019152 radeon_hd: Make crtc lookup fault less catastrophic 2012-04-18 21:50:39 +00:00
Alexander von Gluck IV
e47f861975 radeon_hd: Fix digital output
* Resolves blocker #8322.
* Should resolve #8151, #8163, #8282, #8457
* Digital output on DVII was getting hard set
  in the encoder to analog / CRT mode.
* We now check the edid "type" flag
* Flag gets set to 1 if edid data from digital
  transmitter, 0 if analog transmitter.
2012-04-18 21:36:16 +00:00
Alexander von Gluck IV
af6e0179ca radeon_hd: DIG encoder work
* Cleanup some AtomBIOS arg versions
* Add tracing to encoder calls
* Program a missing dig lane count
2012-04-18 20:18:21 +00:00
Alexander von Gluck IV
bb228d7ca6 radeon_hd: Only assign encoder to crtc after dpms call
* This is the order I received via email long ago and
  it makes more sense to me then the drm method
2012-04-18 20:18:17 +00:00
Humdinger
163e02d670 Merge branch 'master' of ssh://git.haiku-os.org/haiku 2012-04-18 15:16:29 +02:00
John Scipione
e08d64d0d6 If we caught the message in these cases there is no reason to continue on. 2012-04-18 02:57:55 -04:00
John Scipione
63c55f0212 Update Deskcalc's right-click menu options.
If CalcView is embedded as a replicant on the desktop it's parent
window is not CalcWindow. Furthermore, it can't switch between
compact, basic and scientific keypad modes, you are locked in tox
the one you picked at the time you embeded the view into the desktop.
So, I have updated the right-click message to reflect this reality
by taking away the keypad mode switching options. You can still
set auto num-lock and turn beep on and off (theoretically someday
anyway) but the CalcView receives these messages instead of
CalcWindow. So, these 2 options now work in the case of a CalcView
embedded in the desktop at least.
2012-04-18 01:56:17 -04:00
John Scipione
05fa08371f Indent the indented checkboxes in Deskbar prefs more.
* Create my own kIndentSpacing parameter from ControlLook which sets
  the indent spacing width to match the previously used spacing. This
  lines the indented checkbox up with the text of the unindented
  checkbox above it. This matches what it looked like before I
  updated the dialog to use font-aware spacing, while keeping the
  same relative spacing at different font sizes.
2012-04-18 00:20:15 -04:00
John Scipione
f5be13ecc7 Remove time zone clock option and Time preferences button.
* Nobody thought time zone was a particularly useful option to have
  in the clock.
* You can still open Time preferences from Deskbar by right clicking
  on the clock, but, since there isn't a big connection between
  the clock settings in Deskbar and Time preferences anymore
  this button isn't needed here.
* There are still 2 clock options, Show seconds, and Show day of week
  and day of week is localized as well so this wasn't a total wash.
2012-04-17 23:38:12 -04:00
John Scipione
41651bb3fd Small code simplication cleanup and add comment. 2012-04-17 23:20:37 -04:00
John Scipione
0d2ac94c4d Rename the TReplicantTray view "_deskbar_rt_"
instead of "_replicant_tray_". That follows the convention a bit
better and is less likely to cause name collisions. While I am at
it put the BView line below the : as is our usual convention.
2012-04-17 23:08:35 -04:00
John Scipione
30a5580244 Remove Time Interval radio buttons from Deskbar Prefs.
* 12/24 hour clock is set from the Locale prefs only.
* Redirect B_LOCALE_CHANGED message to the replicant tray instead
  of the time view and tell the replicant tray to update the time
  instead of updating the time view directly. This is because there
  was a bug where if the AM/PM marker grew the time view over the
  replicant tray icons when switching from 24 hour to 12 hour clock
  it wouldn't reflow the replicant tray icons like it should.
* Rename the replicant tray view from "Status" to "_replicant_tray_"
  because BarApp uses FindView() to get the view by name and I'm
  assuming that this method can have conflicts. Following the example
  of the "_deskbar_tv_" naming convention.
2012-04-17 22:48:57 -04:00
John Scipione
889692191d Fix Deskcalc drawing rounded corners on the desktop as a replicant, although I am not sure why I'm even bothering at this point. 2012-04-17 20:52:32 -04:00
Alexander von Gluck IV
9e195872df radeon_hd: Begin work on radeon_hd command processor
* First steps at getting card command processor wired
  up to the ring buffers.
* Code doesn't run yet as I have *no* idea what happens
  when these rings are in an invalid state.
2012-04-17 16:10:40 -05:00
Alexander von Gluck IV
582c97352d gl test: Fix GL dependencies for GL kit test apps 2012-04-17 19:50:04 +00:00
Alexander von Gluck IV
acbaa2b251 glinfo: Cosmetic adjustments
* Remove my dropdown to select renderer
  We can accomplish this through a config
  file read by the opengl kit render roster
* Reorder info text
* Adjust tab view column sizes
* Adjust window height
2012-04-17 19:19:02 +00:00
François Revol
3b52696411 Fix gcc2 build. 2012-04-17 19:34:45 +02:00
Reznikov Sergei
ba747b26ac Fix #5586: Add missing shortcuts to FilePanel. 2012-04-17 18:27:52 +02:00
Alexander von Gluck IV
b213b1bdd8 opengl addons: Add rdef to swrast engines
* Only cosmetic
* Helps differentiate GL renderers.
* Had to use AddResources vs Addon rule for
  resources as the Addon rule doesn't take rdef's
2012-04-17 16:15:38 +00:00
Oliver Tappe
546208a539 More catalog-related cleanup.
* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
  B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.
2012-04-16 21:31:22 +02:00
John Scipione
3244c2bcf2 Whoops, remove constraints after drawing slider bar. 2012-04-16 03:23:01 -04:00
John Scipione
a884b43bb1 Added support for buttons and menuframes with rounded corners.
* Not turned on for default buttons and menuframes right now.
* Updated Deskcalc and Keymap to use buttons with rounded corners.
* Overloaded methods with radium parameters are not virtual right
  now so as to not break vtables. Added /*virtual*/ before each
  method that should be made virtual in ControlLook.h
* Added a light line to the left border of the down arrow frame
  on menu frames as a small visual tweak.
* Replace StrokeRect() with StrokeRoundRect() when drawing the
  default button indicator. This gives them a rounded
  appearance if the button is also rounded.
* Added protected methods _DrawMenuFieldBackgroundOutside and
  _DrawMenuFieldBackgroundInside.
* Created some protected methods to get the edge, frame, and bevel
  colors from a passed in base color because it was a mess and I
  needed to calculate the colors from mutiple methods. It is much
  cleaner now.
* Added myself to ControlLook.cpp authors list. Assigned copyright
  to Haiku, Inc. Stippi also retains his copyright.
* Tons of style fixes.
  - Change all instances of `if (flags & B_FLAG)` to
    `if ((flags & B_FLAG) != 0)`
  - Reorder some methods.
  - Reorder includes.
  - Spacing.
  - Updated comments.
2012-04-16 02:10:03 -04:00
John Scipione
c0611fac87 Convert Deskbar preferences to use font aware spacing. 2012-04-15 19:06:58 -04:00
Oliver Tappe
248f2283dd Final part of cleanup in Catalog.h.
* move versions of the B_TRANSLATE_...-macros used during collecting
  of catalog keys to a specific header file, which will only be picked
  up when running collectcatkeys
* fix a couple of build problems during the preprocessing of the libbe-
  sources when extracting catalog keys, all due to private headers not
  being found
* move ZombieReplicantView.h from kits/interface to
  headers/private/interface, as this way it can be picked up when
  building the libbe catalog
2012-04-16 00:04:41 +02:00
Oliver Tappe
541ff51a6e Cleanup BCatalogAddOn.
* rename BCatalogAddOn to BCatalogData, since it doesn't represent an
  add-on, but rather the catalog data provided by an add-on
* move BCatalogData out of Catalog.{h,cpp} into its own header and
  implementation file
* drop BCatalogData::MarkForTranslation() methods, they're not needed
* drop BCatalog::GetNoAutoCollectString() methods, they're not being
  used anywhere
* cleanup the B_TRANSLATE_... macros somewhat
* add versions of the B_TRANSLATE_MARK_... macros that are meant to be
  used in void context (when the string isn't being used by the program,
  just meant to be picked up by collectcatkeys).
* adjust several apps to use B_TRANSLATE_MARK_..._VOID where needed
* adjust users of BCatalogAddOn accordingly
2012-04-16 00:04:41 +02:00
Oliver Tappe
5ac65b7f11 More cleanup in locale kit, this time regarding namespaces.
* it's bad practice to do a 'using <namespace>' in a header, as that
  is very likely to have unintended effects, so drop those from a couple
  of private Locale headers
* adjust files all over the locale kit in order to fix the problems
  (by explicitly importing the required classes in the implementation
  files)
2012-04-16 00:04:40 +02:00
Oliver Tappe
7ae67a9920 Drop empty 'zeta' catalog add-on, wouldn't be useful anyway. 2012-04-16 00:04:40 +02:00
Oliver Tappe
16e5092306 Extract EditableCatalog from Catalog.{h,cpp}.
* move EditableCatalog to its own header and implementation file
* move problematic BCatalog::CatalogAddOn() to EditableCatalog
* adjust Locale tools accordingly
2012-04-16 00:04:40 +02:00
John Scipione
1cd97d5e86 Update modifier keys window to take out cruft.
I don't need to set the ExplicitMaxSize of the StringView's in
Modifier Keys anymore or calculate the widest label now that the
StringView's have an explicit alignment set. I used the old method
of SetAlignment(B_ALIGN_RIGHT) just because I can,
SetExplicitAlignment() should work too.
2012-04-15 16:41:38 -04:00
John Scipione
afe43d0a55 Now that StringViews are left-aligned
by default I don't have to set the size explicitly in the Deskbar Prefs Window.
2012-04-15 16:20:56 -04:00
John Scipione
a2bea84d34 Override the LayoutAlignment method in BStringView.
Left align StringViews using layout API by default falling back
to the alignment settings set by SetAlignment() only if
SetExplicitAlignment() is not used.

This way StringViews are left-aligned by default, can be changed
using the Layout API, and the pre-Layout API legacy method is used
as a fallback.

See this thread for details:
http://www.freelists.org/post/haiku-development/Can-we-make-BStringViews-MaxSize-BSizeB-SIZE-UNLIMITED-B-SIZE-UNSET-by-default
2012-04-15 16:06:29 -04:00
Alexander von Gluck IV
325089f1fc radeon_hd: Stub out gfx ring boot.
* Tab fix as well
2012-04-15 11:23:55 -05:00
Rene Gollent
937ca113b0 Reorder names alphabetically. 2012-04-15 08:22:58 -04:00
Axel Dörfler
6ea60bcdba This must be a 64 bit computation for disks larger than 4GB.
* This closes ticket #8460.
* Patch from jahaiku, thanks!
2012-04-15 13:32:19 +02:00
John Scipione
b932a5a45f Fix bug #8004
Dragging the Deskbar with CTRL+ALT+mouse not possible with
Auto-raise and Auto-hide disabled.

The reason this only worked with auto-raise or auto-hide enabled
is because the EventMask on BarView was only set to received mouse
events when those were settings were enabled. Apparently someone
figured this out. So, to fix this bug I set BarView to always
accept mouse events. Doesn't appear to have any obvious negative
consequences. Auto-hide and auto-raise still work.

I also added a comment in BarWindow::MenusBeginning(). It is
setting the EventMask of BarView to 0 and then back again in
TBarWindow::MenusEnded() to get around a bug in BeOS (according
to the comment anyway). I took out those lines and didn't notice
anything different so I assume that whatever the bug was it is
fixed and now and we can take those lines out permenantly.
2012-04-15 03:20:39 -04:00
John Scipione
083776f89f 2 small visual tweaks to Deskbar prefs
Push the icon size slider down 10px
Indent the time interval radio buttons over 10 more px (20px total)
2012-04-15 01:56:01 -04:00
John Scipione
a81ab45891 Add a button to open Time preferences from Deskbar
preferences in the Clock section.
2012-04-15 01:45:05 -04:00
John Scipione
3cf2d117e5 Change Time Format Options in Deskbar preferences.
Added two new methods to the Locale Kit in order to create a custom time
formats from a format string. One method is outputs into a char* array,
the other into a BString() and you can set the timezone.

These methods should be cleaned up, we only need 2, one to get
the time in a predefined style, the other to get a custom time format.
Also should probably do the same for dates and datetimes. But I'll let
this go for now.

I added myself to the Locale.cpp file. I retained the copyright instead
of assigning it to Haiku, Inc. because the file is under the OpenBeOS
license and I don't know what the concequences of copyright sharing are
for that license, unlike MIT.

These new methods are used to generate custom time formats in Deskbar.
Instead of using a set of Radio Buttons to choose between the predefined
time options I build my own by creating a format string and passing it
to the Locale Kit. The format string is generated from 3 checkboxes,
show seconds, show day of week, and show time zone. You can mix and match
between them choose any that you like. By default they are all off.

There are 3 new deskbar settings associated with these new options:
showSeconds, showDayOfWeek, and showTimeZone. timeFormat has gone away.

The time format string gets cached and updated only when Update() gets called
on the TimeView class.

In order to fit all the options in (there is 1 more than before) I had to
reduce the font size of the clock to 11pt when all options are turned on in
12 hour mode. For those with no imagination it looks like this:

http://imagebin.org/208162

Renamed "Open time preferences..." menuitem to "Time preferences...".
Renamed "Show Time" and "Hide Time" to "Show time" and "Hide time".

Other changes include refactoring the header files a bit. There were a lot
of headers included by header files uneccessarily. For instance BarWindow.h
now only includes <Window.h> and <Deskbar.h>. This change is mainly to
to speed up the compile time since it takes a while right now.

I copy the fBarView pointer from BarWindow in the BarApp constructor and then
use that throughout the file rather than getting the pointer from the window
each time by calling BarView(). BarView() is still available in the header
for other classes though.

I moved some message constants around since it was getting a bit jumbled.
Most of the messages related to settings are in PreferenceWindow.h.
fChangeState is moved to BarView.h since that is where the ChangeState()
function is and BarView.cpp uses that constant.

The time interval and format constants are in TimeView.h.

Make some methods public in their respective classes where it made sense.
The preference window methods to update dependent items are public, that
might get called from BarWindow when a message gets received at some point.

Also made ShowHideTime() and Time() public in StatusView.h. These methods
activate showing and hiding the clock and return the fTime clock object.
No reason they should be private.

I reindented the StatusView.h and PreferenceWindow.h headers to the standard
style. Question here, are the public: protected: and private: lines inside
of classes suppose to get indented 1 tab or not? I've seen both, the style
guide says no indent but 1 indent seems reasonable and looks pretty good.

Style fixes here and there. That's enough for one commit I think.
2012-04-15 00:17:54 -04:00
Alexander von Gluck IV
1f0f781876 radeon_hd: Add bunch of Radeon HD Southern Island cards
* Found in recent Gallium RadeonSI commit
2012-04-14 20:14:50 -05:00
Yongcong Du
cc586f1655 x86: AMD C1E with no ARAT(Always Running APIC Timer) idle support
AMD C1E is a BIOS controlled C3 state. Certain processors families
may cut off TSC and the lapic timer when it is in a deep C state,
including C1E state, thus the cpu can't be waken up and system will hang.

This patch firstly adds the support of idle selection during boot. Then
it implements amdc1e_noarat_idle() routine which checks the MSR which
contains the C1eOnCmpHalt (bit 28) and SmiOnCmpHalt (bit 27)  before
executing the halt instruction, then clear them once set.

However intel C1E doesn't has such problem. AMD C1E is a BIOS controlled
C3 state. The difference between C1E and C3 is that transition into C1E
is not initiated by the operating system. System will enter C1E state
automatically when both cores enters C1 state. As for intel C1E, it
means "reduce CPU voltage before entering corresponding Cx-state".

This patch may fix #8111, #3999, #7562, #7940 and #8060

Copied from the description of #3999:
>but for some reason I hit the power button instead of the reset one. And
>the boot continued!!
The reason is CPUs are waken up once power button is hit.

Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2012-04-14 18:18:29 +02:00
Oliver Tappe
eaa5e0936d Fix #8452 (app's crashing for non-existent system catalog)
* make the system catalog a BCatalog instead of a BCatalogAddOn*,
  such that using a non-existing system catalog won't crash but
  simply return the untranslated string instead
* rename MutableLocaleRoster::GetSystemCatalog() to LoadSystemCatalog()
  and adjust it to use BCatalog::SetTo() in order to replace the
  data used by the given catalog
* adjust all users of gSystemCatalog accordingly
2012-04-14 17:58:58 +02:00
Oliver Tappe
cc52f0df3a Make BCatalog threadsafe.
* use a locker to protect the CatalogAddOn-chain against parallel
  access
* rename BCatalog::SetCatalog() to SetTo() and make it a proper
  initializing function
* adjust implementation of BLocaleRoster accordingly
2012-04-14 17:38:58 +02:00
Oliver Tappe
250eca3254 Start cleanup of Catalog.{h,cpp}
* unify pointer style (to type* )
* always use boolean expressions in if
* introduce some spacing for better readability
* make a couple inline methods non-inline
2012-04-14 17:24:20 +02:00
Oliver Tappe
ec48d27ca3 Revert "Fix access to system catalog strings."
This reverts commit 6d2186615f.
2012-04-14 16:52:59 +02:00
Rene Gollent
5c46b17139 Rework NetworkStatus's status tracking a bit.
NetworkStatus now tracks the status of each interface separately, and
uses that information to make correct comparisons for notifications.
Previously, it would only send notifications using whatever interface
was last in the enumeration list, and if an earlier interface had a higher
configuration level than that, the notification would incorrectly be sent
as occurring on the last interface. We now send notifications for each
interface separately. The status shown by the deskbar icon remains that
of the most highly configured detected interface. Fixes #8468.
2012-04-14 08:46:48 -04:00
Starsseed
d57a764108 MediaPlayer: use float format for audio frequency (see #8433). 2012-04-14 10:46:52 +02:00
John Scipione
70c5197318 Rename 3D Rendering to GL Info and move it.
* Rename 3D Rendering to GL Info
* Moved it in the source tree from src/preferences/3drendering/
  to src/tests/kits/opengl/glinfo/
* Moved in HaikuImage from SYSTEM_PREFERENCES to SYSTEM_APPS
* Does not show up in DESKBAR_APPLICATIONS like AboutSystem
  but can be found in the resulting image in /boot/system/apps/
2012-04-13 23:27:40 -04:00
John Scipione
cf88fe0b31 Style fix.
The <GL/xxxxxx> headers don't go at the end, they just get mixed
with the rest alphabetically.
2012-04-13 22:27:34 -04:00
John Scipione
488d2c7231 Some more layout tweaks for 3drendering.
* Move the gears image to 18px from top matching alert window.
* Set the insets of the views inside the tabview to 5.0 since the
  tabView's bevel was drawing over the views and it didn't look
  right.
* Convert the InfoView fields to a GridView because the GroupView's
  didn't always line up.
* Make the inside tabView columns a little narrower to compensate
  for the insets.
* Make the tabView shorter.
2012-04-13 22:22:22 -04:00
John Scipione
a32d58a545 Update the layout of 3drendering a bit.
Butt the capabilities and extensions views right up against
the edges of the tab view. This gives a bit more room for the
columns inside.
2012-04-13 04:48:08 -04:00
John Scipione
7e76e3c760 Nip this M thing in the bud.
Multiply StringWidth("M") * the number of M's needed and then
tweak to get it to fit well at different font sizes. Turns out
it fits the same most of the time. Tested at font size 12pt, 8pt,
and 18pt.There are issues with BStringColumn at 18pt not
adjusting to the font size correctly but this is a different bug.

Add myself to the authors list on InfoView.cpp since I have
updated the file heavily at this point.
2012-04-13 03:45:55 -04:00
John Scipione
766c2899e6 Put the InfoView in the main OpenGLView.
Take the InfoView out of the tabView and put it above the tabView
in the OpenGLView. Change the format to a slightly altered version
from what kallisti5 recommended. The width and height of the tabView
are controlled by M's so if you change your font size it will fit
accordingly. Therefore the window dimensions are sane defaults yet
don't really affect the dimensions of the child views. The views
know how to size themselves sanely.

* Change the 3d Rendering Engine from a BMenu to a BPopUpMenu.
2012-04-12 22:48:45 -04:00
John Scipione
2ddd0a7965 Make the capabilities view and extensions view font aware. the capabilities column is 21 M's wide and can be adjusted, the value column is 6 M's wide, the available extensions column is 28 M's wide. I do mean M's 2012-04-12 21:17:17 -04:00