[cairo-commit] roadster/src animator.c, 1.8, 1.9 directionswindow.c, 1.1, 1.2 downloadmanager.c, 1.3, 1.4 glyph.c, 1.10, 1.11 gotowindow.c, 1.11, 1.12 gpsclient.c, 1.12, 1.13 gui.c, 1.16, 1.17 location.c, 1.8, 1.9 locationeditwindow.c, 1.4, 1.5 mainwindow.h, 1.15, 1.16 map_draw_cairo.c, 1.32, 1.33 map_draw_gdk.c, 1.30, 1.31 map_tilemanager.c, 1.4, 1.5 mapinfowindow.c, 1.3, 1.4 road.c, 1.11, 1.12 search.h, 1.5, 1.6 search_city.c, 1.2, 1.3 search_coordinate.c, 1.1, 1.2 search_road.c, 1.30, 1.31 searchwindow.c, 1.28, 1.29 test_poly.c, 1.3, 1.4 tooltipwindow.c, 1.2, 1.3 util.c, 1.20, 1.21 util.h, 1.20, 1.21

Ian McIntosh commit at pdx.freedesktop.org
Tue Oct 25 23:53:25 PDT 2005


Committed by: ian

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

Modified Files:
	animator.c directionswindow.c downloadmanager.c glyph.c 
	gotowindow.c gpsclient.c gui.c location.c locationeditwindow.c 
	mainwindow.h map_draw_cairo.c map_draw_gdk.c map_tilemanager.c 
	mapinfowindow.c road.c search.h search_city.c 
	search_coordinate.c search_road.c searchwindow.c test_poly.c 
	tooltipwindow.c util.c util.h 
Log Message:
	* src/*: Fix all compiler warnings that showed up after adding -Wall.


Index: animator.c
===================================================================
RCS file: /cvs/cairo/roadster/src/animator.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- animator.c	30 Sep 2005 23:55:31 -0000	1.8
+++ animator.c	26 Oct 2005 06:53:23 -0000	1.9
@@ -21,6 +21,12 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+/*
+Purpose of animator.c:
+ - Return a number between 0.0 and 1.0 based on the current time
+ - Makes it easy to animate something over time using various functions (linear, parabolic, etc.)
+*/
+
 #ifdef HAVE_CONFIG_H
 #  include <config.h>
 #endif

Index: directionswindow.c
===================================================================
RCS file: /cvs/cairo/roadster/src/directionswindow.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- directionswindow.c	12 Oct 2005 03:56:44 -0000	1.1
+++ directionswindow.c	26 Oct 2005 06:53:23 -0000	1.2
@@ -21,6 +21,13 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+/*
+Purpose of directionswindow.c:
+ - This is the bar across the top of the map, visible only when user is following generated directions (XXX: unimplemented)
+ - Show step-by-step directions with various info for each step
+ - Allow user to view each turn by clicking on the line, etc.
+*/
+
 #include <gtk/gtk.h>
 #include <glib-object.h>
 #include <glade/glade.h>
@@ -28,5 +35,3 @@
 #ifdef HAVE_CONFIG_H
 #  include <config.h>
 #endif
-
-

Index: downloadmanager.c
===================================================================
RCS file: /cvs/cairo/roadster/src/downloadmanager.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- downloadmanager.c	18 Oct 2005 03:05:25 -0000	1.3
+++ downloadmanager.c	26 Oct 2005 06:53:23 -0000	1.4
@@ -21,9 +21,11 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-// Purpose:
-// A general purpose, easy to use, asyncronous download manager.   Hand it URLs,
-// and it calls your callback function when it's done.  It's that simple!
+/*
+Purpose of downloadmanager.c:
+ - A general purpose, easy to use, asyncronous download manager.
+ - Hand it URLs, and it calls your callback function when it's done.
+*/
 
 #ifdef HAVE_CONFIG_H
 #  include <config.h>

