Commit Graph

2563 Commits

Author SHA1 Message Date
Axel Dörfler
d880e2d91f BNetworkSettings: added Get*() by name methods. 2015-03-27 13:21:46 +01:00
Axel Dörfler
fd55fb6615 Moved net_server's settings to libbnetapi.
* As experimental API class BNetworkSettings.
* Added add/remove methods for interfaces, and services, too.
* Moved the conversion of the wireless networks into the settings class,
  too, so that it only gives out converted ones (but accepts both
  variants).
2015-03-27 13:21:46 +01:00
Axel Dörfler
3401ff7c2f BNetworkSettingsAddOn: added missing destructor. 2015-03-27 13:08:44 +01:00
Axel Dörfler
f6c7cf44b5 Network: integrated former hardware view from add-on.
* The interfaces logic is within the main application, so is the
  new interface view.
* Disabling/renegotiating does not work yet.
* Reveals a bug in some interface code; when you click on an ethernet
  device first, there is no place for the wireless menu. When you then
  press on a wireless device, it crashes in BMenuField code.
  In the other direction, there is then an empty space.
* Fixed list item width reporting.
2015-03-27 13:08:44 +01:00
Axel Dörfler
021ff1ca46 Network: no need for public constants. 2015-03-27 13:08:42 +01:00
Axel Dörfler
77db25ddc7 Network: moved add-on headers to the correct position.
* Ie. they've moved to headers/os/add-ons/network_settings now.
2015-03-27 13:08:41 +01:00
Axel Dörfler
0690387cd2 BServer/BApplication: added constructor for looper name.
* Added an extra looperName argument to the private BApplication
  constructor that BServer is using.
* This is now used to fix the ugliness that gave the registrar
  a different looper name, and even saves a string comparison.
2015-03-26 21:47:24 +00:00
Axel Dörfler
b7a87fd137 find_paths_etc(): added user/system only flags.
* B_FIND_PATHS_(USER|SYSTEM)_ONLY cause only the specified paths
  to be included in the result list.
2015-03-26 21:47:22 +00:00
John Scipione
83d5a5313d MessageFormat: Use int64 instead of off_t
They are effectively the same thing, but int64 is more generic.

I used an off_t because that is what Tracker passed in, yet, this could be
used in other places where an off_t doesn't make as much sense.
2015-03-04 15:40:55 -05:00
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