Commit Graph

56270 Commits

Author SHA1 Message Date
Adrien Destugues
36a9daf663 Package kit: more style fixes.
Pointed out by Axel this time. Thanks!
2016-08-21 16:53:27 +02:00
Adrien Destugues
a22f114f7d chroot support in package kit: style fixes
- Catching an exception in the normal flow is not a good thing, instead,
  test before calling the function (I've been doing too much python
  lately)
- Avoid using uninitialized nodeRef if there is no system root and also
  no specified root in the message.

Thanks to Ingo or the code review.
2016-08-21 10:38:23 +02:00
Adrien Destugues
e0c25f9892 VESA: compare modes by index, instead of contents
We only compared the height, width, and depth of modes to decide if the
mode was already set. However, at boot, we may have these settings right
and other things not properly configured, preventing VESA to set a
working mode unless forced from the boot menu.

Fixes #12918
2016-08-20 16:37:13 +02:00
Adrien Destugues
928f78f5a3 FontDemo: localization security fixes
- Avoid use of fixed size buffer without checks, use BString.SetToFormat
  instead.
- Use the same format for the initial setting of the values, so there
  are less strings to translate, and locales using a different
  representation for numbers get the right thing done as well.
- Fix initial label for the outline slider, which did not show the value
  unlike others (problem spotted by Diver, thanks!)
2016-08-20 14:16:17 +02:00
Kacper Kasper
13300cf63a Expander: fix status view.
* Truncate() would cut Unicode characters in the middle.
* This commit removes arbitrary message length limit as well as workaround
  it was needed for and fixes #5289.
* Status view now expands to maximum possible width and cuts the status
  message if necessary using TruncateString().

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

* Minor whitespace fix.
2016-08-20 07:57:55 +02:00
Adrien Destugues
6262ccbbe8 Fix use of findpaths from inside chroot
The package kit needs to provide the package daemon with the node_ref of
the root directory, so the package daemon gives the correct results when
the request comes from inside a chroot.

Moreover, the package kit must be able to handle a root with a system
but no home package dir, as is the case inside the chroot environment
created by haikuporter.

Fixes #12602.
2016-08-20 07:57:52 +02:00
John Scipione
23a6a63e83 Keymap: Follow symlink
get_ref_for_path() doesn't resolve symlinks.

Construct a BEntry from the path passing 'true' for the traverse
argument. That BEntry is then be passed to BDirectory's constructor.

The error was hidden by the fact that the code didn't bother to error
check the result of get_ref_for_path(), which would have indicated that
the passed in path was a link.

Thanks Rene for your help.

if the entry fails to init, we are probably screwed, but, try to get
the path using get_ref_for_path in that case. Worst case scenario it
fails as well and the FilePanel points to your home directory.
2016-08-19 11:09:02 -07:00
John Scipione
3d2f4db565 Keymap: Reinitialize ref after creating Keymap dir
In the case that the Keymap directory does not exist and has to
be created, reinitialize ref to the newly created directory.

Thanks Stippi for your help

There is still a bug present where if the Keymap directory is a
symlink to another directory, the File Panel does not follow that
link and instead opens to your home directory. More on this later.
2016-08-19 10:28:49 -07:00
John Scipione
29f04e867a Revert "Keymap: Handle uninitialized ref"
This reverts commit 1e5f78f522.
2016-08-19 10:13:44 -07:00
John Scipione
1e5f78f522 Keymap: Handle uninitialized ref
...trying to get/make Keymaps settings dir if not able to create
the Keymaps directory under settings.

Resolve symlink, if it is a directory, use that directory instead,
otherwise use home directory as a fallback.
2016-08-18 18:26:43 -07:00
John Scipione
46b84951f7 Appearance: Make color which items draggable
Create a ColorWhichListView class which impliments InitiateDrag()
to drag a color square out of the list view. You can then drop the
color anywhere that accepts a color drop. This allows you to drag
and drop colors between list items for example.
2016-08-18 16:36:46 -07:00
John Scipione
2446f53bc8 BListView: Impliment autoscroll
BeOS had a feature where you could click on a list and while holding
down the mouse button scroll through the list items selecting them
as you went. I implemented the same feature on Haiku.

Did the work in separate thread which makes sure that the mouse
is held down the whole time even if you leave the view.

Thanks Diver for bringing this feature to my attention.
2016-08-18 16:36:46 -07:00
John Scipione
a98f98b744 BListView: check message not NULL, grab buttons and modifiers 2016-08-18 16:36:45 -07:00
John Scipione
ccd7f24f11 BListView: Initialize all fTrack params to default 2016-08-18 16:36:45 -07:00
John Scipione
dc6233fcf4 BListView: Check index non-negative, not only not -1 2016-08-18 16:36:44 -07:00
John Scipione
e10ca8cd1b BListView: Use std::max() and std::min()
... in place of max_c() and min_c() respectively.
2016-08-18 16:36:44 -07:00
John Scipione
9dfd244e92 BListView: Style fixes
* Rename kDoubleClickTresh to kDoubleClickThreshold
  and use floating point in rval
