move ICON_NAME to config file
This commit is contained in:
parent
a502d52045
commit
5a0b025f52
1
config.h
1
config.h
|
@ -1,5 +1,4 @@
|
||||||
#define CLICKABLE_URL
|
#define CLICKABLE_URL
|
||||||
//#define ICON_NAME "terminal"
|
|
||||||
|
|
||||||
static const char *url_regex = "(ftp|http)s?://[-a-zA-Z0-9.?$%&/=_~#.,:;+]*";
|
static const char *url_regex = "(ftp|http)s?://[-a-zA-Z0-9.?$%&/=_~#.,:;+]*";
|
||||||
|
|
||||||
|
|
13
termite.c
13
termite.c
|
@ -320,6 +320,12 @@ static void load_config(GtkWindow *window, VteTerminal *vte, gboolean *dynamic_t
|
||||||
}
|
}
|
||||||
g_free(cursor_shape);
|
g_free(cursor_shape);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gchar *icon_name = g_key_file_get_string(config, "options", "icon_name", &error);
|
||||||
|
IGNORE_ON_ERROR(error) {
|
||||||
|
gtk_window_set_icon_name(window, icon_name);
|
||||||
|
g_free(icon_name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
g_key_file_free(config);
|
g_key_file_free(config);
|
||||||
}
|
}
|
||||||
|
@ -348,13 +354,6 @@ int main(int argc, char **argv) {
|
||||||
gtk_window_set_role(GTK_WINDOW(window), role);
|
gtk_window_set_role(GTK_WINDOW(window), role);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ICON_NAME
|
|
||||||
GdkPixbuf *icon = gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), ICON_NAME, 48, 0, NULL);
|
|
||||||
if (icon) {
|
|
||||||
gtk_window_set_icon(GTK_WINDOW(window), icon);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
GtkWidget *overlay = gtk_overlay_new();
|
GtkWidget *overlay = gtk_overlay_new();
|
||||||
GtkWidget *vte = vte_terminal_new();
|
GtkWidget *vte = vte_terminal_new();
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ dynamic_title = true
|
||||||
urgent_on_bell = true
|
urgent_on_bell = true
|
||||||
font = Monospace 9
|
font = Monospace 9
|
||||||
scrollback_lines = 1000
|
scrollback_lines = 1000
|
||||||
|
#icon_name = terminal
|
||||||
|
|
||||||
# SYSTEM, ON or OFF
|
# SYSTEM, ON or OFF
|
||||||
cursor_blink = SYSTEM
|
cursor_blink = SYSTEM
|
||||||
|
|
Loading…
Reference in New Issue