Cleanups..
authorwellu <wellu@wellu.org>
Tue, 30 Sep 2008 18:19:47 +0000 (18:19 +0000)
committerwellu <wellu@wellu.org>
Tue, 30 Sep 2008 18:19:47 +0000 (18:19 +0000)
git-svn-id: file:///svnroot/speedometer/trunk@40 df364472-da61-43ef-8a67-511c89aa921b

Makefile
TODO
appdata.h
main.c

index dbdf2dc..cd7d4a9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ $(OBJECTS): $(SOURCES)
 
 clean:
        rm -f $(OBJECTS) $(TARGET)
-
+       
 install: all
        install -D -m 755 speedometer $(DESTDIR)/usr/bin/speedometer
        install -D data/speedometer.desktop $(DESTDIR)/usr/share/applications/hildon/speedometer.desktop
@@ -28,4 +28,10 @@ install: all
        install -d $(DESTDIR)/usr/share/speedometer/
        install data/*.png $(DESTDIR)/usr/share/speedometer/
 
+uninstall:
+       rm -rf $(DESTDIR)/usr/share/speedometer
+       rm -f $(DESTDIR)/bin/speedometer
+       rm -f $(DESTDIR)/usr/share/applications/hildon/speedometer.desktop
+       rm -f $(DESTDIR)/usr/share/dbus-1/services/speedometer.service
+       
 
diff --git a/TODO b/TODO
index f773ee5..1295e92 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,8 +1,8 @@
 This is a list of things that are on the pipeline:
 
  - Make AppData part of ui.h --> lots of AppData pointer passing
-   fades away :)
+   should fade away
  
- - Themes: Splitting the package into two graphics and the program.
+ - Themes: Splitting the package into two; graphics and the program itself
 
  -
index 4cbf34c..3bc5275 100644 (file)
--- a/appdata.h
+++ b/appdata.h
 typedef struct _AppData {
     HildonProgram *program;
     HildonWindow *window;
-
-       guint unit;                                     // unit used in conversion
-
-       osso_context_t* osso_ctx;       // libosso
-
 } AppData;
 
 #endif /* APPDATA_H_ */
diff --git a/main.c b/main.c
index 3bd45f4..ed83e7b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -30,6 +30,7 @@
 #define PROGNAME "org.wellu.speedometer"
 
 static AppData *appdata;
+static osso_context_t* osso_ctx;
 
 /* Requests delay from screen blanking
  * Should be called at least once in every 60 seconds
@@ -49,14 +50,14 @@ void init_app() {
        appdata->window = HILDON_WINDOW(hildon_window_new());
        hildon_program_add_window(appdata->program, appdata->window);
 
-       appdata->osso_ctx = osso_initialize(PROGNAME, "1.0", FALSE, NULL);
+       osso_ctx = osso_initialize(PROGNAME, "1.0", FALSE, NULL);
 
        delay_display_blanking(appdata->osso_ctx);
-       g_timeout_add(55000, (GSourceFunc) delay_display_blanking, appdata->osso_ctx);
+       g_timeout_add(55000, (GSourceFunc) delay_display_blanking, osso_ctx);
 }
 
 void deinit_app() {
-       osso_deinitialize(appdata->osso_ctx);
+       osso_deinitialize(osso_ctx);
        stop_gps(appdata);
 }