Skip to content

Commit

Permalink
Add menu option to flush mapcache, and reduce viking memory footprint
Browse files Browse the repository at this point in the history
  • Loading branch information
jocelynj committed Mar 14, 2009
1 parent 844a205 commit 5007567
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/menu.xml.h
Expand Up @@ -35,6 +35,7 @@ static const char *menu_xml =
" <menuitem action='Delete'/>"
" <menuitem action='DeleteAll'/>"
" <separator/>"
" <menuitem action='MapCacheFlush'/>"
" <menuitem action='Preferences'/>"
" </menu>"
" <menu action='View'>"
Expand Down
9 changes: 8 additions & 1 deletion src/vikwindow.c
Expand Up @@ -34,6 +34,7 @@
#include "geonamessearch.h"
#endif
#include "dems.h"
#include "mapcache.h"
#include "print.h"
#include "preferences.h"
#include "icons/icons.h"
Expand Down Expand Up @@ -1505,6 +1506,11 @@ static void goto_address( GtkAction *a, VikWindow *vw)

}

static void mapcache_flush_cb ( GtkAction *a, VikWindow *vw )
{
a_mapcache_flush();
}

static void preferences_cb ( GtkAction *a, VikWindow *vw )
{
a_preferences_show_window ( GTK_WINDOW(vw) );
Expand Down Expand Up @@ -1997,7 +2003,8 @@ static GtkActionEntry entries[] = {
{ "Paste", GTK_STOCK_PASTE, N_("_Paste"), NULL, NULL, (GCallback)menu_paste_layer_cb },
{ "Delete", GTK_STOCK_DELETE, N_("_Delete"), NULL, NULL, (GCallback)menu_delete_layer_cb },
{ "DeleteAll", NULL, N_("Delete All"), NULL, NULL, (GCallback)clear_cb },
{ "Preferences",GTK_STOCK_PREFERENCES, N_("_Preferences..."), NULL, NULL, (GCallback)preferences_cb },
{ "MapCacheFlush",NULL, N_("Flush Map cache"), NULL, NULL, (GCallback)mapcache_flush_cb },
{ "Preferences",GTK_STOCK_PREFERENCES, N_("_Preferences..."), NULL, NULL, (GCallback)preferences_cb },
{ "Properties",GTK_STOCK_PROPERTIES, N_("_Properties"), NULL, NULL, (GCallback)menu_properties_cb },

{ "About", GTK_STOCK_ABOUT, N_("_About"), NULL, NULL, (GCallback)help_about_cb },
Expand Down

0 comments on commit 5007567

Please sign in to comment.