Commit Graph

2175 Commits

Author SHA1 Message Date
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
Alex Smith
ac4525b2a5 Changed BRegion to use int32 instead of long.
There is no need for fCount and fDataSize to be long, not going to have
more than 2^32 rectangles in a region. Thanks Axel for pointing that
out.
2012-08-10 16:22:51 +01:00
Alex Smith
a5e96a301e Merge branch 'master' into x86_64 2012-08-09 08:24:50 +01:00
Philippe Saint-Pierre
d221a261ff Style fix 2012-08-07 18:17:38 -04:00
Alex Smith
8a1903353e Implemented user debugging support for x86_64.
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.
2012-08-07 20:20:42 +01: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
Alex Smith
c802257bbb Merge branch 'master' into x86_64 2012-08-06 12:34:03 +01: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
Alex Smith
a9ee7a5132 Added new BIOS module for calling BIOS interrupts.
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.
2012-08-03 15:42:30 +01:00
Alex Smith
9a5503d01c Different uname machine type for x86_64.
* Added B_64_BIT_PC_PLATFORM platform type.
* Return "x86_64" as the machine type for that platform in uname.
2012-08-01 11:13:14 +01:00
Alex Smith
9be774b553 Compilation and 64-bit fixes to libbe.so sources.
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.
2012-07-30 21:27:21 +01:00
Alex Smith
ef67788fba Ported ISA bus manager and PS/2 driver. 2012-07-30 14:37:28 +01:00
Alex Smith
e27109c167 Merge branch 'master' into x86_64 2012-07-30 08:24:31 +01:00
Alex Smith
6e2f6d1ace Changed cookie type for get_next_area_info() to ssize_t.
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.
2012-07-29 09:31:14 +01:00
Ryan Leavengood
6a03786cc9 Draw menus using the user chosen colors. 2012-07-28 23:02:17 -04:00
Alex Smith
82694bd124 Merge branch 'master' into x86_64
Conflicts:
	headers/posix/arch/x86_64/arch_setjmp.h
	src/system/kernel/cache/block_cache.cpp
2012-07-20 18:33:46 +01:00
Alex Smith
12bd7812dd Ported PCI module to 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.
2012-07-20 12:00:20 +01: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
Alex Smith
368f253347 Merge branch 'master' into x86_64 2012-07-14 08:49:14 +01: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
Alex Smith
c3f0fd28cd Fixed formatting of output in some debugger commands.
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.
2012-07-12 11:29:33 +01:00
Pawel Dziepak
92284dcc2c nfs4: Use semaphore to cancel threads instead of interrupt_thread() 2012-07-08 23:33:44 +02:00
Alex Smith
78d482e3b8 Style fixes. 2012-07-05 09:10:50 +01:00
Alex Smith
4304bb9894 Added arch_cpu.cpp to the x86_64 build.
* 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.
2012-07-04 14:06:46 +01:00
Pawel Dziepak
d764d148b1 Allow file systems to manage file locks
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.
2012-06-29 02:15:19 +02:00
Pawel Dziepak
e552920f09 nfs4: Fix rpc listener thread cancelation
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.
2012-06-29 02:14:18 +02:00
Alex Smith
575a67c7a1 Merge branch 'master' into x86_64 2012-06-27 11:28:28 +01: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
Alex Smith
f76bc433e1 Added some x86_64 system/kernel headers and kernel Jamfiles.
* Not all of these headers are correct yet, just adding what's necessary
  to get things to compile for the time being.
2012-06-13 17:45:22 +01: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
Alexander von Gluck IV
69001466e2 interface: Clean up public headers; No functional change.
* Whitespace / Tab cleanup
* Better document color space
* Let me know if anything looks wrong
2012-01-12 16:26:15 -06:00
Alexander von Gluck IV
77d663c3ea Remove the Haiku Mesa fork 2012-01-08 01:12:54 -06:00
John Scipione
d4fa97f8f8 Moved documentation for the BEntry class into a dox file to include it into the Haiku book. 2011-12-18 21:28:55 -05:00
czeidler
14fc524be2 Style and performance fixes. Thanks Ingo and Stephan. 2011-12-17 14:36:36 +13:00
Alex Wilson
a84e14ca84 Merge branch 'master' of git://github.com/haiku/haiku 2011-12-15 20:50:28 -07:00
czeidler
ed77847ca4 Remove private BStringList implementation from mail. Tested it but however please be careful an review. This fixes bug #8174. 2011-12-15 19:45:07 +13:00
czeidler
779061f0cd Make BStringList derive from BFlattenable. The implementation is more or less copied from the mail version to stay compatible. Fix IndexOf which
was the implementation of HasString.
2011-12-15 19:45:06 +13:00
Alex Wilson
29ef6eb52d Fix BMenu behaviour/ABI by reinstating BMenu::InvalidateLayout()
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.
2011-12-08 14:09:35 -07:00
Alex Wilson
182e2ee973 Add a bit more FBC stuff for the Layout API, which I missed before. 2011-12-01 22:47:46 -07:00
Alex Wilson
d56e7bd64d Make archiving hooks protected in layout classes.
Furthermore,
* remove a stray blank line in Layout.cpp
* make BLayoutItem::SetLayout() private, as it should have been
2011-12-01 20:45:50 -07:00
Ingo Weinhold
9213e9d6a8 Add BPackageRoster::GetActivePackages()
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.
2011-11-25 06:19:49 +01:00
Ingo Weinhold
26265b7b4d Add class BPackageInfoContentHandler
A BPackageContentHandler subclass that initializes a BPackageInfo from
the read package attributes. Pulled out of RepositoryWriterImpl's
PackageContentHandler.
2011-11-25 06:19:48 +01:00
Ingo Weinhold
e35a99be4c Pull class BPackageInfoSet out of BRepositoryCache 2011-11-25 06:19:47 +01:00
Ingo Weinhold
9968845d69 Use BStringList in package kit
Replace all instances of BObjectList<BString> by BStringList.
2011-11-25 06:19:46 +01:00
Ingo Weinhold
7de6af25e9 Add a BStringList class 2011-11-25 06:19:45 +01:00
Ingo Weinhold
ad07ecd821 BString::Private class to access BString internals 2011-11-25 06:19:45 +01:00
Ingo Weinhold
4f5f15f080 BRepositoryCache: Add iteration, etc.
* Remove InitCheck() and the initializing constructor.
* Rename PackageCount() to CountPackages().
* Use BOpenHashTable instead of HashMap for the internal PackageMap.
* Allow multiple packages with the same name. Equally named packages are
  in a singly linked list after the first package with that name.
* Add an Iterator inner class and a GetIterator() method, so one can now
  iterate through the packages in the repository.
2011-11-25 06:19:44 +01:00
Ingo Weinhold
156ea481b3 Add HashValue() methods to BString 2011-11-25 06:19:44 +01:00
Ingo Weinhold
6ae0ecd49a Add a package info "install-path" attribute
The attribute is intended for simplifying package building. The
package's install path will be used for the package's .self package
symlink, allowing installation to a temporary directory when building
the package.
2011-11-25 06:19:35 +01:00
Ingo Weinhold
7efa133cb4 BPackageWriter: Add SetCheckLicenses()
The default is still "true", but now it is possible to disable the
license check.
2011-11-25 06:19:34 +01:00
Ingo Weinhold
a54f7dc250 Move B_MIME_STRING_TYPE to <TypeConstants.h> 2011-11-25 06:19:24 +01:00
Ingo Weinhold
00bc8e9cbd Add support for adding/updating package entries
Add flags parameter to BPackageWriter::Init() (and the private
implementation classes) to indicate that an existing package file shall
be updated instead of created. Currently that always happens in-place.
2011-11-25 06:18:58 +01:00
Ingo Weinhold
78811461b1 Add BLowLevelPackageContentHandler section hooks
* Add hooks HandleSectionStart() and HandleSectionEnd(). They are
  invoked to bracket package file section, so the handler can
  discriminate which section the attributes belong to.
  HandleSectionStart() features a return parameter _handleSection, which
  allows to handler to pick which sections it wants to handle.
* "package dump" does now print the section names.
2011-11-25 06:18:55 +01:00
Ingo Weinhold
f9caa05c2a Define IDs for package section 2011-11-25 06:18:55 +01:00
Ingo Weinhold
2fce201893 BLowLevelPackageContentHandler interface extension
HandleAttributeDone(): Add parentToken parameter.
2011-11-25 06:18:50 +01:00
Ingo Weinhold
0f9a98a419 Add optional FD parameter to AddEntry()
If a FD is specified, instead of using the file with the given the FD is
used. Allows for adding entries without first copying them into the
directory structure.
2011-11-25 06:18:45 +01:00
Ingo Weinhold
cd8f03a8cc BPackageInfo::ReadFromConfigFile() BFile& version 2011-11-25 06:18:44 +01:00
Ingo Weinhold
efb6462777 Cleanup 2011-11-25 06:18:43 +01:00
Ingo Weinhold
c29492a252 Fix gcc 2 build by making Parser a friend 2011-11-25 06:18:39 +01:00
Ingo Weinhold
3a802b3d7f Add URL/source URL hpkg package attributes 2011-11-25 06:18:35 +01:00
Ingo Weinhold
eb7e89518a Add url and sourceURL properties to BPackageInfo
Also extend the parser to accept "url" and "source-url" attributes.
2011-11-25 06:18:34 +01:00
Ingo Weinhold
622ca02bc1 Add package attribute for compatible version 2011-11-25 06:18:26 +01:00
Ingo Weinhold
4438ef7a2c BPackageResolvable: Add compatibleVersion property 2011-11-25 06:18:25 +01:00
Ingo Weinhold
ea754ce710 BPackageResolvableData: Compatible version field
Add fields haveCompatibleVersion and compatibleVersion. This allows us
to have a minimum version a resolvable is backwards compatible with.
2011-11-25 06:18:25 +01:00
Ingo Weinhold
8f314372a8 Introduce a pre-release version component
* The version string pattern is now:
  <major>[.<minor>[.<micro>]][-<pre>][-<release>]
* Introduce B_HPKG_ATTRIBUTE_ID_PACKAGE_VERSION_PRE_RELEASE package
  attribute.
* Add "preRelease" field to BPackageVersionData.
* Add "preRelease" property to BPackageVersion and packagefs's Version.
* Adjust package reader and writer code accordingly.
2011-11-25 06:18:24 +01:00
Oliver Tappe
323b65468e Filtered flat import of Oliver's svn package management branch
Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
  deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
  <directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
  DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
  ~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.
