Commit Graph

2554 Commits

Author SHA1 Message Date
John Scipione
b726ad9203 MessageFormat: Use off_t argument instead of int32
Which doubles the maximum width fixing #11809. I wanted to convert this to
a variadic functionbut that would require updating all of the instance that use
MessageFormat or a clever hack to get around the ambiguity of an off_t
argument and an int argument count with 0 arguments. Either way seemed
out of the scope of fixing this bug.

Fixes #11809

Another Beta1 bug down!
2015-03-04 14:28:47 -05:00
John Scipione
fab1340f2f MessageFormat: Add edn header guard comment 2015-03-04 14:22:56 -05:00
John Scipione
02b72520b6 Storage Kit: Tiny style fix 2015-03-03 18:47:03 -05:00
John Scipione
64182ccb20 Menu and Deskbar: Remove _SetMenuLayout() method
and remove TExpandoMenuBar as a friend class to BMenu hack.

In Deskbar, call the newly added MenuPrivate::SetLayout() method instead.

This is a much cleaner way to implement this, thanks Stefano Ceccherini
for the tip!
2015-02-20 14:38:43 -05:00
John Scipione
deaae5fc20 Deskbar: Persist ExpandoMenuBar
Add private BMenu::_SetMenuLayout() method. Set TExpandoMenuBar
as a friend class in BMenu to call this method. A little hacky,
but, this keeps SetMenuLayout() from being exposed as part of
the public API.

Don't destroy and rebuild the ExpandoMenuBar when switching from
horizontal to vertical mode. Instead build the TExpandoMenuBar
when the application starts and then switch it from B_ITEMS_IN_ROW
to B_ITEMS_IN_COLUMNS by using the newly added _SetMenuLayout()
method.

When we resize from vertical to horizontal, recalc the max
menu item widths, this resizes the application menu items so
that they take up the right amount of space.

Since we no longer destroy the menu bar we no longer have to
save whether menu items are expanded or not in a separate list.
Instead we can store that information in directly in
TExpandoMenuBar. This removes a lot of code.

Fixes #9350
2015-02-19 19:02:39 -05:00
Axel Dörfler
794c227e83 BView: fixed RemoveSelf() layout item handling.
* When RemoveSelf() is called, we do not own our own layout items, so
  we must not delete them.
* However, we do own them when we still have layout items left when
  we get deleted ourselves.
* This fixes removing/adding a child view to a view without deleting
  it inbetween (like the new Network preferences will do).
* Optimized item removal -- not a good idea to always remove item 0.
2015-02-13 22:34:34 +01:00
Axel Dörfler
7720614300 Revert "Move getifaddrs to libnetwork again."
This reverts commit 31ea76548a.

Adrien, please try again without clobbering the otherwise nice
BNetworkInterface API!

Conflicts:
	src/kits/network/getifaddrs.cpp
2015-02-05 11:07:53 +01:00
Axel Dörfler
e661df2980 BPathFinder: include StringList.h for convenience.
* You cannot do anything with a path finder object without a string
  list, so why go through all the hassle?
2015-02-02 22:13:51 +01:00
Axel Dörfler
85f43155fe BRoster: added missing const in Launch() variant.
* The argument array passed in is never touched.
2015-01-28 16:12:18 +01:00
Axel Dörfler
30238c0418 Added BApplication::Signature() getter. 2015-01-27 23:40:03 +01:00
Adrien Destugues
49e8a3c652 BReferencable: implement const references with specialization
This is simpler and cleaner than my previous attempt. Thanks to Ingo for
suggesting this.
2015-01-27 10:31:08 +01:00
Adrien Destugues
e9b8242868 Add a BConstReference class.
This is a BReference that allows only const access to the referenced
object. This was not easily possible with the existing BReference for
two reasons:
* BReference<const Type> would not work, as BReference needs to change
the reference count of the referenced object. Adding mutable and casting
where appropriate wouldwork but,
* It is now also possible to assign a BReference to a BConstReference
(to the same type, of course). The reverse is not allowed, making it
more difficult to "const cast" the referenced object (it's still
possible to "get" the object pointer and cast that).

BConstReference can be used to provide shared read-only access to an
object, for example this can be used to cache non-copiable or
expansive to create objects.
2015-01-26 10:50:48 +01:00
Axel Dörfler
95fdee0bc0 BStringView: added truncation support.
* Added new truncation mode B_NO_TRUNCATION.
* The Truncation()/SetTruncation() methods itself are Dano-compatible,
  however, there was no B_NO_TRUNCATION.
