From 8d5b52ad3560fbc55129123912903044a81d7c08 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Fri, 9 Nov 2012 13:08:11 -0500 Subject: [PATCH] remove the term setting The xterm-termite value provides both correct terminfo and matches xterm* checks done by applications to check for functionality not exposed by terminfo. --- termite.cc | 15 +++++---------- termite.cfg | 1 - 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/termite.cc b/termite.cc index cf61691..2904595 100644 --- a/termite.cc +++ b/termite.cc @@ -94,7 +94,7 @@ static void overlay_show(search_panel_info *info, overlay_mode mode, bool comple static void get_vte_padding(VteTerminal *vte, int *w, int *h); static char *check_match(VteTerminal *vte, int event_x, int event_y); static void load_config(GtkWindow *window, VteTerminal *vte, config_info *info, - const char **term, char **geometry); + char **geometry); static long first_row(VteTerminal *vte); void launch_browser(char *browser, char *url) { @@ -609,7 +609,7 @@ gboolean key_press_cb(VteTerminal *vte, GdkEventKey *event, keybind_info *info) return TRUE; case GDK_KEY_Escape: load_config(GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(vte))), - vte, &info->config, NULL, NULL); + vte, &info->config, nullptr); return TRUE; } } else if (modifiers == GDK_CONTROL_MASK && event->keyval == GDK_KEY_Tab) { @@ -855,7 +855,7 @@ static bool get_config_color(GKeyFile *config, const char *section, const char * } static void load_config(GtkWindow *window, VteTerminal *vte, config_info *info, - const char **term, char **geometry) { + char **geometry) { const char * const filename = "termite.cfg"; char *path = g_build_filename(g_get_user_config_dir(), filename, nullptr); @@ -870,11 +870,6 @@ static void load_config(GtkWindow *window, VteTerminal *vte, config_info *info, *geometry = *s; } } - if (term) { - if (auto s = get_config_string(config, "options", "term")) { - *term = *s; - } - } auto cfg_bool = [config](const char *key, gboolean value) { return get_config(g_key_file_get_boolean, @@ -1075,7 +1070,7 @@ static void exit_with_status(VteTerminal *vte) { int main(int argc, char **argv) { GError *error = NULL; - const char *term = "xterm-termite"; + const char * const term = "xterm-termite"; const char *directory = nullptr; gboolean version = FALSE; @@ -1155,7 +1150,7 @@ int main(int argc, char **argv) { {nullptr, FALSE, FALSE, FALSE, -1} }; - load_config(GTK_WINDOW(window), vte, &info.config, &term, &geometry); + load_config(GTK_WINDOW(window), vte, &info.config, &geometry); vte_terminal_set_pty_object(vte, pty); vte_pty_set_term(pty, term); diff --git a/termite.cfg b/termite.cfg index 714bcda..39fbdd9 100644 --- a/termite.cfg +++ b/termite.cfg @@ -14,7 +14,6 @@ scrollback_lines = 1000 search_wrap = true #icon_name = terminal #geometry = 640x480 -#term = xterm-termite # 0.0: opaque, 1.0: transparent transparency = 0.0