Commit Graph
100 Commits
Author SHA1 Message Date
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 a08f5ecbe3 Revert "BNetworkInterfaceAddress: missing initialization"
This reverts commit fbc43a7279.
2015-02-05 11:07:50 +01:00
Axel Dörfler 89a406bc52 vesa: don't switch to the current mode.
* If a mode change is requested, check if it is equivalent to the
  current one, and don't do anything in this case.
2015-02-04 21:08:17 +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 10203293d1 Removed minimize_all again from the image.
* It's not only broken conceptionally, but also it's implementation
  is: it unconditionally filters all ctrl-cmd(-shift) key combinations.
* Since it's functionality should be implemented differently in the
  first place, it should be removed completely, though.
2015-02-02 22:13:49 +01:00
Axel Dörfler 17f8ccc06c Network: use BLayoutBuilder, more cleanup.
* Instead of the deprecated GroupLayoutBuilder.
* Ordered headers correctly, use headers directly instead of including
  InterfaceKit.h.
* Also, guarded the profile sections in their ENABLE_PROFILES
  definition.
2015-02-01 22:04:49 +01:00
Axel Dörfler 3427ae3942 Network: fixed wrong signature.
* I accidentally replaced the signature for NetworkStatus with the
  one from the preferences app.
2015-01-28 18:29:42 +01:00
Axel Dörfler 03b57bdc55 Removed BRoster::Launch() const args kludges.
* They are no longer needed, as Launch() no longer takes a
  const-less char array.
2015-01-28 17:06:32 +01:00
Axel Dörfler be883bad52 Network: style cleanup. 2015-01-28 17:05:06 +01:00
Axel Dörfler 2d9c195093 PowerStatus: use the design capacity if needed.
* When the last full capacity is not available, use the design
  capacity of the battery instead.
2015-01-28 16:12:21 +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
Axel Dörfler 86f6a66bbe Mouse: make the buttons actually look pressed.
* Just making the font bold looks ugly, lazy Adrien :-)
2015-01-23 21:00:37 +01:00
Axel Dörfler 27231d807a ActivityMonitor: changed full legend width behavior.
* Only use the full width if there is only a single item, otherwise
  I think it's more confusing than helpful.
2015-01-23 21:00:36 +01:00
Axel Dörfler 9b2f561908 Mouse: minor cleanup.
* Removed no longer used class members.
* Synchronized implementation and declaration order.
2015-01-23 21:00:34 +01:00
Axel Dörfler 637cd3124e Mouse: slightly improved the look of the mouse.
* Made it a bit longer, and let the button outline stand out less.
2015-01-23 21:00:33 +01:00
Axel Dörfler be9609b91c Mouse: made the shadow an actual shadow. 2015-01-23 21:00:32 +01:00
Axel Dörfler ddf7ecfaa9 E-mail: take fCheckMailCheckBox into account on save.
* Only the time you entered mattered (ie. 0 would have turned
  the auto check off).
2015-01-23 21:00:30 +01:00
Axel Dörfler 88fed28aff MediaPlayer: reworked info window to use layout API.
* Use BStringViews instead of BTextView - it's more flexible (truncation,
  and tool tips), and allows for fine grained updates.
* The file name and location views are now showing tool tips with their
  full contents.
* Also, its look is now less exotic, if boring.
2015-01-23 21:00:29 +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
Axel Dörfler 8b6e513a2e BFS: _SplitNode() could overflow the new node.
* When the keys were large enough, a large key entering the node could
  overflow the available data in the target node. This caused tree and
  memory corruption.
* This fixes bug #6034.
2015-01-19 21:21:12 +01:00
Axel Dörfler f1dd9654ed BFS: Made bplustree_header::CheckNode() use const node. 2015-01-19 21:21:11 +01:00
Axel Dörfler 7fb1396861 BFS B+tree test: use set to ensure string uniqueness.
* The previous solution was rather slow, and also could produce
  duplicates under some circumstance.