2015-01-23 21:00:28 +01:00
Axel Dörfler
1bfa46f230 BLayoutBuilder::Grid: added spacing setters. 2015-01-23 21:00:26 +01:00
Adrien Destugues
31ea76548a Move getifaddrs to libnetwork again.
* BNetworkInterfaceAddress is moved to libnetwork. It is modified to not
use BNetworkAddress (which is in libbnetapi) and instead use sockaddr
and sockaddr_storage directly. All callers are adjusted to this.
* Some support code is shared between BNetworkInterface and
BNetworkInterfaceAddress, move it to libnetwork but in the BPrivate
namespace.
2015-01-21 10:07:03 +01:00
Adrien Destugues
c299b09cff SupportDefs: make it C89-safe again
The atomic inlines were not implemented in a C89 safe way:
* Use of "static inline" not allowed, but static __inline__ is
* __inline__ is a GCC extension, but these are already in a __GNUC__
block (other compilers use a non-inline version)
* also fix a C++ style comment
2015-01-19 13:54:18 +01:00
Adrien Destugues
4bb4130ff2 Fix instanciate_catalog prototype
The prototype didn't match what the Locale Kit actually uses, making the
plaintext catalog (and any other add-on) unusable.
2015-01-17 17:02:40 +01:00
John Scipione
1f4de50d39 Style fixes to BMessageRunner, no functional changes intended 2015-01-16 18:00:27 -05:00
John Scipione
6fd099550f Style fixes to Messenger, no functional change intended 2015-01-16 16:43:33 -05:00
Axel Dörfler
d33e4744df IMAP: downloading mails is now working.
* Changed the way the attributes are written to make sure that everything
  that can be written once is in fact written just once.
* The rename code in BMailProtocol::_ProcessFetchedHeader() was broken,
  and caused the hang of the last commit.
2015-01-06 15:26:47 +01:00
Axel Dörfler
549949b26f Mail Kit: Changed how filter changes work.
* BMailFilter::HeaderFetched() now only alters the entry_ref, and returns
  B_MOVE_MAIL_ACTION to move a mail.
* Instead of potentially moving the file around several times, the
  BMailProtocol now takes care of carrying out the filter action just once,
  including trying to make the file name unique.
* This also allows the IMAP add-on to know the final location of the mail,
  and thus downloading a message actually works.
* However, with my test inbox, it currently hangs, and a current Debugger does
  not work on my older system -- I guess I need to update.
* Replaced the duplicated space mechanism within the "HaikuMailFormatFilter"
  that is substantially faster, and handles all whitespace, not just spaces.
  It will also replace tabs with spaces.
2015-01-06 15:26:37 +01:00
Axel Dörfler
f8b5e17a23 Minor cleanup. 2015-01-06 15:24:47 +01:00
Axel Dörfler
93608baf60 Clarified progress parameter names for the MailProtocol. 2015-01-06 15:24:14 +01:00
Axel Dörfler
4a8448ce34 Major coding style cleanup. 2015-01-06 15:23:33 +01:00
Axel Dörfler
518698c7e7 Removed commented out method in BMailSettingsView. 2015-01-06 15:23:10 +01:00
Axel Dörfler
ca3341c7b4 Major mail protocol/filter settings rework.
* Instead of abusing BArchive::Archive() we now use a BMailSettingsView as
  a base view for all filter/protocol settings that works with
  BMailAddOnSettings.
* Cleanups in E-mail which is now completely layout friendly. But also still
  crashes when changing the views.
2015-01-06 15:22:56 +01:00
Axel Dörfler
f90a3bbd67 Added support for letting user mail add-ons override system ones.
* The path will now be relativized before storing it.
* On load, the add-on will be tried to load from the user, then common
  and finally system add-on directory.
2015-01-06 15:22:37 +01:00
Axel Dörfler
1f87386b0a Now also loads mail settings from common.
* Also removed the superfluous and unused timeout argument from Save().
2015-01-06 15:22:28 +01:00
Axel Dörfler
bcf60bbb83 Fixed Mail build.
* The former kMsgBodyFetched (now B_MAIL_BODY_FETCHED, following the other
  message constant names in AppDefs.h) must be public.
2015-01-06 15:22:18 +01:00
Axel Dörfler
146357b547 Completed transition to the new mail API; ie. it compiles.
* Completely untested yet. Unlikely to work yet.
2015-01-06 15:21:55 +01:00
Axel Dörfler
383b34adac Moved ProtocolConfigView to headers/private/mail.
* This is by no means meant as a public header.
2015-01-06 15:21:50 +01:00
Axel Dörfler
715bf3d17a Work in progress of mail rework.
* Not everything compiles; all protocols, and inbound filters do, though.
* Renamed a few classes to give a better idea what they are for; prefixed
  public classes with the 'B' prefix.
* Moved ProtocolConfigView's classes into the BPrivate namespace.
* Moved BMailFilter into its own file.
* Added BMailFilter::DescriptiveName(). This is now used by the RuleFilter
  in order to give a description of what it's doing (ie. no more dozens of
  "Rule filter" entries in the preferences).
