[prev in list] [next in list] [prev in thread] [next in thread]
List: opensuse-packaging
Subject: Re: [opensuse-packaging] Patch review needed.
From: Jan Engelhardt <jengelh () inai ! de>
Date: 2015-08-20 18:29:14
Message-ID: alpine.LSU.2.20.1508202028220.27052 () nerf40 ! vanv ! qr
[Download RAW message or body]
On Thursday 2015-08-20 13:16, jcsl wrote:
>I'd like to add a patch to LXPanel for it to make a systemwide themes search.
>I don't know neither C nor GTK so I'm not sure about the quality and possible
>bugs in the patch. I did my best but...
>
>+ file = _user_config_file_name("gtkrc", NULL);
>+ if (!g_file_test (file, G_FILE_TEST_EXISTS))
Does g_file_test handle NULL? If not, you should add a check.
>+ {
>+ /* try XDG fallbacks */
>+ g_free(file);
>+ file = NULL;
>+ const gchar * const * dir = g_get_system_config_dirs();
>+ if (dir) while (dir[0])
>+ {
>+ file = _system_config_file_name(dir[0], "gtkrc");
>+ if (g_file_test (file, G_FILE_TEST_EXISTS))
>+ break;
>+ g_free(file);
>+ file = NULL;
>+ dir++;
>+ }
>+
>+ /* last try at old fallback for compatibility reasons */
>+ if (!file)
>+ file = _old_system_config_file_name("gtkrc");
>+ }
--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org
To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic