changeset 1358:0c41255487ee trunk

[svn] - add toggle option for filepopup window
author yaz
date Thu, 29 Jun 2006 02:57:27 -0700
parents 0675e21d50ea
children c60990f0bf2a
files ChangeLog audacious/glade/prefswin.glade audacious/main.c audacious/main.h audacious/prefswin.c audacious/ui_fileinfo.c
diffstat 6 files changed, 106 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Jun 29 00:38:22 2006 -0700
+++ b/ChangeLog	Thu Jun 29 02:57:27 2006 -0700
@@ -1,3 +1,12 @@
+2006-06-29 07:38:22 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
+  revision [1626]
+  - m3u file should be written in locale encoding.
+  
+
+  Changes:        Modified:
+  +9 -1           trunk/audacious/playlist.c  
+
+
 2006-06-29 02:24:02 +0000  William Pitcock <nenolod@nenolod.net>
   revision [1624]
   - hookup tuple->formatter
--- a/audacious/glade/prefswin.glade	Thu Jun 29 00:38:22 2006 -0700
+++ b/audacious/glade/prefswin.glade	Thu Jun 29 02:57:27 2006 -0700
@@ -2298,6 +2298,83 @@
 			  <property name="fill">False</property>
 			</packing>
 		      </child>
+
+		      <child>
+			<widget class="GtkAlignment" id="alignment85">
+			  <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">12</property>
+			  <property name="bottom_padding">12</property>
+			  <property name="left_padding">0</property>
+			  <property name="right_padding">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label84">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">&lt;b&gt;Popup Information&lt;/b&gt;</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">True</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			      <property name="width_chars">-1</property>
+			      <property name="single_line_mode">False</property>
+			      <property name="angle">0</property>
+			    </widget>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkAlignment" id="alignment86">
+			  <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="checkbutton10">
+			      <property name="visible">True</property>
+			      <property name="tooltip" translatable="yes">Toggles popup information window for the pointed song in the playlist. The window shows title of song, name of album, genre, year of publish, track number, track length, and artwork.</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Show popup information for song</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>
+			      <accessibility>
+			      </accessibility>
+			      <signal name="realize" handler="on_show_filepopup_for_tuple_realize" after="yes" last_modification_time="Thu, 29 Jun 2006 08:45:52 GMT"/>
+			      <signal name="toggled" handler="on_show_filepopup_for_tuple_toggled" last_modification_time="Thu, 29 Jun 2006 08:46:11 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	Thu Jun 29 00:38:22 2006 -0700
+++ b/audacious/main.c	Thu Jun 29 02:57:27 2006 -0700
@@ -202,6 +202,7 @@
     NULL,
     3000,			/* audio buffer size */
     FALSE,			/* whether or not to postpone format detection on initial add */
+    TRUE,			/* show filepopup for tuple */
 };
 
 typedef struct bmp_cfg_boolent_t {
@@ -293,6 +294,7 @@
     {"close_dialog_add", &cfg.close_dialog_add, TRUE},
     {"resume_playback_on_startup", &cfg.resume_playback_on_startup, TRUE},
     {"playlist_detect", &cfg.playlist_detect, TRUE},
+    {"show_filepopup_for_tuple", &cfg.show_filepopup_for_tuple, TRUE},
 };
 
 static gint ncfgbent = G_N_ELEMENTS(bmp_boolents);
--- a/audacious/main.h	Thu Jun 29 00:38:22 2006 -0700
+++ b/audacious/main.h	Thu Jun 29 02:57:27 2006 -0700
@@ -111,6 +111,7 @@
     gchar *chardet_fallback;
     gint output_buffer_size;
     gboolean playlist_detect;
+    gboolean show_filepopup_for_tuple;
 };
 
 typedef struct _BmpConfig BmpConfig;
--- a/audacious/prefswin.c	Thu Jun 29 00:38:22 2006 -0700
+++ b/audacious/prefswin.c	Thu Jun 29 02:57:27 2006 -0700
@@ -1996,6 +1996,18 @@
     bmp_cfg_db_close(db);
 }
 
+static void
+on_show_filepopup_for_tuple_realize(GtkToggleButton * button, gpointer data)
+{
+    gtk_toggle_button_set_active(button, cfg.show_filepopup_for_tuple);
+}
+
+static void
+on_show_filepopup_for_tuple_toggled(GtkToggleButton * button, gpointer data)
+{
+    cfg.show_filepopup_for_tuple = gtk_toggle_button_get_active(button);
+}
+
 /* FIXME: complete the map */
 FUNC_MAP_BEGIN(prefswin_func_map)
     FUNC_MAP_ENTRY(on_input_plugin_view_realize)
@@ -2066,6 +2078,8 @@
     FUNC_MAP_ENTRY(on_output_plugin_bufsize_value_changed)
     FUNC_MAP_ENTRY(on_audio_format_det_cb_toggled)
     FUNC_MAP_ENTRY(on_audio_format_det_cb_realize)
+    FUNC_MAP_ENTRY(on_show_filepopup_for_tuple_realize)
+    FUNC_MAP_ENTRY(on_show_filepopup_for_tuple_toggled)
 FUNC_MAP_END
 
 void
--- a/audacious/ui_fileinfo.c	Thu Jun 29 00:38:22 2006 -0700
+++ b/audacious/ui_fileinfo.c	Thu Jun 29 02:57:27 2006 -0700
@@ -215,7 +215,9 @@
 	    	}
 
 		tuple = playlist_get_tuple(pos);
-		filepopup_show_for_tuple(tuple);
+		if(cfg.show_filepopup_for_tuple){
+			filepopup_show_for_tuple(tuple);
+		}
 	}
 
 	return TRUE;