2015-01-15 20:30:50 +01:00
Axel Dörfler 9b61a43ad6 MediaPlayer: make sure info window is on screen. 2015-01-15 20:30:48 +01:00
Axel Dörfler aeb121ec03 Sudoku: consolidated set value code paths.
* Renamed _ToggleValue() to _SetValue(), and only let it do that.
* It's now called from _InsertKey(), and _SolveSingle() as well which
  results in a correct visual update (ie. completed values, and the
  value hints are updated correctly).
* _SolveSingle() would also not test for a completed game.
2015-01-15 20:30:46 +01:00
Axel Dörfler 758cfd808a BFS B+tree test: style cleanup. 2015-01-15 20:30:45 +01:00
Axel Dörfler f982c9ed88 BFS btreeTest: fixed DEBUG build. 2015-01-15 20:30:43 +01:00
Axel Dörfler e3debc9e26 Sudoku: remove hints when setting a value.
* When you set a value, all then superfluous hints are removed
  automatically now.
2015-01-09 08:57:41 +01:00
Axel Dörfler fc64ef86ff Sudoku: reordered SudokuView's methods.
* Their declaration order now matches their implementation order.
2015-01-09 08:57:39 +01:00
Axel Dörfler 50e3347692 Sudoku: minor refactoring.
* Pulled _Toggle[Hint]Value() methods out of MouseDown().
2015-01-09 08:57:38 +01:00
Axel Dörfler 070e77cc59 PowerStatus: added note battery color.
* When the capacity drops below 30%, it now turns yellow.
2015-01-08 15:37:00 +01:00
Axel Dörfler e889ce2519 PowerStatus: fixed how the info is retrieved.
* The state was usually 0 once there was more than one battery
  slot.
* We now ignore missing batteries completely, instead of taking
  eventually bogus data into account.
* Fixed how to determine fOnline, and fHasBattery, and when to ignore
  probes.
* Made it more strict when to show the notification, ie. it's now only
  shown when actually discharging.
* This fixes all spurious notifications for me.
2015-01-08 15:36:57 +01:00
Axel Dörfler b19e9d5b71 PowerStatus: improved API, minor fixes.
* ioctl() does not return a status_t; fixed its usage.
* Do not overwrite the cached battery info with bogus data (this is
  quite strict, though).
* Improved DriverInterface API with a more "natural" argument order.
* Simplified some code.
2015-01-08 15:36:55 +01:00
Axel Dörfler 90169e6310 PowerStatus: give the locker a name.
* Plus minor cleanup.
2015-01-08 15:36:52 +01:00
Axel Dörfler 6f04ad0358 ACPI: increased acpi DPC thread priority.
* Since the power status outages only happen on load, it's likely
  that we run some code too late (I haven't looked at the ACPI specs,
  though).
* In any case, I now get wrong results much less often.
2015-01-08 15:36:49 +01:00
Axel Dörfler 4fe2002b47 IMAP: fixed GCC4 build. 2015-01-08 15:36:47 +01:00
Axel Dörfler 4772658841 E-mail: fixed GCC4 build. 2015-01-06 18:41:01 +01:00
Axel Dörfler 4601929263 IMAP: let mail retrieval scale better.
* We now also maintain a mail index -> UID array in IMAPMailbox.
* Instead of fetching the message entries by a fixed range of UIDs, we use the
  message count, and get the entries by index.
* Likewise, in FetchHeadersCommand, we now get a list of UIDs rather than a
  range. This makes it possible to only download exactly the headers we want.
* Extended FetchCommand to be able to dynamically build a sequence list from
  a list of UIDs.
* Besides the suboptimal body fetching (one at a time, due to holes in the
  IMAP specification), we should now be able to retrieve the messages with
  pretty much optimal performance, while retaining an acceptable responsiveness
  to user requests.
2015-01-06 15:26:51 +01: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 cf14e7f21f Build fixes.
* Never built a complete image from the IMAP branch before.
2015-01-06 15:26:42 +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 c1f779e350 IMAP: FetchMessageEntriesCommand now also works without UIDs
* This will be used to solve the TODO in CheckMailboxesCommand::Process()
  when the initial message sizes/flags are retrieved.
