diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2014-11-16 19:31:29 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2014-11-16 23:34:25 +0100 |
commit | 38fcf6d15cdf09591e7d7a142ad724164875e433 (patch) | |
tree | bc6d81a5c3e33b6832cf0507fbf7e9e4a01a4358 /src/cmdline.cpp | |
parent | 7a0857515ad216325fc3021c7490df9d01a21c7c (diff) | |
download | sciteco-38fcf6d15cdf09591e7d7a142ad724164875e433.tar.gz |
rewritten View and Interface base classes using the Curiously Recurring Template Pattern.
* without the one-view-per-buffer designs, many Scintilla send message (SSM)
calls could be inlined
* with the new design, this was no longer possible using the abstract
base classes. the CRT pattern allows inlining again but introduces
a strange level of code obscurity.
* tests suggest that at high optimization levels, the one-view-per-buffer
design and the CRT pattern reduces typical macro runtimes by 30%
(e.g. for symbols-extract.tes).
* only updated the NCurses UI for the time being
Diffstat (limited to 'src/cmdline.cpp')
-rw-r--r-- | src/cmdline.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cmdline.cpp b/src/cmdline.cpp index 52427b8..e28ce35 100644 --- a/src/cmdline.cpp +++ b/src/cmdline.cpp @@ -247,7 +247,7 @@ process_edit_cmd(gchar key) *insert = '\0'; if (Goto::skip_label) { - interface.msg(Interface::MSG_ERROR, + interface.msg(InterfaceCurrent::MSG_ERROR, "Label \"%s\" not found", Goto::skip_label); break; @@ -420,13 +420,13 @@ filename_complete(const gchar *filename, gchar completed) for (GList *file = g_list_first(files); file != NULL; file = g_list_next(file)) { - Interface::PopupEntryType type; + InterfaceCurrent::PopupEntryType type; bool in_buffer = false; if (filename_is_dir((gchar *)file->data)) { - type = Interface::POPUP_DIRECTORY; + type = InterfaceCurrent::POPUP_DIRECTORY; } else { - type = Interface::POPUP_FILE; + type = InterfaceCurrent::POPUP_FILE; /* FIXME: inefficient */ in_buffer = ring.find((gchar *)file->data); } @@ -490,7 +490,7 @@ symbol_complete(SymbolList &list, const gchar *symbol, gchar completed) for (GList *entry = g_list_first(glist); entry != NULL; entry = g_list_next(entry)) { - interface.popup_add(Interface::POPUP_PLAIN, + interface.popup_add(InterfaceCurrent::POPUP_PLAIN, (gchar *)entry->data); } |