2011-11-25 06:17:07 +01:00
Oliver Tappe
32a04e8721 Formatting cleanup of B_DEFINE_WEAK_ALIAS macro.
* This doesn't necessarily belong here, but we're going to make use
  of it in the next changeset. Additionally, this change to BeBuild.h
  will trigger a rebuild of nearly all files, and applying it during
  the multibyte-related work will skip another full rebuild ...
2011-11-22 18:19:28 +01:00
Axel Dörfler
362ae0a27e Added unimplemented copy constructor. 2011-11-21 23:57:19 +01:00
Axel Dörfler
29e07dd0eb Added a buffered DataIO subclass.
* Only the read path is tested so far.
2011-11-21 23:55:13 +01:00
Axel Dörfler
0e478f5aec Added experimental version of a Socket API with SSL support.
* Each class has a Socket() method to retrieve the underlaying file descriptor
  to be able to do the more advanced stuff, if necessary.
* A server socket is yet missing, but the rest is pretty much covered.
2011-11-21 22:07:52 +01:00
Rene Gollent
7b27c8fc41 Adjust method naming. 2011-11-17 09:12:47 -05:00
Rene Gollent
6beb27d4a1 Add {Get,Set}ItemVisible() accessors and setters. 2011-11-16 22:19:02 -05:00
Rene Gollent
6d16dcfa0c Add GetCollapsible() accessor to BSplitView/Layout. 2011-11-16 21:43:35 -05:00
John Scipione
30d17caa9d Added support for colored window tabs in the default decorator. 2011-11-13 14:58:21 -05:00
Siarzhuk Zharski
f37821851e Refactoring of 8-bit encodings support.
* Fixed issue introduced in hrev38139: restoring from the line
  drawing table was hard-coded to UTF8 Ground table. That is wrong:
  the table for currently configured encoding must be set back.
  Please look on using of _GuessGroundTable() for details;

* Fixed issue introduced in hrev34894: the semantic of convert_xx_utf8
  functions requires the destination length to be set equal to the
  target buffer size. Pre-hrev34894 usage of "homebrew" conversion
  functions was a bit different - destination length was set to 0.
  This made any converstions of input data useless and produce no
  visual results;

* Private list of supported encodings (Encoding.cpp) was replaced by
  using BPrivate::BCharacterSetRoster functionality. That allows to
  use centralized info about encodings in unified with other
  applications (Mail & StyledEdit for example) way. Most of currently
  enumerated in UTF8.h encodings now available in Terminal.
  Note that UCS-2 and UTF-16 are temporary (???) excluded from the
  list of encodings supported by Terminal.

* The B_UTF16_CONVERSION was added in system-wide UTF8.h declarations.
  This character set is available for enumerating by BCharacterSetRoster
  but not listed in public API. Looks like it was just missed;

* Special note about "Text Encoding" entry in Preference File:
  So known "shortname" of encoding was used in the preferences file.
  For details look on the encodings list in previous version of
  Encoding.cpp. As result of migrating to BCharacterSet-provided
  resources this list was deleted and is not available anymore.
  Instead of it the IANA name of the character encoding targeted
  to be used for this purposes. Frankly speaking this part looks
  like not working at the moment. The value of text encoding is
  hardcoded to "UTF-8" now and is not affected by any operations
  in Terminal menu. Note that "shortname" for default encoding
  was "UTF8" but the saved value is "UTF-8" - and they are looking
  not dependent at all. So this change should not introduce any
  kind of backward incompatibility.
2011-11-13 13:17:38 +01:00
Ingo Weinhold
1c2d7d3a86 Fixed x86_64 handling by the build system.
* Map build variables HOST_CPU and HOST_ARCH to x86_64, if it they are
* x86 and
  64 bit and define the __x86_64__ C macro instead of __INTEL__ in that
case.
* <OS.h>: Also handle __x86_64__.
2011-11-12 15:40:16 +01:00
Adrien Destugues
98f88d29c4 Avoid warning for unused parameters.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43220 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-07 21:31:17 +00:00
John Scipione
8abe72fb66 Changes the menu key bitmap from CTL to CTRL and SHFT to SHIFT.
This is coming from but does not close #7967

Adds a new (currently unused) Menu key bitmap.

Instead of having a single AltAsCommandKey() method the menus now
show the correct bitmap when you switch between your control,
windows/option, and alt/command keys. This is really not flushed
out yet since it only works when you switch those keys and not
other combinations like say switching the control and caps lock
keys but it is a step in the right direction.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43205 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-07 01:46:42 +00:00
Axel Dörfler
c80c50772e * Coding style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43198 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-06 08:23:41 +00:00
Alex Wilson
53617d366d Override a bunch of methods in layout related classes for FBC stability.
* Especially made sure to override archiving methods, since these are called rarely, so the cost is very minimal
* Otherwise, the closer a class is to a base class, the more likely I was to give it all the overrides.
2011-11-05 14:25:06 -06:00
Ingo Weinhold
19ae20e67e Merge branch 'master' into pm-flat
Conflicts:
	build/jam/HaikuImage
	build/jam/OptionalBuildFeatures
	build/jam/OptionalPackages
	build/jam/UserBuildConfig.sample
	data/bin/installoptionalpackage
	src/apps/deskbar/DeskbarMenu.cpp
	src/servers/debug/DebugServer.cpp
	src/system/kernel/fs/vfs.cpp
