Commit Graph

1853 Commits

Author SHA1 Message Date
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
Michael Lotz 290ac5f9b5 Basically revert r41365. Remove the get_pci_info() function of ACPI again as it
turns out to be flaky, is a little bit of a hack anyway and performs unnecessary
operations. The functionality is now handled kernel side which optimizes those
problems away.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41372 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-08 01:15:39 +00:00
Michael Lotz 0fc2a29e52 Cleanup spaces vs. tabs. Probably those spaces were copied over from ACPICA
sources as they use 4 spaces instead of tabs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41366 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-07 17:07:04 +00:00
Michael Lotz 5789be33af Add a way to look up basic PCI info for an ACPI device. It works for retrieving
the base bus number and segment which is what we're using them for. It should
work generically, however I only tested it to look up PCI bridge devices.
The logic is a subset of what is done in AcpiEvPciConfigRegionSetup when setting
up the operation region for a PCI device.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41365 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-07 16:50:46 +00:00
Michael Lotz 63cffb7ee3 Add a way to store a new interrupt_line value to the PCI module. It both updates
the cached pci_info and writes the new value into PCI config space. Drivers
using either mechanism to enumerate devices will therefore get the updated
value.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41364 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-07 16:40:32 +00:00
Axel Dörfler 4296233f0e * Made the messed up BMessage* constructors private - since it only affects the
layout API, we probably can just phase it out after a while.
* Introduced new constructors, and added missing flags to one of them to make
  it more convenient to use.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41350 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-06 20:04:55 +00:00
Michael Lotz fbf6f924d3 * The integer type is actually 64bit, probably just a typo (from very long ago).
* Some automatic whitespace cleanup.

This makes the interrupt model change via kernel actually work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41340 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-06 04:28:39 +00:00
Stefano Ceccherini ab33d547d2 Fix build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41330 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-05 20:16:48 +00:00
Scott McCreary b676e13c3b Readded function declarations that were removed in r40397. These are needed for building Pe.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41327 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-05 19:41:52 +00:00
Fredrik Holmqvist 01de6adfba This opens up so many possiblities.
* ACPI module now has a get_possible_resources function.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-05 17:29:37 +00:00
Jonas Sundström b2d9843906 Add BString::IsEmpty() method.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41242 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-04-12 18:10:02 +00:00
Jérôme Duval 19c52a6cec some cosmetics
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41239 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-04-11 22:30:18 +00:00
Brecht Machiels 8e9e1577cc * added notify headers to the ACPI header (from actypes.h)
* adjusted acpi_battery accordingly



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41162 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-04-01 20:14:01 +00:00
Jonas Sundström 1ea9f437ea Fix for #7372. Don't use an uninitialized buffer. Some BString replacement of C strings. Replace Mail's ReadAttrString() function with the BNode method. Define a B_MAIL_ATTR_BCC.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41159 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-04-01 06:18:49 +00:00
Jonas Sundström 28373dd18a Remove superfluous function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41147 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-31 07:17:05 +00:00
Jonas Sundström ee6a2e5589 * Extend the Model class with a method bool HasLocalizedName().
* Disallow renaming of entries with localized names for now - this is meant to be temporary - and so far only in Tracker's Info window. Renames do not result in a change, visually, as the localized name hides the real name, and results in a bad user experience. One could possibly allow renames of the localized name, writing it back to the catalog. I've experimented with using BCatalogAddOn::SetString() but haven't been able to make it stick yet.
* Disallow renaming Trash in Tracker's Info window via Command-E.
* Adjust the argument order of BLocaleRoster::GetLocalizedFileName().
* Add a BLocaleRoster::GetLocalizedFileName() variant to look up another app's name given its signature and unlocalized, canonical name.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41126 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-27 18:38:05 +00:00
Jonas Sundström 560ff4478d Use resource definition files instead of DoCatalogs rule. Rename B_TRANSLATE_APP_NAME and related macros to the more generic B_TRANSLATE_SYSTEM_NAME, to also fits add-ons, folders, etc, and make 'System name' its standard context. Change CodyCam and PoorMan's app signatures to match the overall x-vnd.Haiku-App pattern. Some clean-up. Make SlideShowSaver build again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41103 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-25 22:13:48 +00:00
Clemens Zeidler 08606d49da Add settings to enable and disable in and outgoing mail accounts.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41077 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-22 10:28:22 +00:00
Jonas Sundström 6f477364cc Make BLocaleRoster::GetLocalizedFileName() take a const entry_ref& rather than a non-const entry_ref&. Remove private GetLocalizedFileName() from libtracker and make Tracker and Deskbar use the one in BLocaleRoster.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41075 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-22 01:35:38 +00:00
Jonas Sundström 85366cb58b Add BLocaleRoster::GetLocalizedFileName()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41074 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-21 23:23:57 +00:00
Clemens Zeidler a64bd5649d Write MAIL:name, MAIL:thread and MAIL:account attribute. The account id is now stored in MAIL:account_id. This requires to re-download all mails to write the correct attribute (sorry).
Fixes #7375.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41062 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-21 09:13:12 +00:00
Siarzhuk Zharski 4115645af6 Localization of some UI parts:
- context menu of the replicant dragger. Fixes #7363;
- default <empty> menu placeholder. Fixes #7072;
- other messages used in PrintJob, Dragger and ZombieReplicantView classes.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40991 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-17 20:25:44 +00:00
Jonas Sundström 2d4087c90a Cleanup. Addition of constructor BRect(float side), allowing e.g. BRect(B_LARGE_ICON).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40984 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-17 01:08:01 +00:00