[cairo-commit] roadster/src databasewindow.h, 1.2, 1.3 datasetwindow.h, 1.1, 1.2 gpsclient.h, 1.2, 1.3 import.h, 1.1, 1.2 import_tiger.h, 1.1, 1.2 importwindow.h, 1.1, 1.2 layers.c, 1.8, 1.9 layers.h, 1.4, 1.5 locationset.h, 1.1, 1.2 mainwindow.c, 1.10, 1.11 mainwindow.h, 1.3, 1.4 search.h, 1.1, 1.2 search_location.h, 1.1, 1.2 search_road.h, 1.1, 1.2 searchwindow.h, 1.1, 1.2 welcomewindow.h, 1.1, 1.2

Nathan Fredrickson commit at pdx.freedesktop.org
Wed Mar 2 23:32:48 PST 2005


Committed by: nrf

Update of /cvs/cairo/roadster/src
In directory gabe:/tmp/cvs-serv3189/src

Modified Files:
	databasewindow.h datasetwindow.h gpsclient.h import.h 
	import_tiger.h importwindow.h layers.c layers.h locationset.h 
	mainwindow.c mainwindow.h search.h search_location.h 
	search_road.h searchwindow.h welcomewindow.h 
Log Message:
    * src/*.h: Change extern "C" to G_BEGIN_DECLS/G_END_DECLS
    * src/layers.h:
    * src/layers.c: Add layers_reload() to reload the layer styles.
    * data/roadster.glade
    * src/mainwindow.c: Add "Debug" menu and "Reload Styles" menuitem.


Index: databasewindow.h
===================================================================
RCS file: /cvs/cairo/roadster/src/databasewindow.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- databasewindow.h	26 Feb 2005 04:41:40 -0000	1.2
+++ databasewindow.h	3 Mar 2005 07:32:46 -0000	1.3
@@ -24,10 +24,7 @@
 #ifndef _DATABASEWINDOW_H
 #define _DATABASEWINDOW_H
 
-#ifdef __cplusplus
-extern "C"
-{
-#endif
+G_BEGIN_DECLS
 
 #ifdef ROADSTER_DEAD_CODE
 
@@ -45,8 +42,6 @@
 
 
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _DATABASEWINDOW_H */

Index: datasetwindow.h
===================================================================
RCS file: /cvs/cairo/roadster/src/datasetwindow.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- datasetwindow.h	23 Feb 2005 17:43:50 -0000	1.1
+++ datasetwindow.h	3 Mar 2005 07:32:46 -0000	1.2
@@ -26,10 +26,7 @@
 
 #include <glade/glade.h>
 