* Pointer (*) goes with type for property var
* Use {}'s for multi-line if conditional
* rename point to where (consistent with header and rest of IK)
* Explicitly compare with 0 for bitwise operator statements
* Rename InitiateDrag() params
2016-08-18 16:36:28 -07:00
Automatic Committer
9c48b844fd Update usb.ids from www.linux-usb.org 2016-08-18 05:20:21 +02:00
John Scipione
661e7652d7 Revert "Keymap: Check return value of get_ref_for_path"
This reverts commit 14698e0432.
2016-08-17 08:54:21 -07:00
John Scipione
e8fc10dee7 Keymap: Refactor _LoadSettings()
Instead of filling out the path into a BString and using it in the calling method,
call _SetKeyboardLayout() directly using the path found.

Also use a plain const char* array instead of BString because we don't need
the added functionality.

The return value now reflects whether or not the window frame was loaded.

Check the return value on the caller side and only use the resulting window
frame if it is B_OK, otherwise CenterOnScreen().
2016-08-16 15:39:50 -07:00
John Scipione
ec55352ea6 Keymap: Fix saving keyboard layout
The function would stop prematurely after the first submenu whether it
found a layout or not.

Now stop when you have has an initialized path or end of menu

Fixing saving keyboard layout also fixes loading layout which fixes #3918

How did this silly bug live so long?
2016-08-16 15:01:47 -07:00
John Scipione
14698e0432 Keymap: Check return value of get_ref_for_path
if not B_OK, create BFilePanels with default directory

This should never happen but better than crashing on a NULL ref
2016-08-16 14:55:36 -07:00
Humdinger
e85c33517c Add package for webfont FontAwesome
Install this font to see all those icons WebPositive currently
fails to display e.g. at the discussion forum at
https://discuss.haiku-os.org

Thanks PulkoMandy for pointing this out!
2016-08-15 18:06:25 +02:00
Humdinger
a4f6437c30 Added package for TimeTracker
TimeTracker lets you create tasks for your various projects and
shows them in a list. Via double-click on an entry you start/stop the timer
on that task, thus helping you keep track of how much time you spend doing
what.
2016-08-15 08:19:09 +02:00
Adrien Destugues
c92f19c6e8 Fix definition of _setjmp
The #pragma weak does not work, the symbol is not defined and when
already defined, it is not made weak. Moreover, it does not make the
symbol global so we need to declare it with a FUNCTION.

If we want the symbol to be weak, then we should use .weak to do so. The
_longjmp symbol should also be changed to match, in that case.

Fixes #12912.
2016-08-14 09:18:07 +02:00
Rene Gollent
8471ec3d56 libdebugger: Fix #12913.
ThreadHandler:
- When single stepping, verify that current instruction pointer is
  actually within a valid image. Otherwise we'll crash attempting to
  retrieve debug information for it.
2016-08-13 21:24:00 -04:00
Rene Gollent
b7012e6c46 libdebugger: Fix #12914.
DwarfImageDebugInfo:
- While computing return value locations, we need to re-evaluate
  the availability of debug information as we're forced to traverse
  around images to resolve the location of a function call. Otherwise,
  we may crash as one of the called functions may belong to an image
  that wasn't compiled with debug info.
