summaryrefslogtreecommitdiff
path: root/src/wins.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2007-12-30 16:27:58 +0000
committerFrederic Culot <calcurse@culot.org>2007-12-30 16:27:58 +0000
commit478b2762e61cee2aa2b073e37cfcdaf220692acf (patch)
treeda7092314c4ad526975642d2e82c22fcf50274c9 /src/wins.c
parent41e7eb0a83f9a6a921ddd54ed89740eaba595354 (diff)
downloadcalcurse-478b2762e61cee2aa2b073e37cfcdaf220692acf.zip
Ability to attach notes to todo items added
Diffstat (limited to 'src/wins.c')
-rwxr-xr-xsrc/wins.c33
1 files changed, 31 insertions, 2 deletions
diff --git a/src/wins.c b/src/wins.c
index b238996..fe79588 100755
--- a/src/wins.c
+++ b/src/wins.c
@@ -1,4 +1,4 @@
-/* $Id: wins.c,v 1.8 2007/10/21 13:39:49 culot Exp $ */
+/* $Id: wins.c,v 1.9 2007/12/30 16:27:59 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -337,7 +337,8 @@ wins_update(void)
break;
default:
- ierror(_("FATAL ERROR in wins_update: no window selected\n"));
+ ierror(_("FATAL ERROR in wins_update: no window selected\n"),
+ IERROR_FATAL);
/* NOTREACHED */
}
@@ -361,3 +362,31 @@ wins_reset(void)
wins_reinit();
wins_update();
}
+
+/*
+ * While inside interactive mode, launch the external command cmd on the given
+ * file.
+ */
+void
+wins_launch_external(const char *file, const char *cmd)
+{
+ char *p;
+
+ if (asprintf(&p, "%s %s", cmd, file) == -1)
+ return;
+
+ if (notify_bar())
+ notify_stop_main_thread();
+ def_prog_mode();
+ endwin();
+ clear();
+ refresh();
+ system(p);
+ reset_prog_mode();
+ clearok(curscr, TRUE);
+ curs_set(0);
+ refresh();
+ if (notify_bar())
+ notify_start_main_thread();
+ free(p);
+}