[gnumeric] conf: improve positioning of get_node functions in header file.



commit 3475048167fc6fc32e87b3bb67c2acfb8f9c94b2
Author: Morten Welinder <terra gnome org>
Date:   Mon Jan 11 10:40:12 2010 -0500

    conf: improve positioning of get_node functions in header file.

 tools/ChangeLog           |    2 ++
 tools/handle-conf-options |   13 ++++++-------
 2 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/tools/ChangeLog b/tools/ChangeLog
index 219c876..4953045 100644
--- a/tools/ChangeLog
+++ b/tools/ChangeLog
@@ -1,6 +1,8 @@
 2010-01-11  Morten Welinder  <terra gnome org>
 
 	* handle-conf-options (quote_c_string): New function.
+	(create_hcfile): Improve positioning of get_node functions in
+	header file.
 
 2009-12-15  Morten Welinder <terra gnome org>
 
diff --git a/tools/handle-conf-options b/tools/handle-conf-options
index 3466782..4d5219c 100644
--- a/tools/handle-conf-options
+++ b/tools/handle-conf-options
@@ -334,6 +334,8 @@ sub create_hcfile {
 	$var =~ s{^/apps/gnome-settings/gnumeric/}{};
 	$var =~ s{[^a-zA-Z0-9_]}{_}g;
 
+	my $watch_name = "watch_$var";
+
 	my $needs_conf = 0;
 	if ($key =~ s{/apps/gnumeric/}{}) {
 	    my $dir = $key; $dir =~ s{/[^/]+$}{};
@@ -341,14 +343,16 @@ sub create_hcfile {
 	    $needs_conf = 1;
 	}
 
+	if ($needs_conf) {
+	    &make_get_conf_node ("$watch_name.key", $var, "node",
+				 \$hfile, \$cfile);
+	}
 	$hfile .= "${ctypes}gnm_conf_get_$var (void);\n";
 	$hfile .= "void gnm_conf_set_$var ($ctype);\n\n";
 
 	my $get_head = "$ctype\ngnm_conf_get_$var (void)";
 	my $set_head = "void\ngnm_conf_set_$var (${ctypes}x)";
 
-	my $watch_name = "watch_$var";
-
 	if ($type eq 'bool') {
 	    $default = uc $default;
 
@@ -451,11 +455,6 @@ sub create_hcfile {
 	} else {
 	    die "$0: Unhandled type $type\n";
 	}
-
-	if ($needs_conf) {
-	    &make_get_conf_node ("$watch_name.key", $var, "node",
-				 \$hfile, \$cfile);
-	}
     }
 
     for my $dir (sort keys %dirs) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]