geany
1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
![]() ![]() |
#include "prefs.h"
#include "app.h"
#include "dialogs.h"
#include "documentprivate.h"
#include "editor.h"
#include "encodingsprivate.h"
#include "filetypes.h"
#include "geanywraplabel.h"
#include "keybindingsprivate.h"
#include "keyfile.h"
#include "msgwindow.h"
#include "printing.h"
#include "sidebar.h"
#include "stash.h"
#include "support.h"
#include "templates.h"
#include "toolbar.h"
#include "tools.h"
#include "ui_utils.h"
#include "utils.h"
#include "vte.h"
#include "osx.h"
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
Go to the source code of this file.
Classes | |
struct | KbData |
Typedefs | |
typedef enum PrefCallbackAction | PrefCallbackAction |
Enumerations | |
enum | PrefCallbackAction { PREF_DISPLAY , PREF_UPDATE } |
enum | { KB_TREE_ACTION , KB_TREE_SHORTCUT , KB_TREE_INDEX , KB_TREE_EDITABLE , KB_TREE_WEIGHT , KB_TREE_COLUMNS } |
Functions | |
static GeanyKeyBinding * | kb_index (guint gidx, guint kid) |
static void | kb_cell_edited_cb (GtkCellRendererText *cellrenderertext, gchar *path, gchar *new_text, KbData *kbdata) |
static gboolean | kb_grab_key_dialog_key_press_cb (GtkWidget *dialog, GdkEventKey *event, GtkLabel *label) |
static void | kb_change_iter_shortcut (KbData *kbdata, GtkTreeIter *iter, const gchar *new_text) |
static gboolean | kb_find_duplicate (GtkTreeStore *store, GtkWidget *parent, GtkTreeIter *old_iter, guint key, GdkModifierType mods, const gchar *shortcut) |
static void | on_toolbar_show_toggled (GtkToggleButton *togglebutton, gpointer user_data) |
static void | on_show_notebook_tabs_toggled (GtkToggleButton *togglebutton, gpointer user_data) |
static void | on_enable_plugins_toggled (GtkToggleButton *togglebutton, gpointer user_data) |
static void | on_use_folding_toggled (GtkToggleButton *togglebutton, gpointer user_data) |
static void | on_open_encoding_toggled (GtkToggleButton *togglebutton, gpointer user_data) |
static void | on_sidebar_visible_toggled (GtkToggleButton *togglebutton, gpointer user_data) |
static void | on_prefs_print_radio_button_toggled (GtkToggleButton *togglebutton, gpointer user_data) |
static void | on_prefs_print_page_header_toggled (GtkToggleButton *togglebutton, gpointer user_data) |
static void | open_preferences_help (void) |
static void | prefs_action (PrefCallbackAction action) |
static void | kb_tree_view_change_button_clicked_cb (GtkWidget *button, KbData *kbdata) |
static void | kb_show_popup_menu (KbData *kbdata, GtkWidget *widget, GdkEventButton *event) |
static gboolean | kb_popup_menu_cb (GtkWidget *widget, KbData *kbdata) |
static gboolean | kb_tree_view_button_press_event_cb (GtkWidget *widget, GdkEventButton *event, KbData *kbdata) |
static void | kb_init_tree (KbData *kbdata) |
static void | kb_set_shortcut (GtkTreeStore *store, GtkTreeIter *iter, guint key, GdkModifierType mods) |
void | prefs_kb_search_name (const gchar *search) |
static void | kb_init (KbData *kbdata) |
static void | prefs_init_dialog (void) |
static void | kb_update (KbData *kbdata) |
static void | on_prefs_dialog_response (GtkDialog *dialog, gint response, gpointer user_data) |
static void | on_color_button_choose_cb (GtkColorButton *widget, gpointer user_data) |
static void | on_prefs_font_choosed (GtkFontButton *widget, gpointer user_data) |
static gboolean | prefs_dialog_key_press_response_cb (GtkWidget *dialog, GdkEventKey *event, gpointer data) |
static void | list_store_append_text (GtkListStore *list, const gchar *text) |
void | prefs_show_dialog (void) |
Variables | |
GeanyPrefs | prefs |
GeanyToolPrefs | tool_prefs |
static KbData | global_kb_data = { NULL, NULL, FALSE } |
static GtkTreeView * | various_treeview = NULL |
typedef enum PrefCallbackAction PrefCallbackAction |
anonymous enum |
enum PrefCallbackAction |
|
static |
Definition at line 1397 of file prefs.c.
References kb_change_iter_shortcut(), NULL, and KbData::store.
Referenced by kb_init_tree().
|
static |
Definition at line 1379 of file prefs.c.
References KbData::edited, kb_find_duplicate(), kb_set_shortcut(), KbData::store, and ui_widgets.
Referenced by kb_cell_edited_cb(), and kb_tree_view_change_button_clicked_cb().
|
static |
Definition at line 1436 of file prefs.c.
References _, dialogs_show_prompt(), kb_set_shortcut(), KB_TREE_ACTION, KB_TREE_SHORTCUT, and label.
Referenced by kb_change_iter_shortcut().
|
static |
Definition at line 1413 of file prefs.c.
References keybindings_get_modifiers(), and label.
Referenced by kb_tree_view_change_button_clicked_cb().
|
static |
Definition at line 809 of file prefs.c.
References group, keybinding_groups, and keybindings_get_item().
Referenced by kb_set_shortcut(), and kb_update().
|
static |
Definition at line 364 of file prefs.c.
References foreach_ptr_array, group, GeanyKeyBinding::id, kb_init_tree(), kb_set_shortcut(), KB_TREE_ACTION, KB_TREE_EDITABLE, KB_TREE_INDEX, GeanyKeyBinding::key, keybinding_groups, keybindings_get_label(), label, GeanyKeyBinding::mods, NULL, KbData::store, and KbData::tree.
Referenced by prefs_init_dialog().
|
static |
Definition at line 277 of file prefs.c.
References _, kb_cell_edited_cb(), kb_popup_menu_cb(), KB_TREE_ACTION, KB_TREE_COLUMNS, KB_TREE_EDITABLE, KB_TREE_SHORTCUT, kb_tree_view_button_press_event_cb(), kb_tree_view_change_button_clicked_cb(), KB_TREE_WEIGHT, NULL, KbData::store, KbData::tree, ui_lookup_widget(), and ui_widgets.
Referenced by kb_init().
|
static |
Definition at line 253 of file prefs.c.
References kb_show_popup_menu(), and NULL.
Referenced by kb_init_tree().
|
static |
Definition at line 314 of file prefs.c.
References GeanyKeyBinding::default_key, GeanyKeyBinding::default_mods, kb_index(), KB_TREE_INDEX, KB_TREE_SHORTCUT, and KB_TREE_WEIGHT.
Referenced by kb_change_iter_shortcut(), kb_find_duplicate(), and kb_init().
|
static |
Definition at line 213 of file prefs.c.
References _, gtk_container_add(), NULL, KbData::tree, and ui_image_menu_item_new().
Referenced by kb_popup_menu_cb(), and kb_tree_view_button_press_event_cb().
|
static |
Definition at line 260 of file prefs.c.
References kb_show_popup_menu(), kb_tree_view_change_button_clicked_cb(), and NULL.
Referenced by kb_init_tree().
|
static |
Definition at line 148 of file prefs.c.
References _, dialog, gtk_container_add(), gtk_widget_show_all(), kb_change_iter_shortcut(), kb_grab_key_dialog_key_press_cb(), KB_TREE_ACTION, label, name, NULL, KbData::tree, and ui_widgets.
Referenced by kb_init_tree(), and kb_tree_view_button_press_event_cb().
|
static |
Definition at line 819 of file prefs.c.
References kb_index(), KB_TREE_INDEX, KB_TREE_SHORTCUT, GeanyKeyBinding::key, keybindings_update_combo(), GeanyKeyBinding::mods, NULL, and KbData::store.
Referenced by on_prefs_dialog_response().
|
static |
Definition at line 1644 of file prefs.c.
Referenced by prefs_show_dialog().
|
static |
Definition at line 1324 of file prefs.c.
References color, editor_prefs, GeanyEditorPrefs::long_line_color, SETPTR, and utils_get_hex_from_color().
Referenced by prefs_show_dialog().
|
static |
Definition at line 1542 of file prefs.c.
References ui_lookup_widget(), and ui_widgets.
Referenced by prefs_init_dialog(), and prefs_show_dialog().
|
static |
Definition at line 1551 of file prefs.c.
References ui_lookup_widget(), and ui_widgets.
Referenced by prefs_init_dialog(), and prefs_show_dialog().
|
static |
Definition at line 867 of file prefs.c.
References GeanyToolbarPrefs::append_to_menu, GeanyEditorPrefs::auto_close_xml_tags, GeanyEditorPrefs::auto_complete_symbols, GeanyEditorPrefs::auto_continue_multiline, GeanyPrefs::auto_focus, GeanyEditorPrefs::autoclose_chars, GeanyPrefs::beep_on_errors, GeanyToolPrefs::browser_cmd, GeanyDocument::changed, GeanyEditorPrefs::comment_toggle_mark, GeanyTemplatePrefs::company, GeanyEditorPrefs::complete_snippets, configuration_save(), GeanyPrefs::confirm_exit, GeanyToolPrefs::context_action_cmd, GeanyTemplatePrefs::date_format, GeanyTemplatePrefs::datetime_format, GeanyFilePrefs::default_eol_character, GeanyFilePrefs::default_new_encoding, GeanyFilePrefs::default_open_encoding, GeanyTemplatePrefs::developer, dialog, GeanyEditorPrefs::disable_dnd, document_get_current(), documents, documents_array, KbData::edited, editor_apply_update_prefs(), editor_prefs, editor_unfold_all(), GeanyFilePrefs::ensure_convert_new_lines, PrintingPrefs::external_print_cmd, file_prefs, filetypes_reload(), GeanyFilePrefs::final_new_line, GeanyEditorPrefs::folding, global_kb_data, GeanyToolPrefs::grep_cmd, GeanyInterfacePrefs::highlighting_invert_all, GeanyToolbarPrefs::icon_size, GeanyToolbarPrefs::icon_style, GeanyTemplatePrefs::initials, interface_prefs, kb_update(), keybindings_write_to_file(), GeanyEditorPrefs::line_break_column, GeanyEditorPrefs::line_wrapping, GeanyPrefs::load_session, GeanyEditorPrefs::long_line_column, GeanyEditorPrefs::long_line_enabled, GeanyEditorPrefs::long_line_type, GeanyTemplatePrefs::mail, main_widgets, GeanyInterfacePrefs::msgwin_orientation, msgwin_show_hide_tabs(), msgwindow, GeanyEditorPrefs::newline_strip, GeanyMainWidgets::notebook, NULL, open_preferences_help(), PrintingPrefs::page_header_basename, PrintingPrefs::page_header_datefmt, PREF_UPDATE, prefs, prefs_action(), PrintingPrefs::print_line_numbers, PrintingPrefs::print_page_header, PrintingPrefs::print_page_numbers, printing_prefs, project_apply_prefs(), project_prefs, GeanyFilePrefs::replace_tabs, GeanyPrefs::save_wingeom, GeanyPrefs::save_winpos, GeanyEditorPrefs::scroll_stop_at_last_line, SETPTR, GeanyEditorPrefs::show_indent_guide, GeanyEditorPrefs::show_line_endings, GeanyEditorPrefs::show_linenumber_margin, GeanyEditorPrefs::show_markers_margin, GeanyInterfacePrefs::show_notebook_tabs, GeanyFilePrefs::show_tab_cross, GeanyEditorPrefs::show_white_space, GeanyMainWidgets::sidebar_notebook, sidebar_openfiles_update_all(), GeanyInterfacePrefs::sidebar_openfiles_visible, GeanyInterfacePrefs::sidebar_pos, GeanyInterfacePrefs::sidebar_symbol_visible, GeanyEditorPrefs::smart_home_key, GeanyInterfacePrefs::statusbar_visible, KbData::store, GeanyFilePrefs::strip_trailing_spaces, GeanyPrefs::suppress_status_messages, GeanyPrefs::switch_to_status, GeanyEditorPrefs::symbolcompletion_max_height, GeanyEditorPrefs::symbolcompletion_min_chars, GeanyFilePrefs::tab_order_beside, GeanyFilePrefs::tab_order_ltr, GeanyInterfacePrefs::tab_pos_editor, GeanyInterfacePrefs::tab_pos_msgwin, GeanyInterfacePrefs::tab_pos_sidebar, template_prefs, GeanyToolPrefs::term_cmd, tool_prefs, toolbar_apply_settings(), toolbar_prefs, toolbar_show_hide(), toolbar_update_ui(), tools_create_insert_custom_command_menu_items(), ui_document_show_hide(), ui_encodings_combo_box_get_active_encoding(), ui_lookup_widget(), ui_prefs, ui_save_buttons_toggle(), ui_sidebar_show_hide(), ui_statusbar_showhide(), ui_swap_sidebar_pos(), ui_update_fold_items(), ui_update_statusbar(), ui_update_view_editor_menu_items(), ui_widgets, GeanyEditorPrefs::unfold_all_children, GeanyToolbarPrefs::use_gtk_default_icon, GeanyToolbarPrefs::use_gtk_default_style, PrintingPrefs::use_gtk_printing, GeanyEditorPrefs::use_indicators, GeanyInterfacePrefs::use_native_windows_dialogs, GeanyTemplatePrefs::version, GeanyToolbarPrefs::visible, GeanyMainWidgets::window, and GeanyTemplatePrefs::year_format.
Referenced by prefs_show_dialog().
|
static |
Definition at line 1333 of file prefs.c.
References SidebarTreeviews::default_tag_tree, documents, documents_array, interface_prefs, GeanyInterfacePrefs::msgwin_font, msgwindow, GeanyDocument::priv, SETPTR, GeanyDocumentPrivate::tag_tree, GeanyInterfacePrefs::tagbar_font, SidebarTreeviews::tree_openfiles, tv, ui_set_editor_font(), and ui_widget_modify_font_from_string().
Referenced by prefs_show_dialog().
|
static |
Definition at line 1577 of file prefs.c.
References ui_lookup_widget(), and ui_widgets.
Referenced by prefs_init_dialog(), and prefs_show_dialog().
|
static |
Definition at line 1568 of file prefs.c.
References ui_lookup_widget(), and ui_widgets.
Referenced by prefs_init_dialog(), and prefs_show_dialog().
|
static |
Definition at line 1524 of file prefs.c.
References ui_lookup_widget(), and ui_widgets.
Referenced by prefs_init_dialog(), and prefs_show_dialog().
|
static |
Definition at line 1560 of file prefs.c.
References ui_lookup_widget(), and ui_widgets.
Referenced by prefs_init_dialog(), and prefs_show_dialog().
|
static |
Definition at line 1509 of file prefs.c.
References ui_lookup_widget(), and ui_widgets.
Referenced by prefs_init_dialog(), and prefs_show_dialog().
|
static |
Definition at line 1534 of file prefs.c.
References ui_lookup_widget(), and ui_widgets.
Referenced by prefs_init_dialog(), and prefs_show_dialog().
|
static |
Definition at line 1586 of file prefs.c.
References _, label, NULL, ui_lookup_widget(), ui_widgets, utils_get_help_url(), utils_open_browser(), and utils_str_equal().
Referenced by on_prefs_dialog_response(), and prefs_dialog_key_press_response_cb().
|
static |
Definition at line 107 of file prefs.c.
References foreach_ptr_array, group, PREF_DISPLAY, pref_groups, PREF_UPDATE, stash_group_display(), stash_group_update(), stash_tree_display(), stash_tree_update(), ui_widgets, and various_treeview.
Referenced by on_prefs_dialog_response(), and prefs_init_dialog().
|
static |
Definition at line 1630 of file prefs.c.
References GEANY_KEY_GROUP_HELP, GEANY_KEYS_HELP_HELP, keybindings_check_event(), keybindings_lookup_item(), and open_preferences_help().
Referenced by prefs_show_dialog().
|
static |
Definition at line 396 of file prefs.c.
References app, GeanyToolbarPrefs::append_to_menu, GeanyEditorPrefs::auto_close_xml_tags, GeanyEditorPrefs::auto_complete_symbols, GeanyEditorPrefs::auto_continue_multiline, GeanyPrefs::auto_focus, GeanyEditorPrefs::autoclose_chars, GeanyPrefs::beep_on_errors, GeanyToolPrefs::browser_cmd, color, GeanyEditorPrefs::comment_toggle_mark, GeanyTemplatePrefs::company, GeanyEditorPrefs::complete_snippets, GeanyPrefs::confirm_exit, GeanyToolPrefs::context_action_cmd, GeanyTemplatePrefs::date_format, GeanyTemplatePrefs::datetime_format, GeanyFilePrefs::default_eol_character, GeanyFilePrefs::default_new_encoding, GeanyFilePrefs::default_open_encoding, GeanyTemplatePrefs::developer, GeanyEditorPrefs::disable_dnd, GeanyInterfacePrefs::editor_font, editor_prefs, GeanyFilePrefs::ensure_convert_new_lines, PrintingPrefs::external_print_cmd, file_prefs, GeanyFilePrefs::final_new_line, GeanyEditorPrefs::folding, GEANY_ENCODING_UTF_8, global_kb_data, GeanyToolPrefs::grep_cmd, GeanyToolbarPrefs::icon_size, GeanyToolbarPrefs::icon_style, GeanyTemplatePrefs::initials, interface_prefs, kb_init(), GeanyEditorPrefs::line_break_column, GeanyEditorPrefs::line_wrapping, GeanyPrefs::load_session, GeanyEditorPrefs::long_line_color, GeanyEditorPrefs::long_line_column, GeanyEditorPrefs::long_line_enabled, GeanyEditorPrefs::long_line_type, GeanyTemplatePrefs::mail, GeanyInterfacePrefs::msgwin_font, GeanyEditorPrefs::newline_strip, NULL, on_enable_plugins_toggled(), on_open_encoding_toggled(), on_prefs_print_page_header_toggled(), on_prefs_print_radio_button_toggled(), on_show_notebook_tabs_toggled(), on_sidebar_visible_toggled(), on_toolbar_show_toggled(), on_use_folding_toggled(), PrintingPrefs::page_header_basename, PrintingPrefs::page_header_datefmt, PREF_DISPLAY, prefs, prefs_action(), PrintingPrefs::print_line_numbers, PrintingPrefs::print_page_header, PrintingPrefs::print_page_numbers, printing_prefs, GeanyApp::project, project_prefs, project_setup_prefs(), GeanyFilePrefs::replace_tabs, GeanyPrefs::save_wingeom, GeanyPrefs::save_winpos, GeanyEditorPrefs::scroll_stop_at_last_line, GeanyEditorPrefs::show_indent_guide, GeanyEditorPrefs::show_line_endings, GeanyEditorPrefs::show_linenumber_margin, GeanyEditorPrefs::show_markers_margin, GeanyInterfacePrefs::show_notebook_tabs, GeanyFilePrefs::show_tab_cross, GeanyEditorPrefs::show_white_space, GeanyInterfacePrefs::sidebar_openfiles_visible, GeanyInterfacePrefs::sidebar_symbol_visible, GeanyEditorPrefs::smart_home_key, GeanyInterfacePrefs::statusbar_visible, GeanyFilePrefs::strip_trailing_spaces, GeanyPrefs::suppress_status_messages, GeanyPrefs::switch_to_status, GeanyEditorPrefs::symbolcompletion_max_height, GeanyEditorPrefs::symbolcompletion_min_chars, GeanyFilePrefs::tab_order_beside, GeanyFilePrefs::tab_order_ltr, GeanyInterfacePrefs::tab_pos_editor, GeanyInterfacePrefs::tab_pos_msgwin, GeanyInterfacePrefs::tab_pos_sidebar, GeanyInterfacePrefs::tagbar_font, template_prefs, GeanyToolPrefs::term_cmd, tool_prefs, toolbar_prefs, ui_encodings_combo_box_set_active_encoding(), ui_lookup_widget(), ui_prefs, ui_widget_show_hide(), ui_widgets, GeanyEditorPrefs::unfold_all_children, GeanyToolbarPrefs::use_gtk_default_icon, GeanyToolbarPrefs::use_gtk_default_style, PrintingPrefs::use_gtk_printing, GeanyEditorPrefs::use_indicators, GeanyInterfacePrefs::use_native_windows_dialogs, utils_parse_color(), GeanyTemplatePrefs::version, GeanyToolbarPrefs::visible, and GeanyTemplatePrefs::year_format.
Referenced by prefs_show_dialog().
void prefs_kb_search_name | ( | const gchar * | search | ) |
Definition at line 336 of file prefs.c.
References global_kb_data, KB_TREE_ACTION, name, NULL, and KbData::tree.
Referenced by keybindings_dialog_show_prefs_scroll().
void prefs_show_dialog | ( | void | ) |
Definition at line 1653 of file prefs.c.
References _, create_prefs_dialog(), encodings_encoding_store_cell_data_func(), encodings_encoding_store_new(), foreach_c_array, geany_wrap_label_new(), label, list_store_append_text(), main_widgets, name, NULL, on_color_button_choose_cb(), on_enable_plugins_toggled(), on_open_encoding_toggled(), on_prefs_dialog_response(), on_prefs_font_choosed(), on_prefs_print_page_header_toggled(), on_prefs_print_radio_button_toggled(), on_show_notebook_tabs_toggled(), on_sidebar_visible_toggled(), on_toolbar_show_toggled(), on_use_folding_toggled(), pref_groups, prefs_dialog_key_press_response_cb(), prefs_init_dialog(), SC_EOL_CR, SC_EOL_CRLF, SC_EOL_LF, stash_tree_setup(), ui_builder_get_object(), ui_entry_add_clear_icon(), ui_lookup_widget(), ui_setup_open_button_callback(), ui_widgets, utils_get_eol_name(), various_treeview, and GeanyMainWidgets::window.
Referenced by key_dialog_show_prefs(), on_customize_toolbar1_activate(), and on_preferences1_activate().
Definition at line 78 of file prefs.c.
Referenced by on_prefs_dialog_response(), prefs_init_dialog(), and prefs_kb_search_name().
GeanyPrefs prefs |
Definition at line 66 of file prefs.c.
Referenced by configuration_apply_settings(), do_main_quit(), geany_data_init(), get_custom_plugin_path(), init_pref_groups(), load_dialog_prefs(), load_settings(), load_startup_files(), main_lib(), main_quit(), msgwin_status_add_string(), on_motion_event(), on_prefs_dialog_response(), plugins_init(), prefs_init_dialog(), save_dialog_prefs(), save_ui_prefs(), setup_window_position(), ui_set_statusbar(), utils_beep(), and utils_get_default_dir_utf8().
GeanyToolPrefs tool_prefs |
Definition at line 67 of file prefs.c.
Referenced by build_run_cmd(), do_main_quit(), geany_data_init(), load_dialog_prefs(), main_lib(), on_context_action1_activate(), on_prefs_dialog_response(), prefs_init_dialog(), save_dialog_prefs(), search_find_in_files(), and utils_open_browser().
|
static |
Definition at line 79 of file prefs.c.
Referenced by prefs_action(), and prefs_show_dialog().