* Also fixed imap_tester build.
2015-01-06 15:26:33 +01:00
Axel Dörfler 1052525dc5 IMAP: work in progress of downloading the mail body.
* Most things are in place now, we just try to download the body to the
  wrong file, as the final location is currently unknown.
* Added local only kPartialMessage flag for mails, but it's not being
  used yet.
2015-01-06 15:26:28 +01:00
Axel Dörfler dcb85ffa51 IMAP: if connecting fails, try again a few times.
* Also documented SyncCommand.
2015-01-06 15:26:24 +01:00
Axel Dörfler e9a197ffff IMAP: make the body fetch limit setting available.
* This is set by the ProtocolConfigView -- there should really be
  some constant for this.
2015-01-06 15:26:19 +01:00
Axel Dörfler 8705e1f6e7 mail_daemon: cleanup, 30s auto check startup delay.
* Refactored new message retrieval a bit, so that the notification strings
  aren't duplicated.
* The daemon now waits 30 seconds before doing the first mail check.
2015-01-06 15:26:14 +01:00
Axel Dörfler 29e5da6f20 IMAP: allow only one sync at a time, divided header fetching.
* CheckMailboxesCommand, and FetchHeadersCommand now inherit from SyncCommand
  which will prevent new CheckMailboxesCommand to be enqueued.
* FetchHeadersCommand now only retrieves up to kMaxFetchEntries headers at
  once. This gets the same TODO about scaling as the limit in
  CheckMailboxesCommand when fetching the flags/UIDs. Since we already read
  all new UIDs at that point, we could easily do better there, though.
2015-01-06 15:26:10 +01:00
Axel Dörfler aebdd0c14b IMAP: call the folder's handler like the mailbox. 2015-01-06 15:26:05 +01:00
Axel Dörfler 4b2c5571c0 IMAP: sync when requested. 2015-01-06 15:26:00 +01:00
Axel Dörfler 47b68f5806 IMAP: IMAPFolder now stores the last UID.
* So mails are no longer downloaded every time.
2015-01-06 15:25:56 +01:00
Axel Dörfler 28ee6c2839 IMAP: Use useful default without destination.
* We now use the account name as destination directory.
* Turns out that an empty string is written as destination which worked
  around the GetString() solution.
2015-01-06 15:25:51 +01:00
Axel Dörfler eba458b940 imap: Fetching headers is now working.
* No state is stored yet, though, so that all messages will be downloaded
  over and over again.
2015-01-06 15:25:47 +01:00
Axel Dörfler c500331f66 BSecureSocket: prepared to do SSL error conversion.
* For now, just print them to stderr; we don't really have matching error
  codes yet AFAICS.
2015-01-06 15:25:42 +01:00
Axel Dörfler a6b84a0c57 BBufferedDataIO: the underlying stream might return an error.
* In this case, fSize would have been set incorrectly, ignoring the error
  completely, but open the possibility to read from uninitialized or even
  unmapped memory.
2015-01-06 15:25:37 +01:00
Axel Dörfler 3302df142e imap: WIP of getting fetching headers to work.
* Changed the FetchListener mechanism quite a bit.
* Doesn't seem to work correctly yet, although most pieces are in
  place now.
2015-01-06 15:25:33 +01:00
Axel Dörfler 9234fd439e imap: Implemented encoding RFC3501 strings.
* Was completely missing so far.
* Fixed bug in decoding that handled the "&-" sequence incorrectly.
* Added small test application that should easily be convertible to
  a unit test.
2015-01-06 15:25:28 +01:00
Axel Dörfler 229c777323 imap: Testing for new messages is now working.
* There is now a CheckSubscribedFoldersCommand that is issued on the main
  connection that triggers everything.
* The new CheckMailboxesCommand divides the new mail check into several
  portions, and requeues itself until the next step, ie. the
  FetchHeadersCommand.
* The headers of the new mails are downloaded, but nothing is done with
  them yet.
