danielborgesoliveira / onedrive_tray Goto Github PK
View Code? Open in Web Editor NEWOneDrive system tray program
License: GNU General Public License v3.0
OneDrive system tray program
License: GNU General Public License v3.0
Currently, the text color in the recent events window appears blue on a dark background, which can hinder readability. This issue request proposes a change to the text color to improve visual clarity and user experience.
Why the help pages list the repo of boforest76?
For example window.cpp
line 356:
"Feel free to clone and improve this program (https://github.com/bforest76/onedrive_tray).
"));
Hello,
I'm trying to make a rpm and I'd like to know what is the license for onedrive_tray. Can you please add a license file?
Thank you
Hi Folks,
using onedrive v2.4.25-1+np1 (abraunegg) i found out, that no sync happens when a file has been changed on the Microsoft server.
In this cases, i had to do perform a "systemctl restart --user onedrive_tray.service" or i have to do some local changes in my ~/OneDrive Folder.
Is that right?
Greetings,
Joerg
I am getting this error on OpenSuse tumbleweed
[../main.cpp: In function ‘int main(int, char**)’:
../main.cpp:16:26: error: ‘AA_UseHighDpiPixmaps’ is not a member of ‘Qt’
16 | app.setAttribute(Qt::AA_UseHighDpiPixmaps);
| ^~~~~~~~~~~~~~~~~~~~
../main.cpp:19:9: error: ‘class QApplication’ has no member named ‘setApplicationDisplayName’; did you mean ‘setApplicationName’?
19 | app.setApplicationDisplayName("System tray for OneDrive");
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| setApplicationName
../main.cpp:24:5: error: ‘QCommandLineParser’ was not declared in this scope
24 | QCommandLineParser parser;
| ^~~~~~~~~~~~~~~~~~
../main.cpp:25:5: error: ‘parser’ was not declared in this scope
25 | parser.setApplicationDescription("Run and control OneDrive from the system tray");
| ^~~~~~
../main.cpp:27:5: error: ‘QCommandLineOption’ was not declared in this scope
27 | QCommandLineOption onedrivePathOption(QStringList() << "p" << "onedrive-path", "Path to the OneDrive program", "path");
| ^~~~~~~~~~~~~~~~~~
../main.cpp:28:22: error: ‘onedrivePathOption’ was not declared in this scope
28 | parser.addOption(onedrivePathOption);
| ^~~~~~~~~~~~~~~~~~
../main.cpp:29:23: error: expected ‘;’ before ‘onedriveArgsOption’
29 | QCommandLineOption onedriveArgsOption(QStringList() << "a" << "onedrive-args", "Arguments passed to OneDrive", "args");
| ^~~~~~~~~~~~~~~~~~~
| ;
../main.cpp:30:22: error: ‘onedriveArgsOption’ was not declared in this scope
30 | parser.addOption(onedriveArgsOption);
| ^~~~~~~~~~~~~~~~~~
../main.cpp:31:23: error: expected ‘;’ before ‘silentFailOption’
31 | QCommandLineOption silentFailOption(QStringList() << "s" << "silent-fail", "No error message displayed when no system tray is detected");
| ^~~~~~~~~~~~~~~~~
| ;
../main.cpp:32:22: error: ‘silentFailOption’ was not declared in this scope
32 | parser.addOption(silentFailOption);
| ^~~~~~~~~~~~~~~~
../main.cpp:50:18: error: ‘class QDebug’ has no member named ‘noquote’
50 | qDebug().noquote() << "Translation not found for" << QLocale().languageToString(QLocale().language()) << "language" << QLocale().uiLanguages() << ".";
| ^~~~~~~
make: *** [Makefile:242: main.o] Error 1](url)
Earlier today I logged back in to onedrive after a password change, and restarted onedrive tray. Since then, every time I make a change in a file, I get the following output, and the file only exists locally, but not in onedrive.
12/22/22 1:07 PM OneDrive started
12/22/22 1:07 PM Uploading, Notes/StoryNotes/US16318.org
12/22/22 1:07 PM Deleting, Notes/StoryNotes/US16318.org
The 'Free Space' section of the system tray menu only currently works with the '--verbose' argument passed to abraunegg's onedrive utility. While this is usually the default for most users, this should either be explicity mentioned in the README.md, included in the onedrive_tray.service file, or in the extreme case it should be added if missing to the arguments (possibly with a flag to disable such behaviour? this would allow those who really want to disable it to do so).
At the moment it's a bit confusing that such a visually prominent feature doesn't appear to work without that setting.
Hi, nice extension for onedrive client but since I have several accounts (personal OneDrive, business OneDrive and SharePoint site) to sync I would like to set and always keep a different color for each account.
The color can be set from the menu but when I restart all icons get the same color.
Do you think it makes sense to add such an option ?
Thanks
In the paragraph where you explain how to create a translation, I suggest an auxiliary addendum because in case we don't have all the basis for programming in Qt, the 'lupdate' command ends up in error. So I would quote:
If "lupdate" responds with the error “could not exec /usr/lib/x86_64-linux-gnu/qt5/bin/lupdate: No such file or directory” execute:
$ sudo apt-get install qttools5-dev-tools
it is not working well. how can I remove it?
root@z390 /usr/local/bin # systemctl disable --user onedrive_tray.service [0]
Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using [email protected] --user to connect to bus of other user)
Hi all,
I'm on Linux Mint 20 cinnamon desktop. I can double-click to get the log and right-click to get the menu, but the left and middle mouse buttons don't do what the main page says they should (?) so I can't see any sync status etc.
Cheers,
Jack
I just created a Arch User Repo package for it: https://aur.archlinux.org/packages/onedrive_tray-git/
Eventually you could link it in the README.
Happens on archlinux with kde
It'd be nice to not warn that the program will keep running in the tray when I close the log. I use the log a lot, because that is the only place I can see information.
Hi,
I'm really excited to try this tool. Do you have a build command or makefile that you can add to the repo? I'd like to give this a shot, but I'm not sure how to link against QT
Hi, thanks for this cool piece of software first of all.
Got it running on Fedora 35 today, now I'm wondering if there's any way to persist the chosen icon color; it's a little less convenient that it changes back to blue whenever a new login is performed.
A switch for the launch script would be most welcome if you're maybe planning for a future version.
FYI within the next couple of weeks v2.5.0 will drop, and there are functionality differences (breaking changes) to how the client operates.
It would be worth validating this code against the v2.5.0-rc1 and/or making applicable changes if required.
If an error occurs with the onedrive client, the tray icon does not give an indication that there has been an error. Even clicking on the icon still shows "Synchronizing...". The only way to see that there has been a problem is by manually opening the Recent Events window and basically keeping that open at all times.
Suggestion:
If an error occurs from the onedrive client, change the tray icon to have a red X (or some other indication that something is wrong), and change the text "Synchronizing..." to "ERROR SYNCING" or similar.
In my case, I had changed my outlook password and updated all the other tools that rely on it, but had forgotten about this one. There could be other reasons for onedrive errors though.
Note that this might be similar to #14
using:
onedrive_tray --onedrive-path onedrive --onedrive-args "--monitor --confdir=~/.config/my-new-config"
not working:
searchIng QStringList should use regulär expressions instead and not adding +1 to notfoundValue==-1
Missing --confdir-Parameter should use ~/.config/onedrive/config as default
filePathes starting with ~ should be replaced by QDir::homePath()
PS:
think about create new process:
Hello,
I've compiled this for qt6 and icons are missing and I get the following errors. Any idea how to fix it?
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setCompositionMode: Painter not active
QPainter::end: Painter not active, aborted
edit:
I played some more and it looks like these errors caused because QPixmap was empty. If I set QPixmap pixmap(imageName) to QPixmap pixmap(128,128) i get an empty icon and can fill it with solid colors. I couldn't make svg work.
Hello Daniel,
Thanks a lot for your program, it's very useful !
I am writing a new version with some more features
My problem : I'm a new user of github and I don't know how to share my program and how to obtain your agreement for this new version. Must I create a fork ? Or something different ?
Best regards,
Bruno
Basically the title, I installed it using the command sudo make install
and enabled the systemctl service and started it. After that my folder appeared in the systray. Everything's fine so far. But when I click on "Open Folder" after right clicking on the icon, the service crashes and restarts after a few seconds.
It feels like the tray icon is counting my clicks to show the log, rather than using a "mouseDoubleClickEvent" or equivalent signal. Confusing because the first click doesn't seem to time out, so it can be in a state where it needs one or two clicks to open the log (unpredictable).
Sorry for the spam, thanks for the project! Very helpful to know onedrive is at least running without having to go to the system monitor.
I would suggest a QGridLayout for the log text widget to sit in, or something that allows me to make the text area taller, so I can see more of the log?
Thank you very much for your great work!
The icon works almost perfect, except for the situation that there are more icons added to the system tray when restarting the system. That means every time Linux restart, there is one more icon appears, and then another one, and so on.
I have to click Quit manually for each icon.
I am using Manjaro KDE.
Hope to solve this, and then everything is perfect!
Hello,
I have this error in the "recents events" window. And don't know whre to search the problem.
Thank you !
Joel
Example 👍
03/12/2023 17:45 OneDrive est lancé
03/12/2023 17:45 The database is currently locked by another process - cannot sync
03/12/2023 17:45 The database is currently locked by another process - cannot sync
03/12/2023 17:45 The database is currently locked by another process - cannot sync
03/12/2023 17:45 The database is currently locked by another process - cannot sync
03/12/2023 17:45 The database is currently locked by another process - cannot sync
03/12/2023 17:45 Copie depuis OneDrive, Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00358.jpg
03/12/2023 17:45 ERROR: The local file system returned an error with the following message: Error Message: Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00358.jpg: No such file or directory
03/12/2023 17:45 Copie depuis OneDrive, Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00355-3.jpg
03/12/2023 17:45 ERROR: The local file system returned an error with the following message: Error Message: Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00355-3.jpg: No such file or directory
03/12/2023 17:45 Copie depuis OneDrive, Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00353.jpg
03/12/2023 17:45 ERROR: The local file system returned an error with the following message: Error Message: Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00353.jpg: No such file or directory
03/12/2023 17:45 Copie depuis OneDrive, Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00352-3.jpg
03/12/2023 17:45 The database is currently locked by another process - cannot sync
03/12/2023 17:45 Copie depuis OneDrive, Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00349.jpg
03/12/2023 17:45 The database is currently locked by another process - cannot sync
03/12/2023 17:45 Copie depuis OneDrive, Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00351-2.jpg
03/12/2023 17:45 The database is currently locked by another process - cannot sync
03/12/2023 17:46 Copie depuis OneDrive, Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00347.jpg
03/12/2023 17:46 The database is currently locked by another process - cannot sync
03/12/2023 17:46 Copie depuis OneDrive, Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00350-2.jpg
03/12/2023 17:46 The database is currently locked by another process - cannot sync
03/12/2023 17:46 Copie depuis OneDrive, Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00346.jpg
03/12/2023 17:46 The database is currently locked by another process - cannot sync
03/12/2023 17:46 Copie depuis OneDrive, Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00345-3.jpg
03/12/2023 17:46 The database is currently locked by another process - cannot sync
03/12/2023 17:46 Copie depuis OneDrive, Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00343.jpg
03/12/2023 17:46 The database is currently locked by another process - cannot sync
03/12/2023 17:46 Copie depuis OneDrive, Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00342-3.jpg
03/12/2023 17:46 The database is currently locked by another process - cannot sync
03/12/2023 17:46 Copie depuis OneDrive, Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00340.jpg
03/12/2023 17:46 The database is currently locked by another process - cannot sync
03/12/2023 17:46 Copie depuis OneDrive, Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00339.jpg
03/12/2023 17:46 The database is currently locked by another process - cannot sync
03/12/2023 17:46 Copie depuis OneDrive, Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00337-3.jpg
03/12/2023 17:46 ERROR: The local file system returned an error with the following message: Error Message: Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00337-3.jpg: No such file or directory
03/12/2023 17:46 Copie depuis OneDrive, Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00335.jpg
03/12/2023 17:46 ERROR: The local file system returned an error with the following message: Error Message: Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00335.jpg: No such file or directory
03/12/2023 17:46 Copie depuis OneDrive, Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00333-3.jpg
03/12/2023 17:46 ERROR: The local file system returned an error with the following message: Error Message: Images/Stockage local Lightroom/Lightroom CC/4d226926d65143a5af85d6003d593ea7/originals/2009/2009-11-01/DSC00333-3.jpg: No such file or directory
Hello,
Compiling failed on Linux Mint 20.3 with
../window.cpp:217:77: error: ‘class QLocale’ has no member named ‘formattedDataSize’
217 | freeSpaceAction->setText(tr("Free space: ") + QLocale().formattedDataSize(freeSpace, 2, QLocale::DataSizeTraditionalFormat));
| ^~~~~~~~~~~~~~~~~
../window.cpp:217:118: error: ‘DataSizeTraditionalFormat’ is not a member of ‘QLocale’
217 | ace: ") + QLocale().formattedDataSize(freeSpace, 2, QLocale::DataSizeTraditionalFormat));
| ^~~~~~~~~~~~~~~~~~~~~~~~~
But, rather than fighting to maintain a more detailed compile instruction set, would you be willing to make a standalone AppImage or something we could just download?
Thanks,
Jack
Hi Folks,
when i perform a right-click on the tray icon, i got a "segmentation fault" failure after choosing "Open Folder".
How can i support you in troubleshooting?
Greetings from Germany,
Joerg
I have just build this from the AUR using YAY; I now however cannot execute the program using your guide. When using sudo cp systray /usr/local/bin/onedrive_tray
the response I get is cp: cannot stat 'systray': No such file or directory
Any advice?
Any plans to have the icon give me a friendly green check when things are good and a scary red exclamation when they are bad?
Can you implement that i.e. double-clicking the icon is a shortcut to the folder?
i try to compile in F37 and this is the error:
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../onedrive_tray -I. -I../../onedrive_tray -I/usr/include/qt6 -I/usr/include/qt6/QtWidgets -I/usr/include/qt6/QtGui -I/usr/include/qt6/QtCore -I. -I/usr/lib64/qt6/mkspecs/linux-g++ -o window.o ../window.cpp
../window.cpp: In member function ‘void Window::createActions()’:
../window.cpp:474:43: error: invalid use of incomplete type ‘class QActionGroup’
474 | iconColorGroup = new QActionGroup(this);
| ^
In file included from /usr/include/qt6/QtWidgets/qwidget.h:11,
from /usr/include/qt6/QtWidgets/qframe.h:8,
from /usr/include/qt6/QtWidgets/qabstractscrollarea.h:8,
from /usr/include/qt6/QtWidgets/qtextedit.h:8,
from /usr/include/qt6/QtWidgets/qplaintextedit.h:8,
from /usr/include/qt6/QtWidgets/QPlainTextEdit:1,
from ../window.h:5,
from ../window.cpp:1:
/usr/include/qt6/QtGui/qaction.h:21:7: note: forward declaration of ‘class QActionGroup’
21 | class QActionGroup;
| ^~~~~~~~~~~~
../window.cpp:490:23: error: invalid use of incomplete type ‘class QActionGroup’
490 | iconColorGroup->addAction(iconColorAction);
| ^~
/usr/include/qt6/QtGui/qaction.h:21:7: note: forward declaration of ‘class QActionGroup’
21 | class QActionGroup;
| ^~~~~~~~~~~~
../window.cpp:497:19: error: invalid use of incomplete type ‘class QActionGroup’
497 | iconColorGroup->addAction(moreColorsAction);
| ^~
/usr/include/qt6/QtGui/qaction.h:21:7: note: forward declaration of ‘class QActionGroup’
21 | class QActionGroup;
| ^~~~~~~~~~~~
../window.cpp: In member function ‘void Window::createTrayIcon()’:
../window.cpp:532:44: error: invalid use of incomplete type ‘class QActionGroup’
532 | submenuColor->addActions(iconColorGroup->actions());
| ^~
/usr/include/qt6/QtGui/qaction.h:21:7: note: forward declaration of ‘class QActionGroup’
21 | class QActionGroup;
| ^~~~~~~~~~~~
make: *** [Makefile:402: window.o] Errore 1
At least on Fedora, the onedrive package already installs a systemd unit that starts onedrive.
It seems that the tray app is trying to start onedrive again, which causes the following error:
11/23/22 5:22 PM OneDrive started
11/23/22 5:22 PM ERROR: onedrive application is already running - check system process list for active application instances
Is this expected? If so, could the docs be updated to say the original systemd unit should be uninstalled?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.