2016-08-13 21:23:11 -04:00
Augustin Cavalier
4fecb09f14 libroot: Ship empty libpthread.a and libm.a for POSIX and general compatibility.
A few weeks back, I spotted in the Musl FAQ that they apparently ship
empty libm.a and libpthread.a files (https://www.musl-libc.org/faq.html),
which they said was for POSIX compatibility. A bit of digging got me to
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html which
says:

> It is unspecified whether the libraries libc.a, libl.a, libm.a, libpthread.a,
> librt.a, [OB] [Option Start] libtrace.a, [Option End] libxnet.a, or liby.a
> exist as regular files. The implementation may accept as -l option-arguments
> names of objects that do not exist as regular files.

So to follow the letter of the law, we only need to have the "c99" command
accept these; however, it appears all Linux and BSD cstdlibs accept them
no matter what compliance mode is in effect.

Discussed with PulkoMandy. This will make HaikuPorts' job a lot easier...
2016-08-13 11:16:06 -04:00
John Scipione
2fd8e2811a Keymap: Add layout files to beginnning of menu
...so they are sorted alphabetically.
2016-08-12 12:37:03 -07:00
John Scipione
2cad94c1c3 Whitespace only changes in jam files 2016-08-12 12:37:03 -07:00
Humdinger
715298cb2b Updated youtube-dl package to 2016.08.12 2016-08-12 10:34:39 +02:00
John Scipione
bd4ea6563f BMenuItem: Style fixes
* explict NULL check
* explicit boolean comparison and pointer style fixes
2016-08-09 16:08:59 -07:00
John Scipione
b0a7a75ab1 Webpositive: 80-char limit style fix 2016-08-09 16:08:18 -07:00
Jérôme Duval
d216db039f Rebuild libwebp package on x86_64. 2016-08-09 23:01:58 +02:00
Adrien Destugues
0ac4c71da3 Add icons to more of the servers.
These are not perfect, but better than using the default app icon. Feel
free to improve.

- DNS resolver: phonebook icon
- App-server: hand + app icon
- Keystore: key lock
- Launch daemon: croissant (to get the day started)
- Net server: hand + earth
- Package daemon: hand + package
- Power daemon: CF lightbulb
2016-08-07 22:06:24 +02:00
Jérôme Duval
1e2bf1417a Update libvorbis package for x86_gcc2. 2016-08-07 21:22:34 +02:00
Adrien Destugues
02cb3dd440 netconsole: style fixes, add FIXME 2016-08-07 13:46:12 +02:00
Adrien Destugues
c2ddcb7957 elf.h: also define SELFMAG
- Used by distcc when it detects elf.h.
2016-08-07 13:39:27 +02:00
Adrien Destugues
289e59b770 jpeg: update to version 9b.
- Packages for version 9 has a broken "provides" entry (version 9
  instead of 9.0.0 for the lib) which confuses haikuporter.
2016-08-07 13:25:46 +02:00
Fredrik Holmqvist
74ffd18dd5 Update ACPICA to 20160729
Changelog: https://acpica.org/sites/acpica/files/changes_34.txt

Mostly minor fixes and ACPI 6.0 work since latest update.
2016-08-07 10:07:25 +02:00
Fredrik Holmqvist
e5ebfda19d Enable power button on 64 bit.
Works here. You may need to hold in for a second or two.
2016-08-07 00:46:27 +02:00
François Revol
8ddcab705e geode: fix build (atomics not volatile anymore) 2016-08-06 22:12:20 +02:00
Adrien Destugues
8efb6db7b9 elf.h: rename ELF_MAGIC to ELFMAG
- This is how it is named in other versions of elf.h (Linux, glibc, possibly more)
- ELF_MAGIC is used by libelf for the same thing, and the defines conflicts,
  breaking libelf build on Haiku.
2016-08-06 20:32:47 +02:00
Adrien Destugues
b4aed463ac add WIP "netconsole" KDL add-on
Similar to Linux netconsole, this should send all debug output over UDP
to the broadcast address. It can be listened to with netcat or similar tools.
This could be an easy way to extract KDL info from a crashing machine
when no serial ports are available.

Does not work yet, help welcome.
2016-08-06 20:29:08 +02:00
Adrien Destugues
766f682338 Fix build and first runtime problem in network boot
The boot still crashes some time later, but at least it is easier to
test now.

- PackageFS included in the net boot archive
- Tell the system it is booted "from image" when netbooting
2016-08-06 20:29:08 +02:00
François Revol
d4cfae74c9 opensound: quit the node threads before recycling buffers on dtor
This works around a KDL in the driver due to the buffer address passed
to write() being unmapped in the destructor, and the driver doesn't
properly checks those yet (BeOS used to lock_memory() on read/write buffers).
2016-08-06 20:10:28 +02:00
John Scipione
6f222a3312 Drag and drop color from Appearance ColorPreview
You can drag a color square from the color preview and drop it
anywhere that accepts a color drop.

This allows you to use the color drop feature more readily
for example to change the desktop background color or change the
color of Deskcalc.

Also did some refactoring of ColorPreview class. Make it a BControl
which eliminates the enabled bool and invoker which both are handled
by the inherited BControl class.

Did some refactoring.
* Renamed a couple of class variables following convention
* Also renamed a couple of method parameters for the same reason

Don't call Draw() directly, this is frowned upon, instead use
Invalidate() so app server can draw at the appropriate time.
2016-08-04 21:21:41 -07:00
Axel Dörfler
eb69155bbf app_server: Fixed/documented uses of new without nothrow.
* This should fix all occurrences except for those in the drawing
  sub directory.
* In some cases, the use of new without nothrow was okay, though.
2016-08-04 22:52:40 +02:00
Axel Dörfler
f744935b65 app_server: Fixed broken ServerApp allocation.
* Did not use std::nothrow, but exceptions were not catched.
* MessageLooper::Run() now returns a status code.
* There are a lot more cases of a new without nothrow that need to
  be investigated.
2016-08-04 22:52:30 +02:00
Jérôme Duval
7503f9a84f Add packages for fluidlite. 2016-08-04 19:04:31 +02:00