34 |
#include "main.h" |
#include "main.h" |
35 |
#include "filesops.h" |
#include "filesops.h" |
36 |
#include "prefs.h" |
#include "prefs.h" |
37 |
|
#include "gtksourceview/gtksourceview.h" |
38 |
|
|
39 |
|
|
40 |
extern GtkWidget *MainWindow; |
extern GtkWidget *MainWindow; |
108 |
set.syn_high_depth = get_int_conf ("General/Adv/SynHighDepth"); |
set.syn_high_depth = get_int_conf ("General/Adv/SynHighDepth"); |
109 |
set.auto_indent = get_bool_conf ("General/Adv/AutoIndent"); |
set.auto_indent = get_bool_conf ("General/Adv/AutoIndent"); |
110 |
set.auto_correct = get_bool_conf ("General/Adv/AutoCorrect"); |
set.auto_correct = get_bool_conf ("General/Adv/AutoCorrect"); |
111 |
|
set.show_line_numbers = get_bool_conf2 ("General/Editor/ShowLineNumbers", TRUE); |
112 |
|
set.show_margin = get_bool_conf2 ("General/Editor/ShowMargin", FALSE); |
113 |
|
|
114 |
normalize_settings (&set); |
normalize_settings (&set); |
115 |
|
|
706 |
} |
} |
707 |
else if (!strcmp (Data, "auto_indent")) |
else if (!strcmp (Data, "auto_indent")) |
708 |
{ |
{ |
709 |
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(Widget))) |
Settings.auto_indent = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(Widget)); |
710 |
{ |
|
711 |
Settings.auto_indent = TRUE; |
for (i = 0; i < OpenedFilesCnt; i++) |
|
} |
|
|
else |
|
712 |
{ |
{ |
713 |
Settings.auto_indent = FALSE; |
gtk_source_view_set_auto_indent (GTK_SOURCE_VIEW (FPROPS(i, Text)), |
714 |
|
Settings.auto_indent); |
715 |
} |
} |
716 |
|
|
717 |
set_bool_conf ("General/Adv/AutoIndent", Settings.auto_indent); |
set_bool_conf ("General/Adv/AutoIndent", Settings.auto_indent); |
718 |
} |
} |
719 |
else if (!strcmp (Data, "auto_correct")) |
else if (!strcmp (Data, "auto_correct")) |
720 |
{ |
{ |
721 |
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(Widget))) |
Settings.auto_correct = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(Widget)); |
|
{ |
|
|
Settings.auto_correct = TRUE; |
|
|
} |
|
|
else |
|
|
{ |
|
|
Settings.auto_correct = FALSE; |
|
|
} |
|
722 |
|
|
723 |
set_bool_conf ("General/Adv/AutoCorrect", Settings.auto_correct); |
set_bool_conf ("General/Adv/AutoCorrect", Settings.auto_correct); |
724 |
} |
} |