View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001623 | Wishes | Plugins API | public | 2010-12-17 22:54 | 2010-12-20 13:45 |
Reporter | Yegor | Assigned To | vskirdin | ||
Priority | normal | Severity | feature | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Platform | x64 | OS | Windows | OS Version | 7 |
Product Version | 2.0 | ||||
Fixed in Version | 2.0 | ||||
Summary | 0001623: Новая команда в FARMACROCOMMAND - MCMD_GETAREA - Получить текущую макрообласть | ||||
Description | В классе KeyMacro уже есть метод GetMode(), возвращающий текущую макрообласть. Идея пробросить ее плагинам, чтобы можно было узнать в какой области мы находимся и вызвать соответствующий кастом макрос, например, загруженный из файла. Одна из идей, неоднократно обсуждавшихся, - макрофайлы. diffы во вложении. | ||||
Tags | No tags attached. | ||||
Build | 1765 | ||||
|
plugapi.cpp.diff (387 bytes)
--- F:\Local\Far2\unicode_far\.svn\text-base\plugapi.cpp.svn-base Mon Dec 13 07:45:13 2010 UTC +++ F:\Local\Far2\unicode_far\plugapi.cpp Fri Dec 17 21:48:43 2010 UTC @@ -450,6 +450,10 @@ { return Macro.GetCurRecord(nullptr,nullptr); } + case MCMD_GETAREA: + { + return Macro.GetMode(); + } #if 0 case MCMD_COMPILEMACRO: { |
|
plugin.hpp.diff (1,037 bytes)
--- F:\Local\Far2\unicode_far\.svn\text-base\plugin.hpp.svn-base Mon Dec 13 07:45:14 2010 UTC +++ F:\Local\Far2\unicode_far\plugin.hpp Fri Dec 17 22:22:45 2010 UTC @@ -1216,6 +1216,27 @@ #endif // END FAR_USE_INTERNALS MCMD_CHECKMACRO = 4, MCMD_GETSTATE = 5, + MCMD_GETAREA = 6, +}; + +enum FARMACROAREA +{ + MACROAREA_OTHER = 0, + MACROAREA_SHELL = 1, + MACROAREA_VIEWER = 2, + MACROAREA_EDITOR = 3, + MACROAREA_DIALOG = 4, + MACROAREA_SEARCH = 5, + MACROAREA_DISKS = 6, + MACROAREA_MAINMENU = 7, + MACROAREA_MENU = 8, + MACROAREA_HELP = 9, + MACROAREA_INFOPANEL = 10, + MACROAREA_QVIEWPANEL = 11, + MACROAREA_TREEPANEL = 12, + MACROAREA_FINDFOLDER = 13, + MACROAREA_USERMENU = 14, + MACROAREA_AUTOCOMPLETION = 15, }; enum FARMACROSTATE |
|
Thanks! |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-12-17 22:54 | Yegor | New Issue | |
2010-12-17 22:54 | Yegor | File Added: plugapi.cpp.diff | |
2010-12-17 22:54 | Yegor | File Added: plugin.hpp.diff | |
2010-12-19 17:33 | vskirdin | Assigned To | => vskirdin |
2010-12-19 17:33 | vskirdin | Status | new => assigned |
2010-12-20 11:57 | Yegor | Note Added: 0006022 | |
2010-12-20 11:57 | Yegor | Status | assigned => resolved |
2010-12-20 13:45 | vskirdin | Build | => 1765 |
2010-12-20 13:45 | vskirdin | Status | resolved => closed |
2010-12-20 13:45 | vskirdin | Resolution | open => fixed |
2010-12-20 13:45 | vskirdin | Fixed in Version | => 2.0 |