summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2013-04-14 10:47:37 +0200
committerBerke Viktor <bviktor@hexchat.org>2013-04-14 10:47:37 +0200
commitdb582a4e5c51f8f83c0d952373b691400ff78178 (patch)
treeda4f53e8254b074cec96ec9e197498c3a7cb85fc
parent059e4ec9c8d59f6b283bda3f007ae9d2fd29bc83 (diff)
Remove sound_dir, it's pointless
-rw-r--r--src/common/cfgfiles.c2
-rw-r--r--src/common/hexchat.h1
-rw-r--r--src/common/text.c2
-rw-r--r--src/fe-gtk/setup.c11
4 files changed, 1 insertions, 15 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c
index c7a89665..4b8a4c8d 100644
--- a/src/common/cfgfiles.c
+++ b/src/common/cfgfiles.c
@@ -558,7 +558,6 @@ const struct prefs vars[] =
 	{"perl_warnings", P_OFFINT (hex_perl_warnings), TYPE_BOOL},
 
 	{"sound_command", P_OFFSET (hex_sound_command), TYPE_STR},
-	{"sound_dir", P_OFFSET (hex_sound_dir), TYPE_STR},
 
 	{"stamp_log", P_OFFINT (hex_stamp_log), TYPE_BOOL},
 	{"stamp_log_format", P_OFFSET (hex_stamp_log_format), TYPE_STR},
@@ -779,7 +778,6 @@ load_config (void)
 	strcpy (prefs.hex_irc_quit_reason, prefs.hex_irc_part_reason);
 	strcpy (prefs.hex_irc_real_name, realname);
 	strcpy (prefs.hex_irc_user_name, username);
-	snprintf (prefs.hex_sound_dir, sizeof (prefs.hex_sound_dir), "%s" G_DIR_SEPARATOR_S "sounds", get_xdir ());
 	strcpy (prefs.hex_stamp_log_format, "%b %d %H:%M:%S ");
 	strcpy (prefs.hex_stamp_text_format, "[%H:%M:%S] ");
 #ifdef WIN32
diff --git a/src/common/hexchat.h b/src/common/hexchat.h
index 3291d93a..906dcabf 100644
--- a/src/common/hexchat.h
+++ b/src/common/hexchat.h
@@ -337,7 +337,6 @@ struct hexchatprefs
 	char hex_net_proxy_pass[32];
 	char hex_net_proxy_user[32];
 	char hex_sound_command[PATHLEN + 1];
-	char hex_sound_dir[PATHLEN + 1];
 	char hex_stamp_log_format[64];
 	char hex_stamp_text_format[64];
 	char hex_text_background[PATHLEN + 1];
diff --git a/src/common/text.c b/src/common/text.c
index 8eabfec9..946ac542 100644
--- a/src/common/text.c
+++ b/src/common/text.c
@@ -2243,7 +2243,7 @@ sound_play (const char *file, gboolean quiet)
 	}
 	else
 	{
-		wavfile = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s", prefs.hex_sound_dir, file);
+		wavfile = g_build_filename (get_xdir (), "sounds", file, NULL);
 	}
 
 	if (g_access (wavfile, R_OK) == 0)
diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c
index abf05d13..1ab0fec3 100644
--- a/src/fe-gtk/setup.c
+++ b/src/fe-gtk/setup.c
@@ -1520,7 +1520,6 @@ setup_create_color_page (void)
 
 static GtkWidget *sndprog_entry;
 static GtkWidget *sndfile_entry;
-static GtkWidget *snddir_entry;
 static int ignore_changed = FALSE;
 
 extern struct text_event te[]; /* text.c */
@@ -1529,7 +1528,6 @@ extern char *sound_files[];
 static void
 setup_snd_apply (void)
 {
-	strcpy (setup_prefs.hex_sound_dir, GTK_ENTRY (snddir_entry)->text);
 	strcpy (setup_prefs.hex_sound_command, GTK_ENTRY (sndprog_entry)->text);
 }
 
@@ -1697,7 +1695,6 @@ setup_create_sound_page (void)
 	GSList *radio_group = NULL;
 	GtkWidget *radio_auto;
 	GtkWidget *label4;
-	GtkWidget *entry3;
 	GtkWidget *scrolledwindow1;
 	GtkWidget *sound_tree;
 	GtkWidget *table1;
@@ -1776,13 +1773,6 @@ setup_create_sound_page (void)
 							(GtkAttachOptions) (0), 0, 0);
 	gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5);
 
-	snddir_entry = entry3 = gtk_entry_new ();
-	gtk_entry_set_text (GTK_ENTRY (entry3), setup_prefs.hex_sound_dir);
-	gtk_widget_show (entry3);
-	gtk_table_attach (GTK_TABLE (table2), entry3, 1, 3, 3, 4,
-							(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-							(GtkAttachOptions) (0), 0, 0);
-
 	scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
 	gtk_widget_show (scrolledwindow1);
 	gtk_container_add (GTK_CONTAINER (vbox2), scrolledwindow1);
@@ -1844,7 +1834,6 @@ setup_create_sound_page (void)
 							(GtkAttachOptions) (0), 0, 0);
 
 	gtk_label_set_mnemonic_widget (GTK_LABEL (label3), sndprog_entry);
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label4), entry3);
 	setup_snd_row_cb (sel, NULL);
 
 	return vbox1;