changeset 1056:21628529c615 trunk

[svn] add the config option to enable/disable separator line in the playlist
author yaz
date Mon, 15 May 2006 08:17:53 -0700
parents fc717728fd10
children 4dfe83e30bfa
files audacious/credits.c audacious/glade/prefswin.glade audacious/main.c audacious/main.h audacious/playlist_list.c audacious/prefswin.c
diffstat 6 files changed, 70 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- 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:"),
--- 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 @@
 				      <property name="fill">False</property>
 				    </packing>
 				  </child>
+
+				  <child>
+				    <widget class="GtkAlignment" id="alignment61">
+				      <property name="visible">True</property>
+				      <property name="xalign">0.5</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xscale">1</property>
+				      <property name="yscale">1</property>
+				      <property name="top_padding">0</property>
+				      <property name="bottom_padding">0</property>
+				      <property name="left_padding">12</property>
+				      <property name="right_padding">0</property>
+
+				      <child>
+					<widget class="GtkCheckButton" id="playlist_show_pl_separator">
+					  <property name="visible">True</property>
+					  <property name="can_focus">True</property>
+					  <property name="label" translatable="yes">Show separator in playlist</property>
+					  <property name="use_underline">True</property>
+					  <property name="relief">GTK_RELIEF_NORMAL</property>
+					  <property name="focus_on_click">True</property>
+					  <property name="active">False</property>
+					  <property name="inconsistent">False</property>
+					  <property name="draw_indicator">True</property>
+					  <signal name="toggled" handler="on_playlist_show_pl_separator_toggled" last_modification_time="Sat, 03 Jul 2004 04:45:40 GMT"/>
+					  <signal name="realize" handler="on_playlist_show_pl_separator_realize" after="yes" last_modification_time="Wed, 07 Jul 2004 06:54:45 GMT"/>
+					</widget>
+				      </child>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">False</property>
+				      <property name="fill">False</property>
+				    </packing>
+				  </child>
 				</widget>
 				<packing>
 				  <property name="padding">0</property>
--- 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},
--- 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;
--- 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);
--- 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)