Commit Graph

1995 Commits

Author SHA1 Message Date
Axel Dörfler 17ad59afd3 Added BLayoutBuilder::{Group|Grid}::SetExplicitAlignment(). 2012-11-05 12:50:04 +01:00
Axel Dörfler 9e42a44cad Added BPath::IsAbsolute() method. 2012-11-05 12:50:03 +01:00
Axel Dörfler 09d87d9151 The text control is now more flexible with its layout items.
* Before, you had to have both, the text view layout item, and the label
  layout item or else nothing would ever be visible.
* Now you can only create the text view item, and it will still work.
* Also, no matter the order you added the layout items, they would always
  put the label on the left, and the control to the right.
* You can place the label and text view layout items anywhere now, although
  you should keep in mind that the view spans over their frame unions; IOW
  they should always adjacent to each other, but not necessarily horizontally
  and left to right.
* No longer uses a fixed label spacing, but utilizes
  BControlLook::DefaultLabelSpacing() instead.
* However, the spacing is always added to the right of the label, no matter
  how you place it in the layout. Maybe one wants to add a SetLabelTextViewGap()
  like method.
2012-11-05 12:50:02 +01:00
Axel Dörfler 6643ead593 Made the BRect::*Copy() methods const as they should have been. 2012-11-05 12:50:02 +01:00
Axel Dörfler 2267b7e7fb Added Grid::AddGlue(), and SetExplicit*Size() methods. 2012-11-05 12:50:01 +01:00
Axel Dörfler 4656e550b0 Added method SetExplicitSize() for convenience. 2012-11-05 12:50:00 +01:00
Oliver Tappe 402c3b2c09 BTextView uses cmd instead of ctrl for navigation
* Adjust BTextView to use B_COMMAND_KEY instead of B_CONTROL_KEY
  for wordwise navigation and jumping to the top and bottom.
  This requires a shortcut, which is only installed if there is
  none already (for the groups B_LEFT_ARROW/B_RIGHT_ARROW and
  B_HOME/B_END). As a result, wordwise navigation no longer works
  in Mail, for instance.
2012-11-05 09:38:23 +01:00
Oliver Tappe 0619f34b52 Add BWindow::HasShortcut() 2012-11-05 09:38:23 +01:00
John Scipione b5446310e9 Remove the scroll bar knobs and corresponding setting 2012-11-04 15:37:57 -05:00
Fredrik Holmqvist 9b0d045c59 Update to ACPICA 20121018.
This is an update from 20120711 and A LOT has happened since then. See
    https://acpica.org/download/changes.txt for all the changes.
2012-11-03 22:46:22 +01:00
Axel Dörfler 6e50e79e54 Added Get*()/Set*() methods like the ones from KMessage. 2012-11-03 11:54:21 +01:00
John Scipione dfa8cf8c05 Change SCROLL_KNOB_* constants to B_SCROLL_KNOB_* 2012-11-02 19:08:09 -04:00
Axel Dörfler 87e7009019 Style cleanup. 2012-11-02 23:42:31 +01:00
Axel Dörfler 009fd25715 Added BMessage::Append(), and new(std::nothrow_t).
* Append() copies all fields from the specified message.
* The nothrow operator new allows you to add BMessages to a BObjectList.
2012-11-02 23:42:29 +01:00
John Scipione 4b5a6861f2 Add the scrollbar constants enum to the header.
Also make some minor tweaks in ScrollBar.cpp
2012-11-02 01:06:59 -04:00
Fredrik Modéen 7a74a5df45 WIP... Updating Bluetooth.
* Some bugfixes.
* added scan mode read.
* inactivated some printout for now. Was a lot of noice in terminal
2012-08-27 19:23:22 +00:00
John Scipione 91c78f092f Create and use new list view item colors
* B_LIST_BACKGROUND_COLOR
* B_LIST_SELECTED_BACKGROUND_COLOR
* B_LIST_ITEM_TEXT_COLOR
* B_LIST_SELECTED_ITEM_TEXT_COLOR
2012-08-22 00:28:24 -04:00
Ryan Leavengood 403bd97afc Update the copyright year too. 2012-08-20 01:13:19 -04:00
Ryan Leavengood f1b593e7b5 Rename Pre Beta 1 version to Pre Alpha 4, introduce Alpha 4 version.
Make Pre Beta 1 fall after Alpha 4. Hopefully we won't need an Alpha 5.
2012-08-20 01:09:53 -04:00
Oliver Tappe e19d7089a7 Fix #8841 (broken localization support for 3rd-party apps).
* made private Catalog.h header public by moving it to 
  os/locale/tools/CollectingCatalog.h
* reintroduce B_COLLECTING_CATKEYS define (which is expected to be set
  during a collectcatkeys session) in order to decide whether or not
  to automatically include the CollecingCatalog.h header from Catalog.h
* adjust jam rule for collecting catalog keys accordingly
2012-08-16 21:12:55 +02:00
Ryan Leavengood 59347b7f1b Reverse the meaning of BWindow fShowLevel to match BView.
This also matches the client_window_info.show_hide_level field used in Deskbar
and other applications.

While doing this, keep fShowLevel fully in sync between BWindow and app_server,
use one message type for both hiding and showing, and make the decision to show
and hide the window in the app_server.

