diff options
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | fightsoap128.jpg | bin | 0 -> 14285 bytes | |||
-rw-r--r-- | fightsoap16.jpg | bin | 0 -> 818 bytes | |||
-rw-r--r-- | fightsoap32.jpg | bin | 0 -> 2012 bytes | |||
-rw-r--r-- | fightsoap48.jpg | bin | 0 -> 3264 bytes | |||
-rw-r--r-- | fightsoap64.jpg | bin | 0 -> 5057 bytes | |||
-rw-r--r-- | xxxterm.1 | 3 | ||||
-rw-r--r-- | xxxterm.c | 24 | ||||
-rw-r--r-- | xxxterm.conf | 1 |
9 files changed, 35 insertions, 4 deletions
diff --git a/Makefile b/Makefile index 873fe04..5c10f16 100644 --- a/Makefile +++ b/Makefile @@ -26,10 +26,13 @@ javascript.h: hinting.js input-focus.js perl ${.CURDIR}/js-merge-helper.pl ${.CURDIR}/hinting.js \ ${.CURDIR}/input-focus.js > ${.CURDIR}/javascript.h - -#tables.h: ${.CURDIR}/../tables ${.CURDIR}/../parsedb.pl -# perl ${.CURDIR}/../parsedb.pl < ${.CURDIR}/../tables - +install: + mkdir -p ${PREFIX}/share/xxxterm + cp ${.CURDIR}/fightsoap16.jpg ${PREFIX}/share/xxxterm + cp ${.CURDIR}/fightsoap32.jpg ${PREFIX}/share/xxxterm + cp ${.CURDIR}/fightsoap48.jpg ${PREFIX}/share/xxxterm + cp ${.CURDIR}/fightsoap64.jpg ${PREFIX}/share/xxxterm + cp ${.CURDIR}/fightsoap128.jpg ${PREFIX}/share/xxxterm ${PROG} ${OBJS} beforedepend: javascript.h diff --git a/fightsoap128.jpg b/fightsoap128.jpg new file mode 100644 index 0000000..3b8755c --- /dev/null +++ b/fightsoap128.jpg Binary files differdiff --git a/fightsoap16.jpg b/fightsoap16.jpg new file mode 100644 index 0000000..c978532 --- /dev/null +++ b/fightsoap16.jpg Binary files differdiff --git a/fightsoap32.jpg b/fightsoap32.jpg new file mode 100644 index 0000000..304412c --- /dev/null +++ b/fightsoap32.jpg Binary files differdiff --git a/fightsoap48.jpg b/fightsoap48.jpg new file mode 100644 index 0000000..0895c03 --- /dev/null +++ b/fightsoap48.jpg Binary files differdiff --git a/fightsoap64.jpg b/fightsoap64.jpg new file mode 100644 index 0000000..a9a575f --- /dev/null +++ b/fightsoap64.jpg Binary files differdiff --git a/xxxterm.1 b/xxxterm.1 index 53e3bd7..4d35e9d 100644 --- a/xxxterm.1 +++ b/xxxterm.1 @@ -192,6 +192,9 @@ Using the -n url option on subsequent .Nm invocations will cause the specified url to be loaded in a new tab. Only a user with identical UID and GID can use this option. +.It Cm resource_dir +Directory that contains various xxxterm resources such as icons. +This is OS specific and should be handled by the porter. .It Cm single_instance If set only one .Nm diff --git a/xxxterm.c b/xxxterm.c index db84d37..8e74339 100644 --- a/xxxterm.c +++ b/xxxterm.c @@ -135,6 +135,14 @@ u_int32_t swm_debug = 0 ~(GDK_BUTTON4_MASK) & \ ~(GDK_BUTTON5_MASK)) +char *icons[] = { + "fightsoap16.jpg", + "fightsoap32.jpg", + "fightsoap48.jpg", + "fightsoap64.jpg", + "fightsoap128.jpg" +}; + struct tab { TAILQ_ENTRY(tab) entry; GtkWidget *vbox; @@ -384,6 +392,7 @@ int enable_js_whitelist = 1; time_t session_timeout = 3600; /* cookie session timeout */ int cookie_policy = SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY; char *ssl_ca_file = NULL; +char *resource_dir = NULL; gboolean ssl_strict_certs = FALSE; int append_next = 1; /* append tab after current tab */ char *home = NULL; @@ -490,6 +499,7 @@ struct settings { { "http_proxy", XT_S_STR, 0 , NULL, &http_proxy, NULL }, { "read_only_cookies", XT_S_INT, 0 , &read_only_cookies, NULL, NULL }, { "refresh_interval", XT_S_INT, 0 , &refresh_interval, NULL, NULL }, + { "resource_dir", XT_S_STR, 0 , NULL, &resource_dir, NULL }, { "runtime_settings", XT_S_STR, 0 , NULL, NULL, &s_runtime }, { "search_string", XT_S_STR, 0 , NULL, &search_string, NULL }, { "session_timeout", XT_S_INT, 0 , &session_timeout, NULL, NULL }, @@ -4847,6 +4857,10 @@ void create_canvas(void) { GtkWidget *vbox; + GList *l = NULL; + GdkPixbuf *pb; + char file[PATH_MAX]; + int i; vbox = gtk_vbox_new(FALSE, 0); notebook = GTK_NOTEBOOK(gtk_notebook_new()); @@ -4871,6 +4885,15 @@ create_canvas(void) main_window = create_window(); gtk_container_add(GTK_CONTAINER(main_window), vbox); gtk_window_set_title(GTK_WINDOW(main_window), XT_NAME); + + /* icons */ + for (i = 0; i < LENGTH(icons); i++) { + snprintf(file, sizeof file, "%s/%s", resource_dir, icons[i]); + pb = gdk_pixbuf_new_from_file(file, NULL); + l = g_list_append(l, pb); + } + gtk_window_set_default_icon_list(l); + gtk_widget_show_all(abtn); gtk_widget_show_all(main_window); } @@ -5255,6 +5278,7 @@ main(int argc, char *argv[]) /* set default string settings */ home = g_strdup("http://www.peereboom.us"); + resource_dir = g_strdup("/usr/local/share/xxxterm/"); /* read config file */ if (strlen(conf) == 0) diff --git a/xxxterm.conf b/xxxterm.conf index 5882ef6..5f5f340 100644 --- a/xxxterm.conf +++ b/xxxterm.conf @@ -18,6 +18,7 @@ enable_cookie_whitelist = 1 ssl_strict_certs = 0 enable_socket = 0 single_instance = 0 +# resource_dir = /usr/local/share/xxxterm/ # only useful if enable_scripts = 0 enable_js_whitelist = 1 |