Ticket #681: icons-dir

File icons-dir, 1.9 KB (added by pini, 10 years ago)
Line 
1Description: Install icons into NAVIT_SHAREDIR/icons
2 It doesn't make sense to put icons into a directory named "xpm" since most
3 of them are png and svg files.
4Author: Gilles Filippini <pini@debian.org>
5Forwarded: http://trac.navit-project.org/ticket/681
6Last-Update: 2011-04-17
7Index: navit/CMakeLists.txt
8===================================================================
9--- navit.orig/CMakeLists.txt   2011-04-17 22:00:44.000000000 +0200
10+++ navit/CMakeLists.txt        2011-04-17 22:01:05.000000000 +0200
11@@ -19,7 +19,7 @@
12 set(BIN_DIR bin)
13 set(SHARE_DIR share/navit)
14 set(LOCALE_DIR share)
15-set(IMAGE_DIR share/navit/xpm)
16+set(IMAGE_DIR share/navit/icons)
17 set(LIB_DIR lib)
18 
19 ### Detect environment
20@@ -342,7 +342,7 @@
21    set(BIN_DIR ./)
22    set(SHARE_DIR ./)
23    set(LOCALE_DIR ./)
24-   set(IMAGE_DIR xpm)
25+   set(IMAGE_DIR icons)
26 
27   
28    if(HAVE_GTK2 AND NOT MSVC)
29Index: navit/navit/graphics.c
30===================================================================
31--- navit.orig/navit/graphics.c 2011-04-17 21:57:18.000000000 +0200
32+++ navit/navit/graphics.c      2011-04-17 21:58:40.000000000 +0200
33@@ -1671,7 +1671,7 @@
34                static char *navit_sharedir;
35                if (! navit_sharedir)
36                        navit_sharedir = getenv("NAVIT_SHAREDIR");
37-               ret=g_strdup_printf("%s/xpm/%s", navit_sharedir, icon);
38+               ret=g_strdup_printf("%s/icons/%s", navit_sharedir, icon);
39 #endif
40        }
41        if (wordexp)
42Index: navit/navit/gui/qml/gui_qml.cpp
43===================================================================
44--- navit.orig/navit/gui/qml/gui_qml.cpp        2011-04-17 21:51:07.000000000 +0200
45+++ navit/navit/gui/qml/gui_qml.cpp     2011-04-17 21:57:09.000000000 +0200
46@@ -458,7 +458,7 @@
47                this_->skin=g_strdup("navit");
48        }
49        if ( this_->icon_src==NULL ) {
50-               this_->icon_src=g_strjoin(NULL,getenv("NAVIT_SHAREDIR"),"/xpm/",NULL);
51+               this_->icon_src=graphics_icon_path("");
52        }
53 
54        if ((attr=attr_search(attrs, NULL, attr_callback_list))) {