From be91b4c7fe5cabe0327b2f01a5a1dfad67f8a2cc Mon Sep 17 00:00:00 2001 From: Fabien Bodard Date: Mon, 6 Sep 2010 18:23:49 +0000 Subject: [PATCH] [GB.FORM] * NEW: Now the icon theme in userpath can be used git-svn-id: svn://localhost/gambas/trunk@3184 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- comp/src/gb.form/.src/Stock.class | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/comp/src/gb.form/.src/Stock.class b/comp/src/gb.form/.src/Stock.class index b83272091..9d975310c 100644 --- a/comp/src/gb.form/.src/Stock.class +++ b/comp/src/gb.form/.src/Stock.class @@ -100,7 +100,10 @@ Static Private Sub InitTheme() If sTheme Then sTheme = Trim(sTheme) 'AddPath("gnome", "/usr/share/icons" &/ sTheme) - GetAllThemePath("gnome", "/usr/share/icons", sTheme) + sPath = "/usr/share/icons" + + + GetAllThemePath("gnome", sPath, sTheme) 'Print $aIconPath 'AddPath("freedesktop", "/usr/share/icons" &/ sTheme) 'AddPath("gnome", "/usr/X11R6/share/icons" &/ sTheme) @@ -404,6 +407,12 @@ Static Private Sub GetAllThemePath(sMap As String, sPath As String, sTheme As St Dim sLine As String + If sMap = "gnome" Then + sPath = "/usr/share/icons" + If Not Exist(sPath &/ sTheme) Then sPath = User.Home &/ ".icons" + Endif + If Not Exist(sPath &/ sTheme) Then Return + AddPath(sMap, sPath &/ sTheme) For Each sLine In Split(File.Load(sPath &/ sTheme &/ "index.theme"), "\n")