SF.net SVN: geany:[2834] branches/custom-tab-width
ntrel at users.sourceforge.net
ntrel at xxxxx
Tue Jul 29 17:46:21 UTC 2008
Revision: 2834
http://geany.svn.sourceforge.net/geany/?rev=2834&view=rev
Author: ntrel
Date: 2008-07-29 17:46:21 +0000 (Tue, 29 Jul 2008)
Log Message:
-----------
Replace init_prefs(), update_prefs() with common prefs_action()
function.
Modified Paths:
--------------
branches/custom-tab-width/ChangeLog
branches/custom-tab-width/src/prefs.c
Modified: branches/custom-tab-width/ChangeLog
===================================================================
--- branches/custom-tab-width/ChangeLog 2008-07-29 14:43:34 UTC (rev 2833)
+++ branches/custom-tab-width/ChangeLog 2008-07-29 17:46:21 UTC (rev 2834)
@@ -2,6 +2,9 @@
* src/prefs.c, src/editor.h:
Move detect_tab_mode editor pref to indentation pref 'detect_type'.
+ * src/prefs.c:
+ Replace init_prefs(), update_prefs() with common prefs_action()
+ function.
2008-07-28 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: branches/custom-tab-width/src/prefs.c
===================================================================
--- branches/custom-tab-width/src/prefs.c 2008-07-29 14:43:34 UTC (rev 2833)
+++ branches/custom-tab-width/src/prefs.c 2008-07-29 17:46:21 UTC (rev 2834)
@@ -224,7 +224,7 @@
typedef void (*PrefItemsCallback)(PrefCallbackAction action);
-/* List of functions which hold the PrefEntry arrays. This allows access to
+/* List of functions which hold the PrefEntry arrays. These allow access to
* runtime setting fields like EditorPrefs::indentation->width. */
PrefItemsCallback pref_item_callbacks[] = {
toggle_items_foreach,
@@ -234,6 +234,15 @@
};
+static void prefs_action(PrefCallbackAction action)
+{
+ guint i;
+
+ for (i = 0; i < G_N_ELEMENTS(pref_item_callbacks); i++)
+ pref_item_callbacks[i](action);
+}
+
+
enum
{
KB_TREE_ACTION,
@@ -306,21 +315,12 @@
}
-static void init_prefs(void)
-{
- guint i;
-
- for (i = 0; i < G_N_ELEMENTS(pref_item_callbacks); i++)
- pref_item_callbacks[i](PREF_DISPLAY);
-}
-
-
void prefs_init_dialog(void)
{
GtkWidget *widget;
GdkColor *color;
- init_prefs();
+ prefs_action(PREF_DISPLAY);
/* General settings */
/* startup */
@@ -721,15 +721,6 @@
}
-static void update_prefs(void)
-{
- guint i;
-
- for (i = 0; i < G_N_ELEMENTS(pref_item_callbacks); i++)
- pref_item_callbacks[i](PREF_UPDATE);
-}
-
-
/*
* callbacks
*/
@@ -741,7 +732,7 @@
GtkWidget *widget;
guint i;
- update_prefs();
+ prefs_action(PREF_UPDATE);
/* General settings */
/* startup */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list