[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 08/09: Fix saving unchanged plugin title.
noreply at xfce.org
noreply at xfce.org
Sat Jan 18 16:26:30 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 a n n o t a t e d t a g v 2 . 3 . 5
in repository panel-plugins/xfce4-whiskermenu-plugin.
commit 5b631f3921dc9d98a804718edee049da30d29508
Author: Graeme Gott <graeme at gottcode.org>
Date: Fri Jan 10 06:38:58 2020 -0500
Fix saving unchanged plugin title.
---
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 4a01151..9c99e24 100644
--- a/panel-plugin/plugin.cpp
+++ b/panel-plugin/plugin.cpp
@@ -95,7 +95,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 e33d91d..1877e44 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),
@@ -324,7 +326,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