diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/app.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -327,6 +327,22 @@ static iBool handlePrefsCommands_(iWidget *d, const char *cmd) { | |||
327 | return iFalse; | 327 | return iFalse; |
328 | } | 328 | } |
329 | 329 | ||
330 | iDocumentWidget *document_App(void) { | ||
331 | return iConstCast(iDocumentWidget *, currentTabPage_Widget(findWidget_App("doctabs"))); | ||
332 | } | ||
333 | |||
334 | iDocumentWidget *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 | |||
330 | iBool handleCommand_App(const char *cmd) { | 346 | iBool 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; |