Home » Developing U++ » UppHub » DBus package for U++ (A D-Bus client side implementation for U++)
| Re: DBus package for U++ [message #62057 is a reply to message #62054] |
Wed, 16 September 2026 18:40   |
Oblivion
Messages: 1284 Registered: August 2007
|
Senior Contributor |
|
|
Hi,
DBusFileSelector is added to DBusLib package. It is now possible to do this with native desktop file choosers:
#include <DBusLib/DBusLib.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
StdLogSetup(LOG_FILE | LOG_COUT);
DBusConnection dbus;
if(!dbus.ConnectSession()) {
RLOG("D-Bus connection failed. " << dbus.GetErrorDesc());
Exit(1);
}
const char *filetypes = "Images\t*.png *.jpg *.jpeg\nText\t*.txt *.doc *.odt";
RLOG("Selected file(s): " << SelectOpenFiles(dbus, filetypes));
RLOG("Selected Folder: " << SelectDirectory(dbus));
// RLOG("Selected file content: " << SelectLoadFile(dbus, filetypes));
}
These one-liner functions all reflect Upp's own FileSel style. and allow opening, loading, saving files in a single line with native file selectors of available desktop (GNOME, KDE, etc.).
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
TerminalCtrl package https://github.com/ismail-yilmaz/Terminal
[Updated on: Wed, 16 September 2026 18:41] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Wed Sep 23 04:18:15 GMT+2 2026
Total time taken to generate the page: 0.00579 seconds
|