]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Have "make install" act more as expected for a desktop application
authorDirk Hohndel <dirk@hohndel.org>
Tue, 11 Oct 2011 22:58:38 +0000 (15:58 -0700)
committerDirk Hohndel <dirk@hohndel.org>
Wed, 12 Oct 2011 03:29:06 +0000 (20:29 -0700)
I'm trying to get subsurface to get closer to becoming a "regular desktop
application"; so far this is based on the recommendations and guidelines
on OpenSUSE and Fedora.

The icon is now named subsurface.svg and make install installs it in the
correct location. At runtime subsurface first checks if an icon is
installed and if it is it uses that - otherwise it falls back to the old
code that tries to read the svg file from the current directory.

We also install a subsurface.desktop file

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Makefile
gtk-gui.c
icon.svg [deleted file]
subsurface.desktop [new file with mode: 0644]
subsurface.svg [new file with mode: 0644]

index 0c67f40f7838e6f0060606d5a501d80b59584254..e05b44e94ff36019c4dbc7bd0bf67dbb36218a82 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,9 +4,18 @@ CC=gcc
 CFLAGS=-Wall -Wno-pointer-sign -g
 INSTALL=install
 
 CFLAGS=-Wall -Wno-pointer-sign -g
 INSTALL=install
 
-prefix = $(HOME)
+# these locations seem to work for SuSE and Fedora
+# prefix = $(HOME)
+prefix = /usr
 DESTDIR = $(prefix)/bin
 DESTDIR = $(prefix)/bin
+DESKTOPDIR = $(prefix)/share/applications
+ICONPATH = $(prefix)/share/icons/hicolor
+ICONDIR = $(ICONPATH)/scalable/apps
+gtk_update_icon_cache = gtk-update-icon-cache -f -t $(ICONPATH)
+
 NAME = subsurface
 NAME = subsurface
+ICONFILE = $(NAME).svg
+DESKTOPFILE = $(NAME).desktop
 
 # find libdivecomputer; we don't trust pkg-config here given how young
 # libdivecomputer still is - so we check /usr/local and /usr and then we
 
 # find libdivecomputer; we don't trust pkg-config here given how young
 # libdivecomputer still is - so we check /usr/local and /usr and then we
@@ -49,6 +58,11 @@ $(NAME): $(OBJS)
 install: $(NAME)
        $(INSTALL) -d -m 755 $(DESTDIR)
        $(INSTALL) $(NAME) $(DESTDIR)
 install: $(NAME)
        $(INSTALL) -d -m 755 $(DESTDIR)
        $(INSTALL) $(NAME) $(DESTDIR)
+       $(INSTALL) -d -m 755 $(DESKTOPDIR)
+       $(INSTALL) $(DESKTOPFILE) $(DESKTOPDIR)
+       $(INSTALL) -d -m 755 $(ICONDIR)
+       $(INSTALL) $(ICONFILE) $(ICONDIR)
+       $(gtk_update_icon_cache)
 
 parse-xml.o: parse-xml.c dive.h
        $(CC) $(CFLAGS) `pkg-config --cflags glib-2.0` -c `xml2-config --cflags`  parse-xml.c
 
 parse-xml.o: parse-xml.c dive.h
        $(CC) $(CFLAGS) `pkg-config --cflags glib-2.0` -c `xml2-config --cflags`  parse-xml.c
index 4ac538a062bdbe32f72ca71d1401e6446e4ecea2..d3de7a649a4ead34c59fb75a073c634b6a8be2fa 100644 (file)
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -43,6 +43,7 @@ void repaint_dive(void)
 }
 
 static char *existing_filename;
 }
 
 static char *existing_filename;
+static gboolean need_icon = TRUE;
 
 static void on_info_bar_response(GtkWidget *widget, gint response,
                                  gpointer data)
 
 static void on_info_bar_response(GtkWidget *widget, gint response,
                                  gpointer data)
@@ -428,11 +429,14 @@ static void about_dialog(GtkWidget *w, gpointer data)
 {
        const char *logo_property = NULL;
        GdkPixbuf *logo = NULL;
 {
        const char *logo_property = NULL;
        GdkPixbuf *logo = NULL;
-       GtkWidget *image = gtk_image_new_from_file("icon.svg");
 
 
-       if (image) {
-               logo = gtk_image_get_pixbuf(GTK_IMAGE(image));
-               logo_property = "logo";
+       if (need_icon) {
+               GtkWidget *image = gtk_image_new_from_file("subsurface.svg");
+
+               if (image) {
+                       logo = gtk_image_get_pixbuf(GTK_IMAGE(image));
+                       logo_property = "logo";
+               }
        }
 
        gtk_show_about_dialog(NULL,
        }
 
        gtk_show_about_dialog(NULL,
@@ -441,6 +445,7 @@ static void about_dialog(GtkWidget *w, gpointer data)
                "license", "GPLv2",
                "version", VERSION_STRING,
                "copyright", "Linus Torvalds 2011",
                "license", "GPLv2",
                "version", VERSION_STRING,
                "copyright", "Linus Torvalds 2011",
+               "logo-icon-name", "subsurface",
                /* Must be last: */
                logo_property, logo,
                NULL);
                /* Must be last: */
                logo_property, logo,
                NULL);
@@ -596,6 +601,8 @@ void init_ui(int argc, char **argv)
        GtkWidget *equipment;
        GtkWidget *menubar;
        GtkWidget *vbox;
        GtkWidget *equipment;
        GtkWidget *menubar;
        GtkWidget *vbox;
+       GdkScreen *screen;
+       GtkIconTheme *icon_theme=NULL;
        GtkSettings *settings;
        static const GtkTargetEntry notebook_target = {
                "GTK_NOTEBOOK_TAB", GTK_TARGET_SAME_APP, 0
        GtkSettings *settings;
        static const GtkTargetEntry notebook_target = {
                "GTK_NOTEBOOK_TAB", GTK_TARGET_SAME_APP, 0
@@ -627,7 +634,20 @@ void init_ui(int argc, char **argv)
 
        error_info_bar = NULL;
        win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
 
        error_info_bar = NULL;
        win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-       gtk_window_set_icon_from_file(GTK_WINDOW(win), "icon.svg", NULL);
+       g_set_application_name ("subsurface");
+       /* Let's check if the subsurface icon has been installed or if
+        * we need to try to load it from the current directory */
+       screen = gdk_screen_get_default();
+       if (screen)
+               icon_theme = gtk_icon_theme_get_for_screen(screen);
+       if (icon_theme) {
+               if (gtk_icon_theme_has_icon(icon_theme, "subsurface")) {
+                       need_icon = FALSE;
+                       gtk_window_set_default_icon_name ("subsurface");
+               }
+       }
+       if (need_icon)
+               gtk_window_set_icon_from_file(GTK_WINDOW(win), "subsurface.svg", NULL);
        g_signal_connect(G_OBJECT(win), "delete-event", G_CALLBACK(on_delete), NULL);
        g_signal_connect(G_OBJECT(win), "destroy", G_CALLBACK(on_destroy), NULL);
        main_window = win;
        g_signal_connect(G_OBJECT(win), "delete-event", G_CALLBACK(on_delete), NULL);
        g_signal_connect(G_OBJECT(win), "destroy", G_CALLBACK(on_destroy), NULL);
        main_window = win;
diff --git a/icon.svg b/icon.svg
deleted file mode 100644 (file)
index 29410c8..0000000
--- a/icon.svg
+++ /dev/null
@@ -1,145 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:xlink="http://www.w3.org/1999/xlink"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="405.71429"
-   height="405.71429"
-   id="svg3958"
-   version="1.1"
-   inkscape:version="0.48.2 r9819"
-   sodipodi:docname="Nuovo documento 3">
-  <defs
-     id="defs3960">
-    <linearGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient3974"
-       id="linearGradient3136"
-       gradientUnits="userSpaceOnUse"
-       x1="-284.28873"
-       y1="258.56543"
-       x2="-284.28873"
-       y2="639.42023" />
-    <linearGradient
-       id="linearGradient3974">
-      <stop
-         id="stop3976"
-         offset="0"
-         style="stop-color:#3465a4;stop-opacity:1;" />
-      <stop
-         id="stop3978"
-         offset="1"
-         style="stop-color:#204a87;stop-opacity:1;" />
-    </linearGradient>
-  </defs>
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="0.35"
-     inkscape:cx="-31.088222"
-     inkscape:cy="347.16626"
-     inkscape:document-units="px"
-     inkscape:current-layer="layer1"
-     showgrid="false"
-     fit-margin-top="0"
-     fit-margin-left="0"
-     fit-margin-right="0"
-     fit-margin-bottom="0"
-     inkscape:window-width="575"
-     inkscape:window-height="448"
-     inkscape:window-x="0"
-     inkscape:window-y="60"
-     inkscape:window-maximized="0" />
-  <metadata
-     id="metadata3963">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title></dc:title>
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g
-     inkscape:label="Livello 1"
-     inkscape:groupmode="layer"
-     id="layer1"
-     transform="translate(-465.71426,-352.36218)">
-    <g
-       transform="translate(2577.3448,387.46589)"
-       id="g3921"
-       inkscape:export-filename="/home/archuser/icon.png"
-       inkscape:export-xdpi="28.389999"
-       inkscape:export-ydpi="28.389999">
-      <g
-         transform="translate(-2082.771,-287.46589)"
-         id="g3120">
-        <g
-           id="g3122"
-           transform="translate(456.85475,0)">
-          <rect
-             style="fill:#d3d7cf;fill-opacity:1;stroke:none"
-             id="rect3124"
-             width="405.71429"
-             height="405.71429"
-             x="-485.71429"
-             y="252.36218"
-             rx="48.57143"
-             ry="48.57143" />
-          <path
-             style="fill:#babdb6;fill-opacity:1;stroke:none"
-             d="m -439.5625,254.4375 c -23.32197,0.49384 -44.19271,21.63293 -44.125,45.3125 0.0318,104.44553 -0.21954,208.90526 0.125,313.34375 1.17202,23.65312 23.03889,43.66042 46.40625,42.96875 104.08218,-0.0837 208.17353,0.16719 312.25,-0.125 23.41986,-1.2263 43.550041,-22.80366 42.90625,-46.5 -0.104782,-104.02969 0.209159,-208.07179 -0.15625,-312.09375 -1.199459,-24.0329 -23.56722,-44.11975 -47.40625,-42.96875 -103.33275,0.0418 -206.67007,-0.0835 -310,0.0625 z"
-             id="path3126"
-             inkscape:connector-curvature="0" />
-          <path
-             style="fill:#888a85;fill-opacity:1;stroke:none"
-             d="m -129.5,256.375 c -104.36101,0.16156 -208.75048,-0.33679 -313.09375,0.28125 -23.00894,2.29305 -41.48312,24.87874 -39.09375,48.09375 0.13102,103.46673 -0.41139,206.94991 0.28125,310.40625 2.44375,23.17089 25.24317,41.33146 48.25,38.90305 103.40288,-0.17062 206.83272,0.41064 310.21875,-0.3093 23.110562,-2.32403 41.378922,-25.24431 38.934295,-48.3125 -0.21452,-103.37176 0.441977,-206.76965 -0.340545,-310.125 -2.240002,-21.90031 -23.0265,-40.01118 -45.15625,-38.9375 z"
-             id="path3128"
-             inkscape:connector-curvature="0" />
-          <path
-             sodipodi:nodetypes="cccccccccc"
-             style="fill:#eeeeec;fill-opacity:1;stroke:none"
-             d="m -130.28125,258.125 c -104.77403,1.0652 -209.59903,-0.92051 -314.34375,1.09375 -23.10839,2.95091 -36.27301,28.27228 -35.28125,50.125 0.81443,99.15252 -0.56392,198.32852 0.625,297.46875 0.30195,14.95108 4.84948,28.32045 16.40625,36.46875 10.96614,8.5872 25.54253,8.88232 38.96873,8.77143 101.68599,-0.47099 203.39121,1.16795 305.06252,-0.95893 22.577086,-4.84975 32.841992,-30.29799 32.838848,-52.03124 -0.699743,-102.76237 1.456849,-205.59796 -1.151348,-308.31251 -4.410414,-19.17914 -23.46032,-33.34826 -43.125,-32.625 z"
-             id="path3138"
-             inkscape:connector-curvature="0" />
-          <path
-             sodipodi:nodetypes="cccccccc"
-             style="fill:#729fcf;fill-opacity:1;stroke:none"
-             d="m -479.90625,307.34375 c 0.81443,99.15252 -0.56392,198.32852 0.625,297.46875 0.125,14.4491 4.84948,28.32045 16.40625,36.46875 10.96614,8.5872 24.5922,8.93596 38.96873,8.77143 101.68599,-0.47099 203.39121,1.16795 305.06252,-0.95893 22.577086,-4.84975 32.929182,-30.12361 32.838848,-52.03124 -0.699743,-102.76237 1.456849,-205.59796 -1.151348,-308.31251 -106.30835,52.32907 -329.2465,-37.13125 -392.75,18.59375 z"
-             id="path3917"
-             inkscape:connector-curvature="0" />
-          <path
-             inkscape:connector-curvature="0"
-             id="path3130"
-             d="m -479.90625,309.34375 c 0.81443,99.15252 -0.56392,198.32852 0.625,297.46875 0.125,14.4491 4.84948,28.32045 16.40625,36.46875 10.96614,8.5872 24.5922,8.93596 38.96873,8.77143 101.68599,-0.47099 203.39121,1.16795 305.06252,-0.95893 22.577086,-4.84975 32.929182,-30.12361 32.838848,-52.03124 -0.699743,-102.76237 1.456849,-205.59796 -1.151348,-308.31251 -106.30835,52.32907 -329.2465,-37.13125 -392.75,18.59375 z"
-             style="fill:url(#linearGradient3136);fill-opacity:1;stroke:none"
-             sodipodi:nodetypes="cccccccc" />
-        </g>
-      </g>
-      <path
-         style="fill:#3465a4"
-         d="m -1923.5806,33.805972 c -9.4807,-0.78916 -3.6181,1.932304 1.5355,4.513312 4.1271,2.881815 10.6659,4.511962 13.3347,8.141432 -0.7278,6.062465 -1.5014,12.205646 -2.1818,18.222083 -3.2457,-0.438613 -13.9469,-7.185347 -11.0938,-2.597463 6.2202,4.118474 0.3905,9.147164 -1.3223,3.57768 1.9917,-8.140756 -6.0865,-1.602385 -10.2827,-0.749319 -3.7133,2.391773 -3.2608,3.567093 -9.4305,2.219644 -4.203,0.236374 -10.7629,-2.486775 -13.5983,-0.628739 -0.9366,5.338739 1.0431,12.056784 -4.694,15.073918 -4.8137,5.253406 -12.5602,8.802202 -12.7609,16.793092 -5.3069,21.514528 -11.0062,42.936978 -15.7794,64.577918 8.161,2.09393 16.5453,5.88336 24.5599,6.9432 8.5107,-3.37572 8.256,-13.7656 12.0893,-20.58455 -0.9535,21.38511 8.8814,41.00772 10.8369,61.94425 1.7598,5.85079 -2.2805,8.47669 -6.9705,10.72793 4.5442,5.94261 -6.7642,-3.26989 -6.0905,5.23471 -4.7136,8.87428 -8.164,18.65139 -13.6841,26.95601 -6.2693,6.26926 -12.5385,12.53852 -18.8078,18.80778 2.2626,11.17287 6.316,22.18251 4.7148,33.7312 -0.019,8.0485 -0.8931,16.33856 -0.4127,24.23773 2.7304,3.98429 4.2596,10.20973 10.3739,8.11401 5.6888,1.13286 9.9375,-0.80744 12.7001,-5.92569 4.5798,-3.16068 3.9256,-7.10961 1.268,-11.39147 -3.5063,-14.13556 -3.652,-28.79639 -5.0372,-43.26568 6.331,-9.91522 11.2575,-20.9286 18.483,-30.13987 8.0723,-8.21465 17.118,-15.93053 24.5921,-24.45275 1.3298,-11.1621 2.6683,-22.32298 3.9481,-33.49074 11.2412,5.4065 21.0711,13.02672 30.9857,20.44841 0.3508,7.43245 -1.5416,15.35364 3.0656,21.85764 6.5546,13.63263 12.377,27.63855 16.4843,42.21041 1.3359,4.15349 3.9481,7.6665 6.7798,10.94576 12.0178,-2.52305 22.9307,-8.06146 34.2259,-12.49777 18.308,-6.48761 37.0741,-11.56907 55.6818,-17.12656 0.1361,-3.60011 6.8416,-12.07212 0.354,-10.94575 -14.4273,-0.57776 -28.8037,1.03557 -42.8301,4.38374 5.1159,6.36115 -6.0688,-1.91592 -9.0456,3.25217 -9.6544,3.65229 -19.3563,8.56832 -29.9997,7.93864 -3.9222,-11.2075 -10.5456,-21.72958 -10.6329,-33.91038 -1.1153,-8.0471 -1.5598,-16.37219 -3.0901,-24.24915 -12.244,-16.39837 -23.9683,-33.27676 -39.7261,-46.42415 7.9702,4.15708 3.4838,-4.12321 4.8563,-6.49669 7.2624,3.29935 7.3475,-0.86858 5.4603,-7.0518 -2.0493,-4.65928 5.0409,-3.52866 6.8917,-6.81824 1.0895,-1.05736 1.8957,-2.50825 1.8788,-4.057 3.7611,0.34824 8.5933,-4.99945 12.7409,-6.7292 2.9418,-4.05326 1.9331,-10.72702 3.2966,-15.81579 1.4686,-7.12191 1.593,-14.882777 6.2896,-20.829607 -4.8989,-4.790158 -9.6023,-10.543017 -16.4186,-12.55222 2.8805,-4.263586 8.9564,-7.680095 5.9981,-13.461718 -1.0629,-8.814219 -4.6156,-17.191508 -11.0898,-23.432551 -6.6276,0.636051 -13.696,3.090371 -20.0622,2.643681 -5.3975,-3.786855 -11.1727,-9.183708 -18.3841,-7.871503 z m -10.6462,36.785356 c 1.1683,2.738357 -11.4836,9.410613 -3.4704,2.81909 0.958,-0.277522 2.7482,-4.442233 3.4704,-2.81909 z m 49.6915,16.255261 c 3.0381,0.81496 0.4983,5.834969 1.3343,8.005103 5.7812,-5.152235 2.0467,6.828578 3.1039,10.183368 -2.5696,1.06769 -4.1624,-1.48696 -3.5425,-4.01576 -0.5408,-4.670186 -1.1753,-9.452663 -1.7125,-14.172711 l 0.8168,0 z m -10.2378,34.470961 c 2.0782,1.51499 3.7061,3.56193 5.2006,5.63624 -4.0533,0.76116 -6.9713,-0.10789 -5.5546,-4.51989 0.087,-0.37776 0.1589,-0.78956 0.354,-1.11635 z"
-         id="path3132"
-         inkscape:connector-curvature="0" />
-      <path
-         sodipodi:nodetypes="ccccccccccccccccccssccsscccccccccccccccccccccccccccccccccccccccsccccccccccscccccccsscccscccccccccccccccccsccccccsscccsssccccccccscccccccccccscccccscccccccccsscccs"
-         style="fill:#eeeeec"
-         d="m -1971.9523,340.81342 -5.6623,0 -2.2605,-3.65786 -2.2611,-3.65785 0.5015,-17.36014 0.5013,-17.36014 -2.4403,-10.8784 -2.4402,-10.87841 9.8022,-9.80236 9.8024,-9.80236 7.0387,-14.54027 7.0393,-14.54029 4.4622,1.71228 4.4621,1.71229 -1.7693,-2.86296 -1.77,-2.86295 3.1651,-1.95581 3.1646,-1.95582 0,-7.44875 c 0,-4.09681 -2.3259,-15.57401 -5.1689,-25.50489 -2.8429,-9.93087 -5.2948,-22.61003 -5.4492,-28.17591 l -0.2803,-10.11977 -1.9977,0 c -1.099,0 -2.9617,3.83926 -4.1394,8.53169 -1.1777,4.69244 -3.5787,9.4202 -5.336,10.50616 l -3.1947,1.97445 -10.819,-3.32042 -10.819,-3.32043 1.4284,-6.40728 c 0.786,-3.52401 4.5912,-19.01808 8.4569,-34.43127 l 7.0289,-28.023997 7.5552,-7.024285 7.5553,-7.024286 0.4251,-5.643216 0.425,-5.643226 6.3859,0.731364 c 3.5127,0.402246 7.6546,0.848127 9.2042,0.990847 l 2.8181,0.259474 -5.3559,5.918426 -5.3566,5.918427 4.0952,2.365233 4.0952,2.365232 -2.3155,-2.555255 -2.3155,-2.555264 6.2599,-4.384566 6.2594,-4.384557 -1.5908,-2.57445 -1.5913,-2.574442 4.6529,-1.78544 4.653,-1.785441 0,3.016044 0,3.016053 4.8545,0 4.8539,0 -1.902,-3.078107 -1.9026,-3.078116 4.8322,1.854361 4.8328,1.854361 0.3548,-2.668464 c 0.1956,-1.467667 0.812,-6.521038 1.3704,-11.229729 l 1.0154,-8.561247 -8.3763,-4.54764 -8.3764,-4.54763 3.2972,-0.124666 c 1.8135,-0.06857 5.9808,1.838006 9.2615,4.236819 l 5.9645,4.361485 9.5657,-1.552236 9.5655,-1.552237 3.9051,4.705267 c 2.1472,2.587903 4.5881,8.472296 5.4225,13.076448 l 1.5181,8.371156 -4.0104,4.860237 -4.0105,4.860228 3.9475,1.328538 c 2.1714,0.730693 6.0378,3.418194 8.5919,5.972221 l 4.6438,4.643674 -1.8663,3.019294 c -1.0264,1.66061 -2.7908,9.452698 -3.9207,17.315758 l -2.0553,14.29645 -5.6314,3.4512 -5.6314,3.45123 -4.0529,-5.44911 c -2.2295,-2.99701 -4.9496,-5.44911 -6.045,-5.44911 -1.096,0 -1.9922,2.1018 -1.9922,4.67066 l 0,4.67067 4.6705,0 4.6705,0 0,3.2115 c 0,1.76633 -2.1267,4.02756 -4.7256,5.02496 l -4.7255,1.81346 0.8331,5.09481 0.8338,5.09481 -3.8923,-0.77844 -3.8923,-0.77844 0.7787,3.89222 0.778,3.89222 -4.6704,-0.92859 -4.6705,-0.9286 9.8648,8.71304 c 5.4261,4.79216 15.3992,16.13552 22.1636,25.20746 l 12.2983,16.49442 1.9965,16.98572 1.9965,16.9857 4.9804,12.44807 4.9811,12.44808 5.8264,0 c 3.2045,0 11.4567,-2.2528 18.338,-5.00624 l 12.5121,-5.00622 4.8388,1.85678 4.8381,1.85679 -1.6676,-2.699 -1.6682,-2.69899 9.68,-1.93601 c 5.3238,-1.0648 14.5255,-1.936 20.4482,-1.936 l 10.7688,0 -1.2904,3.89222 -1.2898,3.89222 -28.377,8.36062 c -15.6076,4.59835 -31.4526,10.00667 -35.2117,12.0185 -3.7591,2.01184 -10.7706,4.78649 -15.5803,6.16592 l -8.7451,2.50805 -2.8466,-3.62832 c -1.5653,-1.99559 -3.7767,-7.51894 -4.9127,-12.27413 -1.1366,-4.75518 -5.5333,-16.2253 -9.7709,-25.48914 l -7.7041,-16.84334 0,-7.8255 0,-7.82549 -10.1202,-7.55219 c -5.5655,-4.1537 -13.4229,-9.25902 -17.46,-11.34514 l -7.3402,-3.79296 -3.558,3.85904 -3.5576,3.85905 3.7573,-2.11415 3.7574,-2.11414 -1.9444,16.44778 -1.9443,16.44777 -13.0268,12.66732 -13.0263,12.66732 -8.5259,14.54739 -8.5252,14.54736 1.5302,19.49196 c 0.8416,10.72057 2.5245,21.9619 3.7398,24.98072 l 2.2101,5.48876 -3.8433,4.63101 -3.8433,4.63101 z m 90.4973,-230.41947 3.1136,0 0,-7.96821 0,-7.968209 3.5951,2.221763 3.595,2.221755 -2.2532,-3.645674 -2.2532,-3.645675 -2.8987,1.791453 -2.8986,1.791444 0,-3.297545 c 0,-1.813645 -1.3171,-3.297545 -2.9272,-3.297545 l -2.9271,0 1.0149,8.562895 c 0.5588,4.709578 1.1753,9.613788 1.3703,10.898208 0.1955,1.28445 1.7566,2.33534 3.4691,2.33534 z"
-         id="path3134"
-         inkscape:connector-curvature="0" />
-    </g>
-  </g>
-</svg>
diff --git a/subsurface.desktop b/subsurface.desktop
new file mode 100644 (file)
index 0000000..6fdec10
--- /dev/null
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Name=subsurface
+GenericName=dive log program
+Comment=manage and display dive computer data
+Icon=subsurface
+Exec=subsurface
+Terminal=false
+Categories=Accessories;
+
diff --git a/subsurface.svg b/subsurface.svg
new file mode 100644 (file)
index 0000000..29410c8
--- /dev/null
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="405.71429"
+   height="405.71429"
+   id="svg3958"
+   version="1.1"
+   inkscape:version="0.48.2 r9819"
+   sodipodi:docname="Nuovo documento 3">
+  <defs
+     id="defs3960">
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3974"
+       id="linearGradient3136"
+       gradientUnits="userSpaceOnUse"
+       x1="-284.28873"
+       y1="258.56543"
+       x2="-284.28873"
+       y2="639.42023" />
+    <linearGradient
+       id="linearGradient3974">
+      <stop
+         id="stop3976"
+         offset="0"
+         style="stop-color:#3465a4;stop-opacity:1;" />
+      <stop
+         id="stop3978"
+         offset="1"
+         style="stop-color:#204a87;stop-opacity:1;" />
+    </linearGradient>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.35"
+     inkscape:cx="-31.088222"
+     inkscape:cy="347.16626"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0"
+     inkscape:window-width="575"
+     inkscape:window-height="448"
+     inkscape:window-x="0"
+     inkscape:window-y="60"
+     inkscape:window-maximized="0" />
+  <metadata
+     id="metadata3963">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Livello 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-465.71426,-352.36218)">
+    <g
+       transform="translate(2577.3448,387.46589)"
+       id="g3921"
+       inkscape:export-filename="/home/archuser/icon.png"
+       inkscape:export-xdpi="28.389999"
+       inkscape:export-ydpi="28.389999">
+      <g
+         transform="translate(-2082.771,-287.46589)"
+         id="g3120">
+        <g
+           id="g3122"
+           transform="translate(456.85475,0)">
+          <rect
+             style="fill:#d3d7cf;fill-opacity:1;stroke:none"
+             id="rect3124"
+             width="405.71429"
+             height="405.71429"
+             x="-485.71429"
+             y="252.36218"
+             rx="48.57143"
+             ry="48.57143" />
+          <path
+             style="fill:#babdb6;fill-opacity:1;stroke:none"
+             d="m -439.5625,254.4375 c -23.32197,0.49384 -44.19271,21.63293 -44.125,45.3125 0.0318,104.44553 -0.21954,208.90526 0.125,313.34375 1.17202,23.65312 23.03889,43.66042 46.40625,42.96875 104.08218,-0.0837 208.17353,0.16719 312.25,-0.125 23.41986,-1.2263 43.550041,-22.80366 42.90625,-46.5 -0.104782,-104.02969 0.209159,-208.07179 -0.15625,-312.09375 -1.199459,-24.0329 -23.56722,-44.11975 -47.40625,-42.96875 -103.33275,0.0418 -206.67007,-0.0835 -310,0.0625 z"
+             id="path3126"
+             inkscape:connector-curvature="0" />
+          <path
+             style="fill:#888a85;fill-opacity:1;stroke:none"
+             d="m -129.5,256.375 c -104.36101,0.16156 -208.75048,-0.33679 -313.09375,0.28125 -23.00894,2.29305 -41.48312,24.87874 -39.09375,48.09375 0.13102,103.46673 -0.41139,206.94991 0.28125,310.40625 2.44375,23.17089 25.24317,41.33146 48.25,38.90305 103.40288,-0.17062 206.83272,0.41064 310.21875,-0.3093 23.110562,-2.32403 41.378922,-25.24431 38.934295,-48.3125 -0.21452,-103.37176 0.441977,-206.76965 -0.340545,-310.125 -2.240002,-21.90031 -23.0265,-40.01118 -45.15625,-38.9375 z"
+             id="path3128"
+             inkscape:connector-curvature="0" />
+          <path
+             sodipodi:nodetypes="cccccccccc"
+             style="fill:#eeeeec;fill-opacity:1;stroke:none"
+             d="m -130.28125,258.125 c -104.77403,1.0652 -209.59903,-0.92051 -314.34375,1.09375 -23.10839,2.95091 -36.27301,28.27228 -35.28125,50.125 0.81443,99.15252 -0.56392,198.32852 0.625,297.46875 0.30195,14.95108 4.84948,28.32045 16.40625,36.46875 10.96614,8.5872 25.54253,8.88232 38.96873,8.77143 101.68599,-0.47099 203.39121,1.16795 305.06252,-0.95893 22.577086,-4.84975 32.841992,-30.29799 32.838848,-52.03124 -0.699743,-102.76237 1.456849,-205.59796 -1.151348,-308.31251 -4.410414,-19.17914 -23.46032,-33.34826 -43.125,-32.625 z"
+             id="path3138"
+             inkscape:connector-curvature="0" />
+          <path
+             sodipodi:nodetypes="cccccccc"
+             style="fill:#729fcf;fill-opacity:1;stroke:none"
+             d="m -479.90625,307.34375 c 0.81443,99.15252 -0.56392,198.32852 0.625,297.46875 0.125,14.4491 4.84948,28.32045 16.40625,36.46875 10.96614,8.5872 24.5922,8.93596 38.96873,8.77143 101.68599,-0.47099 203.39121,1.16795 305.06252,-0.95893 22.577086,-4.84975 32.929182,-30.12361 32.838848,-52.03124 -0.699743,-102.76237 1.456849,-205.59796 -1.151348,-308.31251 -106.30835,52.32907 -329.2465,-37.13125 -392.75,18.59375 z"
+             id="path3917"
+             inkscape:connector-curvature="0" />
+          <path
+             inkscape:connector-curvature="0"
+             id="path3130"
+             d="m -479.90625,309.34375 c 0.81443,99.15252 -0.56392,198.32852 0.625,297.46875 0.125,14.4491 4.84948,28.32045 16.40625,36.46875 10.96614,8.5872 24.5922,8.93596 38.96873,8.77143 101.68599,-0.47099 203.39121,1.16795 305.06252,-0.95893 22.577086,-4.84975 32.929182,-30.12361 32.838848,-52.03124 -0.699743,-102.76237 1.456849,-205.59796 -1.151348,-308.31251 -106.30835,52.32907 -329.2465,-37.13125 -392.75,18.59375 z"
+             style="fill:url(#linearGradient3136);fill-opacity:1;stroke:none"
+             sodipodi:nodetypes="cccccccc" />
+        </g>
+      </g>
+      <path
+         style="fill:#3465a4"
+         d="m -1923.5806,33.805972 c -9.4807,-0.78916 -3.6181,1.932304 1.5355,4.513312 4.1271,2.881815 10.6659,4.511962 13.3347,8.141432 -0.7278,6.062465 -1.5014,12.205646 -2.1818,18.222083 -3.2457,-0.438613 -13.9469,-7.185347 -11.0938,-2.597463 6.2202,4.118474 0.3905,9.147164 -1.3223,3.57768 1.9917,-8.140756 -6.0865,-1.602385 -10.2827,-0.749319 -3.7133,2.391773 -3.2608,3.567093 -9.4305,2.219644 -4.203,0.236374 -10.7629,-2.486775 -13.5983,-0.628739 -0.9366,5.338739 1.0431,12.056784 -4.694,15.073918 -4.8137,5.253406 -12.5602,8.802202 -12.7609,16.793092 -5.3069,21.514528 -11.0062,42.936978 -15.7794,64.577918 8.161,2.09393 16.5453,5.88336 24.5599,6.9432 8.5107,-3.37572 8.256,-13.7656 12.0893,-20.58455 -0.9535,21.38511 8.8814,41.00772 10.8369,61.94425 1.7598,5.85079 -2.2805,8.47669 -6.9705,10.72793 4.5442,5.94261 -6.7642,-3.26989 -6.0905,5.23471 -4.7136,8.87428 -8.164,18.65139 -13.6841,26.95601 -6.2693,6.26926 -12.5385,12.53852 -18.8078,18.80778 2.2626,11.17287 6.316,22.18251 4.7148,33.7312 -0.019,8.0485 -0.8931,16.33856 -0.4127,24.23773 2.7304,3.98429 4.2596,10.20973 10.3739,8.11401 5.6888,1.13286 9.9375,-0.80744 12.7001,-5.92569 4.5798,-3.16068 3.9256,-7.10961 1.268,-11.39147 -3.5063,-14.13556 -3.652,-28.79639 -5.0372,-43.26568 6.331,-9.91522 11.2575,-20.9286 18.483,-30.13987 8.0723,-8.21465 17.118,-15.93053 24.5921,-24.45275 1.3298,-11.1621 2.6683,-22.32298 3.9481,-33.49074 11.2412,5.4065 21.0711,13.02672 30.9857,20.44841 0.3508,7.43245 -1.5416,15.35364 3.0656,21.85764 6.5546,13.63263 12.377,27.63855 16.4843,42.21041 1.3359,4.15349 3.9481,7.6665 6.7798,10.94576 12.0178,-2.52305 22.9307,-8.06146 34.2259,-12.49777 18.308,-6.48761 37.0741,-11.56907 55.6818,-17.12656 0.1361,-3.60011 6.8416,-12.07212 0.354,-10.94575 -14.4273,-0.57776 -28.8037,1.03557 -42.8301,4.38374 5.1159,6.36115 -6.0688,-1.91592 -9.0456,3.25217 -9.6544,3.65229 -19.3563,8.56832 -29.9997,7.93864 -3.9222,-11.2075 -10.5456,-21.72958 -10.6329,-33.91038 -1.1153,-8.0471 -1.5598,-16.37219 -3.0901,-24.24915 -12.244,-16.39837 -23.9683,-33.27676 -39.7261,-46.42415 7.9702,4.15708 3.4838,-4.12321 4.8563,-6.49669 7.2624,3.29935 7.3475,-0.86858 5.4603,-7.0518 -2.0493,-4.65928 5.0409,-3.52866 6.8917,-6.81824 1.0895,-1.05736 1.8957,-2.50825 1.8788,-4.057 3.7611,0.34824 8.5933,-4.99945 12.7409,-6.7292 2.9418,-4.05326 1.9331,-10.72702 3.2966,-15.81579 1.4686,-7.12191 1.593,-14.882777 6.2896,-20.829607 -4.8989,-4.790158 -9.6023,-10.543017 -16.4186,-12.55222 2.8805,-4.263586 8.9564,-7.680095 5.9981,-13.461718 -1.0629,-8.814219 -4.6156,-17.191508 -11.0898,-23.432551 -6.6276,0.636051 -13.696,3.090371 -20.0622,2.643681 -5.3975,-3.786855 -11.1727,-9.183708 -18.3841,-7.871503 z m -10.6462,36.785356 c 1.1683,2.738357 -11.4836,9.410613 -3.4704,2.81909 0.958,-0.277522 2.7482,-4.442233 3.4704,-2.81909 z m 49.6915,16.255261 c 3.0381,0.81496 0.4983,5.834969 1.3343,8.005103 5.7812,-5.152235 2.0467,6.828578 3.1039,10.183368 -2.5696,1.06769 -4.1624,-1.48696 -3.5425,-4.01576 -0.5408,-4.670186 -1.1753,-9.452663 -1.7125,-14.172711 l 0.8168,0 z m -10.2378,34.470961 c 2.0782,1.51499 3.7061,3.56193 5.2006,5.63624 -4.0533,0.76116 -6.9713,-0.10789 -5.5546,-4.51989 0.087,-0.37776 0.1589,-0.78956 0.354,-1.11635 z"
+         id="path3132"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="ccccccccccccccccccssccsscccccccccccccccccccccccccccccccccccccccsccccccccccscccccccsscccscccccccccccccccccsccccccsscccsssccccccccscccccccccccscccccscccccccccsscccs"
+         style="fill:#eeeeec"
+         d="m -1971.9523,340.81342 -5.6623,0 -2.2605,-3.65786 -2.2611,-3.65785 0.5015,-17.36014 0.5013,-17.36014 -2.4403,-10.8784 -2.4402,-10.87841 9.8022,-9.80236 9.8024,-9.80236 7.0387,-14.54027 7.0393,-14.54029 4.4622,1.71228 4.4621,1.71229 -1.7693,-2.86296 -1.77,-2.86295 3.1651,-1.95581 3.1646,-1.95582 0,-7.44875 c 0,-4.09681 -2.3259,-15.57401 -5.1689,-25.50489 -2.8429,-9.93087 -5.2948,-22.61003 -5.4492,-28.17591 l -0.2803,-10.11977 -1.9977,0 c -1.099,0 -2.9617,3.83926 -4.1394,8.53169 -1.1777,4.69244 -3.5787,9.4202 -5.336,10.50616 l -3.1947,1.97445 -10.819,-3.32042 -10.819,-3.32043 1.4284,-6.40728 c 0.786,-3.52401 4.5912,-19.01808 8.4569,-34.43127 l 7.0289,-28.023997 7.5552,-7.024285 7.5553,-7.024286 0.4251,-5.643216 0.425,-5.643226 6.3859,0.731364 c 3.5127,0.402246 7.6546,0.848127 9.2042,0.990847 l 2.8181,0.259474 -5.3559,5.918426 -5.3566,5.918427 4.0952,2.365233 4.0952,2.365232 -2.3155,-2.555255 -2.3155,-2.555264 6.2599,-4.384566 6.2594,-4.384557 -1.5908,-2.57445 -1.5913,-2.574442 4.6529,-1.78544 4.653,-1.785441 0,3.016044 0,3.016053 4.8545,0 4.8539,0 -1.902,-3.078107 -1.9026,-3.078116 4.8322,1.854361 4.8328,1.854361 0.3548,-2.668464 c 0.1956,-1.467667 0.812,-6.521038 1.3704,-11.229729 l 1.0154,-8.561247 -8.3763,-4.54764 -8.3764,-4.54763 3.2972,-0.124666 c 1.8135,-0.06857 5.9808,1.838006 9.2615,4.236819 l 5.9645,4.361485 9.5657,-1.552236 9.5655,-1.552237 3.9051,4.705267 c 2.1472,2.587903 4.5881,8.472296 5.4225,13.076448 l 1.5181,8.371156 -4.0104,4.860237 -4.0105,4.860228 3.9475,1.328538 c 2.1714,0.730693 6.0378,3.418194 8.5919,5.972221 l 4.6438,4.643674 -1.8663,3.019294 c -1.0264,1.66061 -2.7908,9.452698 -3.9207,17.315758 l -2.0553,14.29645 -5.6314,3.4512 -5.6314,3.45123 -4.0529,-5.44911 c -2.2295,-2.99701 -4.9496,-5.44911 -6.045,-5.44911 -1.096,0 -1.9922,2.1018 -1.9922,4.67066 l 0,4.67067 4.6705,0 4.6705,0 0,3.2115 c 0,1.76633 -2.1267,4.02756 -4.7256,5.02496 l -4.7255,1.81346 0.8331,5.09481 0.8338,5.09481 -3.8923,-0.77844 -3.8923,-0.77844 0.7787,3.89222 0.778,3.89222 -4.6704,-0.92859 -4.6705,-0.9286 9.8648,8.71304 c 5.4261,4.79216 15.3992,16.13552 22.1636,25.20746 l 12.2983,16.49442 1.9965,16.98572 1.9965,16.9857 4.9804,12.44807 4.9811,12.44808 5.8264,0 c 3.2045,0 11.4567,-2.2528 18.338,-5.00624 l 12.5121,-5.00622 4.8388,1.85678 4.8381,1.85679 -1.6676,-2.699 -1.6682,-2.69899 9.68,-1.93601 c 5.3238,-1.0648 14.5255,-1.936 20.4482,-1.936 l 10.7688,0 -1.2904,3.89222 -1.2898,3.89222 -28.377,8.36062 c -15.6076,4.59835 -31.4526,10.00667 -35.2117,12.0185 -3.7591,2.01184 -10.7706,4.78649 -15.5803,6.16592 l -8.7451,2.50805 -2.8466,-3.62832 c -1.5653,-1.99559 -3.7767,-7.51894 -4.9127,-12.27413 -1.1366,-4.75518 -5.5333,-16.2253 -9.7709,-25.48914 l -7.7041,-16.84334 0,-7.8255 0,-7.82549 -10.1202,-7.55219 c -5.5655,-4.1537 -13.4229,-9.25902 -17.46,-11.34514 l -7.3402,-3.79296 -3.558,3.85904 -3.5576,3.85905 3.7573,-2.11415 3.7574,-2.11414 -1.9444,16.44778 -1.9443,16.44777 -13.0268,12.66732 -13.0263,12.66732 -8.5259,14.54739 -8.5252,14.54736 1.5302,19.49196 c 0.8416,10.72057 2.5245,21.9619 3.7398,24.98072 l 2.2101,5.48876 -3.8433,4.63101 -3.8433,4.63101 z m 90.4973,-230.41947 3.1136,0 0,-7.96821 0,-7.968209 3.5951,2.221763 3.595,2.221755 -2.2532,-3.645674 -2.2532,-3.645675 -2.8987,1.791453 -2.8986,1.791444 0,-3.297545 c 0,-1.813645 -1.3171,-3.297545 -2.9272,-3.297545 l -2.9271,0 1.0149,8.562895 c 0.5588,4.709578 1.1753,9.613788 1.3703,10.898208 0.1955,1.28445 1.7566,2.33534 3.4691,2.33534 z"
+         id="path3134"
+         inkscape:connector-curvature="0" />
+    </g>
+  </g>
+</svg>