[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 129/473: Fix duplicate all applications sidebar button.

noreply at xfce.org noreply at xfce.org
Mon Feb 16 23:54:59 CET 2015


This is an automated email from the git hooks/post-receive script.

gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.

commit 993de8fd07bc017e2dda79ce50248c97d3feb967
Author: Graeme Gott <graeme at gottcode.org>
Date:   Fri Jul 19 17:16:19 2013 -0400

    Fix duplicate all applications sidebar button.
---
 src/applications_page.cpp |   10 +++++++---
 src/applications_page.hpp |    1 +
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/applications_page.cpp b/src/applications_page.cpp
index 09fdcdc..72cb6ac 100644
--- a/src/applications_page.cpp
+++ b/src/applications_page.cpp
@@ -36,6 +36,7 @@ ApplicationsPage::ApplicationsPage(Menu* menu) :
 	FilterPage(menu),
 	m_garcon_menu(NULL),
 	m_current_category(NULL),
+	m_all_button(NULL),
 	m_loaded(false)
 {
 	// Set desktop environment for applications
@@ -172,6 +173,9 @@ void ApplicationsPage::load_applications()
 void ApplicationsPage::clear_applications()
 {
 	// Free categories
+	delete m_all_button;
+	m_all_button = NULL;
+
 	for (std::vector<Category*>::iterator i = m_categories.begin(), end = m_categories.end(); i != end; ++i)
 	{
 		delete *i;
@@ -292,9 +296,9 @@ void ApplicationsPage::load_categories()
 	std::vector<SectionButton*> category_buttons;
 
 	// Add button for all applications
-	SectionButton* all_button = new SectionButton("applications-other", _("All"));
-	g_signal_connect(all_button->get_button(), "toggled", G_CALLBACK(ApplicationsPage::apply_filter_slot), this);
-	category_buttons.push_back(all_button);
+	m_all_button = new SectionButton("applications-other", _("All"));
+	g_signal_connect(m_all_button->get_button(), "toggled", G_CALLBACK(ApplicationsPage::apply_filter_slot), this);
+	category_buttons.push_back(m_all_button);
 
 	// Add buttons for categories
 	for (std::vector<Category*>::const_iterator i = m_categories.begin(), end = m_categories.end(); i != end; ++i)
diff --git a/src/applications_page.hpp b/src/applications_page.hpp
index ded1d83..a60f921 100644
--- a/src/applications_page.hpp
+++ b/src/applications_page.hpp
@@ -60,6 +60,7 @@ private:
 private:
 	GarconMenu* m_garcon_menu;
 	Category* m_current_category;
+	SectionButton* m_all_button;
 	std::vector<Category*> m_categories;
 	std::map<std::string, Launcher*> m_items;
 	bool m_loaded;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list