2011-11-05 17:00:01 +01:00
Alex Wilson
121a15ea8f By convention, Perform() methods are public, make this true for BLayout. 2011-11-05 01:58:56 -06:00
Alex Wilson
0c8b758c09 Add a BView::LayoutChanged() method, called after layout of this view and children.
Fixes #7683.
2011-11-05 01:03:07 -06:00
Alex Wilson
fceb7ee27e Add FBC padding + Perform() methods to GridView and GroupView.
We probably won't need these, but these additions are cheap.
2011-11-04 23:08:11 -06:00
Alex Wilson
e044d51aa8 Forbid copying and assignment in layout classes.
Specifically in:
 * BAbstractLayout
 * BAbstractLayoutItem
 * BGridLayout
 * BGridView
 * BGroupLayout
 * BGroupView
 * BLayout
 * BSplitView
 * BTwoDimensionalLayout
2011-11-04 22:23:22 -06:00
Adrien Destugues
ba5e652d79 Set of patches by Pete Goodeve to imrpove the handling of audio latency.
Closes #7285.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43164 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-03 14:26:03 +00:00
Rene Gollent
0d973a90bc Add CountItems() convenience function to BSplitView.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43138 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-02 22:41:55 +00:00
Adrien Destugues
4ec6c3a042 Merge patch by plfiorini :
Some changes to the API for notifications.
	* Don't go through be_roster to send a notification, but use Notification->Send() instead.
	* Rename App to Group to make the purpose clearer

And some changes to the notification code itself:
	* Use the Notification class as the way to convey informations about a notification. Allows easier extension of this class
	* Code cleanup
	* Use of the layout kit for the notify window

Unfortunately, the latter part clashes quite a bit with the changes I already did to the notification window, so it's now quite broken. Working on that next, but I wanted to separate that work from the patch ...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-02 14:57:43 +00:00
Alex Wilson
8151838e38 Add FBC padding to all (I think..) of the visible Layout related classes. 2011-11-02 00:29:33 -06:00
Oliver Tappe
3cb4f94295 Add macro to BeBuild.h for declaring a weak alias.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43089 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-02 00:06:53 +00:00
Adrien Destugues
1a5c1f9ed5 * Use const references instead of pointers for the read from/write to
attribute/resource method in locale kit catalogs
 * Only load the embedded catalog if nothing else was found, so it can easily
be overridden
 * Change the resource type to 'CADA' (CAtalog DAta) for embedded catalogs, and
