/[gentoo-x86]/media-video/bdsup2sub/files/bdsup2sub-4.0.0-xdg.patch
Gentoo

Contents of /media-video/bdsup2sub/files/bdsup2sub-4.0.0-xdg.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sun Aug 1 00:45:49 2010 UTC (4 years, 1 month ago) by sbriesen
Branch: MAIN
CVS Tags: HEAD
made a better XDG patch
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 --- src/deadbeef/SupTools/Core.java 2010-07-29 13:01:48.000000000 +0200
2 +++ src/deadbeef/SupTools/Core.java 2010-08-01 02:19:25.215473885 +0200
3 @@ -22,6 +22,8 @@
4 import deadbeef.Tools.Props;
5 import deadbeef.Tools.ToolBox;
6
7 +import xdg.*;
8 +
9 /*
10 * Copyright 2009 Volker Oth (0xdeadbeef)
11 *
12 @@ -750,6 +752,7 @@
13 cliMode = false;
14 String s = c.getClass().getName().replace('.','/') + ".class";
15 URL url = c.getClass().getClassLoader().getResource(s);
16 + /*
17 int pos;
18 try {
19 fnameProps = URLDecoder.decode(url.getPath(),"UTF-8");
20 @@ -767,6 +770,8 @@
21 fnameProps = fnameProps.substring(0,pos+1);
22 }
23 fnameProps += Core.iniName;
24 + */
25 + fnameProps = xdg.config_home() + "/" + Core.iniName;
26
27 // read properties from ini file
28 props = new Props();
29 @@ -905,8 +910,10 @@
30 * Write properties
31 */
32 public static void storeProps() {
33 - if (props != null)
34 + if (props != null) {
35 + xdg.mkdirs_file(fnameProps);
36 props.save(fnameProps);
37 + }
38 }
39
40 /**

  ViewVC Help
Powered by ViewVC 1.1.20