72#define GEANY_MAX_SYMBOLLIST_HEIGHT 10
73#define GEANY_MIN_SYMBOLLIST_CHARS 4
74#define GEANY_MSGWIN_HEIGHT 208
75#define GEANY_DISK_CHECK_TIMEOUT 30
76#define GEANY_DEFAULT_TOOLS_MAKE "make"
78#define GEANY_DEFAULT_TOOLS_TERMINAL "cmd.exe /Q /C %c"
79#elif defined(__APPLE__)
80#define GEANY_DEFAULT_TOOLS_TERMINAL "open -a terminal %c"
82#define GEANY_DEFAULT_TOOLS_TERMINAL "xterm -e \"/bin/sh %c\""
85#define GEANY_DEFAULT_TOOLS_BROWSER "open -a safari"
86#define GEANY_DEFAULT_FONT_SYMBOL_LIST "Helvetica Medium 12"
87#define GEANY_DEFAULT_FONT_MSG_WINDOW "Menlo Medium 12"
88#define GEANY_DEFAULT_FONT_EDITOR "Menlo Medium 12"
90#define GEANY_DEFAULT_TOOLS_BROWSER "firefox"
91#define GEANY_DEFAULT_FONT_SYMBOL_LIST "Sans 9"
92#define GEANY_DEFAULT_FONT_MSG_WINDOW "Monospace 9"
93#define GEANY_DEFAULT_FONT_EDITOR "Monospace 10"
95#define GEANY_DEFAULT_TOOLS_PRINTCMD "lpr"
96#define GEANY_DEFAULT_TOOLS_GREP "grep"
97#define GEANY_DEFAULT_MRU_LENGTH 10
98#define GEANY_TOGGLE_MARK "~ "
99#define GEANY_MAX_AUTOCOMPLETE_WORDS 30
100#define GEANY_MAX_SYMBOLS_UPDATE_FREQ 250
101#define GEANY_DEFAULT_FILETYPE_REGEX "-\\*-\\s*([^\\s]+)\\s*-\\*-"
132 if (for_prefs_dialog)
154 "default_open_path",
"",
"startup_path_entry");
157 "cmdline_new_files", TRUE,
"check_cmdline_new_files");
160 "notebook_double_click_hides_widgets", FALSE,
"check_double_click_hides_widgets");
162 "tab_close_switch_to_mru", FALSE,
"check_tab_close_switch_to_mru");
165 "sidebar_pos", GTK_POS_LEFT,
166 "radio_sidebar_left", GTK_POS_LEFT,
167 "radio_sidebar_right", GTK_POS_RIGHT,
170 "symbols_sort_mode", SYMBOLS_SORT_BY_NAME,
171 "radio_symbols_sort_by_name", SYMBOLS_SORT_BY_NAME,
172 "radio_symbols_sort_by_appearance", SYMBOLS_SORT_BY_APPEARANCE,
175 "msgwin_orientation", GTK_ORIENTATION_VERTICAL,
176 "radio_msgwin_vertical", GTK_ORIENTATION_VERTICAL,
177 "radio_msgwin_horizontal", GTK_ORIENTATION_HORIZONTAL,
182 "highlighting_invert_all", FALSE,
"check_highlighting_invert");
185 "pref_main_search_use_current_word", TRUE,
"check_search_use_current_word");
189 "check_detect_indent", FALSE,
"check_detect_indent_type");
191 "detect_indent_width", FALSE,
"check_detect_indent_width");
193 "use_tab_to_indent", TRUE,
"check_tab_key_indents");
195 "pref_editor_tab_width", 4,
"spin_indent_width");
205 "virtualspace", GEANY_VIRTUAL_SPACE_SELECTION,
206 "radio_virtualspace_disabled", GEANY_VIRTUAL_SPACE_DISABLED,
207 "radio_virtualspace_selection", GEANY_VIRTUAL_SPACE_SELECTION,
208 "radio_virtualspace_always", GEANY_VIRTUAL_SPACE_ALWAYS,
211 "autocomplete_doc_words", FALSE,
"check_autocomplete_doc_words");
213 "completion_drops_rest_of_word", FALSE,
"check_completion_drops_rest_of_word");
216 "spin_autocompletion_max_entries");
220 "color_scheme",
NULL);
222 "scroll_lines_around_cursor", 0,
"spin_scroll_lines_around_cursor");
235 "show_editor_scrollbars", TRUE);
237 "brace_match_ltgt", FALSE);
239 "use_gtk_word_boundaries", TRUE);
241 "complete_snippets_whilst_editing", FALSE);
244 "indent_hard_tab_width", 8);
254 "gio_unsafe_save_backup", FALSE);
256 "use_gio_unsafe_file_saving", TRUE);
258 "keep_edit_history_on_reload", TRUE);
260 "show_keep_edit_history_on_reload_msg", TRUE);
262 "reload_clean_doc_on_file_change", FALSE);
264 "save_config_on_file_change", TRUE);
268 "allow_always_save", FALSE);
276 "replace_and_find_by_default", TRUE);
294 "number_ft_menu_items", 0);
296 "number_non_ft_menu_items", 0);
298 "number_exec_menu_items", 0);
334 if (! g_queue_is_empty(queue))
338 recent_files[i] = g_strdup(g_queue_peek_nth(queue, i));
342 recent_files[i] =
NULL;
348 g_key_file_set_string_list(config,
"files", key,
350 g_strfreev(recent_files);
357 gchar *locale_filename;
358 gchar *escaped_filename;
365 escaped_filename = g_uri_escape_string(locale_filename,
NULL, TRUE);
367 fname = g_strdup_printf(
"%d;%s;%d;E%s;%d;%d;%d;%s;%d;%d",
378 g_free(escaped_filename);
379 g_free(locale_filename);
387 gchar **keys = g_key_file_get_keys(config,
"files",
NULL,
NULL);
391 if (g_str_has_prefix(*
ptr,
"FILE_NAME_"))
392 g_key_file_remove_key(config,
"files", *
ptr,
NULL);
402 guint i = 0, j = 0,
max;
405 g_key_file_set_integer(config,
"files",
"current_page", npage);
412 for (i = 0; i <
max; i++)
420 g_snprintf(
entry,
sizeof(
entry),
"FILE_NAME_%d", j);
422 g_key_file_set_string(config,
"files",
entry, fname);
429 if (vte_info.have_vte)
431 vte_get_working_directory();
432 g_key_file_set_string(config,
"VTE",
"last_dir", vte_info.dir);
446 g_key_file_set_boolean(config, PACKAGE,
"pref_main_load_session",
prefs.
load_session);
447 g_key_file_set_boolean(config, PACKAGE,
"pref_main_project_session",
project_prefs.project_session);
448 g_key_file_set_boolean(config, PACKAGE,
"pref_main_project_file_in_basedir",
project_prefs.project_file_in_basedir);
449 g_key_file_set_boolean(config, PACKAGE,
"pref_main_save_winpos",
prefs.
save_winpos);
450 g_key_file_set_boolean(config, PACKAGE,
"pref_main_save_wingeom",
prefs.
save_wingeom);
451 g_key_file_set_boolean(config, PACKAGE,
"pref_main_confirm_exit",
prefs.
confirm_exit);
455 g_key_file_set_boolean(config, PACKAGE,
"auto_focus",
prefs.
auto_focus);
504 g_key_file_set_string(config, PACKAGE,
"pref_editor_default_open_encoding",
"none");
551 g_key_file_set_boolean(config,
"VTE",
"load_vte", vte_info.load_vte);
552 if (vte_info.have_vte)
556 g_key_file_set_string(config,
"VTE",
"font", vc->font);
557 g_key_file_set_boolean(config,
"VTE",
"scroll_on_key", vc->scroll_on_key);
558 g_key_file_set_boolean(config,
"VTE",
"scroll_on_out", vc->scroll_on_out);
559 g_key_file_set_boolean(config,
"VTE",
"enable_bash_keys", vc->enable_bash_keys);
560 g_key_file_set_boolean(config,
"VTE",
"ignore_menu_bar_accel", vc->ignore_menu_bar_accel);
561 g_key_file_set_boolean(config,
"VTE",
"follow_path", vc->follow_path);
562 g_key_file_set_boolean(config,
"VTE",
"run_in_vte", vc->run_in_vte);
563 g_key_file_set_boolean(config,
"VTE",
"skip_run_script", vc->skip_run_script);
564 g_key_file_set_boolean(config,
"VTE",
"cursor_blinks", vc->cursor_blinks);
565 g_key_file_set_integer(config,
"VTE",
"scrollback_lines", vc->scrollback_lines);
566 g_key_file_set_string(config,
"VTE",
"font", vc->font);
567 g_key_file_set_string(config,
"VTE",
"shell", vc->shell);
569 g_key_file_set_string(config,
"VTE",
"colour_fore", tmp_string);
572 g_key_file_set_string(config,
"VTE",
"colour_back", tmp_string);
581 g_key_file_set_boolean(config, PACKAGE,
"sidebar_visible",
ui_prefs.sidebar_visible);
583 g_key_file_set_boolean(config, PACKAGE,
"msgwindow_visible",
ui_prefs.msgwindow_visible);
584 g_key_file_set_boolean(config, PACKAGE,
"fullscreen",
ui_prefs.fullscreen);
585 g_key_file_set_string(config, PACKAGE,
"color_picker_palette",
ui_prefs.color_picker_palette);
589 GtkTextBuffer *buffer;
590 GtkTextIter start, end, iter;
593 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(
msgwindow.scribble));
594 gtk_text_buffer_get_bounds(buffer, &start, &end);
595 scribble_text = gtk_text_buffer_get_text(buffer, &start, &end, FALSE);
596 g_key_file_set_string(config, PACKAGE,
"scribble_text",
scribble_text);
599 mark = gtk_text_buffer_get_insert(buffer);
600 gtk_text_buffer_get_iter_at_mark(buffer, &iter, mark);
602 g_key_file_set_integer(config, PACKAGE,
"scribble_pos",
scribble_pos);
607 GdkWindowState wstate;
609 g_key_file_set_integer(config, PACKAGE,
"treeview_position",
611 g_key_file_set_integer(config, PACKAGE,
"msgwindow_position",
617 ui_prefs.geometry[4] = (wstate & GDK_WINDOW_STATE_MAXIMIZED) ? 1 : 0;
618 g_key_file_set_integer_list(config, PACKAGE,
"geometry",
ui_prefs.geometry, 5);
621 g_key_file_set_string(config, PACKAGE,
"custom_date_format",
ui_prefs.custom_date_format);
624 g_key_file_set_string_list(config, PACKAGE,
"custom_commands",
625 (
const gchar**)
ui_prefs.custom_commands, g_strv_length(
ui_prefs.custom_commands));
626 g_key_file_set_string_list(config, PACKAGE,
"custom_commands_labels",
627 (
const gchar**)
ui_prefs.custom_commands_labels, g_strv_length(
ui_prefs.custom_commands_labels));
634 GKeyFile *config = g_key_file_new();
638 g_key_file_load_from_file(config, configfile, G_KEY_FILE_NONE,
NULL);
641 g_signal_emit_by_name(
geany_object,
"save-settings", config);
652 else if (vte_info.have_vte)
654 vte_get_working_directory();
655 g_key_file_set_string(config,
"VTE",
"last_dir", vte_info.dir);
660 data = g_key_file_to_data(config,
NULL,
NULL);
664 g_key_file_free(config);
671 gchar **recent_files;
674 recent_files = g_key_file_get_string_list(config,
"files", key, &len,
NULL);
675 if (recent_files !=
NULL)
679 gchar *
filename = g_strdup(recent_files[i]);
682 g_strfreev(recent_files);
694 gboolean have_session_files;
701 if (read_recent_files)
711 g_strfreev(tmp_array);
716 have_session_files = TRUE;
718 while (have_session_files)
720 g_snprintf(
entry,
sizeof(
entry),
"FILE_NAME_%d", i);
721 tmp_array = g_key_file_get_string_list(config,
"files",
entry,
NULL, &
error);
722 if (! tmp_array ||
error)
726 have_session_files = FALSE;
734 if (vte_info.have_vte)
737 vte_cwd(tmp_string,TRUE);
745static void get_setting_color(GKeyFile *config,
const gchar *section,
const gchar *key,
746 GdkColor *
color,
const gchar *default_color)
759 gchar *tmp_string, *tmp_string2;
760 const gchar *default_charset =
NULL;
772 gboolean suppress_search_dialogs =
utils_get_setting_boolean(config, PACKAGE,
"pref_main_suppress_search_dialogs", FALSE);
774 if (!g_key_file_has_key(config,
"search",
"pref_search_always_wrap",
NULL))
775 g_key_file_set_boolean(config,
"search",
"pref_search_always_wrap", suppress_search_dialogs);
777 if (!g_key_file_has_key(config,
"search",
"pref_search_hide_find_dialog",
NULL))
778 g_key_file_set_boolean(config,
"search",
"pref_search_hide_find_dialog", suppress_search_dialogs);
843 g_get_charset(&default_charset);
861 if (strcmp(tmp_string,
"none") != 0)
892 if (vte_info.load_vte && vte_info.load_vte_cmdline )
895 struct passwd *pw = getpwuid(getuid());
896 const gchar *shell = (pw !=
NULL) ? pw->pw_shell :
"/bin/sh";
901 if (strcmp(shell,
"/bin/bash") == 0)
902 shell =
"/bin/bash -l";
905 vc = g_new0(VteConfig, 1);
909 SETPTR(vte_info.dir, g_strdup(pw->pw_dir));
910 else if (vte_info.dir ==
NULL && pw ==
NULL)
912 vte_info.dir = g_strdup(
"/");
925 get_setting_color(config,
"VTE",
"colour_fore", &vc->colour_fore,
"#ffffff");
926 get_setting_color(config,
"VTE",
"colour_back", &vc->colour_back,
"#000000");
947 tmp_string = g_strdup_printf(
"%s@%s", g_get_user_name(), g_get_host_name());
963 if (
strstr(cmd,
"cmd.exe"))
964 cmd = g_strconcat(cmd,
" /Q /C %c",
NULL);
966 cmd = g_strconcat(cmd,
" %c",
NULL);
968 cmd = g_strconcat(cmd,
" -e \"/bin/sh %c\"",
NULL);
984 if (!
EMPTY(tmp_string2))
994 tmp_string = g_strdup(
"");
1029 ui_prefs.custom_commands = g_key_file_get_string_list(config, PACKAGE,
"custom_commands",
NULL,
NULL);
1030 ui_prefs.custom_commands_labels = g_key_file_get_string_list(config, PACKAGE,
"custom_commands_labels",
NULL,
NULL);
1045 guint cc_len =
ui_prefs.custom_commands ? g_strv_length(
ui_prefs.custom_commands) : 0;
1046 guint cc_labels_len =
ui_prefs.custom_commands_labels ? g_strv_length(
ui_prefs.custom_commands_labels) : 0;
1049 if (cc_labels_len < cc_len)
1051 ui_prefs.custom_commands_labels = g_realloc(
ui_prefs.custom_commands_labels,
1052 (cc_len + 1) *
sizeof *
ui_prefs.custom_commands_labels);
1053 for (i = cc_labels_len; i < cc_len; i++)
1054 ui_prefs.custom_commands_labels[i] = g_strdup(
"");
1058 else if (cc_labels_len > cc_len)
1060 for (i = cc_len; i < cc_labels_len; i++)
1062 g_free(
ui_prefs.custom_commands_labels[i]);
1069 _(
"Type here what you want, use it as a notice/scratch board"));
1072 geo = g_key_file_get_integer_list(config, PACKAGE,
"geometry", &geo_len,
NULL);
1073 if (! geo || geo_len < 5)
1090 ui_prefs.geometry[4] = geo[4] != 0;
1108 GKeyFile *config = g_key_file_new();
1110 g_key_file_load_from_file(config, configfile, G_KEY_FILE_NONE,
NULL);
1116 data = g_key_file_to_data(config,
NULL,
NULL);
1120 g_key_file_free(config);
1129 GKeyFile *config = g_key_file_new();
1131 g_key_file_load_from_file(config, configfile, G_KEY_FILE_NONE,
NULL);
1137 data = g_key_file_to_data(config,
NULL,
NULL);
1141 g_key_file_free(config);
1152 GKeyFile *config = g_key_file_new();
1154 g_key_file_load_from_file(config, configfile, G_KEY_FILE_NONE,
NULL);
1159 g_key_file_free(config);
1166 GKeyFile *config = g_key_file_new();
1168 if (! g_file_test(configfile, G_FILE_TEST_IS_REGULAR))
1171 geany_debug(
"No user config file found, trying to use global configuration.");
1174 g_key_file_load_from_file(config, configfile, G_KEY_FILE_NONE,
NULL);
1183 g_signal_emit_by_name(
geany_object,
"load-settings", config);
1185 g_key_file_free(config);
1193 const gchar *ft_name;
1194 gchar *locale_filename;
1195 gchar *unescaped_filename;
1196 const gchar *encoding;
1198 gboolean ro, auto_indent, line_wrapping;
1200 gboolean line_breaking = FALSE;
1201 gboolean ret = FALSE;
1206 if (isdigit(tmp[3][0]))
1212 encoding = &(tmp[3][1]);
1214 indent_type = atoi(tmp[4]);
1215 auto_indent = atoi(tmp[5]);
1216 line_wrapping = atoi(tmp[6]);
1218 unescaped_filename = g_uri_unescape_string(tmp[7],
NULL);
1222 line_breaking = atoi(tmp[8]);
1224 if (g_file_test(locale_filename, G_FILE_TEST_IS_REGULAR))
1228 NULL, locale_filename,
pos, ro, ft, encoding);
1235 indent_width = atoi(tmp[9]);
1245 geany_debug(
"Could not find file '%s'.", unescaped_filename);
1248 g_free(locale_filename);
1249 g_free(unescaped_filename);
1260 gboolean failure = FALSE;
1271 if (tmp !=
NULL && (len = g_strv_length(tmp)) >= 8)
1306 if (target_page == cur_page && n_pages > 0)
1323 GtkTextBuffer *buffer =
1324 gtk_text_view_get_buffer(GTK_TEXT_VIEW(
msgwindow.scribble));
1327 gtk_text_buffer_get_iter_at_offset(buffer, &iter,
scribble_pos);
1328 gtk_text_buffer_place_cursor(buffer, &iter);
1360 return G_SOURCE_REMOVE;
void build_save_menu(GKeyFile *config, gpointer ptr, GeanyBuildSource src)
void build_load_menu(GKeyFile *config, GeanyBuildSource src, gpointer p)
void build_set_group_count(GeanyBuildGroup grp, gint count)
Interface to the Build menu functionality.
@ GEANY_GBG_NON_FT
non filetype items.
@ GEANY_GBG_FT
filetype items
@ GEANY_GBG_EXEC
execute items
@ GEANY_BCS_PREF
Preferences file ~/.config/geany/geany.conf.
GeanyDocument * document_open_file_full(GeanyDocument *doc, const gchar *filename, gint pos, gboolean readonly, GeanyFiletype *ft, const gchar *forced_enc)
GeanyDocument * document_get_from_page(guint page_num)
Finds the document for the given notebook page page_num.
GeanyFilePrefs file_prefs
Document related actions: new, save, open, etc.
void editor_set_indent(GeanyEditor *editor, GeanyIndentType type, gint width)
void editor_set_line_wrapping(GeanyEditor *editor, gboolean wrap)
GeanyEditorPrefs editor_prefs
@ GEANY_AUTOINDENT_CURRENTCHARS
@ GEANY_INDENT_TYPE_BOTH
Both.
@ GEANY_INDENT_TYPE_TABS
Tabs.
@ GEANY_INDENT_TYPE_SPACES
Spaces.
GeanyEncoding encodings[GEANY_ENCODINGS_MAX]
const gchar * encodings_get_charset_from_index(gint idx)
Gets the character set name of the specified index e.g.
const GeanyEncoding * encodings_get_from_charset(const gchar *charset)
Encoding conversion and Byte Order Mark (BOM) handling.
void error(const errorSelection selection, const char *const format,...)
Filetype detection, file extensions and filetype menu items.
#define filetypes
Wraps GeanyData::filetypes_array so it can be used with C array syntax.
#define GEANY_WINDOW_DEFAULT_HEIGHT
static struct @96 build_menu_prefs
gint number_non_ft_menu_items
void configuration_save(void)
void configuration_apply_settings(void)
static gint session_notebook_page
#define GEANY_MIN_SYMBOLLIST_CHARS
#define GEANY_DEFAULT_TOOLS_TERMINAL
#define GEANY_DEFAULT_TOOLS_BROWSER
void configuration_add_pref_group(struct StashGroup *group, gboolean for_prefs_dialog)
static guint document_list_update_idle_func_id
static gint hpan_position
void configuration_reload_default_session(void)
static void load_ui_prefs(GKeyFile *config)
static void load_dialog_prefs(GKeyFile *config)
static gboolean save_configuration_cb(gpointer data)
void configuration_init(void)
static const gchar atomic_file_saving_key[]
static gint vpan_position
static void load_recent_files(GKeyFile *config, GQueue *queue, const gchar *key)
static void init_pref_groups(void)
static gboolean open_session_file(gchar **tmp, guint len)
gboolean configuration_load(void)
void configuration_open_files(void)
static void save_dialog_prefs(GKeyFile *config)
#define GEANY_DEFAULT_FONT_MSG_WINDOW
#define GEANY_DEFAULT_FILETYPE_REGEX
static GPtrArray * keyfile_groups
void configuration_clear_default_session(void)
#define GEANY_MAX_AUTOCOMPLETE_WORDS
static void remove_session_files(GKeyFile *config)
static void save_recent_files(GKeyFile *config, GQueue *queue, gchar const *key)
#define GEANY_DISK_CHECK_TIMEOUT
static gchar * get_session_file_string(GeanyDocument *doc)
static GPtrArray * session_files
#define GEANY_DEFAULT_FONT_SYMBOL_LIST
static void document_list_changed_cb(GObject *obj, GeanyDocument *doc, gpointer data)
#define GEANY_MAX_SYMBOLS_UPDATE_FREQ
static gchar * scribble_text
void configuration_save_default_session(void)
static void save_ui_prefs(GKeyFile *config)
static void settings_action(GKeyFile *config, SettingAction action)
gint number_ft_menu_items
void configuration_load_session_files(GKeyFile *config, gboolean read_recent_files)
#define GEANY_DEFAULT_FONT_EDITOR
void configuration_save_session_files(GKeyFile *config)
void configuration_finalize(void)
#define GEANY_DEFAULT_TOOLS_GREP
gint number_exec_menu_items
void configuration_add_various_pref_group(struct StashGroup *group, const gchar *prefix)
#define GEANY_DEFAULT_MRU_LENGTH
#define GEANY_MAX_SYMBOLLIST_HEIGHT
#define GEANY_TOGGLE_MARK
#define GEANY_MSGWIN_HEIGHT
#define GEANY_DEFAULT_TOOLS_PRINTCMD
CommandLineOptions cl_options
void geany_debug(gchar const *format,...)
Main program-related commands.
void msgwin_show_hide_tabs(void)
Message window functions (status, compiler, messages windows).
GeanyToolPrefs tool_prefs
PrintingPrefs printing_prefs
static GtkPrintSettings * settings
void project_write_config(void)
Forces the project file rewrite and emission of the project-save signal.
void project_load_prefs(GKeyFile *config)
ProjectPrefs project_prefs
void project_save_prefs(GKeyFile *config)
char * strstr(const char *str, const char *substr)
gint sci_get_current_position(ScintillaObject *sci)
Gets the cursor position.
Wrapper functions for the Scintilla editor widget SCI_* messages.
GeanySearchPrefs search_prefs
@ GEANY_FIND_SEL_CURRENT_WORD
#define SOCKET_WINDOWS_REMOTE_CMD_PORT
GeanyFiletype * filetypes_lookup_by_name(const gchar *name)
Finds a filetype pointer from its name field.
stash_group_add_boolean(group, &china_enabled, "china", TRUE)
stash_group_add_string(group, &potter_name, "potter_name", "Miss Clay")
if(!stash_group_load_from_file(group, filename)) g_warning(_("Could not load keyfile %s!")
stash_group_add_toggle_button(group, &want_handle, "handle", TRUE, "check_handle")
void stash_group_add_spin_button_integer(StashGroup *group, gint *setting, const gchar *key_name, gint default_value, StashWidgetID widget_id)
Adds a GtkSpinButton widget pref.
void stash_group_add_radio_buttons(StashGroup *group, gint *setting, const gchar *key_name, gint default_value, StashWidgetID widget_id, gint enum_id,...)
Adds a GtkRadioButton widget group pref.
void stash_group_save_to_key_file(StashGroup *group, GKeyFile *keyfile)
Writes group settings into key values in keyfile.
void stash_group_add_integer(StashGroup *group, gint *setting, const gchar *key_name, gint default_value)
Adds integer setting.
void stash_group_load_from_key_file(StashGroup *group, GKeyFile *keyfile)
Reads key values from keyfile into the group settings.
void stash_group_add_combo_box(StashGroup *group, gint *setting, const gchar *key_name, gint default_value, StashWidgetID widget_id)
Adds a GtkComboBox widget pref.
StashGroup * stash_group_new(const gchar *name)
Creates a new group.
void stash_group_free(StashGroup *group)
Frees a group.
void stash_group_set_various(StashGroup *group, gboolean various, const gchar *prefix)
void stash_group_add_entry(StashGroup *group, gchar **setting, const gchar *key_name, const gchar *default_value, StashWidgetID widget_id)
Adds a GtkEntry widget pref.
Lightweight library for reading/writing GKeyFile settings and synchronizing widgets with C variables.
struct GeanyProject * project
Currently active project or NULL if none is open.
gchar * configdir
User configuration directory, usually ~/.config/geany.
Structure for representing an open tab with all its properties.
gchar * file_name
The UTF-8 encoded file name.
GeanyFiletype * file_type
The filetype for this document, it's only a reference to one of the elements of the global filetypes ...
gchar * real_path
The link-dereferenced, locale-encoded file name.
gchar * encoding
The encoding of the document, must be a valid string representation of an encoding,...
gboolean readonly
Whether this document is read-only.
gboolean is_valid
Flag used to check if this document is valid when iterating GeanyData::documents_array.
GeanyEditor * editor
The editor associated with the document.
gboolean unfold_all_children
gint symbolcompletion_min_chars
gboolean scroll_stop_at_last_line
gboolean brace_match_ltgt
gint autocompletion_update_freq
GeanyIndentPrefs * indentation
gboolean show_markers_margin
gboolean auto_continue_multiline
gboolean complete_snippets_whilst_editing
gboolean long_line_enabled
gboolean use_tab_to_indent
gboolean show_indent_guide
gboolean show_linenumber_margin
guint autocompletion_max_entries
gchar * comment_toggle_mark
gboolean autocomplete_doc_words
gboolean auto_close_xml_tags
gboolean auto_complete_symbols
gboolean complete_snippets
gint symbolcompletion_max_height
gboolean use_gtk_word_boundaries
gint scroll_lines_around_cursor
gboolean show_line_endings
gboolean completion_drops_rest_of_word
gboolean show_white_space
GeanyIndentType indent_type
gboolean line_breaking
Whether to split long lines as you type.
gboolean auto_indent
TRUE if auto-indentation is enabled.
ScintillaObject * sci
The Scintilla editor GtkWidget.
gboolean line_wrapping
TRUE if line wrapping is enabled.
gboolean reload_clean_doc_on_file_change
gboolean use_safe_file_saving
gboolean keep_edit_history_on_reload
gint default_new_encoding
gboolean show_keep_edit_history_on_reload_msg
gboolean tab_order_beside
gint default_open_encoding
gboolean gio_unsafe_save_backup
gboolean use_gio_unsafe_file_saving
gboolean strip_trailing_spaces
gboolean cmdline_new_files
gchar * extract_filetype_regex
gint default_eol_character
gboolean ensure_convert_new_lines
gboolean save_config_on_file_change
gboolean tab_close_switch_to_mru
gchar * name
Untranslated short name, such as "C", "None".
GeanyIndentType type
Whether to use tabs, spaces or both to indent.
gint hard_tab_width
Width of a tab, but only when using GEANY_INDENT_TYPE_BOTH.
GeanyAutoIndent auto_indent_mode
gint tab_pos_editor
positions of editor's tabs
gint symbols_sort_mode
symbol list sorting mode
gboolean statusbar_visible
whether the status bar is visible
gint sidebar_pos
position of the sidebar (left or right)
gboolean use_native_windows_dialogs
whether to use native Windows' dialogs (only used on Windows)
gboolean sidebar_symbol_visible
whether the symbol sidebar is visible
gint tab_pos_sidebar
positions of sidebar's tabs
gchar * editor_font
editor font
gboolean highlighting_invert_all
whether highlighting colors are inverted
gboolean sidebar_openfiles_visible
whether the open file list is visible
gchar * msgwin_font
message window font
gboolean show_notebook_tabs
whether editor tabs are visible
gint tab_pos_msgwin
positions of message window's tabs
gint msgwin_orientation
orientation of the message window
gboolean notebook_double_click_hides_widgets
whether a double click on notebook tabs hides all other windows
gchar * tagbar_font
symbol sidebar font
GtkWidget * window
Main window.
GtkWidget * notebook
Document notebook.
gboolean suppress_status_messages
gboolean switch_to_status
gchar * default_open_path
Default path to look for files when no other path is appropriate.
gboolean replace_and_find_by_default
gboolean use_current_word
Use current word for default search text.
GeanyFindSelOptions find_selection_type
gchar * initials
Initials.
gchar * version
Initial version.
gchar * external_print_cmd
gboolean use_gtk_printing
gboolean print_page_header
gboolean page_header_basename
gchar * page_header_datefmt
gboolean print_page_numbers
gboolean print_line_numbers
Defines internationalization macros.
GeanyTemplatePrefs template_prefs
void ui_set_fullscreen(void)
GeanyMainWidgets main_widgets
void ui_set_statusbar(gboolean log, const gchar *format,...)
Displays text on the statusbar.
GtkWidget * ui_lookup_widget(GtkWidget *widget, const gchar *widget_name)
Returns a widget from a name in a component, usually created by Glade.
GeanyInterfacePrefs interface_prefs
User Interface general utility functions.
gboolean utils_parse_color(const gchar *spec, GdkColor *color)
gint utils_write_file(const gchar *filename, const gchar *text)
Writes text into a file named filename.
gint utils_get_setting_integer(GKeyFile *config, const gchar *section, const gchar *key, const gint default_value)
Wraps g_key_file_get_integer() to add a default value argument.
gboolean utils_get_setting_boolean(GKeyFile *config, const gchar *section, const gchar *key, const gboolean default_value)
Wraps g_key_file_get_boolean() to add a default value argument.
gchar * utils_get_initials(const gchar *name)
gboolean utils_str_equal(const gchar *a, const gchar *b)
NULL-safe string comparison.
gchar * utils_get_setting_string(GKeyFile *config, const gchar *section, const gchar *key, const gchar *default_value)
Wraps g_key_file_get_string() to add a default value argument.
gchar * utils_get_hex_from_color(GdkColor *color)
gchar * utils_get_locale_from_utf8(const gchar *utf8_text)
Converts the given UTF-8 encoded string into locale encoding.
General utility functions, non-GTK related.
#define foreach_strv(str_ptr, strv)
Iterates a null-terminated string vector.
#define foreach_ptr_array(item, idx, ptr_array)
Iterates all the pointers in ptr_array.
#define SETPTR(ptr, result)
Assigns result to ptr, then frees the old value.
#define EMPTY(ptr)
Returns TRUE if ptr is NULL or *ptr is FALSE.