-#ifdef __cplusplus
-extern "C"
-{
-#endif
+G_BEGIN_DECLS
 
 void datasetwindow_init(GladeXML* pGladeXML);
 void datasetwindow_show(void);
@@ -42,8 +39,6 @@
 void datasetwindow_on_datasetdeletebutton_clicked(GtkWidget *widget, gpointer user_data);
 void datasetwindow_on_datasetimportbutton_clicked(GtkWidget *widget, gpointer user_data);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _DATASETWINDOW_H */

Index: gpsclient.h
===================================================================
RCS file: /cvs/cairo/roadster/src/gpsclient.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- gpsclient.h	26 Feb 2005 04:41:40 -0000	1.2
+++ gpsclient.h	3 Mar 2005 07:32:46 -0000	1.3
@@ -24,10 +24,7 @@
 #ifndef _GPSCLIENT_H
 #define _GPSCLIENT_H
 
-#ifdef __cplusplus
-extern "C"
-{
-#endif
+G_BEGIN_DECLS
 
 #include "map.h"
 
@@ -66,8 +63,6 @@
 void gpsclient_init(void);
 const gpsdata_t* gpsclient_getdata(void);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _GPSCLIENT_H */

Index: import.h
===================================================================
RCS file: /cvs/cairo/roadster/src/import.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- import.h	23 Feb 2005 17:43:50 -0000	1.1
+++ import.h	3 Mar 2005 07:32:46 -0000	1.2
@@ -24,15 +24,10 @@
 #ifndef _IMPORT_H
 #define _IMPORT_H
 
-#ifdef __cplusplus
-extern "C"
-{
-#endif
+G_BEGIN_DECLS
 
 gboolean import_from_uri(const gchar* pszURI);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _IMPORT_H */

Index: import_tiger.h
===================================================================
RCS file: /cvs/cairo/roadster/src/import_tiger.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- import_tiger.h	23 Feb 2005 17:43:50 -0000	1.1
+++ import_tiger.h	3 Mar 2005 07:32:46 -0000	1.2
@@ -24,18 +24,13 @@
 #ifndef _IMPORT_TIGER_H
 #define _IMPORT_TIGER_H
 
-#ifdef __cplusplus
-extern "C"
-{
-#endif
+G_BEGIN_DECLS
 
 #include <gtk/gtk.h>
 #include "db.h"
 
 gboolean import_tiger_from_uri(const gchar* pszURI, gint nTigerSetNumber);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _IMPORT_TIGER_H */

Index: importwindow.h
===================================================================
RCS file: /cvs/cairo/roadster/src/importwindow.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- importwindow.h	23 Feb 2005 17:43:50 -0000	1.1
+++ importwindow.h	3 Mar 2005 07:32:46 -0000	1.2
@@ -26,10 +26,7 @@
 
 #include <glade/glade.h>
 
-#ifdef __cplusplus
-extern "C"
-{
-#endif
+G_BEGIN_DECLS
 
 void importwindow_init(GladeXML* pGladeXML);
 void importwindow_show(void);
@@ -39,9 +36,7 @@
 void importwindow_progress_pulse(void);
 
 // void importwindow_progress_callback(gdouble fPercent, gpointer pData);
-	
-#ifdef __cplusplus
-}
-#endif
+
+G_END_DECLS
 
 #endif /* _IMPORTWINDOW_H */

Index: layers.c
===================================================================
RCS file: /cvs/cairo/roadster/src/layers.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- layers.c	3 Mar 2005 06:45:09 -0000	1.8
+++ layers.c	3 Mar 2005 07:32:46 -0000	1.9
@@ -39,7 +39,7 @@
 	{pDash_10_10, 2},
 };
 
-static void layers_load_style(const gchar * file);
+static void layers_load_from_file();
 static layer_t* layers_new(gint index, gchar *name);
 
 static void layers_parse_layers(xmlDocPtr doc, xmlNodePtr node);
@@ -74,15 +74,20 @@
 	/* init libxml */
 	LIBXML_TEST_VERSION
 
-	layers_load_style(PACKAGE_SOURCE_DIR"/data/styles/road.xml");
+	layers_load_from_file();
 
-	xmlCleanupParser();
 }
 
 void 
 layers_deinit(void)
 {
+	xmlCleanupParser();
+}
 
+void 
+layers_reload(void)
+{
+	layers_load_from_file();
 }
 
 static layer_t*
@@ -98,7 +103,7 @@
 }
 
 static void
-layers_load_style(const gchar * file)
+layers_load_from_file()
 {
 	xmlDocPtr doc = NULL;
 	xmlNodePtr root_element = NULL;

Index: layers.h
===================================================================
RCS file: /cvs/cairo/roadster/src/layers.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- layers.h	3 Mar 2005 06:45:09 -0000	1.4
+++ layers.h	3 Mar 2005 07:32:46 -0000	1.5
@@ -27,10 +27,7 @@
 
 #include <gtk/gtk.h>
 
-#ifdef __cplusplus
-extern "C"
-{
-#endif
+G_BEGIN_DECLS
 
 #define LAYER_NONE				(0)
 
@@ -100,9 +97,8 @@
 
 void layers_init(void);
 void layers_deinit(void);
+void layers_reload(void);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _LAYERS_H_ */

Index: locationset.h
===================================================================
RCS file: /cvs/cairo/roadster/src/locationset.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- locationset.h	23 Feb 2005 17:43:50 -0000	1.1
+++ locationset.h	3 Mar 2005 07:32:46 -0000	1.2
@@ -24,10 +24,7 @@
 #ifndef _LOCATIONSET_H
 #define _LOCATIONSET_H
 
-#ifdef __cplusplus
-extern "C"
-{
-#endif
+G_BEGIN_DECLS
 
 #include "map.h"
 	
@@ -59,8 +56,6 @@
 gboolean locationset_add_location(gint nLocationSetID, mappoint_t* pPoint, gint* pReturnID);
 const GPtrArray* locationset_get_set_array(void);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _LOCATIONSET_H */

Index: mainwindow.c
===================================================================
RCS file: /cvs/cairo/roadster/src/mainwindow.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- mainwindow.c	1 Mar 2005 19:48:21 -0000	1.10
+++ mainwindow.c	3 Mar 2005 07:32:46 -0000	1.11
@@ -33,6 +33,7 @@
 #include "gotowindow.h"
 #include "db.h"
 #include "map.h"
+#include "layers.h"
 #include "importwindow.h"
 #include "datasetwindow.h"
 #include "welcomewindow.h"
@@ -617,6 +618,12 @@
 	gotowindow_show();
 }
 
+void on_reloadstylesmenuitem_activate(GtkMenuItem *menuitem, gpointer user_data)
+{
+	layers_reload();
+}
+
+
 // void on_gotobutton_clicked(GtkToolButton *toolbutton,  gpointer user_data)
 // {
 //         gotowindow_show();

Index: mainwindow.h
===================================================================
RCS file: /cvs/cairo/roadster/src/mainwindow.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mainwindow.h	1 Mar 2005 19:48:21 -0000	1.3
+++ mainwindow.h	3 Mar 2005 07:32:46 -0000	1.4
@@ -27,10 +27,7 @@
 #include <glade/glade.h>
 #include "map.h"
 
-#ifdef __cplusplus
-extern "C"
-{
-#endif
+G_BEGIN_DECLS
 
 void mainwindow_init(GladeXML* pGladeXML);
 void mainwindow_draw_map(void);
@@ -96,8 +93,6 @@
 
 void mainwindow_set_centerpoint(mappoint_t* pPoint);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _MAINWINDOW_H */

Index: search.h
===================================================================
RCS file: /cvs/cairo/roadster/src/search.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- search.h	23 Feb 2005 17:43:50 -0000	1.1
+++ search.h	3 Mar 2005 07:32:46 -0000	1.2
@@ -24,17 +24,12 @@
 #ifndef _SEARCH_H
 #define _SEARCH_H
 
-#ifdef __cplusplus
-extern "C"
-{
-#endif
+G_BEGIN_DECLS
 
 void search_clean_string(gchar* p);
 
 gboolean search_address_number_atoi(const gchar* pszText, gint* pnReturn);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _SEARCH_H */

Index: search_location.h
===================================================================
RCS file: /cvs/cairo/roadster/src/search_location.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- search_location.h	23 Feb 2005 17:43:50 -0000	1.1
+++ search_location.h	3 Mar 2005 07:32:46 -0000	1.2
@@ -24,15 +24,10 @@
 #ifndef _SEARCH_LOCATION_H
 #define _SEARCH_LOCATION_H
 
-#ifdef __cplusplus
-extern "C"
-{
-#endif
+G_BEGIN_DECLS
 
 void search_location_execute(const gchar* pszSearch, gint nLocationSetID, gfloat fDistance, gint nDistanceUnit);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _SEARCH_LOCATION_H */

Index: search_road.h
===================================================================
RCS file: /cvs/cairo/roadster/src/search_road.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- search_road.h	23 Feb 2005 17:43:50 -0000	1.1
+++ search_road.h	3 Mar 2005 07:32:46 -0000	1.2
@@ -24,15 +24,10 @@
 #ifndef _SEARCH_ROAD_H
 #define _SEARCH_ROAD_H
 
-#ifdef __cplusplus
-extern "C"
-{
-#endif
+G_BEGIN_DECLS
 
 void search_road_execute(const gchar* pszSentence);
-	
-#ifdef __cplusplus
-}
-#endif
+
+G_END_DECLS
 
 #endif /* _SEARCH_ROAD_H */

Index: searchwindow.h
===================================================================
RCS file: /cvs/cairo/roadster/src/searchwindow.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- searchwindow.h	23 Feb 2005 17:43:50 -0000	1.1
+++ searchwindow.h	3 Mar 2005 07:32:46 -0000	1.2
@@ -24,10 +24,7 @@
 #ifndef _SEARCHWINDOW_H
 #define _SEARCHWINDOW_H
 
-#ifdef __cplusplus
-extern "C"
-{
-#endif
+G_BEGIN_DECLS
 
 #include <glade/glade.h>
 #include "gpsclient.h"
@@ -50,8 +47,6 @@
 void searchwindow_on_addressresultstreeview_row_activated(GtkWidget *pWidget, gpointer* p);
 void searchwindow_on_gobutton_clicked(GtkWidget *pWidget, gpointer* p);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _SEARCHWINDOW_H */

Index: welcomewindow.h
===================================================================
RCS file: /cvs/cairo/roadster/src/welcomewindow.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- welcomewindow.h	23 Feb 2005 17:43:50 -0000	1.1
+++ welcomewindow.h	3 Mar 2005 07:32:46 -0000	1.2
@@ -24,10 +24,7 @@
 #ifndef _WELCOMEWINDOW_H
 #define _WELCOMEWINDOW_H
 
-#ifdef __cplusplus
-extern "C"
-{
-#endif
+G_BEGIN_DECLS
 
 void welcomewindow_init(GladeXML* pGladeXML);
 void welcomewindow_show(void);
@@ -40,8 +37,6 @@
 void welcomewindow_on_url_clicked(GtkWidget* pButton, gpointer data);
 void welcomewindow_on_okbutton_clicked(GtkWidget* pButton, gpointer data);
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _WELCOMEWINDOW_H */




More information about the cairo-commit mailing list