move ICON_NAME to config file

This commit is contained in:
Daniel Micay 2012-06-07 14:10:16 -04:00
parent a502d52045
commit 5a0b025f52
3 changed files with 7 additions and 8 deletions

View File

@ -1,5 +1,4 @@
#define CLICKABLE_URL
//#define ICON_NAME "terminal"
static const char *url_regex = "(ftp|http)s?://[-a-zA-Z0-9.?$%&/=_~#.,:;+]*";

View File

@ -320,6 +320,12 @@ static void load_config(GtkWindow *window, VteTerminal *vte, gboolean *dynamic_t
}
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);
}
@ -348,13 +354,6 @@ int main(int argc, char **argv) {
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 *vte = vte_terminal_new();

View File

@ -9,6 +9,7 @@ dynamic_title = true
urgent_on_bell = true
font = Monospace 9
scrollback_lines = 1000
#icon_name = terminal
# SYSTEM, ON or OFF
cursor_blink = SYSTEM