# HG changeset patch
# User yaz
# Date 1147706273 25200
# Node ID 21628529c615af72e8fb9aaa15845038c6793b7d
# Parent fc717728fd104b61b2d7b1b8f86ebee78d798588
[svn] add the config option to enable/disable separator line in the playlist
diff -r fc717728fd10 -r 21628529c615 audacious/credits.c
--- a/audacious/credits.c Mon May 15 07:47:01 2006 -0700
+++ b/audacious/credits.c Mon May 15 08:17:53 2006 -0700
@@ -54,6 +54,7 @@
N_("William Pitcock"),
N_("Derek Pomery"),
N_("Tony Vroon"),
+ N_("Yoshiki Yazawa"),
NULL,
N_("Graphics:"),
diff -r fc717728fd10 -r 21628529c615 audacious/glade/prefswin.glade
--- a/audacious/glade/prefswin.glade Mon May 15 07:47:01 2006 -0700
+++ b/audacious/glade/prefswin.glade Mon May 15 08:17:53 2006 -0700
@@ -1443,6 +1443,41 @@
False
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 0
+ 0
+ 12
+ 0
+
+
+
+ True
+ True
+ Show separator in playlist
+ True
+ GTK_RELIEF_NORMAL
+ True
+ False
+ False
+ True
+
+
+
+
+
+
+ 0
+ False
+ False
+
+
0
diff -r fc717728fd10 -r 21628529c615 audacious/main.c
--- a/audacious/main.c Mon May 15 07:47:01 2006 -0700
+++ b/audacious/main.c Mon May 15 08:17:53 2006 -0700
@@ -233,6 +233,7 @@
{"convert_underscore", &cfg.convert_underscore, TRUE},
{"convert_twenty", &cfg.convert_twenty, TRUE},
{"show_numbers_in_pl", &cfg.show_numbers_in_pl, TRUE},
+ {"show_separator_in_pl", &cfg.show_separator_in_pl, TRUE},
{"snap_windows", &cfg.snap_windows, TRUE},
{"save_window_positions", &cfg.save_window_position, TRUE},
{"dim_titlebar", &cfg.dim_titlebar, TRUE},
diff -r fc717728fd10 -r 21628529c615 audacious/main.h
--- a/audacious/main.h Mon May 15 07:47:01 2006 -0700
+++ b/audacious/main.h Mon May 15 08:17:53 2006 -0700
@@ -106,6 +106,7 @@
gint scroll_pl_by;
gboolean resume_playback_on_startup;
gint resume_playback_on_startup_time;
+ gboolean show_separator_in_pl;
};
typedef struct _BmpConfig BmpConfig;
diff -r fc717728fd10 -r 21628529c615 audacious/playlist_list.c
--- a/audacious/playlist_list.c Mon May 15 07:47:01 2006 -0700
+++ b/audacious/playlist_list.c Mon May 15 08:17:53 2006 -0700
@@ -785,11 +785,13 @@
if (has_slant)
padding += width_approx_digits_half;
- gdk_draw_line(obj, gc,
- pl->pl_widget.x + padding,
- pl->pl_widget.y,
- pl->pl_widget.x + padding,
- pl->pl_widget.y + pl->pl_widget.height - 1);
+ if (cfg.show_separator_in_pl) {
+ gdk_draw_line(obj, gc,
+ pl->pl_widget.x + padding,
+ pl->pl_widget.y,
+ pl->pl_widget.x + padding,
+ pl->pl_widget.y + pl->pl_widget.height - 1);
+ }
}
if (tpadding_dwidth != 0)
@@ -799,12 +801,13 @@
if (has_slant)
tpadding += width_approx_digits_half;
- gdk_draw_line(obj, gc,
- pl->pl_widget.x + pl->pl_widget.width - tpadding,
- pl->pl_widget.y,
- pl->pl_widget.x + pl->pl_widget.width - tpadding,
- pl->pl_widget.y + pl->pl_widget.height - 1);
-
+ if (cfg.show_separator_in_pl) {
+ gdk_draw_line(obj, gc,
+ pl->pl_widget.x + pl->pl_widget.width - tpadding,
+ pl->pl_widget.y,
+ pl->pl_widget.x + pl->pl_widget.width - tpadding,
+ pl->pl_widget.y + pl->pl_widget.height - 1);
+ }
}
gdk_gc_set_clip_origin(gc, 0, 0);
diff -r fc717728fd10 -r 21628529c615 audacious/prefswin.c
--- a/audacious/prefswin.c Mon May 15 07:47:01 2006 -0700
+++ b/audacious/prefswin.c Mon May 15 08:17:53 2006 -0700
@@ -936,6 +936,22 @@
}
static void
+on_playlist_show_pl_separator_realize(GtkToggleButton * button,
+ gpointer data)
+{
+ gtk_toggle_button_set_active(button, cfg.show_separator_in_pl);
+}
+
+static void
+on_playlist_show_pl_separator_toggled(GtkToggleButton * button,
+ gpointer data)
+{
+ cfg.show_separator_in_pl = gtk_toggle_button_get_active(button);
+ playlistwin_update_list();
+ draw_playlist_window(TRUE);
+}
+
+static void
input_plugin_enable_prefs(GtkTreeView * treeview,
GtkButton * button)
{
@@ -1678,6 +1694,8 @@
FUNC_MAP_ENTRY(on_pl_metadata_on_display_toggled)
FUNC_MAP_ENTRY(on_playlist_show_pl_numbers_realize)
FUNC_MAP_ENTRY(on_playlist_show_pl_numbers_toggled)
+ FUNC_MAP_ENTRY(on_playlist_show_pl_separator_realize)
+ FUNC_MAP_ENTRY(on_playlist_show_pl_separator_toggled)
FUNC_MAP_ENTRY(on_playlist_convert_twenty_realize)
FUNC_MAP_ENTRY(on_playlist_convert_twenty_toggled)
FUNC_MAP_ENTRY(on_playlist_convert_underscore_realize)