From 235ee9199d01d6d357873f2140e6a68f5acd98a0 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Sun, 2 Jan 2011 18:12:09 +0000 Subject: add restart scaffold --- xxxterm.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xxxterm.c b/xxxterm.c index 6f21b0d..4e1dfdb 100644 --- a/xxxterm.c +++ b/xxxterm.c @@ -504,6 +504,7 @@ struct settings { /* globals */ extern char *__progname; +char **start_argv; struct passwd *pwd; GtkWidget *main_window; GtkNotebook *notebook; @@ -3060,6 +3061,13 @@ go_home(struct tab *t, struct karg *args) return (0); } +int +restart(struct tab *t, struct karg *args) +{ + execvp(start_argv[0], start_argv); + return (0); +} + /* inherent to GTK not all keys will be caught at all times */ /* XXX sort key bindings */ struct key { @@ -3183,6 +3191,7 @@ struct cmd { { "hist" , 0, xtp_page_hl, {0} }, { "history" , 0, xtp_page_hl, {0} }, { "home" , 0, go_home, {0} }, + { "restart" , 0, restart, {0} }, { "1", 0, move, {.i = XT_MOVE_TOP} }, { "print", 0, print_page, {0} }, @@ -4777,8 +4786,12 @@ arrow_cb(GtkWidget *w, GdkEventButton *event, gpointer user_data) TAILQ_FOREACH(ti, &tabs, entry) { frame = webkit_web_view_get_main_frame(ti->wv); uri = webkit_web_frame_get_uri(frame); + /* XXX make sure there is something to print */ + /* XXX add gui pages in here to look purdy */ if (uri == NULL) uri = "(untitled)"; + if (strlen(uri) == 0) + uri = "(untitled)"; menu_items = gtk_menu_item_new_with_label(uri); gtk_menu_append(GTK_MENU (menu), menu_items); gtk_widget_show(menu_items); @@ -5155,6 +5168,7 @@ main(int argc, char *argv[]) char *env_proxy = NULL; FILE *f = NULL; + start_argv = argv; while ((c = getopt(argc, argv, "STVf:tn")) != -1) { switch (c) { case 'S': -- cgit 1.4.1-2-gfad0 fd3763a572e0e180c04'>diff stats
path: root/arc/render.vim
blob: f005f48bc43c45e883a7f3ba269827e72a01de26 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93