* Removed no longer used MailAddon.h.
* Renamed Addon to AddOn where found, since that is more consistent with the
  rest of the API.
* Merged the former MailProtocol with the former MailProtocolThread; the
  differentiation between those two was pretty messy.
* All configuration views touched so far are now using the layout kit.
* The RuleFilter is currently broken functionality wise; I have not yet decided
  how to solve the stuff it uses (TriggerFileMove() does not exist anymore,
  for example).
* BMailAddOnSettings (formerly known as AddonSettings) now directly subclass
  BMessage; there are no Settings() and EditSettings() method anymore. The
  class uses a copy of itself to determine whether or not it has been changed.
* Lots of cleanup.
2015-01-06 15:21:36 +01:00
Axel Dörfler
0f11280e6d Minor MailNotifier cleanup.
* Renamed to BMailNotifier, as it's part of the public API.
* Renamed Notifier.{cpp|h} to DefaultNotifier.{cpp|h} as that's the class it
  implements.
* Made the mail counts uint32, and the byte counts uint64.
2015-01-06 15:21:31 +01:00
Axel Dörfler
e0676bb982 Fixed typo. 2015-01-06 15:21:26 +01:00
Adrien Destugues
a6f1bc984d BMessage::ReplaceData: potential corruption on realloc fail
The method would update the field offsets first, and would not restore
them in case of realloc failure, leaving them pointing to the wrong
place.
2014-12-24 11:52:02 +01:00
Adrien Destugues
207212972e BMessage: remove unimplemented GetPointer from headers and docs
* This was never implemented and no one noticed until now.
* A default value for a pointer doesn't make that much sense anyway, so
using the FindPointer method is fine.
2014-12-22 15:01:56 +01:00
John Scipione
b825666f3f Rename method parameter in header to match implementation 2014-12-19 19:58:56 -05:00
John Scipione
65dfd2c67c Documentation fixes for BTab and BTabView 2014-12-19 19:51:42 -05:00
John Scipione
f466445917 Changes to BTextControl for docs.
Also remove the non-ControlLook drawing code.
2014-12-18 20:45:44 -05:00
John Scipione
4a31c32620 Update locale docs to match new reality.
Created docs for NumberFormat, DateFormat, DateTimeFormat, and TimeFormat
and moved the docs from BLocale to the respective new file. Also
DurationFormat was updated as well.

doxygen once again compiles the docs without warnings.
2014-12-04 19:13:46 -05:00
John Scipione
5ae0cde363 Style fixes to BStringView related to docs 2014-12-04 17:56:24 -05:00
Adrien Destugues
529cd177b5 BFilePanel: allow to change the node flavors
There doesn't seem to be anything ini the implementation that would
cause a problem, as long as you don't try to change this while the
window is already open.
2014-12-04 09:26:49 +01:00
Adrien Destugues
3d06e082bc BOptionPopUp: move mennu setup to AttachedToWindow
* There is no need to delay this to AllAttached
* Apps may want to override the SetDivider, and doing it as late as
AllAttached can be annoying.

Fixes #10734.
2014-11-27 09:00:23 +01:00
Alexander von Gluck IV
f2b20f8804 SupportDef: Add B_COUNT_OF to get array element count.
* We implement this in a lot of places in a lot of
  ways. Lets add it to the SupportDef
2014-11-09 14:47:39 -06:00
Adrien Destugues
8007a392cf BMessage: add AddFlat taking a const BFlattenable
It seems the const was forgotten in the BeOS version. But there is no
reason not to have it.
2014-11-09 13:51:29 +01:00
Adrien Destugues
5ee2151e2c BHttpRequest: propagate SSL errors to listener
This way it's possible to handle them in applications.
2014-11-06 15:02:00 +01:00
Adrien Destugues
c86ad7f93b Add more features in BCertificate class
* Make it possible to extract more useful data from the certificate
* Also get the OpenSSL error message when a certificate can't be
validated. Send it to the verification failure callback so it can be
shown to the user.
2014-11-06 15:01:59 +01:00
Michael Lotz
3fe7b3f72c BString: Add ScanWithFormat convenience method. 2014-11-02 11:38:45 +01:00
Michael Lotz
969af8044a BString: Add format attribute to SetToFormatVarArgs. 2014-11-02 11:38:44 +01:00
Ithamar R. Adema
778611c7e6 fdt: humble beginnings of Flattened Device Tree
This isn't really a bus_manager yet, but just minimal support so
we can get rid of hardcoded ARM SoC support from the core kernel
code.

Needs lots of work, like proper handling of #address-cells and
the like. Also, generic attribute handling, device_manager
integration, and I could go on for hours ;)
2014-10-31 11:14:05 +01:00