Exemplo n.º 1
0
void plugin_init(GeanyData *data)
{
	GKeyFile *config = g_key_file_new();
	GeanyKeyGroup *key_group;

	ao_info = g_new0(AddonsInfo, 1);

	ao_info->config_file = g_strconcat(geany->app->configdir, G_DIR_SEPARATOR_S,
		"plugins", G_DIR_SEPARATOR_S, "addons", G_DIR_SEPARATOR_S, "addons.conf", NULL);

	g_key_file_load_from_file(config, ao_info->config_file, G_KEY_FILE_NONE, NULL);
	ao_info->enable_doclist = utils_get_setting_boolean(config,
		"addons", "show_toolbar_doclist_item", TRUE);
	ao_info->doclist_sort_mode = utils_get_setting_integer(config,
		"addons", "doclist_sort_mode", DOCLIST_SORT_BY_OCCURRENCE);
	ao_info->enable_openuri = utils_get_setting_boolean(config,
		"addons", "enable_openuri", FALSE);
	ao_info->enable_tasks = utils_get_setting_boolean(config,
		"addons", "enable_tasks", TRUE);
	ao_info->tasks_scan_all_documents = utils_get_setting_boolean(config,
		"addons", "tasks_scan_all_documents", FALSE);
	ao_info->tasks_token_list = utils_get_setting_string(config,
		"addons", "tasks_token_list", "TODO;FIXME");
	ao_info->enable_systray = utils_get_setting_boolean(config,
		"addons", "enable_systray", FALSE);
	ao_info->enable_bookmarklist = utils_get_setting_boolean(config,
		"addons", "enable_bookmarklist", FALSE);
	ao_info->enable_markword = utils_get_setting_boolean(config,
		"addons", "enable_markword", FALSE);
	ao_info->strip_trailing_blank_lines = utils_get_setting_boolean(config,
		"addons", "strip_trailing_blank_lines", FALSE);
	ao_info->enable_xmltagging = utils_get_setting_boolean(config, "addons",
		"enable_xmltagging", FALSE);

	plugin_module_make_resident(geany_plugin);

	ao_info->doclist = ao_doc_list_new(ao_info->enable_doclist, ao_info->doclist_sort_mode);
	ao_info->openuri = ao_open_uri_new(ao_info->enable_openuri);
	ao_info->systray = ao_systray_new(ao_info->enable_systray);
	ao_info->bookmarklist = ao_bookmark_list_new(ao_info->enable_bookmarklist);
	ao_info->markword = ao_mark_word_new(ao_info->enable_markword);
	ao_info->tasks = ao_tasks_new(ao_info->enable_tasks,
						ao_info->tasks_token_list, ao_info->tasks_scan_all_documents);

	ao_blanklines_set_enable(ao_info->strip_trailing_blank_lines);

	/* setup keybindings */
	key_group = plugin_set_key_group(geany_plugin, "addons", KB_COUNT, NULL);
	keybindings_set_item(key_group, KB_FOCUS_BOOKMARK_LIST, kb_bmlist_activate,
		0, 0, "focus_bookmark_list", _("Focus Bookmark List"), NULL);
	keybindings_set_item(key_group, KB_FOCUS_TASKS, kb_tasks_activate,
		0, 0, "focus_tasks", _("Focus Tasks List"), NULL);
	keybindings_set_item(key_group, KB_UPDATE_TASKS, kb_tasks_update,
		0, 0, "update_tasks", _("Update Tasks List"), NULL);
	keybindings_set_item(key_group, KB_XMLTAGGING, kb_ao_xmltagging,
		0, 0, "xml_tagging", _("Run XML tagging"), NULL);
}
Exemplo n.º 2
0
void plugin_init(GeanyData *data)
{
	GKeyFile *config = g_key_file_new();
	gchar *default_lang;

	default_lang = sc_speller_get_default_lang();
	sc_info = g_new0(SpellCheck, 1);

	sc_info->config_file = g_strconcat(geany->app->configdir,
		G_DIR_SEPARATOR_S, "plugins", G_DIR_SEPARATOR_S,
		"spellcheck", G_DIR_SEPARATOR_S, "spellcheck.conf", NULL);

	g_key_file_load_from_file(config, sc_info->config_file, G_KEY_FILE_NONE, NULL);
	sc_info->default_language = utils_get_setting_string(config,
		"spellcheck", "language", default_lang);
	sc_info->check_while_typing = utils_get_setting_boolean(config,
		"spellcheck", "check_while_typing", FALSE);
	sc_info->check_on_document_open = utils_get_setting_boolean(config,
		"spellcheck", "check_on_document_open", FALSE);
	sc_info->show_toolbar_item = utils_get_setting_boolean(config,
		"spellcheck", "show_toolbar_item", TRUE);
	sc_info->show_editor_menu_item = utils_get_setting_boolean(config,
		"spellcheck", "show_editor_menu_item", TRUE);
	sc_info->dictionary_dir = utils_get_setting_string(config,
		"spellcheck", "dictionary_dir", NULL);
	sc_info->use_msgwin = utils_get_setting_boolean(config, "spellcheck", "use_msgwin", FALSE);
	g_key_file_free(config);
	g_free(default_lang);

	sc_info->menu_item = gtk_image_menu_item_new_from_stock(GTK_STOCK_SPELL_CHECK, NULL);
	ui_add_document_sensitive(sc_info->menu_item);

	sc_gui_update_toolbar();

	sc_gui_init();
	sc_speller_init();

	sc_gui_create_edit_menu();
	sc_gui_update_menu();
	gtk_widget_show_all(sc_info->menu_item);

	/* setup keybindings */
	keybindings_set_item(plugin_key_group, KB_SPELL_CHECK, sc_gui_kb_run_activate_cb,
		0, 0, "spell_check", _("Run Spell Check"), sc_info->submenu_item_default);
	keybindings_set_item(plugin_key_group, KB_SPELL_TOOGLE_TYPING,
		sc_gui_kb_toggle_typing_activate_cb, 0, 0, "spell_toggle_typing",
		_("Toggle Check While Typing"), NULL);
}
Exemplo n.º 3
0
void conterm_load_config(void)
{
	gchar *configfile = g_build_filename(geany_data->app->configdir, "geany.conf", NULL);
	GKeyFile *config = g_key_file_new();
	gchar *tmp_string;

	g_key_file_load_from_file(config, configfile, G_KEY_FILE_NONE, NULL);
	pref_vte_blinken = utils_get_setting_boolean(config, "VTE", "cursor_blinks", FALSE);
	pref_vte_emulation = utils_get_setting_string(config, "VTE", "emulation", "xterm");
	pref_vte_font = utils_get_setting_string(config, "VTE", "font", "Monospace 10");
	pref_vte_scrollback = utils_get_setting_integer(config, "VTE", "scrollback_lines", 500);
	tmp_string = utils_get_setting_string(config, "VTE", "colour_fore", "#ffffff");
#if !GTK_CHECK_VERSION(3, 14, 0)
	gdk_color_parse(tmp_string, &pref_vte_colour_fore);
#else
	gdk_rgba_parse(&pref_vte_colour_fore, tmp_string);
#endif
	g_free(tmp_string);
	tmp_string = utils_get_setting_string(config, "VTE", "colour_back", "#000000");
#if !GTK_CHECK_VERSION(3, 14, 0)
	gdk_color_parse(tmp_string, &pref_vte_colour_back);
#else
	gdk_rgba_parse(&pref_vte_colour_back, tmp_string);
#endif
	g_free(tmp_string);
	g_key_file_free(config);
	g_free(configfile);
}
Exemplo n.º 4
0
void plugin_init(GeanyData *data)
{
	home = g_getenv("HOME");
	if (!home) {
		home = g_get_home_dir();
	}

	conf = g_build_path(G_DIR_SEPARATOR_S, geany_data->app->configdir, "plugins", "quick-opener.conf", NULL);
	config = g_key_file_new();
	g_key_file_load_from_file(config, conf, G_KEY_FILE_NONE, NULL);
	include_path = utils_get_setting_boolean(config, "main", "include-path", include_path);
	pathRegexSetting.text = utils_get_setting_string(config, "main", "path-regex", pathRegexSetting.DEFAULT);
	nameRegexSetting.text = utils_get_setting_string(config, "main", "name-regex", nameRegexSetting.DEFAULT);
	opener_path = utils_get_setting_string(config, "main", "path", home);

	setup_regex();

	GeanyKeyGroup *key_group;
	key_group = plugin_set_key_group(geany_plugin, "quick_open_keyboard_shortcut", COUNT_KB, NULL);
	keybindings_set_item(key_group, KB_QUICK_OPEN_PROJECT, quick_open_project_keyboard_shortcut, 0, 0,
		"quick_open_project_keyboard_shortcut", _("Quick Open Project Files..."), NULL);
	keybindings_set_item(key_group, KB_QUICK_OPEN, quick_open_keyboard_shortcut, 0, 0,
		"quick_open_keyboard_shortcut", _("Quick Open..."), NULL);

	quick_open_project_menu = gtk_menu_item_new_with_mnemonic("Quick Open Project Files...");
	gtk_widget_show(quick_open_project_menu);
	gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu), quick_open_project_menu);
	g_signal_connect(quick_open_project_menu, "activate", G_CALLBACK(quick_open_project_menu_callback), NULL);

	quick_open_menu = gtk_menu_item_new_with_mnemonic("Quick Open...");
	gtk_widget_show(quick_open_menu);
	gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu), quick_open_menu);
	g_signal_connect(quick_open_menu, "activate", G_CALLBACK(quick_open_menu_callback), NULL);
}
Exemplo n.º 5
0
static void load_config(void)
{
	gchar *filename = get_config_filename();
	GKeyFile *kf = g_key_file_new();

	if (g_key_file_load_from_file(kf, filename, G_KEY_FILE_NONE, NULL))
	{
		vi_set_enabled(utils_get_setting_boolean(kf, CONF_GROUP, CONF_ENABLE_VIM, TRUE));
		vi_set_insert_for_dummies(utils_get_setting_boolean(kf,
			CONF_GROUP, CONF_INSERT_FOR_DUMMIES, FALSE));
		start_in_insert = utils_get_setting_boolean(kf,
			CONF_GROUP, CONF_START_IN_INSERT, FALSE);
	}
  
	g_key_file_free(kf);
	g_free(filename);
}
/* load settings (preferences, file data, and macro data) */
static void LoadSettings(void)
{
	gint i;
	gchar *config_file=NULL;
	gchar *config_dir=NULL;
	GKeyFile *config=NULL;

	/* Make config_dir hold directory name of settings file */
	config_dir=g_build_filename(geany->app->configdir,"plugins","Geany_Numbered_Bookmarks",NULL);
	/* ensure directory exists */
	g_mkdir_with_parents(config_dir,0755);

	/* make config_file hold name of settings file */
	config_file=g_build_filename(config_dir,"settings.conf",NULL);

	/* either load settings file, or create one from default */
	config=g_key_file_new();
	if(!g_key_file_load_from_file(config,config_file, G_KEY_FILE_KEEP_COMMENTS,NULL))
		g_key_file_load_from_data(config,default_config,sizeof(default_config),
								G_KEY_FILE_KEEP_COMMENTS,NULL);

	/* extract settings */
	bCenterWhenGotoBookmark=utils_get_setting_boolean(config,"Settings",
	                        "Center_When_Goto_Bookmark",FALSE);
	bRememberFolds=utils_get_setting_boolean(config,"Settings","Remember_Folds",FALSE);
	PositionInLine=utils_get_setting_integer(config,"Settings","Position_In_Line",0);
	WhereToSaveFileDetails=utils_get_setting_integer(config,"Settings",
	                                                 "Where_To_Save_File_Details",0);
	bRememberBookmarks=utils_get_setting_boolean(config,"Settings","Remember_Bookmarks",FALSE);
	FileDetailsSuffix=utils_get_setting_string(config,"Settings","File_Details_Suffix",
	                                           ".gnbs.conf");

	/* extract data about files */
	i=0;
	while(LoadIndividualSetting(config,i,NULL))
		i++;

	/* free memory */
	g_free(config_dir);
	g_free(config_file);
	g_key_file_free(config);
}
Exemplo n.º 7
0
static void load_settings(void)
{
    GKeyFile *config = g_key_file_new();

    config_file = g_strconcat(geany->app->configdir, G_DIR_SEPARATOR_S, "plugins", G_DIR_SEPARATOR_S,
                              "geniuspaste", G_DIR_SEPARATOR_S, "geniuspaste.conf", NULL);
    g_key_file_load_from_file(config, config_file, G_KEY_FILE_NONE, NULL);
    
    website_selected = utils_get_setting_integer(config, "geniuspaste", "website", PASTEBIN_GEANY_ORG);
    check_button_is_checked = utils_get_setting_boolean(config, "geniuspaste", "open_browser", FALSE);
    author_name = utils_get_setting_string(config, "geniuspaste", "author_name", USERNAME);
    
    g_key_file_free(config);
}
Exemplo n.º 8
0
void plugin_init(GeanyData *data)
{
	GKeyFile *config = g_key_file_new();
	gchar *tmp;

	config_file = g_strconcat(geany->app->configdir, G_DIR_SEPARATOR_S, "plugins",
		G_DIR_SEPARATOR_S, "saveactions", G_DIR_SEPARATOR_S, "saveactions.conf", NULL);

	g_key_file_load_from_file(config, config_file, G_KEY_FILE_NONE, NULL);

	enable_autosave = utils_get_setting_boolean(
		config, "saveactions", "enable_autosave", FALSE);
	enable_instantsave = utils_get_setting_boolean(
		config, "saveactions", "enable_instantsave", FALSE);
	enable_backupcopy = utils_get_setting_boolean(
		config, "saveactions", "enable_backupcopy", FALSE);

	instantsave_default_ft = utils_get_setting_string(config, "instantsave", "default_ft",
		filetypes[GEANY_FILETYPES_NONE]->name);

	autosave_src_id = 0; /* mark as invalid */
	autosave_interval = utils_get_setting_integer(config, "autosave", "interval", 300);
	autosave_print_msg = utils_get_setting_boolean(config, "autosave", "print_messages", FALSE);
	autosave_save_all = utils_get_setting_boolean(config, "autosave", "save_all", FALSE);
	if (enable_autosave)
		autosave_set_timeout();

	backupcopy_dir_levels = utils_get_setting_integer(config, "backupcopy", "dir_levels", 0);
	backupcopy_time_fmt = utils_get_setting_string(
		config, "backupcopy", "time_fmt", "%Y-%m-%d-%H-%M-%S");
	tmp = utils_get_setting_string(config, "backupcopy", "backup_dir", g_get_tmp_dir());
	backupcopy_set_backup_dir(tmp);

	g_key_file_free(config);
	g_free(tmp);
}
Exemplo n.º 9
0
static void init_configuration(void)
{
    GKeyFile *config = g_key_file_new();

    /* loading configurations from file ...*/
    config_file = g_strconcat(geany->app->configdir, G_DIR_SEPARATOR_S,
    "plugins", G_DIR_SEPARATOR_S,
    "updatechecker", G_DIR_SEPARATOR_S, "general.conf", NULL);

    /* ... and Initialising options from config file */
    g_key_file_load_from_file(config, config_file, G_KEY_FILE_NONE, NULL);

    check_on_startup = utils_get_setting_boolean(config, "general",
        "check_for_updates_on_startup", FALSE);

    g_key_file_free(config);
}
Exemplo n.º 10
0
void gprj_project_open(GKeyFile * key_file)
{
	gchar **source_patterns, **header_patterns, **ignored_dirs_patterns;
	gboolean generate_tags;

	if (g_prj != NULL)
		gprj_project_close();

	g_prj = (GPrj *) g_new0(GPrj, 1);

	g_prj->source_patterns = NULL;
	g_prj->header_patterns = NULL;
	g_prj->ignored_dirs_patterns = NULL;
	g_prj->generate_tags = FALSE;

	g_prj->file_tag_table = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);

	deferred_op_queue_clean();

	source_patterns = g_key_file_get_string_list(key_file, "gproject", "source_patterns", NULL, NULL);
	if (!source_patterns)
		source_patterns = g_strsplit("*.c *.C *.cpp *.cxx *.c++ *.cc", " ", -1);
	header_patterns = g_key_file_get_string_list(key_file, "gproject", "header_patterns", NULL, NULL);
	if (!header_patterns)
		header_patterns = g_strsplit("*.h *.H *.hpp *.hxx *.h++ *.hh *.m", " ", -1);
	ignored_dirs_patterns = g_key_file_get_string_list(key_file, "gproject", "ignored_dirs_patterns", NULL, NULL);
	if (!ignored_dirs_patterns)
		ignored_dirs_patterns = g_strsplit(".* CVS", " ", -1);
	generate_tags = utils_get_setting_boolean(key_file, "gproject", "generate_tags", FALSE);

	update_project(
		source_patterns,
		header_patterns,
		ignored_dirs_patterns,
		generate_tags);

	g_strfreev(source_patterns);
	g_strfreev(header_patterns);
	g_strfreev(ignored_dirs_patterns);
}
Exemplo n.º 11
0
static void
on_comboboxType_changed(GtkComboBox * combobox, G_GNUC_UNUSED gpointer user_data)
{
	gchar *from, *to;
	GtkWidget *cmd0 = ui_lookup_widget(GTK_WIDGET(combobox), "entryCommand0");
	GtkWidget *cmd1 = ui_lookup_widget(GTK_WIDGET(combobox), "entryCommand1");
	GtkWidget *intern = ui_lookup_widget(GTK_WIDGET(combobox), "cbIntern");

	gchar *cmd0_txt = (gchar *) gtk_entry_get_text(GTK_ENTRY(cmd0));
	gchar *cmd1_txt = (gchar *) gtk_entry_get_text(GTK_ENTRY(cmd1));
	gboolean intern_b = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(intern));
	GKeyFile *config = (GKeyFile *) g_object_get_data(G_OBJECT(combobox), "config");

	from = g_object_get_data(G_OBJECT(combobox), "current");
	to = gtk_combo_box_get_active_text(combobox);

	if (from != NULL)
	{
		if (! EMPTY(cmd0_txt))
			g_key_file_set_string(config, from, "command0", cmd0_txt);
		else
			g_key_file_remove_key(config, from, "command0", NULL);
		if (! EMPTY(cmd1_txt))
			g_key_file_set_string(config, from, "command1", cmd1_txt);
		else
			g_key_file_remove_key(config, from, "command1", NULL);
		g_key_file_set_boolean(config, from, "internal", intern_b);
		g_free(from);
	}
	g_object_set_data(G_OBJECT(combobox), "current", g_strdup(to));

	cmd0_txt = utils_get_setting_string(config, to, "command0", "");
	cmd1_txt = utils_get_setting_string(config, to, "command1", "");
	intern_b = utils_get_setting_boolean(config, to, "internal", FALSE);

	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(intern), intern_b);
	gtk_entry_set_text(GTK_ENTRY(cmd0), cmd0_txt);
	gtk_entry_set_text(GTK_ENTRY(cmd1), cmd1_txt);
}
Exemplo n.º 12
0
void prefs_init(void)
{
	guint i;
	MarkerStyle *style = pref_marker_styles;
	StashGroup *group;
	char *configdir = g_build_filename(geany->app->configdir, "plugins", "scope", NULL);
	char *configfile = prefs_file_name();
	GKeyFile *config = g_key_file_new();
	gchar *tmp_string;

	group = stash_group_new("scope");
	stash_group_add_string(group, &pref_gdb_executable, "gdb_executable", "gdb");
	stash_group_add_boolean(group, &pref_gdb_async_mode, "gdb_async_mode", FALSE);
	stash_group_add_integer(group, &pref_gdb_buffer_length, "gdb_buffer_length", 16383);
	stash_group_add_integer(group, &pref_gdb_wait_death, "gdb_wait_death", 20);
#ifndef G_OS_UNIX
	stash_group_add_integer(group, &pref_gdb_send_interval, "gdb_send_interval", 5);
	stash_group_add_boolean(group, &pref_async_break_bugs, "async_break_bugs", TRUE);
#endif
	stash_group_add_boolean(group, &pref_auto_view_source, "auto_view_source", FALSE);
	stash_group_add_boolean(group, &pref_keep_exec_point, "keep_exec_point", FALSE);
	stash_group_add_integer(group, &pref_visual_beep_length, "visual_beep_length", 25);
#ifdef G_OS_UNIX
	stash_group_add_boolean(group, &pref_debug_console_vte, "debug_console_vte", TRUE);
#endif
	stash_group_add_integer(group, &pref_sci_marker_1st, "sci_marker_first", 17);
	stash_group_add_integer(group, &pref_sci_caret_policy, "sci_caret_policy", CARET_SLOP |
		CARET_JUMPS | CARET_EVEN);
	stash_group_add_integer(group, &pref_sci_caret_slop, "sci_caret_slop", 3);
	stash_group_add_boolean(group, &pref_unmark_current_line, "unmark_current_line", FALSE);
	stash_group_add_boolean(group, &pref_scope_goto_cursor, "scope_run_to_cursor", FALSE);
	stash_group_add_boolean(group, &pref_seek_with_navqueue, "seek_with_navqueue", FALSE);
	stash_group_add_integer(group, &pref_panel_tab_pos, "panel_tab_pos", GTK_POS_TOP);
	stash_group_add_integer(group, &pref_show_recent_items, "show_recent_items", 10);
	stash_group_add_integer(group, &pref_show_toolbar_items, "show_toolbar_items", 0xFF);
	stash_group_add_integer(group, &pref_tooltips_fail_action, "tooltips_fail_action", 0);
	stash_group_add_integer(group, &pref_tooltips_send_delay, "tooltips_send_delay", 25);
	stash_group_add_integer(group, &pref_tooltips_length, "tooltips_length", 2048);
	stash_group_add_integer(group, &pref_memory_bytes_per_line, "memory_line_bytes", 16);
	stash_group_add_string(group, &pref_memory_font, "memory_font", "");
	scope_group = group;

	config_item = ui_add_config_file_menu_item(configfile, NULL, NULL);
	plugin_signal_connect(geany_plugin, NULL, "document-save", FALSE,
		G_CALLBACK(on_document_save), NULL);

	group = stash_group_new("terminal");
#ifdef G_OS_UNIX
	stash_group_add_boolean(group, &pref_terminal_save_pos, "save_pos", TRUE);
	stash_group_add_boolean(group, &pref_terminal_padding, "padding", TRUE);
	stash_group_add_integer(group, &pref_terminal_window_x, "window_x", 70);
	stash_group_add_integer(group, &pref_terminal_window_y, "window_y", 50);
	stash_group_add_integer(group, &pref_terminal_width, "width", 640);
	stash_group_add_integer(group, &pref_terminal_height, "height", 480);
#endif  /* G_OS_UNIX */
	terminal_group = group;

	for (i = 0; i < MARKER_COUNT; i++, style++)
	{
		group = stash_group_new(style->name);
		stash_group_add_integer(group, &style->mark, "mark", style->default_mark);
		stash_group_add_integer(group, &style->alpha, "alpha", style->default_alpha);
		marker_group[i] = group;
	}

	g_key_file_load_from_file(config, configfile, G_KEY_FILE_NONE, NULL);
	load_scope_prefs(config);
	pref_sci_marker_first = pref_sci_marker_1st;
	prefs_configure();
	program_load_config(config);

	if (pref_panel_tab_pos == GTK_POS_LEFT || pref_panel_tab_pos == GTK_POS_RIGHT)
	{
		gtk_label_set_label(GTK_LABEL(get_widget("program_terminal_label")), _("Program"));
		gtk_label_set_label(GTK_LABEL(get_widget("break_view_label")), _("Breaks"));
		gtk_label_set_label(GTK_LABEL(get_widget("debug_console_label")), _("Console"));
	}

	if (!g_file_test(configfile, G_FILE_TEST_IS_REGULAR))
	{
		gint error = utils_mkdir(configdir, TRUE);

		if (error)
			msgwin_status_add(_("Scope: %s: %s."), configdir, g_strerror(error));
		else
		{
			save_scope_prefs(config);
			if (utils_key_file_write_to_file(config, configfile))
				msgwin_status_add(_("Scope: created configuration file."));
		}
	}

	g_key_file_free(config);
	g_free(configfile);
	g_free(configdir);

	configfile = g_build_filename(geany_data->app->configdir, "geany.conf", NULL);
	config = g_key_file_new();
	g_key_file_load_from_file(config, configfile, G_KEY_FILE_NONE, NULL);
	pref_vte_blinken = utils_get_setting_boolean(config, "VTE", "cursor_blinks", FALSE);
	pref_vte_emulation = utils_get_setting_string(config, "VTE", "emulation", "xterm");
	pref_vte_font = utils_get_setting_string(config, "VTE", "font", "Monospace 10");
	pref_vte_scrollback = utils_get_setting_integer(config, "VTE", "scrollback_lines", 500);
	tmp_string = utils_get_setting_string(config, "VTE", "colour_fore", "#ffffff");
	gdk_color_parse(tmp_string, &pref_vte_colour_fore);
	g_free(tmp_string);
	tmp_string = utils_get_setting_string(config, "VTE", "colour_back", "#000000");
	gdk_color_parse(tmp_string, &pref_vte_colour_back);
	g_free(tmp_string);
	g_key_file_free(config);
	g_free(configfile);
}