As there aren't any more generic meta data containers inside BKey,
there's no real way to distinguish different instances with the same
identifiers. This may be added later, for example the same index system
as used in BMessage could apply.
The application access concept is on the keyring level only for now.
Generally it probably would get pretty complicated and therefore harder
to use when application access needs to be granted on a per key basis.
The type is relevant and required as it determines the type of the
handed in key. The purpose however isn't actually needed and rather
inconvenient to get by depending on the situation.
* Add all relevant message constants.
* Implement the messaging to send/retrieve key info.
* Implement _Flatten/_Unflatten for sending flat BKey objects.
* Remove application list from BKey, the key can't only differ by
allowed applications as the identifiers would still collide, so the
comparison isn't needed to uniquely identify the key. The applications
can be enumerated via the BKeyStore instead.
* Modified the API greatly to be based on BKey* instead of BPassword*.
* Added BKeyPurpose and used it instead of BKeyType. It is supposed to
indicate the purpose of a key so that an app can look up keys on a
more granular level. The BKeyType on the other hand actually
identifies the type (i.e. subclass of BKey) so an app knows how to
handle a given key or may only enumerate/use keys it is compatible
with.
* Made everything based on a raw data buffer for now, only BPasswordKey
is implemented yet which stores the (0 terminated) string into that
data buffer.
* Removed the additional data BMessage as I don't yet see where it fits
in. While I could imagine adding meta data to a key may be nice it
might be an interoperability concern when keys are shared by
different apps.
* Moved the app functions to the keystore as per the TODO, but not sure
how to actually implement them.
With this commit every class in the storage kit is now documented
in the Haiku book!
Thanks to Ingo, Axel, Vincent Dominguez, Tyler Dauwalder, and
everyone who helped document these classes.
* Remove docs from Resources.cpp (leaving the brief description).
* Reformat Resources.h to style it like so many other header files.
* There is one not-entirely style based change. I renamed the outSize
parameter or the LoadResource method to _size as is our convention for out
parameters.
And clean it up a bit. Kept brief description in source.
* Also added Axel to authors in Path.dox and Path.cpp because his name
appears in git blame as working on the docs and code for the file.
I hope he doesn't mind.
* Delete the docs from NodeInfo.cpp and NodeInfo.h
* I snuck a couple of style fixes into NodeInfo.cpp
* I had to make a small modification to MimeType.dox to prevent it
from overriding the docs of one of the methods in NodeInfo.dox.
I made the following changes to the original patch:
* Add const to the cursor setting functions.
* Removed the legacy cursor copying code.
* Minor coding style cleanup.
* use only a single static object (MutableLocaleRoster) instead of
two, which avoids any problems if the order of static object
destruction would destroy RosterData before MutableLocaleRoster
* rename BPrivate::RosterData to BPrivate::LocaleRosterData and move
it into a header and implementation file of its own
This should hopefully fix problems encountered with a clang-compiled
Locale Kit.
After this change, low level cpuidle drivers load the generic cpuidle
module if they can support the underlying platform.
change the intel cpuidle driver accordingly, now it's loaded by acpi
bus manager during boot, although it doesn't depend on acpi
Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
This module will load the various lowlevel cpuidle modules' implementations
during initialiation. If it finds one available module, it will change
the global gCpuIdleFunc as its own better one.
When idle, cpuidle module will select the best cstate and enter it by
calling the lowlevel module's implementation.
Signed-off-by: Yongcong Du <ycdu.vmcore@gmail.com>
Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
* We felt that me adding this didn't really
properly communicate the spirit of the
email approval. You really can't just
'change' a license from MIT without author
approval... so this is superfluous.
* A copy of the email approving this change is
in the LICENSE.txt file
* This clears up several concerns
* We now have permission to clean / update GLUT
code and redistrubute its binaries.
* We have to ensure all of Mark's work is *not*
GPL licensed as per his wishes.
* GCC 4.7 is more picky than GCC 4.6, so have to make changes accordingly
* Changes include addressing issues with scoping, redeclaration, etc.
Thanks Rene and Ingo for your input on these changes
Also gave the Up Arrow and Down Arrow a scroll arrow. The up arrow works
but the down arrow doesn't because the sibling menu is stealing the
MouseDown event."
instead of trying to make it follow fExpando just make it a fixed
size on creation. It is invisible and extends to the bottom of the
screen. fExpando grows inside it, and the window follows fExpando.
When the window grows taller than the screenframe the arrows are
added. You can scroll with the mouse wheel, but I haven't yet gotten
scrolling to work from clicking. Deskbar still crashes when going
from Mini mode to vertical expando mode. I have no idea why.
Rename ScrollMenu.cpp to MenuScrollView.cpp
Half step towards making this class work as part of Deskbar without
extending any other classes. Scrolling works both with mouse and
scroll wheel. Redraws on scroll, need to make that work better.
Also need to move classes out of the Interface Kit and into Deskbar.
Modify the ScrollMenu class to use the layout kit by adding a constructor that doesn't take a view.
Get the BScrollMenu class to follow the size of the BMenu it is a parent of. Adjust the scrollers to appear in the right places. This is a WIP but it works in Deskbar, next step is to integrate this directly into BMenu with the scrollers as children of the menu instead of as children of the BScroller class.
Rebase changes on top of master
Deskbar scrolling works for the most part, just need to fix the
bottom arrow and clean up a bit.
* 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.
* 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.
* 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
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.
Reused x86 arch_user_debugger.cpp, with a few minor changes to make
the code work for both 32 and 64 bit. Something isn't quite working
right, if a breakpoint is hit the kernel will hang. Other than that
everything appears to work correctly.
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.
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 ;)
This module provides an interface for drivers to use to perform calls
to the BIOS (only really for use by graphics drivers which need to use
the VESA BIOS). It uses the x86emu library from X.org which emulates
a real mode x86 CPU. This is necessary for x86_64 as virtual 8086 mode
no longer exists there.
Fixed the usual issues - printf format strings, uint32 instead of
addr_t, etc. One thing that isn't so nice is several places where
BList is used to store (u)int32, these require a double cast to addr_t
then void* to silence a warning on x86_64.
The cookie is used to store the base address of the area that was just
visited. On 64-bit systems, int32 is not sufficient. Therefore, changed
to ssize_t which retains compatibility on x86 while expanding to a
sufficient size on x86_64.
Uses the x86 architecture code, made fixes to printf formats and a
couple of 64-bit fixes. Only potentially intrusive change is that I've
changed PCI.h to use uint32 rather than ulong. I don't see any way
this would cause any issues, though.
Currently all debugger commands assume 32-bit pointers when formatting their
output. This means that on x86_64 the output is incorrectly formatted. Fixed
this by adding a B_PRINTF_POINTER_WIDTH definition (16 on 64-bit, 8 on
32-bit), and using this to correctly format the output. Not all commands have
been fixed yet, but all VM, slab, VFS, team, thread and image commands should
be correct.
* Some things are currently ifndef'd out completely for x86_64 because
they aren't implemented, there's a few other ifdef's to handle x86_64
differences but most of the code works unchanged.
* Renamed some i386_* functions to x86_*.
* Added a temporary method for setting the current thread on x86_64
(a global variable, not SMP safe). This will be changed to be done
via the GS segment but I've not implemented that yet.
Haiku implements file locking at vfs level. That would not work for remote
and shared file systems, since they need to negotiate locks with peers.
This patch introduces three additional hooks in fs_interface that allow
file system module to take over the management of file locks.
recv on UDP sockets is not interrupted when the socket is closed.
Additionaly, signals do not interrupt kernel threads, that is why
new function interrupt_thread was implemented in order to cancel
listener thread.
* 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.
* 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.
* 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.
* 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.
* 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
* 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
* move EditableCatalog to its own header and implementation file
* move problematic BCatalog::CatalogAddOn() to EditableCatalog
* adjust Locale tools accordingly
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.
* 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
* unify pointer style (to type* )
* always use boolean expressions in if
* introduce some spacing for better readability
* make a couple inline methods non-inline
* 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.
* 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.
* 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.
It turns out,this is an old method added by Be, and is not really related to BView::InvalidateLayout(bool). In fact BMenu::InvalidateLayout() does something separate, but related to the BView method. I was wrong to delete this method, since it needs to have action taken each time it is called, so moving these actions into LayoutInvalidated() only worked sometimes (when the BView was considered to have a valid layout).
I have added a comment for future hackers so that they don't delete this method.
The implementation is temporary. Currently it reads through the packages
in the respective packages directory and checks against the package
links. Once package activation is tracked explicitly we'll use the
activation file/directory.
A BPackageContentHandler subclass that initializes a BPackageInfo from
the read package attributes. Pulled out of RepositoryWriterImpl's
PackageContentHandler.