Revision: 5122
http://geany.svn.sourceforge.net/geany/?rev=5122&view=rev
Author: ntrel
Date: 2010-08-10 12:49:16 +0000 (Tue, 10 Aug 2010)
Log Message:
-----------
Move some interface hidden prefs to ui_utils.c.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/geany.html
trunk/doc/geany.txt
trunk/src/keyfile.c
trunk/src/ui_utils.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-08-10 12:46:30 UTC (rev 5121)
+++ trunk/ChangeLog 2010-08-10 12:49:16 UTC (rev 5122)
@@ -9,6 +9,8 @@
* src/stash.c:
Fix writing the default value when a key is missing for hidden
prefs, even if it was overridden when it was originally read.
+ * src/keyfile.c, src/ui_utils.c, doc/geany.txt, doc/geany.html:
+ Move some interface hidden prefs to ui_utils.c.
2010-08-05 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html 2010-08-10 12:46:30 UTC (rev 5121)
+++ trunk/doc/geany.html 2010-08-10 12:49:16 UTC (rev 5122)
@@ -6,7 +6,7 @@
<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
<title>Geany</title>
<meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" />
-<meta name="date" content="2010-07-08" />
+<meta name="date" content="2010-07-09" />
<style type="text/css">
/*
@@ -139,7 +139,7 @@
<br />Nick Treleaven
<br />Frank Lanitz</td></tr>
<tr><th class="docinfo-name">Date:</th>
-<td>2010-07-08</td></tr>
+<td>2010-07-09</td></tr>
<tr><th class="docinfo-name">Version:</th>
<td>0.20</td></tr>
</tbody>
@@ -4693,6 +4693,12 @@
<tt class="docutils literal"><span class="pre">Space</span></tt>.</td>
<td>false</td>
</tr>
+<tr><td>show_editor_scrollbars</td>
+<td>Whether to display scrollbars. If set to
+false, the horizontal and vertical
+scrollbars are hidden completely.</td>
+<td>true</td>
+</tr>
<tr><td><strong>Interface related</strong></td>
<td> </td>
<td> </td>
@@ -4713,12 +4719,6 @@
and files can be saved.</td>
<td>false</td>
</tr>
-<tr><td>show_editor_scrollbars</td>
-<td>Whether to display scrollbars. If set to
-false, the horizontal and vertical
-scrollbars are hidden completely.</td>
-<td>true</td>
-</tr>
<tr><td>compiler_tab_autoscroll</td>
<td>Whether to automatically scroll to the
last line of the output in the Compiler
@@ -6143,7 +6143,7 @@
<div class="footer">
<hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2010-07-09 12:18 UTC.
+Generated on: 2010-07-09 15:38 UTC.
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt 2010-08-10 12:46:30 UTC (rev 5121)
+++ trunk/doc/geany.txt 2010-08-10 12:49:16 UTC (rev 5122)
@@ -4049,6 +4049,9 @@
position on the line). Only used when the
keybinding ``Complete snippet`` is set to
``Space``.
+show_editor_scrollbars Whether to display scrollbars. If set to true
+ false, the horizontal and vertical
+ scrollbars are hidden completely.
**Interface related**
show_symbol_list_expanders Whether to show or hide the small expander true
icons on the symbol list treeview (only
@@ -4060,9 +4063,6 @@
setting this option to true, the Save
buttons and menu items are always active
and files can be saved.
-show_editor_scrollbars Whether to display scrollbars. If set to true
- false, the horizontal and vertical
- scrollbars are hidden completely.
compiler_tab_autoscroll Whether to automatically scroll to the true
last line of the output in the Compiler
tab.
Modified: trunk/src/keyfile.c
===================================================================
--- trunk/src/keyfile.c 2010-08-10 12:46:30 UTC (rev 5121)
+++ trunk/src/keyfile.c 2010-08-10 12:49:16 UTC (rev 5122)
@@ -187,12 +187,6 @@
"use_gtk_word_boundaries", TRUE);
stash_group_add_boolean(group, &editor_prefs.complete_snippets_whilst_editing,
"complete_snippets_whilst_editing", FALSE);
- stash_group_add_boolean(group, &interface_prefs.show_symbol_list_expanders,
- "show_symbol_list_expanders", TRUE);
- stash_group_add_boolean(group, &interface_prefs.compiler_tab_autoscroll,
- "compiler_tab_autoscroll", TRUE);
- stash_group_add_boolean(group, &ui_prefs.allow_always_save,
- "allow_always_save", FALSE);
stash_group_add_boolean(group, &file_prefs.use_safe_file_saving,
"use_safe_file_saving", FALSE);
/* for backwards-compatibility */
Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c 2010-08-10 12:46:30 UTC (rev 5121)
+++ trunk/src/ui_utils.c 2010-08-10 12:49:16 UTC (rev 5122)
@@ -2003,10 +2003,18 @@
{
StashGroup *group = stash_group_new(PACKAGE);
+ /* hidden prefs (don't overwrite them so users can edit them manually) */
configuration_add_pref_group(group, FALSE);
stash_group_set_write_once(group, TRUE);
- stash_group_add_string(group, &statusbar_template, "statusbar_template", "");
+ stash_group_add_boolean(group, &interface_prefs.show_symbol_list_expanders,
+ "show_symbol_list_expanders", TRUE);
+ stash_group_add_boolean(group, &interface_prefs.compiler_tab_autoscroll,
+ "compiler_tab_autoscroll", TRUE);
+ stash_group_add_boolean(group, &ui_prefs.allow_always_save,
+ "allow_always_save", FALSE);
+ stash_group_add_string(group, &statusbar_template,
+ "statusbar_template", "");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5121
http://geany.svn.sourceforge.net/geany/?rev=5121&view=rev
Author: ntrel
Date: 2010-08-10 12:46:30 +0000 (Tue, 10 Aug 2010)
Log Message:
-----------
Fix writing the default value when a key is missing for hidden
prefs, even if it was overridden when it was originally read.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/stash.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-08-10 12:43:30 UTC (rev 5120)
+++ trunk/ChangeLog 2010-08-10 12:46:30 UTC (rev 5121)
@@ -6,6 +6,9 @@
merged into one enum; the order of keybindings is now just the
order they are added to each group. Keybindings can be reordered
without breaking the plugin ABI but groups must stay the same.
+ * src/stash.c:
+ Fix writing the default value when a key is missing for hidden
+ prefs, even if it was overridden when it was originally read.
2010-08-05 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/stash.c
===================================================================
--- trunk/src/stash.c 2010-08-10 12:43:30 UTC (rev 5120)
+++ trunk/src/stash.c 2010-08-10 12:46:30 UTC (rev 5121)
@@ -101,9 +101,9 @@
struct StashPref
{
GType setting_type; /* e.g. G_TYPE_INT */
- gpointer setting;
+ gpointer setting; /* Address of a variable */
const gchar *key_name;
- gpointer default_value;
+ gpointer default_value; /* Default value, e.g. (gpointer)1 */
GType widget_type; /* e.g. GTK_TYPE_TOGGLE_BUTTON */
StashWidgetID widget_id; /* (GtkWidget*) or (gchar*) */
gpointer fields; /* extra fields */
@@ -233,15 +233,21 @@
foreach_array(StashPref, entry, group->entries)
{
- /* don't overwrite write_once prefs */
- if (group->write_once && action == SETTING_WRITE &&
- g_key_file_has_key(keyfile, group->name, entry->key_name, NULL))
- continue;
+ gpointer tmp = entry->setting;
+
/* don't override settings with default values */
if (!group->use_defaults && action == SETTING_READ &&
!g_key_file_has_key(keyfile, group->name, entry->key_name, NULL))
continue;
+ /* don't overwrite write_once prefs */
+ if (group->write_once && action == SETTING_WRITE)
+ {
+ if (g_key_file_has_key(keyfile, group->name, entry->key_name, NULL))
+ continue;
+ /* We temporarily use the default value for writing */
+ entry->setting = &entry->default_value;
+ }
switch (entry->setting_type)
{
case G_TYPE_BOOLEAN:
@@ -251,13 +257,15 @@
case G_TYPE_STRING:
handle_string_setting(group, entry, keyfile, action); break;
default:
- /* G_TYPE_STRV is not a constant */
+ /* Note: G_TYPE_STRV is not a constant, can't use case label */
if (entry->setting_type == G_TYPE_STRV)
handle_strv_setting(group, entry, keyfile, action);
else
g_warning("Unhandled type for %s::%s in %s()!", group->name, entry->key_name,
G_STRFUNC);
}
+ if (group->write_once && action == SETTING_WRITE)
+ entry->setting = tmp;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5117
http://geany.svn.sourceforge.net/geany/?rev=5117&view=rev
Author: eht16
Date: 2010-08-05 21:45:58 +0000 (Thu, 05 Aug 2010)
Log Message:
-----------
Inherit 'beep on errors' preference for the audible bell preference for the VTE (closes #3038215).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/vte.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-08-05 21:13:47 UTC (rev 5116)
+++ trunk/ChangeLog 2010-08-05 21:45:58 UTC (rev 5117)
@@ -4,6 +4,9 @@
Make ui_label_new_bold() a function.
Escape the name of the current document for markup when using
document name for menu items (closes #3038844).
+ * src/vte.c:
+ Inherit 'beep on errors' preference for the audible bell preference
+ for the VTE (closes #3038215).
2010-08-01 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/vte.c
===================================================================
--- trunk/src/vte.c 2010-08-05 21:13:47 UTC (rev 5116)
+++ trunk/src/vte.c 2010-08-05 21:45:58 UTC (rev 5117)
@@ -115,6 +115,7 @@
VteTerminalCursorBlinkMode mode);
void (*vte_terminal_set_cursor_blinks) (VteTerminal *terminal, gboolean blink);
void (*vte_terminal_select_all) (VteTerminal *terminal);
+ void (*vte_terminal_set_audible_bell) (VteTerminal *terminal, gboolean is_audible);
};
@@ -432,6 +433,7 @@
* this symbol, we are probably on an older version and use the old API instead */
g_module_symbol(mod, "vte_terminal_set_cursor_blinks", (void*)&vf->vte_terminal_set_cursor_blinks);
g_module_symbol(mod, "vte_terminal_select_all", (void*)&vf->vte_terminal_select_all);
+ g_module_symbol(mod, "vte_terminal_set_audible_bell", (void*)&vf->vte_terminal_set_audible_bell);
}
@@ -448,6 +450,7 @@
vf->vte_terminal_set_color_foreground(VTE_TERMINAL(vc->vte), vc->colour_fore);
vf->vte_terminal_set_color_bold(VTE_TERMINAL(vc->vte), vc->colour_fore);
vf->vte_terminal_set_color_background(VTE_TERMINAL(vc->vte), vc->colour_back);
+ vf->vte_terminal_set_audible_bell(VTE_TERMINAL(vc->vte), prefs.beep_on_errors);
vte_set_cursor_blink_mode();
override_menu_key();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.