summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/app.c b/src/app.c
index 3aba28b6..0d15bce1 100644
--- a/src/app.c
+++ b/src/app.c
@@ -327,6 +327,22 @@ static iBool handlePrefsCommands_(iWidget *d, const char *cmd) {
327 return iFalse; 327 return iFalse;
328} 328}
329 329
330iDocumentWidget *document_App(void) {
331 return iConstCast(iDocumentWidget *, currentTabPage_Widget(findWidget_App("doctabs")));
332}
333
334iDocumentWidget *document_Command(const char *cmd) {
335 iAnyObject *obj = pointerLabel_Command(cmd, "doc");
336 if (obj) {
337 return obj;
338 }
339 obj = pointer_Command(cmd);
340 if (obj && isInstance_Object(obj, &Class_DocumentWidget)) {
341 return obj;
342 }
343 return document_App();
344}
345
330iBool handleCommand_App(const char *cmd) { 346iBool handleCommand_App(const char *cmd) {
331 iApp *d = &app_; 347 iApp *d = &app_;
332 iWidget *root = d->window->root; 348 iWidget *root = d->window->root;