use a hash of the language code as the resource ID. This allows multiple
languages to be stored in the same file and does not interfere with the user
storing his own BMessages as resources.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-01 10:13:34 +00:00
Alex Wilson
a851b3ad54 Add Perform() methods to all the layout-related classes that needed them. 2011-10-31 14:57:30 -06:00
Adrien Destugues
54fad654ce Rework the handling of catalog loading in locale kit :
Instead of computing the mime signature and giving this to the catalog system,
give an entry_ref instead. The default catalog add-on can thus look at the
right place when searching local catalogs (embedded as resources, or stored
as files next to the executable.
  * This allows different versions of the same app to each have their own
catalog set,
  * And also make the embedded/local catalog searching work for add-ons and
libs, instead it only worked for apps because of a getAppInfo call.

Fix cpufrequency to make use of it properly (that wouldhave worked without the
change, but nowit's mandatory, since loading a catlog by mimesignature is not
possible anymore).

Should fix #8037.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43021 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-31 08:57:09 +00:00
Niels Sascha Reedijk
7f1880dc0e Apply patch for ticket #8008:
* Remove BNode documentation from the source code and add it to Node.dox
 * Rewrite some of the existing documents


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42986 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-29 22:02:52 +00:00
Niels Sascha Reedijk
1326b9d0b4 Apply the patch by jscipione on ticket #7994.
* Update BScreen class style and variable names
 * Remove documentation from Screen.cpp file
 * Create Screen.dox documentation file



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42984 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-29 21:51:43 +00:00
François Revol
e039afe87e Define B_MAIL_DAEMON_SIGNATURE and use it instead of hardcoding the signature everywhere.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42966 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-29 16:21:17 +00:00
Stephan Aßmus
f9152093a3 Reverted r42958 as it is broken and I completely forgot to compile before
I commited... need to get back into the habbit, sorry for the noise.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42961 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-29 15:51:04 +00:00
Stephan Aßmus
7749d0bb0c Applied slightly reworked and updated patch from ticket #1576
by "jarz" to rewrite the last remaining (?) headers in order
to get rid of the Be copyright. Thanks a lot and sorry for the
long delay.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-29 15:38:20 +00:00
Alex Wilson
0843fb4572 Revirtualize BLayout::Relayout(), since it is in fact inherited from BLayoutItem and virtual anyway.
Also add a comment to make this obvious.
2011-10-28 14:17:05 -06:00
Alex Wilson
e7b0dc78f7 Now that child classes aren't overriding the various InvalidateLayout() methods, we can take advantage of some guarantees to simplify/clean/optimize the layout invalidation propagation mechanisms! 2011-10-28 14:16:54 -06:00
Alex Wilson
c74faed432 Add BLayoutItem::LayoutInvalidated() hook. Leave BLayoutItem::InvalidateLayout() (and therefore BLayout::InvalidateLayout()) virtual. This is needed to let BLayout override it for invalidation propagations. 2011-10-28 14:16:52 -06:00
Alex Wilson
61eb1f1d19 Replace remaining InvalidateLayout()'s with LayoutInvalidated(). Also do a bit of cleanup/move methods around. 2011-10-28 14:16:49 -06:00
Alex Wilson
eee4243d35 De-virtualize BView::InvalidateLayout() and introduce LayoutInvalidated() hook, like BLayout. 2011-10-28 14:16:43 -06:00
Alex Wilson
b38ea98f52 Devirtualize BLayout::InvalidateLayout(), add a protected hook BLayout::DoLayout(). This will allow for much better control over the propagation of layout invalidations, and therefore cleaner, more optimal code. 2011-10-28 14:16:39 -06:00
Alex Wilson
b8725ee37e De-virtualize BLayout::Relayout(). I think this was virtual only by accident. 2011-10-28 14:16:28 -06:00
Alex Wilson
4e0131f51b Rename BLayout::DerivedLayoutItems() to DoLayout(), which is consistent with BView::DoLayout(). Also adjusted child classes and documentation. 2011-10-28 14:16:25 -06:00
Alex Wilson
fa01d08496 User BView's layout item tracking functionality to simplify and optimize some methods in BLayout and BView.
Delete BLayout::RemoveViewRecursive() as it is no longer needed.
Add a few TODO's.
2011-10-28 14:16:16 -06:00
Philippe Houdoin
1ce29039cd Revert r42812. As pointed by Michael, one can use
BUSBDevice::GetDescriptor() to retrieve whatever descriptor, including a 
complete configuration descriptor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42905 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-24 21:02:14 +00:00
Michael Lotz
7d7b963225 * Remove the BNetworkDevice::AddPersistentNetwork() again and instead introduce
BNetworkRoster::{Count|GetNext|Add|Remove}PersistentNetwork() as it fits
  better (thanks Philippe for the heads up).
* Implement the backend for these functions in the net_server and also move
  conversion of the wireless_network based format into the settings based format
  there.
* Implement removal of a network from the settings and make adding a new network
  with the same name replace the old one instead of just adding multiple ones.
  Might need to change this in the future depending on how we want to handle
  multiple networks with the same name (i.e. distinguish based on BSSID or
  similar).
* Fix apparent oversight that caused configured networks _not_ to be used in the
  auto join attempt.
* Remove auto joining open networks. I've been bitten by that more than once now
  because we happen to have an open network in the neighbourhood that I now
  accidentally used to transfer quite a bit of (unencrypted) stuff before
  noticing... In the future, one will instead have to explicitly join an open
  network once and store that config. Note that the driver will actually still
  auto-associate with open networks due to how things are set up currently.
  Note also that the auto join will fire join requests whenever there's a
  disassociation event, so you might see spurious join dialogs when the
  wpa_supplicant actually just re-establishes the connection.
* Make join requests async again. Instead of waiting for a synchronous reply of
  the wpa_supplicant we instead return success when the request has been sent.
  While the API call might still be made synchronous again in the future, the
  net_server should really not block on an external application. In the case of
  the wpa_supplicant we would otherwise deadlock when using the new
  *PersistentNetwork() API after a successful join, and in other cases we might
  just unacceptably delay other calls.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42816 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-09 19:56:19 +00:00
Philippe Houdoin
d41559757e Expand usb_raw ioctl to support retrieving full usb configuration descriptor from userland, not only the header part.
I try to keep UBSConfiguration binary compatibility, but proofreading is welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-09 15:15:15 +00:00
Michael Lotz
a1b98367ae Add a way to add persistent (configured) wireless_networks that will eventually
be stored by the backend in the net_server. I put it in BNetworkDevice because
that is where network enumeration is done as well, but I'm not sure that it fits
there particularly well.
Since BNetworkDevice::GetNetwork() directly interfaces with the driver and gets
the networks from scan results, such persistent networks don't yet show up in
those enumerations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42807 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-07 10:23:47 +00:00
Oliver Tappe
6846765fbf Work on #7947 (CalendarView not respecting locale's start of week)
* support all weekdays as start of week, not only Sunday and Monday
  (at least Saturday is used for real, too)
* introduce BWeekday as enumeration of weekdays (currently in Locale.h,
  may be moved somewhere else later)
* change CalendarView to use BDate as its model, not individual values
  for day, month and year, such that no more date computation is done 
  in CalendarView itself
* some more style cleanups in CalendarView along the way
* add monthwise paging to CalendarView
* adjusted Deskbar and Time preflet accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-09-07 21:41:57 +00:00
Adrien Destugues
52d1086f2d Header was not self-containing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-28 13:47:07 +00:00
Oliver Tappe
e267238ff1 * add predicate FormattingConventions::AreCountrySpecific()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42666 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-21 17:18:31 +00:00
Oliver Tappe
7ba0381def * add protected accessor for baseline offset to StringItem, as that value is of
interest to derived classes

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-21 17:17:13 +00:00
Oliver Tappe
e621fc3198 * minor formatting cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42651 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-20 20:36:41 +00:00
Oliver Tappe
45f2f22b52 * update (not-so-)optional package ICU to 4.8.1, which contains interesting stuff
for message formatting
* adjust LocaleKit to use namespace 'icu', as ICU has been configured to no longer
  use a version specific namespace
* adjust LocaleKit to general API changes in ICU 4.8
Note: all software using ICU (like WebPositive) needs to be rebuilt!
Note: the ICU package for PPC needs to be updated before it can be used!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42638 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-18 22:13:06 +00:00
Fredrik Holmqvist
fcb8a5cb4e * Updated ACPICA to 20110623.
See http://www.acpica.org/download/changes.txt done after 2010-10-13 for info on ACPI changes.
 * Adapted the embedded controller to match current FreeBSD one.

There will probably be some issues with these changes initially.




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42637 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-17 19:16:21 +00:00
Axel Dörfler
d5e36fb599 * Introduced new fs_lopen_attr_dir() function that opens the attribute
directory of a file without traversing leaf links (just like lstat()).
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42620 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-10 21:08:00 +00:00
Adrien Destugues
ca2c99c2ca * Add BIconUtils documentation to the Haiku Book
* Remove comments from the header itself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-09 19:31:46 +00:00
Alexander von Gluck IV
cd4c994bdf * define PCI add-on rom flags that are normally defined in PCI header files.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-03 20:36:41 +00:00
Clemens Zeidler
c0dad949ee BRect's OffsetBy takes a BPoint. Add a similar BRegion method to be more consistent. This one takes a const reference instead a complete BPoint object.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42476 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-07-24 23:53:12 +00:00
Clemens Zeidler
f7953fa769 Add MoveItem method to easily move a item within a list. Fix line limit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42475 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-07-24 23:49:30 +00:00
Ingo Weinhold
8c29f58728 Add BPackageRoster::GetActivePackages()
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.
2011-07-17 16:55:22 +02:00
Ingo Weinhold
10b8f70276 Add class BPackageInfoContentHandler
A BPackageContentHandler subclass that initializes a BPackageInfo from
the read package attributes. Pulled out of RepositoryWriterImpl's
PackageContentHandler.
2011-07-17 16:55:21 +02:00
Ingo Weinhold
db9a50a2c6 Pull class BPackageInfoSet out of BRepositoryCache 2011-07-17 16:55:21 +02:00
Ingo Weinhold
2021c9842e Use BStringList in package kit
Replace all instances of BObjectList<BString> by BStringList.
2011-07-17 16:55:20 +02:00
Ingo Weinhold
808a51161a Add a BStringList class 2011-07-17 16:55:20 +02:00
Ingo Weinhold
d0c417848b BString::Private class to access BString internals 2011-07-17 16:55:20 +02:00
Ingo Weinhold
10e1bc5267 BRepositoryCache: Add iteration, etc.
* Remove InitCheck() and the initializing constructor.
* Rename PackageCount() to CountPackages().
* Use BOpenHashTable instead of HashMap for the internal PackageMap.
* Allow multiple packages with the same name. Equally named packages are
  in a singly linked list after the first package with that name.
* Add an Iterator inner class and a GetIterator() method, so one can now
  iterate through the packages in the repository.
2011-07-17 16:55:20 +02:00
Ingo Weinhold
5a54e156e5 Add HashValue() methods to BString 2011-07-17 16:55:19 +02:00
Ingo Weinhold
f19957b8e5 Add a package info "install-path" attribute
The attribute is intended for simplifying package building. The
package's install path will be used for the package's .self package
symlink, allowing installation to a temporary directory when building
the package.
2011-07-17 16:55:14 +02:00
Ingo Weinhold
d7227dfa9e BPackageWriter: Add SetCheckLicenses()
The default is still "true", but now it is possible to disable the
license check.
2011-07-17 16:55:14 +02:00
Ingo Weinhold
3e29244600 Move B_MIME_STRING_TYPE to <TypeConstants.h> 2011-07-17 16:55:09 +02:00
Ingo Weinhold
327b38d69c Add support for adding/updating package entries
Add flags parameter to BPackageWriter::Init() (and the private
implementation classes) to indicate that an existing package file shall
be updated instead of created. Currently that always happens in-place.
2011-07-17 16:54:56 +02:00
Ingo Weinhold
97aabbede9 Add BLowLevelPackageContentHandler section hooks
* Add hooks HandleSectionStart() and HandleSectionEnd(). They are
  invoked to bracket package file section, so the handler can
  discriminate which section the attributes belong to.
  HandleSectionStart() features a return parameter _handleSection, which
  allows to handler to pick which sections it wants to handle.
* "package dump" does now print the section names.
2011-07-17 16:54:55 +02:00
Ingo Weinhold
b3211314fc Define IDs for package section 2011-07-17 16:54:54 +02:00
Ingo Weinhold
697b9545b1 BLowLevelPackageContentHandler interface extension
HandleAttributeDone(): Add parentToken parameter.
2011-07-17 16:54:53 +02:00
Ingo Weinhold
4512e8d566 Add optional FD parameter to AddEntry()
If a FD is specified, instead of using the file with the given the FD is
used. Allows for adding entries without first copying them into the
directory structure.
2011-07-17 16:54:51 +02:00
Ingo Weinhold
bfbb410d1a BPackageInfo::ReadFromConfigFile() BFile& version 2011-07-17 16:54:50 +02:00
Ingo Weinhold
4cf5f9293f Cleanup 2011-07-17 16:54:50 +02:00
Ingo Weinhold
df18eb8718 Fix gcc 2 build by making Parser a friend 2011-07-17 16:54:46 +02:00
Ingo Weinhold
8b684dd363 Add URL/source URL hpkg package attributes 2011-07-17 16:54:44 +02:00
Ingo Weinhold
ee453e8bbc Add url and sourceURL properties to BPackageInfo
Also extend the parser to accept "url" and "source-url" attributes.
2011-07-17 16:54:44 +02:00
Ingo Weinhold
22e1ec0e30 Add package attribute for compatible version 2011-07-17 16:54:38 +02:00
Ingo Weinhold
c2f56ca020 BPackageResolvable: Add compatibleVersion property 2011-07-17 16:54:38 +02:00
Ingo Weinhold
3a56aaeeb9 BPackageResolvableData: Compatible version field
Add fields haveCompatibleVersion and compatibleVersion. This allows us
to have a minimum version a resolvable is backwards compatible with.
2011-07-17 16:54:38 +02:00
Ingo Weinhold
ed6d59a9a9 Introduce a pre-release version component
* The version string pattern is now:
  <major>[.<minor>[.<micro>]][-<pre>][-<release>]
* Introduce B_HPKG_ATTRIBUTE_ID_PACKAGE_VERSION_PRE_RELEASE package
  attribute.
* Add "preRelease" field to BPackageVersionData.
* Add "preRelease" property to BPackageVersion and packagefs's Version.
* Adjust package reader and writer code accordingly.
2011-07-17 16:54:37 +02:00
Ingo Weinhold
f1eeb32334 Fixed x86_64 handling by the build system.
* Map build variables HOST_CPU and HOST_ARCH to x86_64, if it they are
* x86 and
  64 bit and define the __x86_64__ C macro instead of __INTEL__ in that
case.
* <OS.h>: Also handle __x86_64__.
2011-07-17 16:54:08 +02:00
Oliver Tappe
3dfd9cb95c Flat commit of all changes from package-management branch in svn 2011-07-17 16:54:06 +02:00
Ingo Weinhold
85b41b15d9 * Added bool and double BString::operator<<() versions.
* Removed the clashing operator in JobSetupDlg. Automatic whitespace
  cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42387 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-07-07 10:17:15 +00:00
Jérôme Duval
aa56e459e0 revert r42251. Cast the enum to uint32 before use in switchs to please GCC 4.5.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-20 21:12:10 +00:00
Axel Dörfler
21c22141b8 * Removed default_sent_directory(), and introduced
default_mail{_in|_out}_directory() methods in the BPrivate namespace.
* Used these methods in the inbound/outbound protocols.
* Moved WriteMessageFile() into the BPrivate namespace as well, and put its
  prototype into a new header MailPrivate.h along with the new directory
  getters.
* Removed the automatic copy to the sent directory again, and only have one
  directory for incoming mail. Incidentally, this fixed #7509, although the
  underlying filter restriction remains.
* Automatic whitespace cleanups, some style cleanups. Sorry for the mess.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-19 22:11:04 +00:00
Jérôme Duval
ad1263fce3 Part of patch from #6840:
* GCC 4.5 complains about switchs with cases not part of the directory_which enum
* Merge FSUtils directory_which values into the enum


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42251 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-19 18:15:25 +00:00
Alex Wilson
8ef1944247 Add new constructors to BLayoutBuilder::Grid and BLayoutBuilder::Group that accept a plain old BView, and give it a new layout. These are very similar to the constructors that are already in place taking a BWindow. This solves a problem I have come across a few times, where one wants to build a layout in something like a BBox. Althought there is currently a way to do it with the layout builders, this is prettier.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-18 01:12:29 +00:00
Alex Wilson
d90a465e08 Change the value of other spacing/inset constants so that B_USE_DEFAULT_SPACING has its own unique value. Also adjust BControlLook::ComposeSpacing() to reflect this.
closes #7447


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42222 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-18 00:37:39 +00:00
Ingo Weinhold
54cf3a72ba Changed sReplyPortInUse type from long to int32, so it be used with
atomic_add() also on 64 bit architectures.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-14 11:25:37 +00:00
Ingo Weinhold
eff23a8157 Added missing header <Size.h>.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42166 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-14 01:25:51 +00:00
Ingo Weinhold
a928c3f001 operation <<(): Use the standard types [unsigned] long [long] instead of
[u]int32 and [u]int64 to avoid clashes with the int/unsigned int versions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-14 01:07:16 +00:00
Michael Lotz
16c5a72847 * Seperate out the tty_close_cookie from tty_destory_cookie and make the former
available as a module function as well.
* Remove some unneeded resetting from tty_destroy_cookie.
* Move the public module functions to the public API section of the file and
  order them by their declaration order in the module info.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-13 20:44:22 +00:00
Michael Lotz
f1ec739ed7 Style and text cleanups and some added clarifications. No functional changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42148 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-13 13:06:45 +00:00
Ingo Weinhold
90ade5e298 * Added file_system_module_info::uninitialize() analogously to
partition_module_info::uninitialize().
* Implemented the hook for BFS.
* Implemented KFileSystem::Uninitialize().

Fixes failure to initialize a BFS initialized device with an intel partition
map.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42142 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-13 01:53:11 +00:00
Ingo Weinhold
24df65921b Merged signals-merge branch into trunk with the following changes:
* Reorganized the kernel locking related to threads and teams.
* We now discriminate correctly between process and thread signals. Signal
  handlers have been moved to teams. Fixes #5679.
* Implemented real-time signal support, including signal queuing, SA_SIGINFO
  support, sigqueue(), sigwaitinfo(), sigtimedwait(), waitid(), and the addition
  of the real-time signal range. Closes #1935 and #2695.
* Gave SIGBUS a separate signal number. Fixes #6704.
* Implemented <time.h> clock and timer support, and fixed/completed alarm() and
  [set]itimer(). Closes #5682.
* Implemented support for thread cancellation. Closes #5686.
* Moved send_signal() from <signal.h> to <OS.h>. Fixes #7554.
* Lots over smaller more or less related changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-12 00:00:23 +00:00
Alex Wilson
813147df83 * Add new SetInsets() methods to BTwoDimensionalLayout, BSplitView
* Also add equivalent methods to the layout builders in LayoutBuilder.h
* BSplitView now calls BControlLook::ComposeSpacing(), instead of BSplitLayout
* part of #7447


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42077 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-09 20:58:52 +00:00
Alex Wilson
6648dd3cf1 * Add new spacing/inset constants for the layout API. For now, leave B_USE_DEFAULT_SPACING, but this will go soon.
* Rename BControlLook::ComposeItemSpacing() to ComposeSpacing(), and extend it to handle the new constants.
* Adjust users of BControlLook::ComposeItemSpacing() accordingly.
* part of #7447


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42025 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-07 20:40:56 +00:00
Michael Lotz
ab1763688f * Replace the fixed size extended_joystick structure with a variably sized one
inside BJoystick.
* Add joystick_module_info flag to communicate support for variably sized reads.
* The variably sized data structure is set up to describe either the actual
  amount of data, when variably sized reads are supported by the driver, or it
  is set up so that it exactly matches the data layout of the extended_joystick
  structure. This allows us to support both as input data, while only needing to
  care about a single format inside BJoystick. Convenience pointers allow the
  data to be retrieved without additional overhead or extra logic.
* Add some sanity checks and ensure some boundaries when dealing reading data
  from the variably sized structure (as there might not be any buttons, hats,
  axis at all now).
* Ensure that the extended_joystick structure doesn't change in size due to
  padding by making it _PACKED (it wasn't padded though).

This is still supposed to work exactly as before. However, it opens up the
possibility to actually support arbitrary controllers with arbitrary axis, hat
and button counts. It therefore allows to actually deliver what the BJoystick
API was designed to handle all along.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41885 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 18:33:43 +00:00
Michael Lotz
4b5bcc6684 Introduce a BJoystick::GetButtonValues() function that aligns with the other
Get*Values() functions but retrieves an arbitrary amount of button states using
a boolean array. This overcomes the 32 button limitation on the API side. Right
now the function does simply set the first 32 states from the button bitmap, as
the BJoystick to driver interface hasn't been adapted yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 15:40:31 +00:00
Michael Lotz
bb2420a474 Remove two unimplemented private functions. Since their signature was changed
already anyway (as compared to the original BeOS ones) this won't introduce any
missing symbols.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41879 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 13:26:22 +00:00
Michael Lotz
1147fabd67 Move function definitions to match their declaration order. Also move some
declarations to group them more logically. No functional changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 12:45:35 +00:00
Michael Lotz
464e0351d3 * Add a BJoystick::RescanDevices() public function. It allows the BJoystick
to be updated with newly plugged in devices without the need to recreate a
  BJoystick object.
* Do an initial (re-)scan on object creation instead of always scanning in
  CountDevices() and by extension GetDeviceName().
* This makes CountDevices() and GetDeviceName() stable with regards to the
  device list, so that an enumerating application doesn't suddenly get more/less
  devices than it might expect.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-02 15:10:31 +00:00
Michael Lotz
ef13dbda92 * Actually implement the relevant parts of BJoystick, i.e. reading the joystick
info and values. Inspired by and in parts based on the patch by caz_haiku in
  ticket #7429 (though rewritten completely due to the other changes). Thanks
  for the pointers!
* Clean up the mixup of internal joystick info and the one from
  joystick_driver.h so that BJoystick and the drivers talk about the same
  structures.
* Extensive coding style cleanup, simplifications, NULL checks, early returns,
  std::nothrow allocations, include sorting, argument naming, ... that kind of
  stuff.
* Added some TODO notes for remaining stuff.
* Automatic (and manual) whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-31 02:05:39 +00:00
Axel Dörfler
48ae3e3808 * Followed Ingo's suggestion, and added a BWindow::Layout() method.
* Changed ShowImage to use that function.
+alpha in case Ingo gives his okay :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-27 22:21:59 +00:00
Axel Dörfler
702526b17f * Added BLanguage::GetIcon(), and BLocaleRoster::GetFlagIconForLanguage(). The
former just calls the latter. Getting the flag for a language is pretty
  simplistic for now, but it won't return the wrong flag, just only a few known
  ones (should be enough for ReadOnlyBootPrompt, at least).
* Ordered methods in declaration order.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41744 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-25 17:09:30 +00:00
Rene Gollent
a6e171a7e2 Update trunk version to post-Alpha3 since the latter has now been branched.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-16 21:53:38 +00:00
Michael Lotz
407af313ca Make the signature argument to get_table() const. Should fix the GCC4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-11 09:05:43 +00:00
Michael Lotz
2645ca0a28 Provide a function to gain ACPI table access.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41429 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-11 08:22:22 +00:00
Michael Lotz
2800b06462 Add missing const to the path argument of get_handle().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41398 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-09 13:05:28 +00:00
Michael Lotz
ce57718d12 Add set_current_resources() which will be used to configure device resources
from settings retrieved through get_{current|possible}_resources().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41382 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-08 12:13:55 +00:00