[cairo-commit] roadster/src db.c, 1.15, 1.16 mainwindow.c, 1.24, 1.25 map.c, 1.26, 1.27 search_location.c, 1.6, 1.7

Ian McIntosh commit at pdx.freedesktop.org
Sun Mar 13 18:04:32 PST 2005


Committed by: ian

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

Modified Files:
	db.c mainwindow.c map.c search_location.c 
Log Message:
	* src/db.c: Index on column 'Name' of table 'LocationAttributeName' should be UNIQUE.
	* src/mainwindow.c: Add test for event->is_hint in mainwindow_on_mouse_motion to hopefully avoid situation where we continue drawing after mouse button is up.
	* src/map.c: Play with zoom level ratios.


Index: db.c
===================================================================
RCS file: /cvs/cairo/roadster/src/db.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- db.c	13 Mar 2005 23:31:21 -0000	1.15
+++ db.c	14 Mar 2005 02:04:30 -0000	1.16
@@ -594,7 +594,7 @@
 		" ID INT4 UNSIGNED NOT NULL AUTO_INCREMENT,"
 		" Name VARCHAR(30) NOT NULL,"
 		" PRIMARY KEY (ID),"
-		" INDEX (Name));", NULL);
+		" UNIQUE INDEX (Name));", NULL);
 
 	// Location Attribute Value
 	db_query("CREATE TABLE IF NOT EXISTS LocationAttributeValue("

Index: mainwindow.c
===================================================================
RCS file: /cvs/cairo/roadster/src/mainwindow.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- mainwindow.c	13 Mar 2005 23:31:21 -0000	1.24
+++ mainwindow.c	14 Mar 2005 02:04:30 -0000	1.25
@@ -796,7 +796,17 @@
 static gboolean mainwindow_on_mouse_motion(GtkWidget* w, GdkEventMotion *event)
 {
         gint nX,nY;
-	gdk_window_get_pointer(w->window, &nX, &nY, NULL);
+	gint nState;
+	if (event->is_hint) {
+		gdk_window_get_pointer(event->window, &nX, &nY, &nState);
+	}
+	else
+	{
+		nX = event->x;
+		nY = event->y;
+		nState = event->state;
+	}
+
 
 	gint nWidth = GTK_WIDGET(g_MainWindow.m_pDrawingArea)->allocation.width;
 	gint nHeight = GTK_WIDGET(g_MainWindow.m_pDrawingArea)->allocation.height;

Index: map.c
===================================================================
RCS file: /cvs/cairo/roadster/src/map.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- map.c	13 Mar 2005 23:31:21 -0000	1.26
+++ map.c	14 Mar 2005 02:04:30 -0000	1.27
@@ -79,9 +79,9 @@
 	{  400000, ""},		// 3
 	{  200000, ""},		// 4
 	{  100000, ""},		// 5
-	{   40000, ""},		// 6
-	{   20000, ""}, 	// 7
 
+	{   35000, ""},		// 6
+	{   20000, ""}, 	// 7
 	{   10000, ""},		// 8
 	{    4000, ""},		// 9
 	{    1800, ""},		// 10

Index: search_location.c
===================================================================
RCS file: /cvs/cairo/roadster/src/search_location.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- search_location.c	1 Mar 2005 19:48:21 -0000	1.6
+++ search_location.c	14 Mar 2005 02:04:30 -0000	1.7
@@ -45,6 +45,8 @@
 void search_location_on_locationsearch_struct(locationsearch_t* pLocationSearch);
 void search_location_filter_result(gint nLocationID);
 
+// SELECT Location.ID, LocationAttributeValue_Name.Value AS Name, AsText(Location.Coordinates) FROM LocationAttributeValue LEFT JOIN LocationAttributeName ON (LocationAttributeValue.AttributeNameID=LocationAttributeName.ID) LEFT JOIN Location ON (LocationAttributeValue.LocationID=Location.ID) LEFT JOIN LocationAttributeValue AS LocationAttributeValue_Name ON (Location.ID=LocationAttributeValue_Name.LocationID AND LocationAttributeValue_Name.AttributeNameID=1) WHERE MATCH(LocationAttributeValue.Value) AGAINST ('Chang*' IN BOOLEAN MODE) GROUP BY Location.ID;
+
 void search_location_execute(const gchar* pszSentence, gint nLocationSetID, gfloat fDistance, gint nDistanceUnit)
 {
 	return;




More information about the cairo-commit mailing list