Index: glyph.c
===================================================================
RCS file: /cvs/cairo/roadster/src/glyph.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- glyph.c	1 Oct 2005 05:24:16 -0000	1.10
+++ glyph.c	26 Oct 2005 06:53:23 -0000	1.11
@@ -21,6 +21,14 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+/*
+Purpose of glyph.c:
+ - Load images in various formats
+ - Provide these images in various formats for the rest of the app (currently pixmap, pixbuf)
+ - Be able to reload all images without invalidating the pointers we previously returned 
+*/
+
+#include <string.h>
 #include <gtk/gtk.h>
 #include <cairo.h>
 
@@ -112,14 +120,14 @@
 		g_free(pszFilePath);
 
 		if(pNewPixbuf != NULL) {
-			g_print("loaded image '%s' as %s with size (%d,%d)\n", pszName, apszExtensions[iExtension], gdk_pixbuf_get_width(pNewPixbuf), gdk_pixbuf_get_height(pNewPixbuf));
+			//g_debug("loaded image '%s' as %s with size (%d,%d)\n", pszName, apszExtensions[iExtension], gdk_pixbuf_get_width(pNewPixbuf), gdk_pixbuf_get_height(pNewPixbuf));
 			break;	// got it!
 		}
 	}
 
 	// Create a fake pixbuf if not found
 	if(pNewPixbuf == NULL) {
-		g_print("unabled to load image '%s'\n", pszName);
+		g_warning("unabled to load image '%s'\n", pszName);
 
 		if(nMaxWidth == -1) {
 			pNewPixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, 16, 16);
@@ -142,7 +150,7 @@
 
 	glyph_t* pExistingGlyph = NULL;
 	if(glyph_find_by_attributes(pszName, -1, -1, &pExistingGlyph)) {
-		g_print("Found in cache '%s'\n", pszName);
+		//g_debug("Found in cache '%s'\n", pszName);
 		pExistingGlyph->nReferenceCount++;
 		return pExistingGlyph;
 	}
@@ -170,7 +178,7 @@
 
 	glyph_t* pExistingGlyph = NULL;
 	if(glyph_find_by_attributes(pszName, nMaxWidth, nMaxHeight, &pExistingGlyph)) {
-		g_print("Found in cache '%s'\n", pszName);
+		//g_debug("Found in cache '%s'\n", pszName);
 		pExistingGlyph->nReferenceCount++;
 		return pExistingGlyph;
 	}

Index: gotowindow.c
===================================================================
RCS file: /cvs/cairo/roadster/src/gotowindow.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- gotowindow.c	25 Sep 2005 19:02:37 -0000	1.11
+++ gotowindow.c	26 Oct 2005 06:53:23 -0000	1.12
@@ -21,6 +21,11 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+/*
+Purpose of gotowindow.c:
+ - This is the GOTO window, with inputs for lat and lon.
+*/
+
 #include <glade/glade.h>
 #include <gtk/gtk.h>
 #include "main.h"

Index: gpsclient.c
===================================================================
RCS file: /cvs/cairo/roadster/src/gpsclient.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- gpsclient.c	25 Sep 2005 19:02:37 -0000	1.12
+++ gpsclient.c	26 Oct 2005 06:53:23 -0000	1.13
@@ -21,6 +21,11 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+/*
+Purpose of gpsclient.c:
+ - Provide a sanitized interface to GPSD.
+*/
+
 #define HAVE_GPSD		// XXX: this should come from configure.ac
 
 #include <gtk/gtk.h>

Index: gui.c
===================================================================
RCS file: /cvs/cairo/roadster/src/gui.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- gui.c	11 Oct 2005 23:28:45 -0000	1.16
+++ gui.c	26 Oct 2005 06:53:23 -0000	1.17
@@ -21,6 +21,11 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+/*
+Purpose of gui.c:
+ - The controller of all GUI (graphical user interface) related files (*window.c)
+*/
+
 #ifdef HAVE_CONFIG_H
 #  include <config.h>
 #endif

Index: location.c
===================================================================
RCS file: /cvs/cairo/roadster/src/location.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- location.c	26 Sep 2005 13:57:13 -0000	1.8
+++ location.c	26 Oct 2005 06:53:23 -0000	1.9
@@ -21,12 +21,15 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+#include <stdlib.h>
 #include <gtk/gtk.h>
 #include "main.h"
 #include "map.h"
 #include "location.h"
 #include "db.h"
 
+gboolean location_lookup_attribute_name(const gchar* pszName, gint* pnReturnID);
+
 struct {
 	GMemChunk* pLocationChunkAllocator;
 } g_Location;
@@ -130,8 +133,8 @@
 	g_free(pszSQL);
 	db_free_escaped_string(pszSafeName);
 
-	db_row_t aRow;
-	if(aRow = db_fetch_row(pResultSet)) {
+	db_row_t aRow = db_fetch_row(pResultSet);
+	if(aRow != NULL) {
 		if(pnReturnID) {
 			*pnReturnID = atoi(aRow[0]);
 		}

Index: locationeditwindow.c
===================================================================
RCS file: /cvs/cairo/roadster/src/locationeditwindow.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- locationeditwindow.c	18 Oct 2005 03:05:25 -0000	1.4
+++ locationeditwindow.c	26 Oct 2005 06:53:23 -0000	1.5
@@ -73,6 +73,8 @@
 gboolean locationeditwindow_set_expander_label(gpointer _unused);
 
 // When an 'entry' is created to do in-place editing in a tree, we want to attach this "insert-text" hander to it.
+#ifdef ROADSTER_DEAD_CODE
+/*
 static void callback_install_insert_text_callback_on_entry(GtkCellRenderer *pCellRenderer, GtkCellEditable *pEditable, const gchar *pszTreePath, gpointer pUserData)
 {
 	if(GTK_IS_ENTRY(pEditable)) {
@@ -82,6 +84,8 @@
 		g_signal_connect(G_OBJECT(GTK_COMBO_BOX_ENTRY(pEditable)), "insert-text", G_CALLBACK(pUserData), NULL);
 	}
 }
+*/
+#endif
 
 // Save the results of in-place cell editing
 static void callback_store_attribute_editing(GtkCellRendererText *pCell, const gchar *pszTreePath, const gchar *pszNewValue, gpointer *pUserData)

Index: mainwindow.h
===================================================================
RCS file: /cvs/cairo/roadster/src/mainwindow.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- mainwindow.h	20 Oct 2005 06:56:22 -0000	1.15
+++ mainwindow.h	26 Oct 2005 06:53:23 -0000	1.16
@@ -72,7 +72,7 @@
 
 // Map
 void mainwindow_map_center_on_mappoint(mappoint_t* pPoint);
-void mainwindow_map_get_centerpoint(mappoint_t* pPoint);
+void mainwindow_get_centerpoint(mappoint_t* pPoint);
 void mainwindow_map_slide_to_mappoint(mappoint_t* pPoint);
 
 void mainwindow_add_history();

Index: map_draw_cairo.c
===================================================================
RCS file: /cvs/cairo/roadster/src/map_draw_cairo.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- map_draw_cairo.c	20 Oct 2005 06:56:22 -0000	1.32
+++ map_draw_cairo.c	26 Oct 2005 06:53:23 -0000	1.33
@@ -66,7 +66,7 @@
 static void map_draw_cairo_layer_polygon_labels(map_t* pMap, cairo_t* pCairo, rendermetrics_t* pRenderMetrics, GPtrArray* pRoadsArray, maplayerstyle_t* pLayerStyle);
 
 // Draw a single line/polygon/point
-static void map_draw_cairo_layer_points(map_t* pMap, cairo_t* pCairo, rendermetrics_t* pRenderMetrics, GPtrArray* pLocationsArray);
+//static void map_draw_cairo_layer_points(map_t* pMap, cairo_t* pCairo, rendermetrics_t* pRenderMetrics, GPtrArray* pLocationsArray);
 //static void map_draw_cairo_locationset(map_t* pMap, cairo_t *pCairo, rendermetrics_t* pRenderMetrics, locationset_t* pLocationSet, GPtrArray* pLocationsArray);
 //static void map_draw_cairo_locationselection(map_t* pMap, cairo_t *pCairo, rendermetrics_t* pRenderMetrics, GPtrArray* pLocationSelectionArray);
 
@@ -470,9 +470,9 @@
 	cairo_fill(pCairo);
 }
 
+/*
 void map_draw_cairo_layer_points(map_t* pMap, cairo_t* pCairo, rendermetrics_t* pRenderMetrics, GPtrArray* pLocationsArray)
 {
-/*
 	gdouble fRadius = map_degrees_to_pixels(pMap, 0.0007, map_get_zoomlevel(pMap));
 	gboolean bAddition = FALSE;
 
@@ -511,8 +511,8 @@
 //		cairo_fill(pCairo);
 
 	cairo_restore(pCairo);
-*/
 }
+*/
 
 #define ROAD_MAX_SEGMENTS 		(200)
 #define DRAW_LABEL_BUFFER_LEN	(200)
@@ -673,6 +673,9 @@
 //
 // Draw a label along a multi-point line
 //
+
+#ifdef ROADSTER_DEAD_CODE
+/*
 static gint map_draw_cairo_road_label_position_sort(gconstpointer pA, gconstpointer pB)
 {
 	labelposition_t *pPosA = *(labelposition_t **)pA;
@@ -681,6 +684,8 @@
 	if(pPosA->fScore > pPosB->fScore) return -1;
 	return 1;
 }
+*/
+#endif
 
 static void map_draw_cairo_road_label(map_t* pMap, cairo_t *pCairo, maplayerstyle_t* pLayerStyle, rendermetrics_t* pRenderMetrics, GArray* pMapPointsArray, const gchar* pszLabel)
 {

Index: map_draw_gdk.c
===================================================================
RCS file: /cvs/cairo/roadster/src/map_draw_gdk.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- map_draw_gdk.c	18 Oct 2005 06:40:20 -0000	1.30
+++ map_draw_gdk.c	26 Oct 2005 06:53:23 -0000	1.31
@@ -48,9 +48,10 @@
 //static void map_draw_gdk_background(map_t* pMap, GdkPixmap* pPixmap);
 static void map_draw_gdk_layer_polygons(map_t* pMap, GdkPixmap* pPixmap, rendermetrics_t* pRenderMetrics, GPtrArray* pRoadsArray, maplayerstyle_t* pLayerStyle);
 static void map_draw_gdk_layer_lines(map_t* pMap, GdkPixmap* pPixmap, rendermetrics_t* pRenderMetrics, GPtrArray* pRoadsArray, maplayerstyle_t* pLayerStyle);
+static void map_draw_gdk_layer_fill(map_t* pMap, GdkPixmap* pPixmap, rendermetrics_t* pRenderMetrics, maplayerstyle_t* pLayerStyle);
 
-static void map_draw_gdk_locations(map_t* pMap, GdkPixmap* pPixmap, rendermetrics_t* pRenderMetrics);
-static void map_draw_gdk_locationset(map_t* pMap, GdkPixmap* pPixmap, rendermetrics_t* pRenderMetrics, locationset_t* pLocationSet, GPtrArray* pLocationsArray);
+//static void map_draw_gdk_locations(map_t* pMap, GdkPixmap* pPixmap, rendermetrics_t* pRenderMetrics);
+//static void map_draw_gdk_locationset(map_t* pMap, GdkPixmap* pPixmap, rendermetrics_t* pRenderMetrics, locationset_t* pLocationSet, GPtrArray* pLocationsArray);
 
 typedef struct {
 	GdkPixmap* pPixmap;
@@ -153,7 +154,7 @@
 }
 
 // useful for filling the screen with a color.  not much else.
-void map_draw_gdk_layer_fill(map_t* pMap, GdkPixmap* pPixmap, rendermetrics_t* pRenderMetrics, maplayerstyle_t* pLayerStyle)
+static void map_draw_gdk_layer_fill(map_t* pMap, GdkPixmap* pPixmap, rendermetrics_t* pRenderMetrics, maplayerstyle_t* pLayerStyle)
 {
 	GdkGC* pGC = pMap->pTargetWidget->style->fg_gc[GTK_WIDGET_STATE(pMap->pTargetWidget)];
 
@@ -288,7 +289,6 @@
 {
 	road_t* pRoad;
 	gint iString;
-	gint iPoint;
 
 	if(pLayerStyle->fLineWidth <= 0.0) return;			// Don't draw invisible lines
 	if(pLayerStyle->clrPrimary.fAlpha == 0.0) return;	// invisible?  (not that we respect it in gdk drawing anyway)
@@ -366,6 +366,8 @@
 }
 
 // Draw all locations from sets marked visible
+#ifdef ROADSTER_DEAD_CODE
+/*
 static void map_draw_gdk_locations(map_t* pMap, GdkPixmap* pPixmap, rendermetrics_t* pRenderMetrics)
 {
 	const GPtrArray* pLocationSetsArray = locationset_get_array();
@@ -416,3 +418,5 @@
 		}
 	}
 }
+*/
+#endif

Index: map_tilemanager.c
===================================================================
RCS file: /cvs/cairo/roadster/src/map_tilemanager.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- map_tilemanager.c	18 Oct 2005 06:40:20 -0000	1.4
+++ map_tilemanager.c	26 Oct 2005 06:53:23 -0000	1.5
@@ -21,6 +21,12 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+/*
+Purpose of map_tilemanager.c:
+ - Load tiles of map data
+ - Cache tiles
+*/
+
 #include <gtk/gtk.h>
 #include "util.h"
 #include "map_tilemanager.h"

Index: mapinfowindow.c
===================================================================
RCS file: /cvs/cairo/roadster/src/mapinfowindow.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mapinfowindow.c	20 Oct 2005 06:56:22 -0000	1.3
+++ mapinfowindow.c	26 Oct 2005 06:53:23 -0000	1.4
@@ -22,9 +22,12 @@
  */
 
 /*
-	This is the bar containing current [Country] [State] [City] buttons
+Purpose of mapinfowindow.c:
+ - This is the bar containing current [Country] [State] [City] buttons
+ - Allow user to quickly zoom out to country/state/city level
 */
 
+#include <stdlib.h>
 #include <gtk/gtk.h>
 #include <glade/glade.h>
 #include "map.h"

Index: road.c
===================================================================
RCS file: /cvs/cairo/roadster/src/road.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- road.c	26 Oct 2005 05:09:26 -0000	1.11
+++ road.c	26 Oct 2005 06:53:23 -0000	1.12
@@ -21,6 +21,13 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+/*
+Purpose of road.c:
+ - Convert from road suffix names (eg. "st") to numbers for storing to DB
+ - Convert from numbers to suffix names for display
+ - Convert from direction (N, NW, W, etc.) prefix/suffix to numbers and back (XXX: not yet implemented)
+*/
+
 #include <gtk/gtk.h>
 #include "road.h"
 #include "util.h"

Index: search.h
===================================================================
RCS file: /cvs/cairo/roadster/src/search.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- search.h	20 Oct 2005 06:56:22 -0000	1.5
+++ search.h	26 Oct 2005 06:53:23 -0000	1.6
@@ -39,6 +39,7 @@
 
 void search_init();
 void search_clean_string(gchar* p);
+void search_all(const gchar* pszSentence);
 
 gboolean search_address_number_atoi(const gchar* pszText, gint* pnReturn);
 

Index: search_city.c
===================================================================
RCS file: /cvs/cairo/roadster/src/search_city.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- search_city.c	26 Sep 2005 13:57:14 -0000	1.2
+++ search_city.c	26 Oct 2005 06:53:23 -0000	1.3
@@ -21,6 +21,7 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+#include <stdlib.h>
 #include <gtk/gtk.h>
 #include "searchwindow.h"
 #include "search.h"
@@ -132,7 +133,7 @@
 			// [2] State.CountryID
 			nCount++;
 
-			gint nCountryID = atoi(aRow[2]);
+			//gint nCountryID = atoi(aRow[2]);
 
 			mappoint_t point = {0,0};
 

Index: search_coordinate.c
===================================================================
RCS file: /cvs/cairo/roadster/src/search_coordinate.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- search_coordinate.c	20 Oct 2005 06:56:22 -0000	1.1
+++ search_coordinate.c	26 Oct 2005 06:53:23 -0000	1.2
@@ -53,7 +53,7 @@
 
 void search_coordinate_execute(const gchar* pszSentence)
 {
-	mappoint_t ptResult = {0};
+	//mappoint_t ptResult = {0};
 
 	// Goals:
 	// Make sure never to match something that could likely be a road or POI search!

Index: search_road.c
===================================================================
RCS file: /cvs/cairo/roadster/src/search_road.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- search_road.c	20 Oct 2005 06:56:22 -0000	1.30
+++ search_road.c	26 Oct 2005 06:53:23 -0000	1.31
@@ -21,9 +21,15 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+/*
+Purpose of search_road.c:
+ - Match search string against road map objects (XXX: and other map objects?)
+*/
+
 #include <gtk/gtk.h>
 #include <math.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include "main.h"
 #include "db.h"
@@ -477,7 +483,6 @@
 		const gchar* pszZIPLeft, const gchar* pszZIPRight,
 		GArray* pMapPointsArray)
 {
-	gint nRoadID = 0;
 	gchar azBuffer[BUFFER_SIZE];
 
 	mappoint_t ptAddress = {0};

Index: searchwindow.c
===================================================================
RCS file: /cvs/cairo/roadster/src/searchwindow.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- searchwindow.c	20 Oct 2005 06:56:22 -0000	1.28
+++ searchwindow.c	26 Oct 2005 06:53:23 -0000	1.29
@@ -21,6 +21,12 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+/*
+Purpose of searchwindow.c:
+ - This is the search box in the toolbar and the search results list in the sidebar
+ - Process searches, fill results list, and respond to selections on results list!
+*/
+
 #include <gtk/gtk.h>
 #include <glib-object.h>
 #include <glade/glade.h>
@@ -121,9 +127,6 @@
 
 //	util_gtk_entry_add_hint_text(g_SearchWindow.pSearchEntry, "type place or address");
 	util_gtk_entry_add_hint_text(g_SearchWindow.pSearchLocationEntry, "near here");
-
-	g_SearchWindow.pSearchComboBoxEntry;
-	GtkComboBoxEntry a;
 }
 
 void searchwindow_clear_results(void)

Index: test_poly.c
===================================================================
RCS file: /cvs/cairo/roadster/src/test_poly.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- test_poly.c	18 Oct 2005 03:05:25 -0000	1.3
+++ test_poly.c	26 Oct 2005 06:53:23 -0000	1.4
@@ -1,3 +1,31 @@
+/***************************************************************************
+ *            test_poly.c
+ *
+ *  Copyright  2005  Ian McIntosh
+ *  ian_mcintosh at linuxadvocate.org
+ ****************************************************************************/
+
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/*
+Purpose of test_poly.c:
+ - This is the debug window for testing polygon related utility functions.
+*/
+
 #ifdef HAVE_CONFIG_H
 #  include <config.h>
 #endif
@@ -9,6 +37,7 @@
 
 #include "gui.h"
 #include "map.h"
+#include "map_math.h"
 #include "util.h"
 
 struct {
@@ -78,6 +107,7 @@
 gboolean test_poly_on_time_to_queue_draw(GtkWidget* w, GdkEventButton *event)
 {
 	gtk_widget_queue_draw(GTK_WIDGET(g_Test_Poly.pDrawingArea));
+	return FALSE;
 }
 
 static gboolean test_poly_on_mouse_button_click(GtkWidget* w, GdkEventButton *event)
@@ -95,6 +125,7 @@
 
 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_Test_Poly.pHideDrawingCheckButton), FALSE);
 	gtk_widget_queue_draw(GTK_WIDGET(g_Test_Poly.pDrawingArea));
+	return FALSE;
 }
 
 static void test_poly_draw_array(cairo_t* pCairo, GArray* pArray)

Index: tooltipwindow.c
===================================================================
RCS file: /cvs/cairo/roadster/src/tooltipwindow.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- tooltipwindow.c	10 Oct 2005 07:07:36 -0000	1.2
+++ tooltipwindow.c	26 Oct 2005 06:53:23 -0000	1.3
@@ -21,6 +21,12 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+/*
+Purpose of tooltipwindow.c:
+ - Make it easy to display a 'tooltip' (really a GtkWindow) with text (XXX: add images, etc?)
+ - Make it easy to make the tooltip follow the mouse cursor
+*/
+
 #include <gtk/gtk.h>
 
 #include "main.h"
@@ -84,4 +90,5 @@
 {
 	// in case the mouse makes its way onto the tooltip, hide it.
 	gtk_widget_hide(pWidget);
+	return FALSE;
 }

Index: util.c
===================================================================
RCS file: /cvs/cairo/roadster/src/util.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- util.c	26 Oct 2005 05:04:53 -0000	1.20
+++ util.c	26 Oct 2005 06:53:23 -0000	1.21
@@ -21,6 +21,9 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
 #include <gnome-vfs-2.0/libgnomevfs/gnome-vfs.h>
 
 #include "main.h"
@@ -198,6 +201,8 @@
 	pReturnColor->fBlue = (gfloat)strtol(azBuffer, NULL, 16)/255.0;
 	azBuffer[0] = *p++; azBuffer[1] = *p++;
 	pReturnColor->fAlpha = (gfloat)strtol(azBuffer, NULL, 16)/255.0;
+
+	return TRUE;
 }
 
 void util_random_color(void* p)
