Added an option to disable auto completion of known symbols while typing (still can be forced by pressing the keybinding).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1232 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
ffef5c9dab
commit
f7474a0bc2
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
* src/document.c: Applied patch from Jeff Pohlmeyer to clear the line
|
* src/document.c: Applied patch from Jeff Pohlmeyer to clear the line
|
||||||
marker when clearing the compile error markers.
|
marker when clearing the compile error markers.
|
||||||
|
* geany.glade, src/geany.h, src/interface.c, src/keyfile.c,
|
||||||
|
src/prefs.c, src/sci_cb.c:
|
||||||
|
Added an option to disable auto completion of known symbols while
|
||||||
|
typing (still can be forced by pressing the keybinding).
|
||||||
|
|
||||||
|
|
||||||
2007-01-25 Enrico Tröger <enrico.troeger@uvena.de>
|
2007-01-25 Enrico Tröger <enrico.troeger@uvena.de>
|
||||||
|
2
THANKS
2
THANKS
@ -21,7 +21,7 @@ Stefan Oltmanns <stefan(dot)oltmanns(at)abi2006(dot)gymnasium-achim(dot)de> - es
|
|||||||
Bob Doan <bdoan(at)sicom(dot)com> - some patches
|
Bob Doan <bdoan(at)sicom(dot)com> - some patches
|
||||||
Rob van der Linde <robvdl(at)paradise(dot)net(dot)nz> - fixed wrong vte height on some systems
|
Rob van der Linde <robvdl(at)paradise(dot)net(dot)nz> - fixed wrong vte height on some systems
|
||||||
Josef Whiter <josef(at)toxicpanda(dot)com> - parse 'Entering directory' build messages.
|
Josef Whiter <josef(at)toxicpanda(dot)com> - parse 'Entering directory' build messages.
|
||||||
Jeff Pohlmeyer <yetanothergeek(at)gmail(dot)com> - "Allow DnD" and "Use tabs" patches
|
Jeff Pohlmeyer <yetanothergeek(at)gmail(dot)com> - "Allow DnD", "Use tabs" and other great patches
|
||||||
|
|
||||||
Translators:
|
Translators:
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
49
geany.glade
49
geany.glade
@ -5464,12 +5464,57 @@ Bottom
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkCheckButton" id="check_symbol_auto_completion">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="tooltip" translatable="yes">Automatic completion of known symbols in open source file(s) (function, global variables, ...)</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes">Symbol autocompletion</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
<property name="focus_on_click">False</property>
|
||||||
|
<property name="active">False</property>
|
||||||
|
<property name="inconsistent">False</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkHBox" id="hbox6">
|
<widget class="GtkHBox" id="hbox6">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="homogeneous">False</property>
|
<property name="homogeneous">False</property>
|
||||||
<property name="spacing">20</property>
|
<property name="spacing">20</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label182">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes"></property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="label173">
|
<widget class="GtkLabel" id="label173">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -5510,7 +5555,7 @@ Bottom
|
|||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">0</property>
|
<property name="padding">0</property>
|
||||||
<property name="expand">False</property>
|
<property name="expand">True</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
@ -5518,7 +5563,7 @@ Bottom
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="padding">0</property>
|
<property name="padding">0</property>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">False</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -110,6 +110,7 @@ typedef struct MyApp
|
|||||||
gboolean pref_editor_show_white_space;
|
gboolean pref_editor_show_white_space;
|
||||||
gboolean pref_editor_show_indent_guide;
|
gboolean pref_editor_show_indent_guide;
|
||||||
gboolean pref_editor_show_line_endings;
|
gboolean pref_editor_show_line_endings;
|
||||||
|
gboolean pref_editor_auto_complete_symbols;
|
||||||
gboolean pref_editor_auto_close_xml_tags;
|
gboolean pref_editor_auto_close_xml_tags;
|
||||||
gboolean pref_editor_auto_complete_constructs;
|
gboolean pref_editor_auto_complete_constructs;
|
||||||
gboolean pref_editor_folding;
|
gboolean pref_editor_folding;
|
||||||
|
@ -2402,7 +2402,9 @@ create_prefs_dialog (void)
|
|||||||
GtkWidget *vbox19;
|
GtkWidget *vbox19;
|
||||||
GtkWidget *check_auto_complete;
|
GtkWidget *check_auto_complete;
|
||||||
GtkWidget *check_xmltag;
|
GtkWidget *check_xmltag;
|
||||||
|
GtkWidget *check_symbol_auto_completion;
|
||||||
GtkWidget *hbox6;
|
GtkWidget *hbox6;
|
||||||
|
GtkWidget *label182;
|
||||||
GtkWidget *label173;
|
GtkWidget *label173;
|
||||||
GtkObject *spin_autocheight_adj;
|
GtkObject *spin_autocheight_adj;
|
||||||
GtkWidget *spin_autocheight;
|
GtkWidget *spin_autocheight;
|
||||||
@ -3331,9 +3333,19 @@ create_prefs_dialog (void)
|
|||||||
gtk_tooltips_set_tip (tooltips, check_xmltag, _("Automatic completion of open XML tags (includes HTML tags)"), NULL);
|
gtk_tooltips_set_tip (tooltips, check_xmltag, _("Automatic completion of open XML tags (includes HTML tags)"), NULL);
|
||||||
gtk_button_set_focus_on_click (GTK_BUTTON (check_xmltag), FALSE);
|
gtk_button_set_focus_on_click (GTK_BUTTON (check_xmltag), FALSE);
|
||||||
|
|
||||||
|
check_symbol_auto_completion = gtk_check_button_new_with_mnemonic (_("Symbol autocompletion"));
|
||||||
|
gtk_widget_show (check_symbol_auto_completion);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox19), check_symbol_auto_completion, FALSE, FALSE, 0);
|
||||||
|
gtk_tooltips_set_tip (tooltips, check_symbol_auto_completion, _("Automatic completion of known symbols in open source file(s) (function, global variables, ...)"), NULL);
|
||||||
|
gtk_button_set_focus_on_click (GTK_BUTTON (check_symbol_auto_completion), FALSE);
|
||||||
|
|
||||||
hbox6 = gtk_hbox_new (FALSE, 20);
|
hbox6 = gtk_hbox_new (FALSE, 20);
|
||||||
gtk_widget_show (hbox6);
|
gtk_widget_show (hbox6);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox19), hbox6, FALSE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox19), hbox6, FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
label182 = gtk_label_new ("");
|
||||||
|
gtk_widget_show (label182);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox6), label182, FALSE, FALSE, 0);
|
||||||
|
|
||||||
label173 = gtk_label_new (_("Rows of autocompletion list:"));
|
label173 = gtk_label_new (_("Rows of autocompletion list:"));
|
||||||
gtk_widget_show (label173);
|
gtk_widget_show (label173);
|
||||||
@ -3343,7 +3355,7 @@ create_prefs_dialog (void)
|
|||||||
spin_autocheight_adj = gtk_adjustment_new (10, 1, 99, 1, 10, 10);
|
spin_autocheight_adj = gtk_adjustment_new (10, 1, 99, 1, 10, 10);
|
||||||
spin_autocheight = gtk_spin_button_new (GTK_ADJUSTMENT (spin_autocheight_adj), 1, 0);
|
spin_autocheight = gtk_spin_button_new (GTK_ADJUSTMENT (spin_autocheight_adj), 1, 0);
|
||||||
gtk_widget_show (spin_autocheight);
|
gtk_widget_show (spin_autocheight);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox6), spin_autocheight, FALSE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox6), spin_autocheight, TRUE, TRUE, 0);
|
||||||
gtk_tooltips_set_tip (tooltips, spin_autocheight, _("Number of rows to display in the autocompletion list."), NULL);
|
gtk_tooltips_set_tip (tooltips, spin_autocheight, _("Number of rows to display in the autocompletion list."), NULL);
|
||||||
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin_autocheight), TRUE);
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin_autocheight), TRUE);
|
||||||
|
|
||||||
@ -3838,7 +3850,9 @@ create_prefs_dialog (void)
|
|||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, vbox19, "vbox19");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, vbox19, "vbox19");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, check_auto_complete, "check_auto_complete");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, check_auto_complete, "check_auto_complete");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, check_xmltag, "check_xmltag");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, check_xmltag, "check_xmltag");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, check_symbol_auto_completion, "check_symbol_auto_completion");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, hbox6, "hbox6");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, hbox6, "hbox6");
|
||||||
|
GLADE_HOOKUP_OBJECT (prefs_dialog, label182, "label182");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label173, "label173");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, label173, "label173");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, spin_autocheight, "spin_autocheight");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, spin_autocheight, "spin_autocheight");
|
||||||
GLADE_HOOKUP_OBJECT (prefs_dialog, label177, "label177");
|
GLADE_HOOKUP_OBJECT (prefs_dialog, label177, "label177");
|
||||||
|
@ -118,6 +118,7 @@ void configuration_save()
|
|||||||
g_key_file_set_boolean(config, PACKAGE, "switch_msgwin_pages", app->switch_msgwin_pages);
|
g_key_file_set_boolean(config, PACKAGE, "switch_msgwin_pages", app->switch_msgwin_pages);
|
||||||
g_key_file_set_boolean(config, PACKAGE, "auto_close_xml_tags", app->pref_editor_auto_close_xml_tags);
|
g_key_file_set_boolean(config, PACKAGE, "auto_close_xml_tags", app->pref_editor_auto_close_xml_tags);
|
||||||
g_key_file_set_boolean(config, PACKAGE, "auto_complete_constructs", app->pref_editor_auto_complete_constructs);
|
g_key_file_set_boolean(config, PACKAGE, "auto_complete_constructs", app->pref_editor_auto_complete_constructs);
|
||||||
|
g_key_file_set_boolean(config, PACKAGE, "auto_complete_symbols", app->pref_editor_auto_complete_symbols);
|
||||||
#ifdef HAVE_VTE
|
#ifdef HAVE_VTE
|
||||||
g_key_file_set_boolean(config, "VTE", "load_vte", vte_info.load_vte);
|
g_key_file_set_boolean(config, "VTE", "load_vte", vte_info.load_vte);
|
||||||
if (vte_info.load_vte && vc != NULL)
|
if (vte_info.load_vte && vc != NULL)
|
||||||
@ -319,6 +320,7 @@ gboolean configuration_load()
|
|||||||
app->pref_editor_show_line_endings = utils_get_setting_boolean(config, PACKAGE, "show_line_endings", FALSE);
|
app->pref_editor_show_line_endings = utils_get_setting_boolean(config, PACKAGE, "show_line_endings", FALSE);
|
||||||
app->pref_editor_auto_close_xml_tags = utils_get_setting_boolean(config, PACKAGE, "auto_close_xml_tags", TRUE);
|
app->pref_editor_auto_close_xml_tags = utils_get_setting_boolean(config, PACKAGE, "auto_close_xml_tags", TRUE);
|
||||||
app->pref_editor_auto_complete_constructs = utils_get_setting_boolean(config, PACKAGE, "auto_complete_constructs", TRUE);
|
app->pref_editor_auto_complete_constructs = utils_get_setting_boolean(config, PACKAGE, "auto_complete_constructs", TRUE);
|
||||||
|
app->pref_editor_auto_complete_symbols = utils_get_setting_boolean(config, PACKAGE, "auto_complete_symbols", TRUE);
|
||||||
app->pref_editor_folding = utils_get_setting_boolean(config, PACKAGE, "use_folding", TRUE);
|
app->pref_editor_folding = utils_get_setting_boolean(config, PACKAGE, "use_folding", TRUE);
|
||||||
app->pref_editor_unfold_all_children = utils_get_setting_boolean(config, PACKAGE, "unfold_all_children", FALSE);
|
app->pref_editor_unfold_all_children = utils_get_setting_boolean(config, PACKAGE, "unfold_all_children", FALSE);
|
||||||
app->show_markers_margin = utils_get_setting_boolean(config, PACKAGE, "show_markers_margin", TRUE);
|
app->show_markers_margin = utils_get_setting_boolean(config, PACKAGE, "show_markers_margin", TRUE);
|
||||||
|
50
src/prefs.c
50
src/prefs.c
@ -55,15 +55,16 @@ static GtkTreeView *tree = NULL;
|
|||||||
GtkWidget *dialog_label;
|
GtkWidget *dialog_label;
|
||||||
static gboolean edited = FALSE;
|
static gboolean edited = FALSE;
|
||||||
|
|
||||||
static gboolean on_prefs_tree_view_button_press_event(
|
static gboolean on_tree_view_button_press_event(
|
||||||
GtkWidget *widget, GdkEventButton *event, gpointer user_data);
|
GtkWidget *widget, GdkEventButton *event, gpointer user_data);
|
||||||
static void on_cell_edited(GtkCellRendererText *cellrenderertext, gchar *path, gchar *new_text, gpointer user_data);
|
static void on_cell_edited(GtkCellRendererText *cellrenderertext, gchar *path, gchar *new_text, gpointer user_data);
|
||||||
static gboolean on_keytype_dialog_response(GtkWidget *dialog, GdkEventKey *event, gpointer user_data);
|
static gboolean on_keytype_dialog_response(GtkWidget *dialog, GdkEventKey *event, gpointer user_data);
|
||||||
static void on_dialog_response(GtkWidget *dialog, gint response, gpointer user_data);
|
static void on_dialog_response(GtkWidget *dialog, gint response, gpointer user_data);
|
||||||
static gboolean find_duplicate(guint idx, guint key, GdkModifierType mods, const gchar *action);
|
static gboolean find_duplicate(guint idx, guint key, GdkModifierType mods, const gchar *action);
|
||||||
static void on_pref_toolbar_show_toggled(GtkToggleButton *togglebutton, gpointer user_data);
|
static void on_toolbar_show_toggled(GtkToggleButton *togglebutton, gpointer user_data);
|
||||||
static void on_pref_show_notebook_tabs_toggled(GtkToggleButton *togglebutton, gpointer user_data);
|
static void on_show_notebook_tabs_toggled(GtkToggleButton *togglebutton, gpointer user_data);
|
||||||
static void on_pref_use_folding_toggled(GtkToggleButton *togglebutton, gpointer user_data);
|
static void on_use_folding_toggled(GtkToggleButton *togglebutton, gpointer user_data);
|
||||||
|
static void on_symbol_auto_completion_toggled(GtkToggleButton *togglebutton, gpointer user_data);
|
||||||
|
|
||||||
|
|
||||||
void prefs_init_dialog(void)
|
void prefs_init_dialog(void)
|
||||||
@ -99,7 +100,7 @@ void prefs_init_dialog(void)
|
|||||||
widget = lookup_widget(app->prefs_dialog, "check_show_notebook_tabs");
|
widget = lookup_widget(app->prefs_dialog, "check_show_notebook_tabs");
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->show_notebook_tabs);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->show_notebook_tabs);
|
||||||
// disable following setting if notebook tabs are hidden
|
// disable following setting if notebook tabs are hidden
|
||||||
on_pref_show_notebook_tabs_toggled(GTK_TOGGLE_BUTTON(
|
on_show_notebook_tabs_toggled(GTK_TOGGLE_BUTTON(
|
||||||
lookup_widget(app->prefs_dialog, "check_show_notebook_tabs")), NULL);
|
lookup_widget(app->prefs_dialog, "check_show_notebook_tabs")), NULL);
|
||||||
|
|
||||||
if (app->tab_order_ltr)
|
if (app->tab_order_ltr)
|
||||||
@ -198,7 +199,7 @@ void prefs_init_dialog(void)
|
|||||||
}
|
}
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE);
|
||||||
// disable elements if toolbar is hidden
|
// disable elements if toolbar is hidden
|
||||||
on_pref_toolbar_show_toggled(GTK_TOGGLE_BUTTON(
|
on_toolbar_show_toggled(GTK_TOGGLE_BUTTON(
|
||||||
lookup_widget(app->prefs_dialog, "check_toolbar_show")), NULL);
|
lookup_widget(app->prefs_dialog, "check_toolbar_show")), NULL);
|
||||||
|
|
||||||
|
|
||||||
@ -245,7 +246,7 @@ void prefs_init_dialog(void)
|
|||||||
|
|
||||||
widget = lookup_widget(app->prefs_dialog, "check_unfold_children");
|
widget = lookup_widget(app->prefs_dialog, "check_unfold_children");
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_editor_unfold_all_children);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_editor_unfold_all_children);
|
||||||
on_pref_use_folding_toggled(GTK_TOGGLE_BUTTON(
|
on_use_folding_toggled(GTK_TOGGLE_BUTTON(
|
||||||
lookup_widget(app->prefs_dialog, "check_folding")), NULL);
|
lookup_widget(app->prefs_dialog, "check_folding")), NULL);
|
||||||
|
|
||||||
widget = lookup_widget(app->prefs_dialog, "check_disable_dnd");
|
widget = lookup_widget(app->prefs_dialog, "check_disable_dnd");
|
||||||
@ -257,6 +258,10 @@ void prefs_init_dialog(void)
|
|||||||
widget = lookup_widget(app->prefs_dialog, "check_indicators");
|
widget = lookup_widget(app->prefs_dialog, "check_indicators");
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_editor_use_indicators);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_editor_use_indicators);
|
||||||
|
|
||||||
|
widget = lookup_widget(app->prefs_dialog, "check_symbol_auto_completion");
|
||||||
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_editor_auto_complete_symbols);
|
||||||
|
on_symbol_auto_completion_toggled(GTK_TOGGLE_BUTTON(widget), NULL);
|
||||||
|
|
||||||
widget = lookup_widget(app->prefs_dialog, "spin_autocheight");
|
widget = lookup_widget(app->prefs_dialog, "spin_autocheight");
|
||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), app->autocompletion_max_height);
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), app->autocompletion_max_height);
|
||||||
|
|
||||||
@ -330,9 +335,9 @@ void prefs_init_dialog(void)
|
|||||||
|
|
||||||
g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(on_cell_edited), NULL);
|
g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(on_cell_edited), NULL);
|
||||||
g_signal_connect(G_OBJECT(tree), "button-press-event",
|
g_signal_connect(G_OBJECT(tree), "button-press-event",
|
||||||
G_CALLBACK(on_prefs_tree_view_button_press_event), NULL);
|
G_CALLBACK(on_tree_view_button_press_event), NULL);
|
||||||
g_signal_connect(G_OBJECT(lookup_widget(app->prefs_dialog, "button2")), "button-press-event",
|
g_signal_connect(G_OBJECT(lookup_widget(app->prefs_dialog, "button2")), "button-press-event",
|
||||||
G_CALLBACK(on_prefs_tree_view_button_press_event), NULL);
|
G_CALLBACK(on_tree_view_button_press_event), NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < GEANY_MAX_KEYS; i++)
|
for (i = 0; i < GEANY_MAX_KEYS; i++)
|
||||||
@ -563,6 +568,9 @@ void on_prefs_button_clicked(GtkDialog *dialog, gint response, gpointer user_dat
|
|||||||
widget = lookup_widget(app->prefs_dialog, "check_use_tabs");
|
widget = lookup_widget(app->prefs_dialog, "check_use_tabs");
|
||||||
app->pref_editor_use_tabs = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
app->pref_editor_use_tabs = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||||
|
|
||||||
|
widget = lookup_widget(app->prefs_dialog, "check_symbol_auto_completion");
|
||||||
|
app->pref_editor_auto_complete_symbols = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
|
||||||
|
|
||||||
widget = lookup_widget(app->prefs_dialog, "spin_autocheight");
|
widget = lookup_widget(app->prefs_dialog, "spin_autocheight");
|
||||||
app->autocompletion_max_height = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
|
app->autocompletion_max_height = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));
|
||||||
|
|
||||||
@ -770,7 +778,7 @@ void on_prefs_font_choosed(GtkFontButton *widget, gpointer user_data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static gboolean on_prefs_tree_view_button_press_event(
|
static gboolean on_tree_view_button_press_event(
|
||||||
GtkWidget *widget, GdkEventButton *event, gpointer user_data)
|
GtkWidget *widget, GdkEventButton *event, gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
@ -928,7 +936,7 @@ static gboolean find_duplicate(guint idx, guint key, GdkModifierType mods, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void on_pref_toolbar_show_toggled(GtkToggleButton *togglebutton, gpointer user_data)
|
static void on_toolbar_show_toggled(GtkToggleButton *togglebutton, gpointer user_data)
|
||||||
{
|
{
|
||||||
gboolean sens = gtk_toggle_button_get_active(togglebutton);
|
gboolean sens = gtk_toggle_button_get_active(togglebutton);
|
||||||
|
|
||||||
@ -937,7 +945,7 @@ static void on_pref_toolbar_show_toggled(GtkToggleButton *togglebutton, gpointer
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void on_pref_show_notebook_tabs_toggled(GtkToggleButton *togglebutton, gpointer user_data)
|
static void on_show_notebook_tabs_toggled(GtkToggleButton *togglebutton, gpointer user_data)
|
||||||
{
|
{
|
||||||
gboolean sens = gtk_toggle_button_get_active(togglebutton);
|
gboolean sens = gtk_toggle_button_get_active(togglebutton);
|
||||||
|
|
||||||
@ -946,7 +954,7 @@ static void on_pref_show_notebook_tabs_toggled(GtkToggleButton *togglebutton, gp
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void on_pref_use_folding_toggled(GtkToggleButton *togglebutton, gpointer user_data)
|
static void on_use_folding_toggled(GtkToggleButton *togglebutton, gpointer user_data)
|
||||||
{
|
{
|
||||||
gboolean sens = gtk_toggle_button_get_active(togglebutton);
|
gboolean sens = gtk_toggle_button_get_active(togglebutton);
|
||||||
|
|
||||||
@ -954,6 +962,14 @@ static void on_pref_use_folding_toggled(GtkToggleButton *togglebutton, gpointer
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void on_symbol_auto_completion_toggled(GtkToggleButton *togglebutton, gpointer user_data)
|
||||||
|
{
|
||||||
|
gboolean sens = gtk_toggle_button_get_active(togglebutton);
|
||||||
|
|
||||||
|
gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "hbox6"), sens);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void dialogs_show_prefs_dialog(void)
|
void dialogs_show_prefs_dialog(void)
|
||||||
{
|
{
|
||||||
if (app->prefs_dialog == NULL)
|
if (app->prefs_dialog == NULL)
|
||||||
@ -1004,11 +1020,13 @@ void dialogs_show_prefs_dialog(void)
|
|||||||
"clicked", G_CALLBACK(on_prefs_tools_button_clicked), lookup_widget(app->prefs_dialog, "entry_grep"));
|
"clicked", G_CALLBACK(on_prefs_tools_button_clicked), lookup_widget(app->prefs_dialog, "entry_grep"));
|
||||||
|
|
||||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "check_toolbar_show"),
|
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "check_toolbar_show"),
|
||||||
"toggled", G_CALLBACK(on_pref_toolbar_show_toggled), NULL);
|
"toggled", G_CALLBACK(on_toolbar_show_toggled), NULL);
|
||||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "check_show_notebook_tabs"),
|
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "check_show_notebook_tabs"),
|
||||||
"toggled", G_CALLBACK(on_pref_show_notebook_tabs_toggled), NULL);
|
"toggled", G_CALLBACK(on_show_notebook_tabs_toggled), NULL);
|
||||||
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "check_folding"),
|
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "check_folding"),
|
||||||
"toggled", G_CALLBACK(on_pref_use_folding_toggled), NULL);
|
"toggled", G_CALLBACK(on_use_folding_toggled), NULL);
|
||||||
|
g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "check_symbol_auto_completion"),
|
||||||
|
"toggled", G_CALLBACK(on_symbol_auto_completion_toggled), NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
prefs_init_dialog();
|
prefs_init_dialog();
|
||||||
|
@ -765,7 +765,10 @@ gboolean sci_cb_start_auto_complete(gint idx, gint pos, gboolean force)
|
|||||||
gchar *wordchars;
|
gchar *wordchars;
|
||||||
filetype *ft;
|
filetype *ft;
|
||||||
|
|
||||||
if (! DOC_IDX_VALID(idx) || doc_list[idx].file_type == NULL) return FALSE;
|
if ((! app->pref_editor_auto_complete_symbols && ! force) ||
|
||||||
|
! DOC_IDX_VALID(idx) || doc_list[idx].file_type == NULL)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
sci = doc_list[idx].sci;
|
sci = doc_list[idx].sci;
|
||||||
ft = doc_list[idx].file_type;
|
ft = doc_list[idx].file_type;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user