diff options
author | Ian McIntosh <ian_mcintosh@linuxadvocate.org> | 2005-10-26 01:53:22 +0000 |
---|---|---|
committer | Ian McIntosh <ian_mcintosh@linuxadvocate.org> | 2005-10-26 01:53:22 +0000 |
commit | fc863b6bcdd42e879788cc8f14c6eb818a0818ae (patch) | |
tree | 4c1f3fcc9891040f6d710e2fc8f4177b6622f7db /src | |
parent | 0da765398297034266f800d06d76ba372162f831 (diff) |
Fix all compiler warnings that showed up after adding -Wall.
Diffstat (limited to 'src')
-rw-r--r-- | src/animator.c | 6 | ||||
-rw-r--r-- | src/directionswindow.c | 9 | ||||
-rw-r--r-- | src/downloadmanager.c | 8 | ||||
-rw-r--r-- | src/glyph.c | 16 | ||||
-rw-r--r-- | src/gotowindow.c | 5 | ||||
-rw-r--r-- | src/gpsclient.c | 5 | ||||
-rw-r--r-- | src/gui.c | 5 | ||||
-rw-r--r-- | src/location.c | 7 | ||||
-rw-r--r-- | src/locationeditwindow.c | 4 | ||||
-rw-r--r-- | src/mainwindow.h | 2 | ||||
-rw-r--r-- | src/map_draw_cairo.c | 11 | ||||
-rw-r--r-- | src/map_draw_gdk.c | 12 | ||||
-rw-r--r-- | src/map_tilemanager.c | 6 | ||||
-rw-r--r-- | src/mapinfowindow.c | 5 | ||||
-rw-r--r-- | src/road.c | 7 | ||||
-rw-r--r-- | src/search.h | 1 | ||||
-rw-r--r-- | src/search_city.c | 3 | ||||
-rw-r--r-- | src/search_coordinate.c | 2 | ||||
-rw-r--r-- | src/search_road.c | 7 | ||||
-rw-r--r-- | src/searchwindow.c | 9 | ||||
-rw-r--r-- | src/test_poly.c | 31 | ||||
-rw-r--r-- | src/tooltipwindow.c | 7 | ||||
-rw-r--r-- | src/util.c | 13 | ||||
-rw-r--r-- | src/util.h | 2 |
24 files changed, 152 insertions, 31 deletions
diff --git a/src/animator.c b/src/animator.c index 2c0e8a9..0ae9f5b 100644 --- a/src/animator.c +++ b/src/animator.c @@ -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 diff --git a/src/directionswindow.c b/src/directionswindow.c index 1f24c76..d984f98 100644 --- a/src/directionswindow.c +++ b/src/directionswindow.c @@ -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 - - diff --git a/src/downloadmanager.c b/src/downloadmanager.c index 7164b8d..7cd07d0 100644 --- a/src/downloadmanager.c +++ b/src/downloadmanager.c @@ -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> diff --git a/src/glyph.c b/src/glyph.c index 418602e..d71ee7a 100644 --- a/src/glyph.c +++ b/src/glyph.c @@ -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 @@ void _glyph_load_at_size_into_struct(glyph_t* pNewGlyph, const gchar* pszName, g 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* glyph_load(const gchar* pszName) 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* glyph_load_at_size(const gchar* pszName, gint nMaxWidth, gint nMaxHeigh 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; } diff --git a/src/gotowindow.c b/src/gotowindow.c index ec4e17c..db683d8 100644 --- a/src/gotowindow.c +++ b/src/gotowindow.c @@ -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" diff --git a/src/gpsclient.c b/src/gpsclient.c index 2a216c8..7121fc3 100644 --- a/src/gpsclient.c +++ b/src/gpsclient.c @@ -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> @@ -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 diff --git a/src/location.c b/src/location.c index 6acd4d9..fa21d2a 100644 --- a/src/location.c +++ b/src/location.c @@ -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 @@ gboolean location_lookup_attribute_name(const gchar* pszName, gint* pnReturnID) 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]); } diff --git a/src/locationeditwindow.c b/src/locationeditwindow.c index 5f76a58..538a32f 100644 --- a/src/locationeditwindow.c +++ b/src/locationeditwindow.c @@ -73,6 +73,8 @@ void locationeditwindow_show_for_edit(gint nLocationID); 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 @@ static void callback_install_insert_text_callback_on_entry(GtkCellRenderer *pCel 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) diff --git a/src/mainwindow.h b/src/mainwindow.h index df64011..63ec79b 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -72,7 +72,7 @@ void mainwindow_statusbar_update_position(void); // 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(); diff --git a/src/map_draw_cairo.c b/src/map_draw_cairo.c index 8ee22b2..af24166 100644 --- a/src/map_draw_cairo.c +++ b/src/map_draw_cairo.c @@ -66,7 +66,7 @@ static void map_draw_cairo_layer_road_labels(map_t* pMap, cairo_t* pCairo, rende 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 @@ void map_draw_cairo_layer_polygons(map_t* pMap, cairo_t* pCairo, rendermetrics_t 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 @@ void map_draw_cairo_layer_points(map_t* pMap, cairo_t* pCairo, rendermetrics_t* // cairo_fill(pCairo); cairo_restore(pCairo); -*/ } +*/ #define ROAD_MAX_SEGMENTS (200) #define DRAW_LABEL_BUFFER_LEN (200) @@ -673,6 +673,9 @@ static void map_draw_cairo_road_label_one_segment(map_t* pMap, cairo_t *pCairo, // // 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 @@ static gint map_draw_cairo_road_label_position_sort(gconstpointer pA, gconstpoin 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) { diff --git a/src/map_draw_gdk.c b/src/map_draw_gdk.c index 99768cf..6e7dd10 100644 --- a/src/map_draw_gdk.c +++ b/src/map_draw_gdk.c @@ -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 @@ void map_draw_gdk(map_t* pMap, GPtrArray* pTiles, rendermetrics_t* pRenderMetric } // 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 @@ static void map_draw_gdk_layer_lines(map_t* pMap, GdkPixmap* pPixmap, rendermetr { 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 @@ static void map_draw_gdk_layer_lines(map_t* pMap, GdkPixmap* pPixmap, rendermetr } // 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 @@ static void map_draw_gdk_locationset(map_t* pMap, GdkPixmap* pPixmap, rendermetr } } } +*/ +#endif diff --git a/src/map_tilemanager.c b/src/map_tilemanager.c index a3556dc..996f3ac 100644 --- a/src/map_tilemanager.c +++ b/src/map_tilemanager.c @@ -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" diff --git a/src/mapinfowindow.c b/src/mapinfowindow.c index ed76807..5b9ea13 100644 --- a/src/mapinfowindow.c +++ b/src/mapinfowindow.c @@ -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" @@ -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" diff --git a/src/search.h b/src/search.h index f7e6db8..1cd4bc3 100644 --- a/src/search.h +++ b/src/search.h @@ -39,6 +39,7 @@ G_BEGIN_DECLS 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); diff --git a/src/search_city.c b/src/search_city.c index 33056ac..c7fc248 100644 --- a/src/search_city.c +++ b/src/search_city.c @@ -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 @@ void search_city_on_words(gchar** aWords, gint nWordCount) // [2] State.CountryID nCount++; - gint nCountryID = atoi(aRow[2]); + //gint nCountryID = atoi(aRow[2]); mappoint_t point = {0,0}; diff --git a/src/search_coordinate.c b/src/search_coordinate.c index dc5e02e..18ee417 100644 --- a/src/search_coordinate.c +++ b/src/search_coordinate.c @@ -53,7 +53,7 @@ void search_coordinate_init() 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! diff --git a/src/search_road.c b/src/search_road.c index 12441c4..ba4edc5 100644 --- a/src/search_road.c +++ b/src/search_road.c @@ -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 @@ void search_road_filter_result( const gchar* pszZIPLeft, const gchar* pszZIPRight, GArray* pMapPointsArray) { - gint nRoadID = 0; gchar azBuffer[BUFFER_SIZE]; mappoint_t ptAddress = {0}; diff --git a/src/searchwindow.c b/src/searchwindow.c index 58c3e16..d94cac1 100644 --- a/src/searchwindow.c +++ b/src/searchwindow.c @@ -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 @@ void searchwindow_init(GladeXML* pGladeXML) // 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) diff --git a/src/test_poly.c b/src/test_poly.c index 7714738..1dfaa64 100644 --- a/src/test_poly.c +++ b/src/test_poly.c @@ -1,3 +1,31 @@ +/*************************************************************************** + * test_poly.c + * + * Copyright 2005 Ian McIntosh + * ian_mcintosh@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 @@ static gboolean test_poly_on_clearbutton_clicked(GtkWidget* w, GdkEventButton *e 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 @@ static gboolean test_poly_on_mouse_button_click(GtkWidget* w, GdkEventButton *ev 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) diff --git a/src/tooltipwindow.c b/src/tooltipwindow.c index acf3b6c..f83704a 100644 --- a/src/tooltipwindow.c +++ b/src/tooltipwindow.c @@ -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 @@ static gboolean tooltip_on_mouse_motion(GtkWidget* pWidget, GdkEventMotion *__un { // in case the mouse makes its way onto the tooltip, hide it. gtk_widget_hide(pWidget); + return FALSE; } @@ -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 @@ gboolean util_parse_hex_color(const gchar* pszString, void* pvReturnColor) 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 @@ gchar* util_str_replace_many(const gchar* pszSource, util_str_replace_t* aReplac 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 @@ gboolean util_load_array_of_string_vectors(const gchar* pszPath, GArray** ppRetu 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; } @@ -63,7 +63,7 @@ gboolean util_gtk_tree_view_select_next(GtkTreeView* pTreeView); 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); |