@@ -415,14 +420,14 @@
 gboolean util_gtk_window_is_fullscreen(GtkWindow* pWindow)
 {
     GdkWindow* pTopLevelGDKWindow = gdk_window_get_toplevel(GTK_WIDGET(pWindow)->window);
-	g_return_if_fail(pTopLevelGDKWindow != NULL);
+	g_return_val_if_fail(pTopLevelGDKWindow != NULL, FALSE);
 
 	GdkWindowState windowstate = gdk_window_get_state(pTopLevelGDKWindow);
 
 	return((windowstate & GDK_WINDOW_STATE_FULLSCREEN) > 0);
 }
 
-gboolean util_gtk_window_set_fullscreen(GtkWindow* pWindow, gboolean bFullscreen)
+void util_gtk_window_set_fullscreen(GtkWindow* pWindow, gboolean bFullscreen)
 {
 	GdkWindow* pTopLevelGDKWindow = gdk_window_get_toplevel(GTK_WIDGET(pWindow)->window);
 	g_return_if_fail(pTopLevelGDKWindow != NULL);
@@ -661,11 +666,11 @@
 	gint i;
 	for(i=0 ; i<nNumLines ; i++) {
 		if(apszLines[i][0] == '\0') {
-			g_debug("skipping blank line");
+			//g_debug("skipping blank line");
 			continue;
 		}
 		if(apszLines[i][0] == '#') {
-			g_debug("skipping comment line");
+			//g_debug("skipping comment line");
 			continue;
 		}
 

Index: util.h
===================================================================
RCS file: /cvs/cairo/roadster/src/util.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- util.h	26 Oct 2005 05:04:53 -0000	1.20
+++ util.h	26 Oct 2005 06:53:23 -0000	1.21
@@ -63,7 +63,7 @@
 gboolean util_gtk_tree_view_select_previous(GtkTreeView* pTreeView);
 
 gboolean util_gtk_window_is_fullscreen(GtkWindow* pWindow);
-gboolean util_gtk_window_set_fullscreen(GtkWindow* pWindow, gboolean bFullscreen);
+void util_gtk_window_set_fullscreen(GtkWindow* pWindow, gboolean bFullscreen);
 
 gboolean util_gtk_range_instant_set_on_value_changing_callback(GtkRange *range, GtkScrollType scroll, gdouble value, gpointer user_data);
 const gchar* util_gtk_menu_item_get_label_text(GtkMenuItem* pMenuItem);



More information about the cairo-commit mailing list