changed Gtk::TreeView to ZebraTreeView
This commit is contained in:
parent
99778330e3
commit
d7c103d6f0
2 changed files with 14 additions and 5 deletions
|
@ -39,6 +39,8 @@
|
||||||
#include "LiveSupport/Widgets/Button.h"
|
#include "LiveSupport/Widgets/Button.h"
|
||||||
#include "LiveSupport/Widgets/ScrolledNotebook.h"
|
#include "LiveSupport/Widgets/ScrolledNotebook.h"
|
||||||
#include "LiveSupport/Widgets/EntryBin.h"
|
#include "LiveSupport/Widgets/EntryBin.h"
|
||||||
|
#include "LiveSupport/Widgets/ZebraTreeView.h"
|
||||||
|
|
||||||
#include "OptionsWindow.h"
|
#include "OptionsWindow.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -394,18 +396,21 @@ Gtk::VBox*
|
||||||
OptionsWindow :: constructKeyBindingsSection(void) throw ()
|
OptionsWindow :: constructKeyBindingsSection(void) throw ()
|
||||||
{
|
{
|
||||||
// create the TreeView
|
// create the TreeView
|
||||||
|
Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance();
|
||||||
|
|
||||||
keyBindingsModel = Gtk::TreeStore::create(keyBindingsColumns);
|
keyBindingsModel = Gtk::TreeStore::create(keyBindingsColumns);
|
||||||
Gtk::TreeView * keyBindingsView = Gtk::manage(new Gtk::TreeView(
|
ZebraTreeView * keyBindingsView = Gtk::manage(wf->createTreeView(
|
||||||
keyBindingsModel ));
|
keyBindingsModel ));
|
||||||
|
|
||||||
keyBindingsView->append_column("", keyBindingsColumns.actionColumn);
|
keyBindingsView->appendColumn("", keyBindingsColumns.actionColumn);
|
||||||
keyBindingsView->append_column("", keyBindingsColumns.keyNameColumn);
|
keyBindingsView->appendColumn("", keyBindingsColumns.keyNameColumn);
|
||||||
|
|
||||||
// fill in the data
|
// fill in the data
|
||||||
Ptr<const KeyboardShortcutList>::Ref
|
Ptr<const KeyboardShortcutList>::Ref
|
||||||
list = gLiveSupport->getKeyboardShortcutList();
|
list = gLiveSupport->getKeyboardShortcutList();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
int rowNumber = 0;
|
||||||
KeyboardShortcutList::iterator it;
|
KeyboardShortcutList::iterator it;
|
||||||
for (it = list->begin(); it != list->end(); ++it) {
|
for (it = list->begin(); it != list->end(); ++it) {
|
||||||
Ptr<const KeyboardShortcutContainer>::Ref
|
Ptr<const KeyboardShortcutContainer>::Ref
|
||||||
|
@ -415,6 +420,8 @@ OptionsWindow :: constructKeyBindingsSection(void) throw ()
|
||||||
Gtk::TreeRow parent = *keyBindingsModel->append();
|
Gtk::TreeRow parent = *keyBindingsModel->append();
|
||||||
parent[keyBindingsColumns.actionColumn]
|
parent[keyBindingsColumns.actionColumn]
|
||||||
= *gLiveSupport->getLocalizedWindowName(windowName);
|
= *gLiveSupport->getLocalizedWindowName(windowName);
|
||||||
|
parent[keyBindingsColumns.rowNumberColumn]
|
||||||
|
= rowNumber++;
|
||||||
|
|
||||||
KeyboardShortcutContainer::iterator iter;
|
KeyboardShortcutContainer::iterator iter;
|
||||||
for (iter = container->begin(); iter != container->end(); ++iter) {
|
for (iter = container->begin(); iter != container->end(); ++iter) {
|
||||||
|
@ -431,6 +438,8 @@ OptionsWindow :: constructKeyBindingsSection(void) throw ()
|
||||||
actionString);
|
actionString);
|
||||||
child[keyBindingsColumns.keyNameColumn]
|
child[keyBindingsColumns.keyNameColumn]
|
||||||
= *keyString; // TODO: localize this?
|
= *keyString; // TODO: localize this?
|
||||||
|
child[keyBindingsColumns.rowNumberColumn]
|
||||||
|
= rowNumber++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
#include "LiveSupport/Widgets/Notebook.h"
|
#include "LiveSupport/Widgets/Notebook.h"
|
||||||
#include "LiveSupport/Widgets/WhiteWindow.h"
|
#include "LiveSupport/Widgets/WhiteWindow.h"
|
||||||
#include "LiveSupport/Widgets/ScrolledWindow.h"
|
#include "LiveSupport/Widgets/ScrolledWindow.h"
|
||||||
|
#include "LiveSupport/Widgets/ZebraTreeModelColumnRecord.h"
|
||||||
#include "GLiveSupport.h"
|
#include "GLiveSupport.h"
|
||||||
#include "MasterPanelUserInfoWidget.h"
|
#include "MasterPanelUserInfoWidget.h"
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ class OptionsWindow : public WhiteWindow, public LocalizedObject
|
||||||
* @author $Author$
|
* @author $Author$
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
class ModelColumns : public Gtk::TreeModelColumnRecord
|
class ModelColumns : public ZebraTreeModelColumnRecord
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue