lxqt-notificationd icon indicating copy to clipboard operation
lxqt-notificationd copied to clipboard

Toggle "Do not disturb" from tray

Open stefonarch opened this issue 3 years ago • 10 comments

Actually we have "Basic Settings" and "advanced". When clicking "Settings" in the tray icon (if unattended notifications is active) users arrive at the position setting, the have to switch to "advanced" to change settings.

  • [x] Toggle settings' positions
  • [x] rename Basic Settings > Position
  • [x] rename Advanced Settings > General (Settings)
  • [x] remove redundant title in "position"
  • [x] change icon?
  • [x ] move spacing and width settings in ~"Position"~ "Appearance"
  • [ ] Toggle "do not disturb" from tray menu

schermata-12-14-09-02

stefonarch avatar Dec 14 '21 07:12 stefonarch

I agree.

tsujan avatar Dec 14 '21 15:12 tsujan

Actually I'm not fully satisfied yet: When changing size and spacing users have to switch always between "General" and "Position" to have a preview.

So logically there should be "General Settings" and "Appearance and Position"; the latter should contain Size, Spazing and "show on screen with mouse cursor":

stefonarch avatar Dec 16 '21 07:12 stefonarch

Personally, I have no problem with the changes you suggested. They just need time. Since rearranging the code may introduce new bugs, it should be done with more care; otherwise, there's no obstacle.

tsujan avatar Dec 16 '21 07:12 tsujan

Stumbled open this, forgot it. Instead of a new issue I make a note here: "Do not disturb" is away some clicks, could there be an option in the tray menu to toggle it?

stefonarch avatar Nov 16 '22 16:11 stefonarch

could there be an option in the tray menu to toggle it?

It should be possible — although I don't remember the code ;)

BTW, we changed the layout; didn't we? Why is this still open?

tsujan avatar Nov 16 '22 17:11 tsujan

Oh, sorry, I didn't notice that you re-opened it because of your new suggestion.

tsujan avatar Nov 16 '22 17:11 tsujan

Happened the same to me, why is that open still? ;)

stefonarch avatar Nov 16 '22 17:11 stefonarch

Changed the title.

tsujan avatar Nov 16 '22 18:11 tsujan

This is quite messy now to understand, as it's partially achieved and the title has changed as it's about an enhancement (toggle "do not disturb" from systray). I edited the first post.

stefonarch avatar Jun 18 '23 12:06 stefonarch

I managed to get the item in the right click menu but not the action as m_area is not declared here and it should toggle "do not disturb", being a checkbox. https://github.com/lxqt/lxqt-notificationd/blob/63fdeb192b8e7bf0a131278393903de0b014e0cd/src/notifyd.cpp#L266

    // "Do not disturb"
    action = m_trayMenu->addAction(QIcon::fromTheme(QSL("notifications-disabled")), tr("Do not disturb"));
   // connect(action, &QAction::triggered, m_trayMenu, [] {
   // m_area->layout()->setDoNotDisturb(m_doNotDisturb);)}

   // "Options"
    action = m_trayMenu->addAction(QIcon::fromTheme(QSL("preferences-system")), tr("Options"));
    connect(action, &QAction::triggered, m_trayMenu, [] {
        QProcess::startDetached(QSL("lxqt-config-notificationd"), QStringList());
    });

stefonarch avatar Jun 18 '23 15:06 stefonarch