Lastly make minimize behave as described in the Be Book: hidden windows cannot
be minimized, and minimized windows which get hidden become unminimized.
2012-08-15 23:45:15 -04:00
Philippe Saint-Pierre d221a261ff Style fix 2012-08-07 18:17:38 -04:00
Ryan Leavengood e77304562d Actually sort the translator menu used in ShowImage.
There were two problems with the last commit:

* the list needed to be outside of the top-level loop.
* BList was just broken for sorting translation_format pointers.

I fixed this by moving the loop outside and converting the translation_formats
to translator_info, which has the translator_id, since that is needed to create
the menu item, and would otherwise be unavailable outside the loop.

I tried to get this working with BList, but the sorting was completely broken,
and converting to BObjectList made the code much, much better and worked great.
Screw BList and casting, hurray templated BObjectList.

Really fixes #6782.
2012-08-07 00:41:41 -04:00
Ryan Leavengood adfe152ee2 Sort the translation formats in AddTranslationItems by name.
This is used by ShowImage and CodyCam to create a list of image formats which a
file can be saved as. Tracker sorts the image MIME types used in the Find
window by name, so this makes these Save As menus match that (minus the icons
which I think are superfluous.)

Fixes #6782.

If the use of BList is no longer recommended, I welcome better suggestions
for sorting which will work in both GCC2 and GCC4. But this works ;)
2012-08-06 02:08:37 -04:00
Ryan Leavengood 6a03786cc9 Draw menus using the user chosen colors. 2012-07-28 23:02:17 -04:00
John Scipione 4bb5af765f Add control mark color setting. #8054
An enhancement adding a setting to Colors under Appearance to
set the mark color of radio button and check box controls.
2012-07-15 15:09:04 -04:00
Rene Gollent 639e18555f Fix indentation and match parameter names with .cpp. 2012-07-12 19:47:04 -04:00
Rene Gollent 0e20120117 Fix build, header changes were forgotten in previous commit. 2012-07-12 19:38:09 -04:00
Fredrik Holmqvist a51a5f3e1e Fixes to Haiku specific code to work with ACPICA 20120711. 2012-07-12 18:32:56 +02:00
Ryan Leavengood 9f5864ab09 Handle the scroll wheel changing over scrollbars.
* Extract the scrollbar change based on the mouse wheel delta into a protected
  method of BView.
* Call that method from BScrollBar's MessageReceived.

With this change it is now a bit easier to scroll horizontally around the
system by putting the mouse cursor over a horizontal scrollbar and using the
wheel.

Fixes #8631.
2012-06-24 10:50:42 -04:00
Michael Lotz bfc18b1ecd Add missing space before opening brace. 2012-06-24 16:17:32 +02:00
Alexander von Gluck IV 548b1a4988 cpuid: Rework AMD CPUID numbers
* If family is 0xF, we grab extended family and model
  like Intel does
* Idenfify AMD cpu's more correctly
2012-06-04 11:01:39 -05:00
czeidler 31f768577e The layout checks the target view now if the layout invalidation has been disabled in the view. 2012-05-10 10:36:41 +12: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
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 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
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 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 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
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
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 635df64352 Add BLocaleRoster::GetAvailableTimeZonesWithRegionInfo()
* allow locale kit clients to get all timezones with their corresponding
  country/region ID piecemeal
2012-04-07 20:51:43 +02:00
Jérôme Duval 9f6b2d77b7 PCI: add bridge control flags and use them. 2012-02-27 21:46:01 +01:00
Axel Dörfler d452ff664c Added some reserved fields to BControlLook.
* This makes future changes less troublesome, although we should also add
  some virtual slots there (probably just dozens of it, though, that's why
  I was being lazy).
* Don't pass messages by value; they are copied twice this way.
* Minor coding style corrections, automatic whitespace cleanup.
2012-02-26 14:58:52 +01:00
Philippe Saint-Pierre d63b75faf8 Outline of labels/strings drawn to desktop
* Rather than duplicating the decision taking logic involving wheter or not to draw
the outline or glow in every replicant, update be_control_look to make it more
generic.
* The Monitoring of the background preferences is now only done in Tracker (where it
was already being done).
* Add a BControlLook::B_IGNORE_OUTLINE flag to avoid this new behaviour.
* Remove that said logic from ActivityMonitor and use be_control_look.
* Use the ignore flag in DeskCalc to avoid the outline in its case.

Should fix #7716, #7291.
2012-02-22 19:06:22 -05:00
czeidler 6c40fc5dfc Reconnect BApplication and trigger reconnect of all BWindows in an application.
* handle bitmap reconnect request in the app server
2012-01-22 15:30:16 +13:00
czeidler 40c34878fa Reconnect BPicture to the app_server.
* maintain a list of all BPictures to do so
* BView downloads the BPicture data after recording the picture. This could probably done more efficiently using shared memory in the first place.
2012-01-22 15:30:15 +13:00
czeidler 577f58763b Make it possible to reconnect BBitmap to the app_server.
* maintain a list of all BBitmaps
* refactor the client memory allocator class, its possible now to just clone existing client area
2012-01-22 15:30:15 +13:00