[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 130/473: Fix not showing items with duplicate text. Closes #22.

noreply at xfce.org noreply at xfce.org
Mon Feb 16 23:55:00 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 6a096c2a136fc38387b0087e9fd425b093955ba1
Author: Graeme Gott <graeme at gottcode.org>
Date:   Sat Jul 20 04:50:15 2013 -0400

    Fix not showing items with duplicate text. Closes #22.
---
 src/applications_page.cpp |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/applications_page.cpp b/src/applications_page.cpp
index 72cb6ac..f37533c 100644
--- a/src/applications_page.cpp
+++ b/src/applications_page.cpp
@@ -141,17 +141,17 @@ void ApplicationsPage::load_applications()
 	}
 
 	// Create sorted list of menu items
-	std::map<std::string, Launcher*> sorted_items;
+	std::multimap<std::string, Launcher*> sorted_items;
 	for (std::map<std::string, Launcher*>::const_iterator i = m_items.begin(), end = m_items.end(); i != end; ++i)
 	{
 		gchar* collation_key = g_utf8_collate_key(i->second->get_text(), -1);
-		sorted_items[collation_key] = i->second;
+		sorted_items.insert(std::make_pair(collation_key, i->second));
 		g_free(collation_key);
 	}
 
 	// Add all items to model
 	LauncherModel model;
-	for (std::map<std::string, Launcher*>::const_iterator i = sorted_items.begin(), end = sorted_items.end(); i != end; ++i)
+	for (std::multimap<std::string, Launcher*>::const_iterator i = sorted_items.begin(), end = sorted_items.end(); i != end; ++i)
 	{
 		model.append_item(i->second);
 	}

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


More information about the Xfce4-commits mailing list