diff options
author | Peter Hofmann <scm@uninformativ.de> | 2018-07-11 18:00:18 +0200 |
---|---|---|
committer | Peter Hofmann <scm@uninformativ.de> | 2020-04-24 16:41:28 +0200 |
commit | 86fbb28fdcb70733c426219a1b3bc44dc0a27e46 (patch) | |
tree | b4cefc0f9c46a6f9db87fd2f7811adf2fd0316b5 /browser.c | |
parent | 0204244aafa5ffb2c577934ad1e4179126f4b3d4 (diff) | |
download | lariza-86fbb28fdcb70733c426219a1b3bc44dc0a27e46.tar.gz |
Remove support for tabbed
Diffstat (limited to 'browser.c')
-rw-r--r-- | browser.c | 67 |
1 files changed, 1 insertions, 66 deletions
@@ -51,7 +51,6 @@ static gboolean remote_msg(GIOChannel *, GIOCondition, gpointer); static void run_user_scripts(WebKitWebView *); static void search(gpointer, gint); static void show_web_view(WebKitWebView *, gpointer); -static Window tabbed_launch(void); static void trust_user_certs(WebKitWebContext *); @@ -81,7 +80,6 @@ static gboolean cooperative_instances = TRUE; static int cooperative_pipe_fp = 0; static gchar *download_dir = "/var/tmp"; static gboolean enable_console_to_stdout = FALSE; -static Window embed = 0; static gchar *fifo_suffix = "main"; static gdouble global_zoom = 1.0; static gchar *history_file = NULL; @@ -89,7 +87,6 @@ static gchar *home_uri = "about:blank"; static gboolean initial_wc_setup_done = FALSE; static GHashTable *keywords = NULL; static gchar *search_text = NULL; -static gboolean tabbed_automagic = TRUE; static gchar *user_agent = NULL; @@ -140,18 +137,6 @@ client_new(const gchar *uri, WebKitWebView *related_wv, gboolean show) exit(EXIT_FAILURE); } - if (embed != 0) - { - c->win = gtk_plug_new(embed); - if (!gtk_plug_get_embedded(GTK_PLUG(c->win))) - { - fprintf(stderr, __NAME__": Can't plug-in to XID %ld.\n", embed); - gtk_widget_destroy(c->win); - c->win = NULL; - embed = 0; - } - } - if (c->win == NULL) c->win = gtk_window_new(GTK_WINDOW_TOPLEVEL); @@ -1192,46 +1177,6 @@ show_web_view(WebKitWebView *web_view, gpointer data) gtk_widget_show_all(c->win); } -Window -tabbed_launch(void) -{ - gint tabbed_stdout; - GIOChannel *tabbed_stdout_channel; - GError *err = NULL; - gchar *output = NULL; - char *argv[] = { "tabbed", "-c", "-d", "-p", "s1", "-n", __NAME__, NULL }; - Window plug_into; - - if (!g_spawn_async_with_pipes(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, - NULL, NULL, NULL, &tabbed_stdout, NULL, - &err)) - { - fprintf(stderr, __NAME__": Could not launch tabbed: %s\n", err->message); - g_error_free(err); - return 0; - } - - tabbed_stdout_channel = g_io_channel_unix_new(tabbed_stdout); - if (tabbed_stdout_channel == NULL) - { - fprintf(stderr, __NAME__": Could open tabbed's stdout\n"); - return 0; - } - g_io_channel_read_line(tabbed_stdout_channel, &output, NULL, NULL, NULL); - g_io_channel_shutdown(tabbed_stdout_channel, FALSE, NULL); - if (output == NULL) - { - fprintf(stderr, __NAME__": Could not read XID from tabbed\n"); - return 0; - } - g_strstrip(output); - plug_into = strtol(output, NULL, 16); - g_free(output); - if (plug_into == 0) - fprintf(stderr, __NAME__": The XID from tabbed is 0\n"); - return plug_into; -} - void trust_user_certs(WebKitWebContext *wc) { @@ -1272,20 +1217,13 @@ main(int argc, char **argv) grab_environment_configuration(); - while ((opt = getopt(argc, argv, "e:CT")) != -1) + while ((opt = getopt(argc, argv, "C")) != -1) { switch (opt) { - case 'e': - embed = atol(optarg); - tabbed_automagic = FALSE; - break; case 'C': cooperative_instances = FALSE; break; - case 'T': - tabbed_automagic = FALSE; - break; default: fprintf(stderr, "Usage: "__NAME__" [OPTION]... [URI]...\n"); exit(EXIT_FAILURE); @@ -1297,9 +1235,6 @@ main(int argc, char **argv) cooperation_setup(); downloadmanager_setup(); - if (tabbed_automagic && !(cooperative_instances && !cooperative_alone)) - embed = tabbed_launch(); - if (!cooperative_instances || cooperative_alone) { c = g_build_filename(g_get_user_config_dir(), __NAME__, "web_extensions", |