From 849a8ff473d65d450d1335f096798fac141d742c Mon Sep 17 00:00:00 2001 From: elvez Date: Mon, 11 Sep 2006 21:06:23 +0000 Subject: [PATCH] - Description and name of plugins is now correctly displayed in preferences dialog git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1094 3ecf2c5c-341e-0410-92b4-d18e462d057c --- src/backend/module.cc | 3 --- src/backend/sgpemv2/module.hh | 2 +- src/graphical_preferences_editor.cc | 16 +++------------- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/src/backend/module.cc b/src/backend/module.cc index 0577bef..049fa54 100644 --- a/src/backend/module.cc +++ b/src/backend/module.cc @@ -22,9 +22,6 @@ #include -// FIXME: remove this header -#include - using namespace sgpem; Module::Module(const Glib::ustring& identifier) throw(InvalidPluginException) : diff --git a/src/backend/sgpemv2/module.hh b/src/backend/sgpemv2/module.hh index 77c509e..51de7b1 100644 --- a/src/backend/sgpemv2/module.hh +++ b/src/backend/sgpemv2/module.hh @@ -51,7 +51,7 @@ namespace sgpem private: typedef void (*f_void)(void); - typedef Glib::ustring (*f_ustring)(void); + typedef const char* (*f_ustring)(void); typedef float (*f_float)(void); bool _enabled; diff --git a/src/graphical_preferences_editor.cc b/src/graphical_preferences_editor.cc index 7919197..c6ad78f 100644 --- a/src/graphical_preferences_editor.cc +++ b/src/graphical_preferences_editor.cc @@ -277,19 +277,9 @@ void PreferencesEditor::update_plugins() Gtk::TreeModel::iterator new_row = plugins_model->append(); // featuring its name, its description, and its author -// FIXME: the plugins do not behave correctly -// new_row->set_value(0, (**i_p).get_name()); -// new_row->set_value(1, (**i_p).describe()); -// new_row->set_value(2, (**i_p).get_author()); -// std::cout << (**i_p).get_name() << std::endl; -// std::cout << (**i_p).describe() << std::endl; -// std::cout << (**i_p).get_author().c_str() << std::endl; - Glib::ustring name("name!"); - Glib::ustring author("author!"); - Glib::ustring desc("description!"); - new_row->set_value(0, name); - new_row->set_value(1, desc); - new_row->set_value(2, author); + new_row->set_value(0, (**i_p).get_name()); + new_row->set_value(1, (**i_p).describe()); + new_row->set_value(2, (**i_p).get_author()); } // when the model gets updated, the associated TreeView // widget is automatically updated