* The actual check for the new mails doesn't scale that well yet, not sure
  how to properly do this without having to rely on the mail indices. Might
  be sensible to solve this via some simple heuristic.
2015-01-06 15:25:24 +01:00
Axel Dörfler 82f27de238 imap_tester: Fixed build after Protocol.GetFolders() changes. 2015-01-06 15:25:19 +01:00
Axel Dörfler 7993ddfaba imap: Fleshed out command processing.
* Still doesn't do anything useful, though.
2015-01-06 15:25:14 +01:00
Axel Dörfler a4bdd26d61 imap: Work in progress of connection setup.
* SelectCommand now correctly encodes the mailbox name again.
* Hierarchy separators from the LIST/LSUB commands are now properly parsed,
  and taken into account.
* Folders in the file system are now created for mailboxes on the server,
  supporting hierarchical mailbox names.
* A connection worker now has an IMAPFolder that handles the local side of the
  mailbox, and an IMAPMailbox that handles the server side.
* Connection workers are now created/deleted, and setup correctly. They will
  now also wait in case they don't have a mailbox until they get some.
2015-01-06 15:25:10 +01:00
Axel Dörfler adbe8fc944 IMAP: The connection workers are now started.
* On SyncMessages(), the main connection worker is started if it is not already
  running (it may only run already in idle mode).
* This will then list the subscribed folders, and create as many more connection
  workers as allowed and make sense.
* Finally, it will distribute the folders to the workers which don't do anything
  further yet.
2015-01-06 15:25:05 +01:00
Axel Dörfler bfe83adcb2 imap_tester: Fixed SSL build. 2015-01-06 15:25:00 +01:00
Axel Dörfler 4cab719ff2 mail_daemon: auto check message was leaked, send immediately.
* BMessageRunner does not take ownership of the message.
* Instead of waiting through the complete interval, we send an auto check
  message immediately after launch (or whenever else the timer is being
  started).
* Added constant instead of referring to 'moto' for the auto check message.
2015-01-06 15:24:56 +01:00
Axel Dörfler c67313f3c3 imap: added Settings::MaxConnections()/IdleMode().
* Also made use of the new BMessage API for the existing methods.
2015-01-06 15:24:51 +01:00
Axel Dörfler f8b5e17a23 Minor cleanup. 2015-01-06 15:24:47 +01:00
Axel Dörfler 186c96d50c IMAP: Early work in progress of main protocol class. 2015-01-06 15:24:42 +01:00
Axel Dörfler 3ab3f57ad2 IMAP: FolderList is supposed to be an interface.
* Made its methods pure virtual.
2015-01-06 15:24:37 +01:00
Axel Dörfler edf77456f2 IMAP: close folder config window on error, show message. 2015-01-06 15:24:33 +01:00
Axel Dörfler c9fb410e42 IMAP: fixed folder configuration.
* Store the settings, don't archive the view; removed leftovers of the
  old settings API.
2015-01-06 15:24:28 +01:00
Axel Dörfler d6ce6060b9 pop3: minor cleanup. 2015-01-06 15:24:24 +01:00
Axel Dörfler a9de7ece6b pop3: Fixed maintaining fSizes list, and more.
* The list was filled, but never emptied.
* If SyncMessages() was called more than once for the same POP3 instance,
  this could garble the mails retrieved in the second run.
* Maintain the total size of mails in fSizes to be able to report progress
  in more detail.
* Also adapted progress reporting to the argument changes made in MailProtocol
  earlier.
* Minor cleanup.
2015-01-06 15:24:19 +01:00
Axel Dörfler 93608baf60 Clarified progress parameter names for the MailProtocol. 2015-01-06 15:24:14 +01:00
Axel Dörfler 46851a74af BMessage::SetString() was broken.
* We cannot use the macro for this, unfortunately.
2015-01-06 15:24:10 +01:00
Axel Dörfler acee88be99 E-mail settings are now stored as they should.
* ProtocolSettingsView was still using Archive() instead of SaveInto().
* However, it looks like BMessage::Set*() does corrupt the message fields.
2015-01-06 15:24:05 +01:00
Axel Dörfler 8651ebbe7a Fixed stale config view pointer in E-mail.
* When removing an account (all accounts would be removed when the app
  was quit), AccountItem::ConfigPanel() was used to remove views.
