[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 437/473: Move remove launcher code into favorites page.

noreply at xfce.org noreply at xfce.org
Tue Feb 17 00:00:07 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 a14c328eaa9b6d6b7fadc7b9bc840ecaaa67ffce
Author: Graeme Gott <graeme at gottcode.org>
Date:   Tue Dec 31 09:56:11 2013 -0500

    Move remove launcher code into favorites page.
---
 panel-plugin/favorites-page.cpp |   22 ++++++++++++++++++++++
 panel-plugin/favorites-page.h   |    1 +
 panel-plugin/list-page.cpp      |   22 ----------------------
 panel-plugin/list-page.h        |    1 -
 4 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/panel-plugin/favorites-page.cpp b/panel-plugin/favorites-page.cpp
index a114ce5..b03ac51 100644
--- a/panel-plugin/favorites-page.cpp
+++ b/panel-plugin/favorites-page.cpp
@@ -72,6 +72,28 @@ void FavoritesPage::add(Launcher* launcher)
 
 //-----------------------------------------------------------------------------
 
+void FavoritesPage::remove(Launcher* launcher)
+{
+	GtkTreeModel* model = GTK_TREE_MODEL(get_view()->get_model());
+	GtkListStore* store = GTK_LIST_STORE(model);
+	GtkTreeIter iter;
+	Launcher* test_launcher = NULL;
+
+	bool valid = gtk_tree_model_get_iter_first(model, &iter);
+	while (valid)
+	{
+		gtk_tree_model_get(model, &iter, LauncherView::COLUMN_LAUNCHER, &test_launcher, -1);
+		if (test_launcher == launcher)
+		{
+			gtk_list_store_remove(store, &iter);
+			break;
+		}
+		valid = gtk_tree_model_iter_next(model, &iter);
+	}
+}
+
+//-----------------------------------------------------------------------------
+
 void FavoritesPage::extend_context_menu(GtkWidget* menu)
 {
 	GtkWidget* menuitem = gtk_separator_menu_item_new();
diff --git a/panel-plugin/favorites-page.h b/panel-plugin/favorites-page.h
index 63c43ff..1eb8092 100644
--- a/panel-plugin/favorites-page.h
+++ b/panel-plugin/favorites-page.h
@@ -31,6 +31,7 @@ public:
 	bool contains(Launcher* launcher) const;
 
 	void add(Launcher* launcher);
+	void remove(Launcher* launcher);
 
 private:
 	void extend_context_menu(GtkWidget* menu);
diff --git a/panel-plugin/list-page.cpp b/panel-plugin/list-page.cpp
index 9c2f281..5b0d2f6 100644
--- a/panel-plugin/list-page.cpp
+++ b/panel-plugin/list-page.cpp
@@ -43,28 +43,6 @@ ListPage::~ListPage()
 
 //-----------------------------------------------------------------------------
 
-void ListPage::remove(Launcher* launcher)
-{
-	GtkTreeModel* model = GTK_TREE_MODEL(get_view()->get_model());
-	GtkListStore* store = GTK_LIST_STORE(model);
-	GtkTreeIter iter;
-	Launcher* test_launcher = NULL;
-
-	bool valid = gtk_tree_model_get_iter_first(model, &iter);
-	while (valid)
-	{
-		gtk_tree_model_get(model, &iter, LauncherView::COLUMN_LAUNCHER, &test_launcher, -1);
-		if (test_launcher == launcher)
-		{
-			gtk_list_store_remove(store, &iter);
-			break;
-		}
-		valid = gtk_tree_model_iter_next(model, &iter);
-	}
-}
-
-//-----------------------------------------------------------------------------
-
 void ListPage::set_menu_items()
 {
 	GtkTreeModel* model = get_window()->get_applications()->create_launcher_model(m_desktop_ids);
diff --git a/panel-plugin/list-page.h b/panel-plugin/list-page.h
index fe62097..2ef03d5 100644
--- a/panel-plugin/list-page.h
+++ b/panel-plugin/list-page.h
@@ -33,7 +33,6 @@ public:
 	~ListPage();
 
 	virtual void add(Launcher* launcher)=0;
-	void remove(Launcher* launcher);
 	void set_menu_items();
 	void unset_menu_items();
 

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


More information about the Xfce4-commits mailing list