1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-02 06:03:50 +00:00

- Fix loading empty preference keys

- Do not load ~/.gtkrc [1]

[1] reported by Davide D'Amico and Giuseppe Serano

PR:		ports/65728
Submitted by:	maintainer
This commit is contained in:
Kirill Ponomarev 2004-04-18 17:14:10 +00:00
parent 668835a9f5
commit ed6e532c27
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=107446
3 changed files with 55 additions and 1 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= sylpheed-gtk2
PORTVERSION= 0.9.9.20040229
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= mail ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}

View File

@ -0,0 +1,24 @@
--- src/main.c.orig Sun Apr 18 17:22:45 2004
+++ src/main.c Sun Apr 18 17:23:11 2004
@@ -194,21 +194,6 @@
srandom((gint)time(NULL));
- /* parse gtkrc files */
- userrc = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S, ".gtkrc",
- NULL);
- gtk_rc_parse(userrc);
- g_free(userrc);
- userrc = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S, ".gtk",
- G_DIR_SEPARATOR_S, "gtkrc", NULL);
- gtk_rc_parse(userrc);
- g_free(userrc);
- userrc = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, "gtkrc", NULL);
- gtk_rc_parse(userrc);
- g_free(userrc);
-
- gtk_rc_parse("./gtkrc");
-
userrc = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, MENU_RC, NULL);
gtk_accel_map_load (userrc);
g_free(userrc);

View File

@ -0,0 +1,30 @@
--- src/prefs.c.orig Fri Jan 23 12:08:46 2004
+++ src/prefs.c Fri Jan 23 12:16:37 2004
@@ -109,17 +109,18 @@
case P_STRING:
{
#warning FIXME_GTK2
- gchar *tmp;
+ gchar *tmp = NULL;
- tmp = *value ?
- conv_codeset_strdup(value,
- conv_get_current_charset_str(),
- CS_UTF_8)
- : g_strdup("");
- if (!tmp) {
- g_warning("faild to convert character set.");
- tmp = g_strdup(value);
+ if (*value) {
+ tmp = conv_codeset_strdup(value,
+ conv_get_current_charset_str(),
+ CS_UTF_8);
+ if (!tmp) {
+ g_warning("failed to convert character set.");
+ tmp = g_strdup(value);
+ }
}
+
g_free(*((gchar **)param[i].data));
*((gchar **)param[i].data) = tmp;
break;