[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 01/01: Fix saving unchanged plugin title. (bug #15403)
noreply at xfce.org
noreply at xfce.org
Fri Jan 10 19:30:09 CET 2020
This is an automated email from the git hooks/post-receive script.
g o t t c o d e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-whiskermenu-plugin.
commit 3127aebb0af9cb93039a36c697699052aedb4c26
Author: Graeme Gott <graeme at gottcode.org>
Date: Fri Jan 10 06:38:58 2020 -0500
Fix saving unchanged plugin title. (bug #15403)
---
panel-plugin/plugin.cpp | 1 -
panel-plugin/settings.cpp | 7 ++++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/panel-plugin/plugin.cpp b/panel-plugin/plugin.cpp
index 191843e..329103b 100644
--- a/panel-plugin/plugin.cpp
+++ b/panel-plugin/plugin.cpp
@@ -97,7 +97,6 @@ Plugin::Plugin(XfcePanelPlugin* plugin) :
{
// Load settings
wm_settings = new Settings;
- wm_settings->button_title = get_button_title_default();
for (int i = Settings::CommandSwitchUser; i < Settings::CommandLogOut; ++i)
{
wm_settings->command[i]->set_shown(false);
diff --git a/panel-plugin/settings.cpp b/panel-plugin/settings.cpp
index 8d8d736..444893b 100644
--- a/panel-plugin/settings.cpp
+++ b/panel-plugin/settings.cpp
@@ -18,6 +18,7 @@
#include "settings.h"
#include "command.h"
+#include "plugin.h"
#include "search-action.h"
#include <algorithm>
@@ -88,6 +89,7 @@ static void write_vector_entry(XfceRc* rc, const char* key, const std::vector<st
Settings::Settings() :
m_modified(false),
+ button_title(Plugin::get_button_title_default()),
button_icon_name("xfce4-whiskermenu"),
button_title_visible(false),
button_icon_visible(true),
@@ -326,7 +328,10 @@ void Settings::save(char* file)
xfce_rc_write_entry(rc, "custom-menu-file", custom_menu_file.c_str());
}
- xfce_rc_write_entry(rc, "button-title", button_title.c_str());
+ if (button_title != Plugin::get_button_title_default())
+ {
+ xfce_rc_write_entry(rc, "button-title", button_title.c_str());
+ }
xfce_rc_write_entry(rc, "button-icon", button_icon_name.c_str());
xfce_rc_write_bool_entry(rc, "button-single-row", button_single_row);
xfce_rc_write_bool_entry(rc, "show-button-title", button_title_visible);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list