[gtkmm] porting, poritng and porting
- From: Carlos <carlos solaria-mediterranea com>
- To: gtkmm-list gnome org
- Subject: [gtkmm] porting, poritng and porting
- Date: Sun, 19 Jan 2003 12:52:37 +0100
Hi all:
I have ported a big application with gtkmm and omniORB from gtkmm-1.2
to gtkmm-2 and the work is very hard.
In my case the usage of CList was very important and the new version has
about 60 different treemodels, and this treemodels change between calls.
I have spent about one month in doing this, but I think that the
results are very good.
The two major problems that I have found is the use of
Glib::locale_to_utf8 because our application is in Spanish and the use
of 'n with tilde' and accute vocals is neccesary and the change from
CList to TreeModel.
My approach was to do an API *similar* to gtkmm1.2 with gtkmm2 and so
the changes in my application ares minimals. An example:
gtkmm-1.2
if (lalista->selection ()[0].get_row_num () >= 0) {
.....
}
gtkmm-2
if (lalista->get_selected_row() >= 0) {
.......
}
where ::get_selected_row() is:
int
MyList::get_selected_row(void) {
Glib::RefPtr<TreeSelection> refSelection = p_lavista->get_selection();
if (const TreeIter iter = refSelection->get_selected()) {
const TreeModel::Path path(p_modelo->get_path(iter));
const std::vector<int> indices(path.get_indices());
if (!indices.empty()) return indices[0];
}
return -1;
}
And so on.
Now I only have to say that I'm happy using gtkmm and that the developer
team do a BIIIIIIIIIIGGGGGGGG work.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]