* However, this member was only set when a new view was created, never when
  it was removed. This could cause a crash on quit.
* Removed that member completely, as it was unnecessary, anyway.
* Fixed naming of AccountItem getters to lose their Get* prefix.
2015-01-06 15:24:01 +01:00
Axel Dörfler dcb663f339 libmail: Fixed missing initialization in protocol view.
* This would cause a crash when the fields were actually not being
  used.
2015-01-06 15:23:56 +01:00
Axel Dörfler fa587d2956 The protocol config view now adds some glue at the bottom.
* This makes all boxes fill the complete height of the window.
* The SMTP add-on did that itself which makes no sense.
2015-01-06 15:23:51 +01:00
Axel Dörfler 4235da3061 Improved label of the button to configure the IMAP folders. 2015-01-06 15:23:47 +01:00
Axel Dörfler 22fc80c6e3 Align all protocol config view labels to the right. 2015-01-06 15:23:42 +01:00
Axel Dörfler 19d947eb7f The E-mail window's frame is no longer stored.
* This is part of a clean up of BMailSettings; storing the window
  position might be implemented again later -- it just doesn't
  belong there.
* Changed the logic when the daemon is set to auto start. It's now
  always started if at least a single account exists.
2015-01-06 15:23:38 +01:00
Axel Dörfler 4a8448ce34 Major coding style cleanup. 2015-01-06 15:23:33 +01:00
Axel Dörfler 81ec973846 Minor coding style fix. 2015-01-06 15:23:28 +01:00
Axel Dörfler 792843e8af Adapted IMAP to the new MailSettingsView API. 2015-01-06 15:23:24 +01:00
Axel Dörfler 006040d06e Adapted POP3, and Fortune to the new MailSettingsView API. 2015-01-06 15:23:19 +01:00
Axel Dörfler 1da1e5a166 Renamed BodyDownloadConfig to BodyDownloadConfigView. 2015-01-06 15:23:15 +01:00
Axel Dörfler 518698c7e7 Removed commented out method in BMailSettingsView. 2015-01-06 15:23:10 +01:00
Axel Dörfler 57b305558b MailProtocolConfigView now is a BMailSettingsView.
* Changed the private settings base classes to follow the new style.
* Made BodyDownloadConfig use the layout API.
* Adapted SMTP to these changes.
2015-01-06 15:23:06 +01:00
Axel Dörfler efd1602a79 Fixed debugger call in E-mail.
* The settings view is no longer a direct child of the protocol settings
  view.
2015-01-06 15:23:01 +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 a6943acbe0 Added missing BMessage::{Get|Set}String() methods.
* Forgot to add those before accidentally.
2015-01-06 15:22:51 +01:00
Axel Dörfler 5faab458af Reworked the mail preferences.
* Made it use the layout API.
* Removed options that no longer apply (dial-up, for example).
* Cleanup.
* There are a few issues left, though, for example, the BTextView is not
  correctly sized, and it currently crashes in the protocol panels.
2015-01-06 15:22:47 +01:00
Axel Dörfler 58b56ffc80 Improved mail protocol config view layout. 2015-01-06 15:22:42 +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 b448d260c3 Fixed mail daemon build.
* Removed cvs package leftovers.
2015-01-06 15:22:33 +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 9d8cf1b6f7 E-mail now also builds, but doesn't work yet. 2015-01-06 15:22:23 +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 e1e78d4deb Reset the daemon messenger after a successful Launch(). 2015-01-06 15:22:14 +01:00
Axel Dörfler daf972c99c Renamed MailDaemon{App|.cpp|.h} to MailDaemonApplication[.{cpp|h}]. 2015-01-06 15:22:09 +01:00