[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 216/473: Remove LauncherModel class.
noreply at xfce.org
noreply at xfce.org
Mon Feb 16 23:56:26 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 0c6cf57b313fd9af82e0ba4eea4cf79d4e199b7b
Author: Graeme Gott <graeme at gottcode.org>
Date: Sat Nov 2 15:52:37 2013 -0400
Remove LauncherModel class.
---
panel-plugin/CMakeLists.txt | 1 -
panel-plugin/category.cpp | 36 +++++------
panel-plugin/favorites-page.cpp | 17 +++---
panel-plugin/launcher-model.cpp | 127 ---------------------------------------
panel-plugin/launcher-model.h | 77 ------------------------
panel-plugin/launcher-view.cpp | 7 +--
panel-plugin/launcher-view.h | 8 +++
panel-plugin/list-page.cpp | 46 ++++++++++----
panel-plugin/page.cpp | 5 +-
panel-plugin/recent-page.cpp | 28 ++++++---
panel-plugin/search-page.cpp | 9 ++-
11 files changed, 98 insertions(+), 263 deletions(-)
diff --git a/panel-plugin/CMakeLists.txt b/panel-plugin/CMakeLists.txt
index 88c5deb..e3623b5 100644
--- a/panel-plugin/CMakeLists.txt
+++ b/panel-plugin/CMakeLists.txt
@@ -68,7 +68,6 @@ add_library(whiskermenu MODULE
favorites-page.cpp
icon-size.cpp
launcher.cpp
- launcher-model.cpp
launcher-view.cpp
list-page.cpp
page.cpp
diff --git a/panel-plugin/category.cpp b/panel-plugin/category.cpp
index 4b6d12a..137091e 100644
--- a/panel-plugin/category.cpp
+++ b/panel-plugin/category.cpp
@@ -17,7 +17,7 @@
#include "category.h"
-#include "launcher-model.h"
+#include "launcher-view.h"
#include "section-button.h"
#include <algorithm>
@@ -103,7 +103,7 @@ GtkTreeModel* Category::get_model()
if (m_has_subcategories)
{
GtkTreeStore* model = gtk_tree_store_new(
- LauncherModel::N_COLUMNS,
+ LauncherView::N_COLUMNS,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_POINTER);
@@ -113,7 +113,7 @@ GtkTreeModel* Category::get_model()
else
{
GtkListStore* model = gtk_list_store_new(
- LauncherModel::N_COLUMNS,
+ LauncherView::N_COLUMNS,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_POINTER);
@@ -201,9 +201,9 @@ void Category::insert_items(GtkTreeStore* model, GtkTreeIter* parent, const gcha
GtkTreeIter iter;
gtk_tree_store_insert_with_values(model,
&iter, parent, INT_MAX,
- LauncherModel::COLUMN_ICON, icon,
- LauncherModel::COLUMN_TEXT, text,
- LauncherModel::COLUMN_LAUNCHER, NULL,
+ LauncherView::COLUMN_ICON, icon,
+ LauncherView::COLUMN_TEXT, text,
+ LauncherView::COLUMN_LAUNCHER, NULL,
-1);
g_free(text);
category->insert_items(model, &iter, icon);
@@ -213,18 +213,18 @@ void Category::insert_items(GtkTreeStore* model, GtkTreeIter* parent, const gcha
Launcher* launcher = static_cast<Launcher*>(element);
gtk_tree_store_insert_with_values(model,
NULL, parent, INT_MAX,
- LauncherModel::COLUMN_ICON, launcher->get_icon(),
- LauncherModel::COLUMN_TEXT, launcher->get_text(),
- LauncherModel::COLUMN_LAUNCHER, launcher,
+ LauncherView::COLUMN_ICON, launcher->get_icon(),
+ LauncherView::COLUMN_TEXT, launcher->get_text(),
+ LauncherView::COLUMN_LAUNCHER, launcher,
-1);
}
else if ((i + 1) < end)
{
gtk_tree_store_insert_with_values(model,
NULL, parent, INT_MAX,
- LauncherModel::COLUMN_ICON, NULL,
- LauncherModel::COLUMN_TEXT, NULL,
- LauncherModel::COLUMN_LAUNCHER, NULL,
+ LauncherView::COLUMN_ICON, NULL,
+ LauncherView::COLUMN_TEXT, NULL,
+ LauncherView::COLUMN_LAUNCHER, NULL,
-1);
}
}
@@ -242,18 +242,18 @@ void Category::insert_items(GtkListStore* model)
Launcher* launcher = static_cast<Launcher*>(element);
gtk_list_store_insert_with_values(model,
NULL, INT_MAX,
- LauncherModel::COLUMN_ICON, launcher->get_icon(),
- LauncherModel::COLUMN_TEXT, launcher->get_text(),
- LauncherModel::COLUMN_LAUNCHER, launcher,
+ LauncherView::COLUMN_ICON, launcher->get_icon(),
+ LauncherView::COLUMN_TEXT, launcher->get_text(),
+ LauncherView::COLUMN_LAUNCHER, launcher,
-1);
}
else if ((i + 1) < end)
{
gtk_list_store_insert_with_values(model,
NULL, INT_MAX,
- LauncherModel::COLUMN_ICON, NULL,
- LauncherModel::COLUMN_TEXT, NULL,
- LauncherModel::COLUMN_LAUNCHER, NULL,
+ LauncherView::COLUMN_ICON, NULL,
+ LauncherView::COLUMN_TEXT, NULL,
+ LauncherView::COLUMN_LAUNCHER, NULL,
-1);
}
}
diff --git a/panel-plugin/favorites-page.cpp b/panel-plugin/favorites-page.cpp
index 52afe24..d6f4a89 100644
--- a/panel-plugin/favorites-page.cpp
+++ b/panel-plugin/favorites-page.cpp
@@ -19,7 +19,6 @@
#include "applications-page.h"
#include "launcher.h"
-#include "launcher-model.h"
#include "launcher-view.h"
#include "settings.h"
#include "window.h"
@@ -40,17 +39,19 @@ FavoritesPage::FavoritesPage(Window* window) :
void FavoritesPage::add(Launcher* launcher)
{
- if (!launcher)
+ if (!launcher || contains(launcher))
{
return;
}
- // Remove item if already in list
- remove(launcher);
-
- // Add to list of items
- LauncherModel model(GTK_LIST_STORE(get_view()->get_model()));
- model.append_item(launcher);
+ // Append to list of items
+ GtkListStore* store = GTK_LIST_STORE(get_view()->get_model());
+ gtk_list_store_insert_with_values(
+ store, NULL, G_MAXINT,
+ LauncherView::COLUMN_ICON, launcher->get_icon(),
+ LauncherView::COLUMN_TEXT, launcher->get_text(),
+ LauncherView::COLUMN_LAUNCHER, launcher,
+ -1);
}
//-----------------------------------------------------------------------------
diff --git a/panel-plugin/launcher-model.cpp b/panel-plugin/launcher-model.cpp
deleted file mode 100644
index f6e573e..0000000
--- a/panel-plugin/launcher-model.cpp
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (C) 2013 Graeme Gott <graeme at gottcode.org>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "launcher-model.h"
-
-#include "launcher.h"
-
-using namespace WhiskerMenu;
-
-//-----------------------------------------------------------------------------
-
-LauncherModel::LauncherModel()
-{
- m_model = gtk_list_store_new(
- N_COLUMNS,
- G_TYPE_STRING,
- G_TYPE_STRING,
- G_TYPE_POINTER);
-}
-
-//-----------------------------------------------------------------------------
-
-LauncherModel::LauncherModel(GtkListStore* model) :
- m_model(model)
-{
- if (G_LIKELY(m_model))
- {
- g_object_ref(m_model);
- }
-}
-
-//-----------------------------------------------------------------------------
-
-LauncherModel::~LauncherModel()
-{
- if (G_LIKELY(m_model))
- {
- g_object_unref(m_model);
- }
-}
-
-//-----------------------------------------------------------------------------
-
-void LauncherModel::insert_item(Launcher* launcher, int position)
-{
- if (launcher)
- {
- gtk_list_store_insert_with_values(
- m_model, NULL, position,
- COLUMN_ICON, launcher->get_icon(),
- COLUMN_TEXT, launcher->get_text(),
- COLUMN_LAUNCHER, launcher,
- -1);
- }
- else
- {
- gtk_list_store_insert_with_values(
- m_model, NULL, position,
- -1);
- }
-}
-
-//-----------------------------------------------------------------------------
-
-void LauncherModel::remove_item(Launcher* launcher)
-{
- GtkTreeModel* model = GTK_TREE_MODEL(m_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, COLUMN_LAUNCHER, &test_launcher, -1);
- if (test_launcher == launcher)
- {
- gtk_list_store_remove(m_model, &iter);
- break;
- }
- valid = gtk_tree_model_iter_next(model, &iter);
- }
-}
-
-//-----------------------------------------------------------------------------
-
-void LauncherModel::remove_first_item()
-{
- GtkTreeIter iter;
- if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(m_model), &iter))
- {
- gtk_list_store_remove(m_model, &iter);
- }
-}
-
-//-----------------------------------------------------------------------------
-
-void LauncherModel::remove_last_item()
-{
- GtkTreeModel* model = GTK_TREE_MODEL(m_model);
- gint size = gtk_tree_model_iter_n_children(model, NULL);
- if (!size)
- {
- return;
- }
-
- GtkTreeIter iter;
- if (gtk_tree_model_iter_nth_child(model, &iter, NULL, size - 1))
- {
- gtk_list_store_remove(m_model, &iter);
- }
-}
-
-//-----------------------------------------------------------------------------
diff --git a/panel-plugin/launcher-model.h b/panel-plugin/launcher-model.h
deleted file mode 100644
index 5f7e4db..0000000
--- a/panel-plugin/launcher-model.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2013 Graeme Gott <graeme at gottcode.org>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef WHISKERMENU_LAUNCHER_MODEL_H
-#define WHISKERMENU_LAUNCHER_MODEL_H
-
-extern "C"
-{
-#include <gtk/gtk.h>
-}
-
-namespace WhiskerMenu
-{
-
-class Launcher;
-
-class LauncherModel
-{
-public:
- LauncherModel();
- explicit LauncherModel(GtkListStore* model);
- ~LauncherModel();
-
- GtkTreeModel* get_model() const
- {
- return GTK_TREE_MODEL(m_model);
- }
-
- void append_item(Launcher* launcher)
- {
- insert_item(launcher, INT_MAX);
- }
-
- void insert_item(Launcher* launcher, int position);
-
- void prepend_item(Launcher* launcher)
- {
- insert_item(launcher, 0);
- }
-
- void remove_item(Launcher* launcher);
- void remove_first_item();
- void remove_last_item();
-
- enum Columns
- {
- COLUMN_ICON = 0,
- COLUMN_TEXT,
- COLUMN_LAUNCHER,
- N_COLUMNS
- };
-
-private:
- LauncherModel(const LauncherModel& model);
- LauncherModel& operator=(const LauncherModel& model);
-
-private:
- GtkListStore* m_model;
-};
-
-}
-
-#endif // WHISKERMENU_LAUNCHER_MODEL_H
diff --git a/panel-plugin/launcher-view.cpp b/panel-plugin/launcher-view.cpp
index aec277c..53d7ec7 100644
--- a/panel-plugin/launcher-view.cpp
+++ b/panel-plugin/launcher-view.cpp
@@ -17,7 +17,6 @@
#include "launcher-view.h"
-#include "launcher-model.h"
#include "settings.h"
#include <algorithm>
@@ -35,7 +34,7 @@ using namespace WhiskerMenu;
static gboolean is_separator(GtkTreeModel* model, GtkTreeIter* iter, gpointer)
{
const gchar* text;
- gtk_tree_model_get(model, iter, LauncherModel::COLUMN_TEXT, &text, -1);
+ gtk_tree_model_get(model, iter, LauncherView::COLUMN_TEXT, &text, -1);
return exo_str_is_empty(text);
}
@@ -198,12 +197,12 @@ void LauncherView::create_column()
m_icon_renderer = exo_cell_renderer_icon_new();
g_object_set(m_icon_renderer, "size", wm_settings->launcher_icon_size.get_size(), NULL);
gtk_tree_view_column_pack_start(m_column, m_icon_renderer, false);
- gtk_tree_view_column_add_attribute(m_column, m_icon_renderer, "icon", LauncherModel::COLUMN_ICON);
+ gtk_tree_view_column_add_attribute(m_column, m_icon_renderer, "icon", LauncherView::COLUMN_ICON);
GtkCellRenderer* text_renderer = gtk_cell_renderer_text_new();
g_object_set(text_renderer, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
gtk_tree_view_column_pack_start(m_column, text_renderer, true);
- gtk_tree_view_column_add_attribute(m_column, text_renderer, "markup", LauncherModel::COLUMN_TEXT);
+ gtk_tree_view_column_add_attribute(m_column, text_renderer, "markup", LauncherView::COLUMN_TEXT);
gtk_tree_view_column_set_sizing(m_column, GTK_TREE_VIEW_COLUMN_FIXED);
diff --git a/panel-plugin/launcher-view.h b/panel-plugin/launcher-view.h
index 6b498f2..f2784a9 100644
--- a/panel-plugin/launcher-view.h
+++ b/panel-plugin/launcher-view.h
@@ -62,6 +62,14 @@ public:
void reload_icon_size();
+ enum Columns
+ {
+ COLUMN_ICON = 0,
+ COLUMN_TEXT,
+ COLUMN_LAUNCHER,
+ N_COLUMNS
+ };
+
private:
void create_column();
bool on_key_press_event(GdkEventKey* event);
diff --git a/panel-plugin/list-page.cpp b/panel-plugin/list-page.cpp
index 5dc4381..3916d82 100644
--- a/panel-plugin/list-page.cpp
+++ b/panel-plugin/list-page.cpp
@@ -19,7 +19,6 @@
#include "applications-page.h"
#include "launcher.h"
-#include "launcher-model.h"
#include "launcher-view.h"
#include "window.h"
@@ -59,8 +58,22 @@ bool ListPage::contains(Launcher* launcher) const
void ListPage::remove(Launcher* launcher)
{
- LauncherModel model(GTK_LIST_STORE(get_view()->get_model()));
- model.remove_item(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);
+ }
}
//-----------------------------------------------------------------------------
@@ -68,7 +81,11 @@ void ListPage::remove(Launcher* launcher)
void ListPage::set_menu_items()
{
// Create new model for treeview
- LauncherModel model;
+ GtkListStore* store = gtk_list_store_new(
+ LauncherView::N_COLUMNS,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_POINTER);
// Fetch menu items or remove them from list if missing
for (std::vector<std::string>::iterator i = m_desktop_ids.begin(); i != m_desktop_ids.end(); ++i)
@@ -81,7 +98,12 @@ void ListPage::set_menu_items()
Launcher* launcher = get_window()->get_applications()->get_application(*i);
if (launcher)
{
- model.append_item(launcher);
+ gtk_list_store_insert_with_values(
+ store, NULL, G_MAXINT,
+ LauncherView::COLUMN_ICON, launcher->get_icon(),
+ LauncherView::COLUMN_TEXT, launcher->get_text(),
+ LauncherView::COLUMN_LAUNCHER, launcher,
+ -1);
}
else
{
@@ -91,10 +113,12 @@ void ListPage::set_menu_items()
}
// Replace treeview contents
- get_view()->set_model(model.get_model());
- g_signal_connect(get_view()->get_model(), "row-changed", G_CALLBACK(ListPage::on_row_changed_slot), this);
- g_signal_connect(get_view()->get_model(), "row-inserted", G_CALLBACK(ListPage::on_row_inserted_slot), this);
- g_signal_connect(get_view()->get_model(), "row-deleted", G_CALLBACK(ListPage::on_row_deleted_slot), this);
+ GtkTreeModel* model = GTK_TREE_MODEL(store);
+ get_view()->set_model(model);
+ g_signal_connect(model, "row-changed", G_CALLBACK(ListPage::on_row_changed_slot), this);
+ g_signal_connect(model, "row-inserted", G_CALLBACK(ListPage::on_row_inserted_slot), this);
+ g_signal_connect(model, "row-deleted", G_CALLBACK(ListPage::on_row_deleted_slot), this);
+ g_object_unref(model);
}
//-----------------------------------------------------------------------------
@@ -127,7 +151,7 @@ void ListPage::on_row_changed(GtkTreeModel* model, GtkTreePath* path, GtkTreeIte
}
Launcher* launcher;
- gtk_tree_model_get(model, iter, LauncherModel::COLUMN_LAUNCHER, &launcher, -1);
+ gtk_tree_model_get(model, iter, LauncherView::COLUMN_LAUNCHER, &launcher, -1);
if (launcher)
{
m_desktop_ids[pos] = launcher->get_desktop_id();
@@ -143,7 +167,7 @@ void ListPage::on_row_inserted(GtkTreeModel* model, GtkTreePath* path, GtkTreeIt
std::string desktop_id;
Launcher* launcher;
- gtk_tree_model_get(model, iter, LauncherModel::COLUMN_LAUNCHER, &launcher, -1);
+ gtk_tree_model_get(model, iter, LauncherView::COLUMN_LAUNCHER, &launcher, -1);
if (launcher)
{
desktop_id = launcher->get_desktop_id();
diff --git a/panel-plugin/page.cpp b/panel-plugin/page.cpp
index ec5f8f5..1f393ce 100644
--- a/panel-plugin/page.cpp
+++ b/panel-plugin/page.cpp
@@ -19,7 +19,6 @@
#include "favorites-page.h"
#include "launcher.h"
-#include "launcher-model.h"
#include "launcher-view.h"
#include "recent-page.h"
#include "window.h"
@@ -94,7 +93,7 @@ Launcher* Page::get_selected_launcher() const
GtkTreeModel* model = m_view->get_model();
GtkTreeIter iter;
gtk_tree_model_get_iter(model, &iter, m_selected_path);
- gtk_tree_model_get(model, &iter, LauncherModel::COLUMN_LAUNCHER, &launcher, -1);
+ gtk_tree_model_get(model, &iter, LauncherView::COLUMN_LAUNCHER, &launcher, -1);
}
return launcher;
}
@@ -116,7 +115,7 @@ void Page::launcher_activated(GtkTreeView* view, GtkTreePath* path)
// Find launcher
Launcher* launcher = NULL;
- gtk_tree_model_get(model, &iter, LauncherModel::COLUMN_LAUNCHER, &launcher, -1);
+ gtk_tree_model_get(model, &iter, LauncherView::COLUMN_LAUNCHER, &launcher, -1);
if (!launcher)
{
return;
diff --git a/panel-plugin/recent-page.cpp b/panel-plugin/recent-page.cpp
index dd08bea..d632874 100644
--- a/panel-plugin/recent-page.cpp
+++ b/panel-plugin/recent-page.cpp
@@ -18,7 +18,6 @@
#include "recent-page.h"
#include "launcher.h"
-#include "launcher-model.h"
#include "launcher-view.h"
#include "settings.h"
#include "window.h"
@@ -47,17 +46,32 @@ void RecentPage::add(Launcher* launcher)
return;
}
+ // Skip if already first launcher
+ if (!wm_settings->recent.empty() && (wm_settings->recent.front() == launcher->get_desktop_id()))
+ {
+ return;
+ }
+
// Remove item if already in list
remove(launcher);
// Prepend to list of items
- LauncherModel model(GTK_LIST_STORE(get_view()->get_model()));
- model.prepend_item(launcher);
+ GtkListStore* store = GTK_LIST_STORE(get_view()->get_model());
+ gtk_list_store_insert_with_values(
+ store, NULL, 0,
+ LauncherView::COLUMN_ICON, launcher->get_icon(),
+ LauncherView::COLUMN_TEXT, launcher->get_text(),
+ LauncherView::COLUMN_LAUNCHER, launcher,
+ -1);
// Prevent going over max
while (wm_settings->recent.size() > m_max_items)
{
- model.remove_last_item();
+ GtkTreeIter iter;
+ if (gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(store), &iter, NULL, wm_settings->recent.size() - 1))
+ {
+ gtk_list_store_remove(store, &iter);
+ }
}
}
@@ -79,11 +93,7 @@ void RecentPage::extend_context_menu(GtkWidget* menu)
void RecentPage::clear_menu()
{
- LauncherModel model(GTK_LIST_STORE(get_view()->get_model()));
- for (size_t i = 0, count = wm_settings->recent.size(); i < count; ++i)
- {
- model.remove_first_item();
- }
+ gtk_list_store_clear(GTK_LIST_STORE(get_view()->get_model()));
get_window()->set_modified();
}
diff --git a/panel-plugin/search-page.cpp b/panel-plugin/search-page.cpp
index d9f0435..c73c0b6 100644
--- a/panel-plugin/search-page.cpp
+++ b/panel-plugin/search-page.cpp
@@ -18,7 +18,6 @@
#include "search-page.h"
#include "launcher.h"
-#include "launcher-model.h"
#include "launcher-view.h"
#include "window.h"
@@ -146,7 +145,7 @@ void SearchPage::set_menu_items(GtkTreeModel* model)
while (valid)
{
Launcher* launcher = NULL;
- gtk_tree_model_get(model, &iter, LauncherModel::COLUMN_LAUNCHER, &launcher, -1);
+ gtk_tree_model_get(model, &iter, LauncherView::COLUMN_LAUNCHER, &launcher, -1);
if (launcher)
{
m_launchers.push_back(launcher);
@@ -184,7 +183,7 @@ gboolean SearchPage::on_filter(GtkTreeModel* model, GtkTreeIter* iter, SearchPag
// Check if launcher search string contains text
Launcher* launcher = NULL;
- gtk_tree_model_get(model, iter, LauncherModel::COLUMN_LAUNCHER, &launcher, -1);
+ gtk_tree_model_get(model, iter, LauncherView::COLUMN_LAUNCHER, &launcher, -1);
return launcher && (page->m_current_results->find(launcher) != page->m_current_results->end());
}
@@ -193,12 +192,12 @@ gboolean SearchPage::on_filter(GtkTreeModel* model, GtkTreeIter* iter, SearchPag
gint SearchPage::on_sort(GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b, SearchPage* page)
{
Launcher* launcher_a = NULL;
- gtk_tree_model_get(model, a, LauncherModel::COLUMN_LAUNCHER, &launcher_a, -1);
+ gtk_tree_model_get(model, a, LauncherView::COLUMN_LAUNCHER, &launcher_a, -1);
g_assert(launcher_a != NULL);
g_assert(page->m_current_results->find(launcher_a) != page->m_current_results->end());
Launcher* launcher_b = NULL;
- gtk_tree_model_get(model, b, LauncherModel::COLUMN_LAUNCHER, &launcher_b, -1);
+ gtk_tree_model_get(model, b, LauncherView::COLUMN_LAUNCHER, &launcher_b, -1);
g_assert(launcher_b != NULL);
g_assert(page->m_current_results->find(launcher_b) != page->m_current_results->end());
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list