changeset 3377:30088b5ae4e4 trunk

Automated merge with ssh://hg.atheme.org//hg/audacious
author William Pitcock <nenolod@atheme-project.org>
date Thu, 23 Aug 2007 20:31:48 -0500
parents f7d56abcef56 (current diff) 6e4944657ab9 (diff)
children bc7cebd36c61 f5e5e9653287 f5d403630c40
files
diffstat 11 files changed, 163 insertions(+), 197 deletions(-) [+]
line wrap: on
line diff
--- a/po/ja.po	Thu Aug 23 20:31:30 2007 -0500
+++ b/po/ja.po	Thu Aug 23 20:31:48 2007 -0500
@@ -14,7 +14,7 @@
 "Project-Id-Version: audacious HEAD\n"
 "Report-Msgid-Bugs-To: http://bugs.audacious-media-player.org\n"
 "POT-Creation-Date: 2007-07-29 17:21+0200\n"
-"PO-Revision-Date: 2007-06-03 22:33+0900\n"
+"PO-Revision-Date: 2007-08-07 14:14+0900\n"
 "Last-Translator: dai <d+po@vdr.jp>\n"
 "Language-Team: Japanese <ja@li.org>\n"
 "MIME-Version: 1.0\n"
@@ -491,61 +491,56 @@
 msgstr "演奏する位置の入力:"
 
 #: src/audacious/ui_main.c:1659
-#, fuzzy, c-format
+#, c-format
 msgid "Seek to: %d:%-2.2d/%d:%-2.2d (%d%%)"
 msgstr "移動先: %d:%-2.2d/%d:%-2.2d (%d%%)"
 
 #: src/audacious/ui_main.c:1691
 #, c-format
 msgid "Volume: %d%%"
-msgstr ""
+msgstr "音量: %d%%"
 
 #: src/audacious/ui_main.c:1722
 #, c-format
 msgid "Balance: %d%% left"
-msgstr ""
+msgstr "バランス: %d%% 左"
 
 #: src/audacious/ui_main.c:1726
 msgid "Balance: center"
-msgstr ""
+msgstr "バランス: 中央"
 
 #: src/audacious/ui_main.c:1730
 #, c-format
 msgid "Balance: %d%% right"
-msgstr ""
+msgstr "バランス: %d%% 右"
 
 #: src/audacious/ui_main.c:2118
 msgid "Options Menu"
-msgstr ""
+msgstr "オプションメニュー"
 
 #: src/audacious/ui_main.c:2122
-#, fuzzy
 msgid "Disable 'Always On Top'"
-msgstr "常に最前面に配置する"
+msgstr "「常に最前面に配置」無効"
 
 #: src/audacious/ui_main.c:2124
-#, fuzzy
 msgid "Enable 'Always On Top'"
-msgstr "常に最前面に配置する"
+msgstr "「常に最前面に配置」有効"
 
 #: src/audacious/ui_main.c:2127
 msgid "File Info Box"
-msgstr ""
+msgstr "ファイル情報ボックス"
 
 #: src/audacious/ui_main.c:2131
-#, fuzzy
 msgid "Disable 'Doublesize'"
-msgstr "ダブルサイズ"
+msgstr "「ダブルサイズ」無効"
 
 #: src/audacious/ui_main.c:2133
-#, fuzzy
 msgid "Enable 'Doublesize'"
-msgstr "ダブルサイズ"
+msgstr "「ダブルサイズ」有効"
 
 #: src/audacious/ui_main.c:2136
-#, fuzzy
 msgid "Visualization Menu"
-msgstr "視覚化モード"
+msgstr "視覚化メニュー"
 
 #: src/audacious/ui_main.c:2184
 msgid ""
@@ -1114,12 +1109,11 @@
 
 #: src/audacious/ui_manager.c:398
 msgid "Last.fm radio"
-msgstr ""
+msgstr "Last.fm ラジオ"
 
 #: src/audacious/ui_manager.c:399
-#, fuzzy
 msgid "Play Last.fm radio"
-msgstr "場所を演奏"
+msgstr "Last.fm ラジオを演奏"
 
 #: src/audacious/ui_manager.c:401
 msgid "Preferences"
@@ -1423,14 +1417,12 @@
 "わからない場合は, 単純に検索しようとしているものの文字を入力します."
 
 #: src/audacious/ui_playlist.c:513
-#, fuzzy
 msgid "Title: "
-msgstr "タイトル"
+msgstr "タイトル: "
 
 #: src/audacious/ui_playlist.c:520
-#, fuzzy
 msgid "Album: "
-msgstr "アルバム名"
+msgstr "アルバム名: "
 
 #: src/audacious/ui_playlist.c:527
 msgid "Artist: "
@@ -1474,13 +1466,12 @@
 "%s のファイルの種類が不明です.\n"
 
 #: src/audacious/ui_playlist.c:965
-#, fuzzy
 msgid "Save as Static Playlist"
-msgstr "プレイリストの保存"
+msgstr "スタティックプレイリストとして保存"
 
 #: src/audacious/ui_playlist.c:972
 msgid "Use Relative Path"
-msgstr ""
+msgstr "相対パスを使う"
 
 #: src/audacious/ui_playlist.c:994
 msgid "Load Playlist"
@@ -1531,9 +1522,8 @@
 msgstr "フィルタ(_F):"
 
 #: src/audacious/ui_jumptotrack.c:597
-#, fuzzy
 msgid "Close on Jump"
-msgstr "開いたらダイアログを閉じる"
+msgstr "ジャンプしたらダイアログを閉じる"
 
 #: src/audacious/playback.c:223
 msgid ""
@@ -1668,9 +1658,8 @@
 msgstr "メインウィンドウで使用するフォントの選択"
 
 #: src/audacious/glade/prefswin.glade:1045
-#, fuzzy
 msgid "Select playlist font:"
-msgstr "メインウィンドウで使用するフォントの選択"
+msgstr "プレイリスで使用するフォントの選択"
 
 #: src/audacious/glade/prefswin.glade:1091
 msgid ""
@@ -1947,7 +1936,6 @@
 msgstr "現在の出力プラグイン:"
 
 #: src/audacious/glade/prefswin.glade:3541
-#, fuzzy
 msgid ""
 "<span size=\"small\">This is the amount of time to prebuffer audio streams "
 "by, in milliseconds.\n"
@@ -1955,9 +1943,11 @@
 "Please note however, that high values will result in Audacious performing "
 "poorly.</span>"
 msgstr ""
-"<span size=\"small\">オーディオストリームのプレバッファするための十分な時間を"
-"ミリ秒で指定します. 音飛びがあるなら, この値を増やします. しかし, 高い値は "
-"Audacious のパフォーマンスを悪くすることに注意してください.</span>"
+"<span size=\"small\">オーディオストリームをプレバッファするための十分な時間を"
+"ミリ秒で指定します.\n"
+"音飛びがあるならこの値を増やします.\n"
+"しかし, 高い値は Audacious のパフォーマンスを悪くすることに注意してください."
+"</span>"
 
 #: src/audacious/glade/prefswin.glade:3571
 msgid "Buffer size:"
@@ -2049,7 +2039,6 @@
 msgstr "サンプリングレート [Hz]:"
 
 #: src/audacious/glade/prefswin.glade:4334
-#, fuzzy
 msgid ""
 "<span size=\"small\">All streams will be converted to this sampling rate.\n"
 "This should be the max supported sampling rate of\n"
--- a/src/audacious/ui/mainwin.ui	Thu Aug 23 20:31:30 2007 -0500
+++ b/src/audacious/ui/mainwin.ui	Thu Aug 23 20:31:48 2007 -0500
@@ -127,9 +127,7 @@
 				<menuitem action="view easy move" />
 			</menu>
 			<separator />
-			<menu action="plugins" name="plugins-menu">
-			   <menuitem action="dummy" name="plugins-menu-dummy" />
-			</menu>
+			<menuitem action="plugins-menu" />
 			<separator />
 			<menuitem action="preferences" />
 			<menuitem action="quit" />
--- a/src/audacious/ui/playlist.ui	Thu Aug 23 20:31:30 2007 -0500
+++ b/src/audacious/ui/playlist.ui	Thu Aug 23 20:31:48 2007 -0500
@@ -11,14 +11,14 @@
 			<separator />
 			<menuitem action="queue toggle" />
 			<separator />
-			<menu action="plugins" name="plugins-menu">
-			   <menuitem action="dummy" name="plugins-menu-dummy" />
-			</menu>
+			<menuitem action="plugins-menu" />
 		</menu>
 
 		<menu action="dummy" name="add-menu">
 			<menuitem action="playlist add url" />
 			<menuitem action="playlist add files" />
+			<separator />
+			<menuitem action="plugins-menu" />
 		</menu>
 
 		<menu action="dummy" name="del-menu">
@@ -34,6 +34,8 @@
 			<menuitem action="playlist remove all" />
 			<menuitem action="playlist remove unselected" />
 			<menuitem action="playlist remove selected" />
+			<separator />
+			<menuitem action="plugins-menu" />
 		</menu>
 
 		<menu action="dummy" name="select-menu">
@@ -43,6 +45,8 @@
 			<separator />
 			<menuitem action="playlist select none" />
 			<menuitem action="playlist select all" />
+			<separator />
+			<menuitem action="plugins-menu" />
 		</menu>
 
 		<menu action="dummy" name="misc-menu">
@@ -67,6 +71,8 @@
 				<menuitem action="playlist sort selected by track number" />
 				<menuitem action="playlist sort selected by playlist entry" />
 			</menu>
+			<separator />
+			<menuitem action="plugins-menu" />
 		</menu>
 
 		<menu action="dummy" name="playlist-menu">
@@ -81,10 +87,8 @@
 			<menuitem action="playlist save default" />
 			<separator />
 			<menuitem action="playlist manager" />
-         <separator />
-			<menu action="plugins" name="plugins-menu">
-			   <menuitem action="dummy" name="plugins-menu-dummy" />
-			</menu>
+			<separator />
+			<menuitem action="plugins-menu" />
 			<separator />
 			<menuitem action="playlist refresh" />
 			<separator />
--- a/src/audacious/ui_fileinfopopup.c	Thu Aug 23 20:31:30 2007 -0500
+++ b/src/audacious/ui_fileinfopopup.c	Thu Aug 23 20:31:48 2007 -0500
@@ -92,7 +92,7 @@
     GtkWidget *progressbar =
         g_object_get_data(G_OBJECT(filepopup_win), "progressbar");
     gchar *tooltip_file = g_object_get_data(G_OBJECT(filepopup_win), "file");
-    gchar *current_file;
+    gchar *current_file_u, *current_file;
     Playlist *pl;
     gint length =
         GPOINTER_TO_INT(g_object_get_data(G_OBJECT(filepopup_win), "length"));
@@ -105,9 +105,9 @@
 
     pos = playlist_get_position(pl);
 
-    current_file = playlist_get_filename(pl , pos);
-
-    g_return_val_if_fail(current_file != NULL, FALSE);
+    current_file_u = playlist_get_filename(pl , pos);
+    g_return_val_if_fail(current_file_u != NULL, FALSE);
+    current_file = g_filename_from_uri(current_file_u, NULL, NULL);
 
     if (playback_get_playing() && length != -1 &&
         current_file != NULL && tooltip_file != NULL &&
@@ -133,6 +133,7 @@
             gtk_widget_hide(progressbar);
     }
 
+    g_free( current_file );
     return TRUE;
 }
 
--- a/src/audacious/ui_main.c	Thu Aug 23 20:31:30 2007 -0500
+++ b/src/audacious/ui_main.c	Thu Aug 23 20:31:48 2007 -0500
@@ -436,17 +436,6 @@
 }
 
 gboolean
-mainwin_num_clicked(GtkWidget *widget, GdkEventButton *event)
-{
-    if (event->button == 1) {
-        change_timer_mode();
-    } else if (event->button == 3)
-        return FALSE;
-
-    return TRUE;
-}
-
-gboolean
 mainwin_vis_cb(GtkWidget *widget, GdkEventButton *event)
 {
     if (event->button == 1) {
@@ -2114,12 +2103,24 @@
     cfg.timer_mode = mode;
 }
 
+gboolean
+change_timer_mode_cb(GtkWidget *widget, GdkEventButton *event)
+{
+    if (event->button == 1) {
+        change_timer_mode();
+    } else if (event->button == 3)
+        return FALSE;
+
+    return TRUE;
+}
+
 void change_timer_mode(void) {
     if (cfg.timer_mode == TIMER_ELAPSED)
         set_timer_mode(TIMER_REMAINING);
     else
         set_timer_mode(TIMER_ELAPSED);
-    mainwin_update_song_info();
+    if (playback_get_playing())
+        mainwin_update_song_info();
 }
 
 static void
@@ -2449,19 +2450,19 @@
     mainwin_playstatus = ui_skinned_playstatus_new(SKINNED_WINDOW(mainwin)->fixed, 24, 28);
 
     mainwin_minus_num = ui_skinned_number_new(SKINNED_WINDOW(mainwin)->fixed, 36, 26, SKIN_NUMBERS);
-    g_signal_connect(mainwin_minus_num, "button-press-event", G_CALLBACK(mainwin_num_clicked), NULL);
+    g_signal_connect(mainwin_minus_num, "button-press-event", G_CALLBACK(change_timer_mode_cb), NULL);
 
     mainwin_10min_num = ui_skinned_number_new(SKINNED_WINDOW(mainwin)->fixed, 48, 26, SKIN_NUMBERS);
-    g_signal_connect(mainwin_10min_num, "button-press-event", G_CALLBACK(mainwin_num_clicked), NULL);
+    g_signal_connect(mainwin_10min_num, "button-press-event", G_CALLBACK(change_timer_mode_cb), NULL);
 
     mainwin_min_num = ui_skinned_number_new(SKINNED_WINDOW(mainwin)->fixed, 60, 26, SKIN_NUMBERS);
-    g_signal_connect(mainwin_min_num, "button-press-event", G_CALLBACK(mainwin_num_clicked), NULL);
+    g_signal_connect(mainwin_min_num, "button-press-event", G_CALLBACK(change_timer_mode_cb), NULL);
 
     mainwin_10sec_num = ui_skinned_number_new(SKINNED_WINDOW(mainwin)->fixed, 78, 26, SKIN_NUMBERS);
-    g_signal_connect(mainwin_10sec_num, "button-press-event", G_CALLBACK(mainwin_num_clicked), NULL);
+    g_signal_connect(mainwin_10sec_num, "button-press-event", G_CALLBACK(change_timer_mode_cb), NULL);
 
     mainwin_sec_num = ui_skinned_number_new(SKINNED_WINDOW(mainwin)->fixed, 90, 26, SKIN_NUMBERS);
-    g_signal_connect(mainwin_sec_num, "button-press-event", G_CALLBACK(mainwin_num_clicked), NULL);
+    g_signal_connect(mainwin_sec_num, "button-press-event", G_CALLBACK(change_timer_mode_cb), NULL);
 
     mainwin_about = ui_skinned_button_new();
     ui_skinned_small_button_setup(mainwin_about, SKINNED_WINDOW(mainwin)->fixed, 247, 83, 20, 25);
@@ -2486,10 +2487,10 @@
     g_signal_connect(mainwin_sposition, "release", G_CALLBACK(mainwin_spos_release_cb), NULL);
 
     mainwin_stime_min = ui_skinned_textbox_new(SKINNED_WINDOW(mainwin)->fixed, 130, 4, 15, FALSE, SKIN_TEXT);
-    g_signal_connect(mainwin_stime_min, "clicked", change_timer_mode, NULL);
+    g_signal_connect(mainwin_stime_min, "button-press-event", G_CALLBACK(change_timer_mode_cb), NULL);
 
     mainwin_stime_sec = ui_skinned_textbox_new(SKINNED_WINDOW(mainwin)->fixed, 147, 4, 10, FALSE, SKIN_TEXT);
-    g_signal_connect(mainwin_stime_sec, "clicked", change_timer_mode, NULL);
+    g_signal_connect(mainwin_stime_sec, "button-press-event", G_CALLBACK(change_timer_mode_cb), NULL);
 
     err = gtk_message_dialog_new(GTK_WINDOW(mainwin), GTK_DIALOG_DESTROY_WITH_PARENT|GTK_DIALOG_MODAL,
                                  GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Error in Audacious."));
--- a/src/audacious/ui_main.h	Thu Aug 23 20:31:30 2007 -0500
+++ b/src/audacious/ui_main.h	Thu Aug 23 20:31:48 2007 -0500
@@ -177,6 +177,7 @@
                                 gpointer user_data);
 
 void mainwin_setup_menus(void);
+gboolean change_timer_mode_cb(GtkWidget *widget, GdkEventButton *event);
 
 void mainwin_jump_to_file(void);
 void mainwin_jump_to_time(void);
@@ -190,5 +191,4 @@
                                 gint * frequency,
                                 gint * numchannels);
 
-
 #endif
--- a/src/audacious/ui_manager.c	Thu Aug 23 20:31:30 2007 -0500
+++ b/src/audacious/ui_manager.c	Thu Aug 23 20:31:48 2007 -0500
@@ -375,6 +375,8 @@
 
 	{ "dummy", NULL, "dummy" },
 
+	{ "plugins-menu", NULL, N_("Plugins") },
+
 	{ "current track info", AUD_STOCK_INFO , N_("View Track Details"), "I",
 	  N_("View track details"), G_CALLBACK(action_current_track_info) },
 
@@ -627,22 +629,14 @@
 static void
 ui_manager_create_menus_init_pmenu( gchar * path )
 {
-  GtkWidget *plugins_menu, *plugins_menu_item, *plugins_dummy_item;
-  GList *plugins_menu_children = NULL;
-  gchar *path_dummy = g_strjoin( NULL , path , "/plugins-menu-dummy" , NULL );
-  /* remove the dummy item placed in plugins-menu as a workaround */
-  plugins_dummy_item = gtk_ui_manager_get_widget( ui_manager , path_dummy );
-  if ( plugins_dummy_item )
-    gtk_widget_destroy( plugins_dummy_item );
-  /* take note of the initial count of items in the "empty" plugins-menu */
-  plugins_menu_item = gtk_ui_manager_get_widget( ui_manager , path );
-  plugins_menu = gtk_menu_item_get_submenu( GTK_MENU_ITEM(plugins_menu_item) );
-  plugins_menu_children = gtk_container_get_children( GTK_CONTAINER(plugins_menu) );
-  g_object_set_data( G_OBJECT(plugins_menu) , "ic" , GINT_TO_POINTER(g_list_length(plugins_menu_children)) );
-  g_list_free( plugins_menu_children );
-  /* last, hide the plugins-menu by default */
-  gtk_widget_hide( plugins_menu_item );
-  g_free( path_dummy );
+  GtkWidget *plugins_menu_item = gtk_ui_manager_get_widget( ui_manager , path );
+  if ( plugins_menu_item )
+  {
+    /* initially set count of items under plugins_menu_item to 0 */
+    g_object_set_data( G_OBJECT(plugins_menu_item) , "ic" , GINT_TO_POINTER(0) );
+    /* and since it's 0, hide the plugins_menu_item */
+    gtk_widget_hide( plugins_menu_item );
+  }
   return;
 }
 
@@ -692,6 +686,10 @@
 
   /* initialize plugins-menu for playlist-menus */
   ui_manager_create_menus_init_pmenu( "/playlist-menus/playlist-menu/plugins-menu" );
+  ui_manager_create_menus_init_pmenu( "/playlist-menus/add-menu/plugins-menu" );
+  ui_manager_create_menus_init_pmenu( "/playlist-menus/del-menu/plugins-menu" );
+  ui_manager_create_menus_init_pmenu( "/playlist-menus/select-menu/plugins-menu" );
+  ui_manager_create_menus_init_pmenu( "/playlist-menus/misc-menu/plugins-menu" );
   ui_manager_create_menus_init_pmenu( "/playlist-menus/playlist-rightclick-menu/plugins-menu" );
 
   gtk_ui_manager_add_ui_from_file( ui_manager , DATA_DIR "/ui/equalizer.ui" , &gerr );
@@ -765,6 +763,32 @@
 /******************************/
 /* plugin-available functions */
 
+#define _MP_GWID(y) gtk_ui_manager_get_widget( ui_manager , y )
+
+static GtkWidget*
+audacious_menu_plugin_menuwid( menu_id )
+{
+  switch (menu_id)
+  {
+    case AUDACIOUS_MENU_MAIN:
+      return _MP_GWID("/mainwin-menus/main-menu/plugins-menu");
+    case AUDACIOUS_MENU_PLAYLIST:
+      return _MP_GWID("/playlist-menus/playlist-menu/plugins-menu");
+    case AUDACIOUS_MENU_PLAYLIST_RCLICK:
+      return _MP_GWID("/playlist-menus/playlist-rightclick-menu/plugins-menu");
+    case AUDACIOUS_MENU_PLAYLIST_ADD:
+      return _MP_GWID("/playlist-menus/add-menu/plugins-menu");
+    case AUDACIOUS_MENU_PLAYLIST_REMOVE:
+      return _MP_GWID("/playlist-menus/del-menu/plugins-menu");
+    case AUDACIOUS_MENU_PLAYLIST_SELECT:
+      return _MP_GWID("/playlist-menus/select-menu/plugins-menu");
+    case AUDACIOUS_MENU_PLAYLIST_MISC:
+      return _MP_GWID("/playlist-menus/misc-menu/plugins-menu");
+    default:
+      return NULL;
+  }
+}
+
 
 gint
 audacious_menu_plugin_item_add( gint menu_id , GtkWidget * item )
@@ -772,46 +796,27 @@
   if ( menu_created )
   {
     GtkWidget *plugins_menu = NULL;
-    GtkWidget *plugins_menu_item = NULL;
-
-    switch (menu_id)
-    {
-      case AUDACIOUS_MENU_MAIN:
-        plugins_menu_item = gtk_ui_manager_get_widget( ui_manager ,
-          "/mainwin-menus/main-menu/plugins-menu" );
-        break;
-
-      case AUDACIOUS_MENU_PLAYLIST:
-        plugins_menu_item = gtk_ui_manager_get_widget( ui_manager ,
-          "/playlist-menus/playlist-menu/plugins-menu" );
-        break;
-
-      case AUDACIOUS_MENU_PLAYLIST_RCLICK:
-        plugins_menu_item = gtk_ui_manager_get_widget( ui_manager ,
-          "/playlist-menus/playlist-rightclick-menu/plugins-menu" );
-        break;
-
-      default:
-        return -1;
-    }
-
+    GtkWidget *plugins_menu_item = audacious_menu_plugin_menuwid( menu_id );
     if ( plugins_menu_item )
     {
-      plugins_menu = gtk_menu_item_get_submenu( GTK_MENU_ITEM(plugins_menu_item) );
-      if ( plugins_menu )
+      gint ic = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(plugins_menu_item),"ic"));
+      if ( ic == 0 ) /* no items under plugins_menu_item, create the submenu */
       {
-        gtk_menu_shell_append( GTK_MENU_SHELL(plugins_menu) , item );
-        gtk_widget_show( plugins_menu_item );
-        return 0; /* success */
+        plugins_menu = gtk_menu_new();
+        gtk_menu_item_set_submenu( GTK_MENU_ITEM(plugins_menu_item), plugins_menu );
       }
-      else
-        return -1;
+      else /* items available under plugins_menu_item, pick the existing submenu */
+      {
+        plugins_menu = gtk_menu_item_get_submenu( GTK_MENU_ITEM(plugins_menu_item) );
+        if ( !plugins_menu ) return -1;
+      }
+      gtk_menu_shell_append( GTK_MENU_SHELL(plugins_menu) , item );
+      gtk_widget_show( plugins_menu_item );
+      g_object_set_data( G_OBJECT(plugins_menu_item) , "ic" , GINT_TO_POINTER(++ic) );
+      return 0; /* success */
     }
-    else
-      return -1;
   }
-  else
-    return -1;
+  return -1; /* failure */
 }
 
 
@@ -821,52 +826,28 @@
   if ( menu_created )
   {
     GtkWidget *plugins_menu = NULL;
-    GtkWidget *plugins_menu_item = NULL;
-    GList *plugins_menu_children = NULL;
-
-    switch (menu_id)
-    {
-      case AUDACIOUS_MENU_MAIN:
-        plugins_menu_item = gtk_ui_manager_get_widget( ui_manager ,
-          "/mainwin-menus/main-menu/plugins-menu" );
-        break;
-
-      case AUDACIOUS_MENU_PLAYLIST:
-        plugins_menu_item = gtk_ui_manager_get_widget( ui_manager ,
-          "/playlist-menus/playlist-menu/plugins-menu" );
-        break;
-
-      case AUDACIOUS_MENU_PLAYLIST_RCLICK:
-        plugins_menu_item = gtk_ui_manager_get_widget( ui_manager ,
-          "/playlist-menus/playlist-rightclick-menu/plugins-menu" );
-        break;
-
-      default:
-        return -1;
-    }
-
+    GtkWidget *plugins_menu_item = audacious_menu_plugin_menuwid( menu_id );
     if ( plugins_menu_item )
     {
-      plugins_menu = gtk_menu_item_get_submenu( GTK_MENU_ITEM(plugins_menu_item) );
-      if ( plugins_menu )
+      gint ic = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(plugins_menu_item),"ic"));
+      if ( ic > 0 )
       {
-        /* remove the plugin-added entry */
-        gtk_container_remove( GTK_CONTAINER(plugins_menu) , item );
-        /* check the current number of items in plugins-menu against its initial count
-           of items; if these are equal, it means that the menu is "empty", so hide it */
-        gint ic = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(plugins_menu),"ic"));
-        plugins_menu_children = gtk_container_get_children( GTK_CONTAINER(plugins_menu) );
-        if ( ic == g_list_length(plugins_menu_children) )
-          gtk_widget_hide( plugins_menu_item );
-        g_list_free( plugins_menu_children );
-        return 0; /* success */
+        plugins_menu = gtk_menu_item_get_submenu( GTK_MENU_ITEM(plugins_menu_item) );
+        if ( plugins_menu )
+        {
+          /* remove the plugin-added entry */
+          gtk_container_remove( GTK_CONTAINER(plugins_menu) , item );
+          g_object_set_data( G_OBJECT(plugins_menu_item) , "ic" , GINT_TO_POINTER(--ic) );
+          if ( ic == 0 ) /* if the menu is empty now, destroy it */
+          {
+            gtk_menu_item_remove_submenu( GTK_MENU_ITEM(plugins_menu_item) );
+            gtk_widget_destroy( plugins_menu );
+            gtk_widget_hide( plugins_menu_item );
+          }
+          return 0; /* success */
+        }
       }
-      else
-        return -1;
     }
-    else
-      return -1;
   }
-  else
-    return -1;
+  return -1; /* failure */
 }
--- a/src/audacious/ui_playlist.c	Thu Aug 23 20:31:30 2007 -0500
+++ b/src/audacious/ui_playlist.c	Thu Aug 23 20:31:48 2007 -0500
@@ -999,8 +999,6 @@
 {
     gint xpos, ypos;
     GtkRequisition req;
-    Playlist *playlist = playlist_get_active();
-    gint idx = 0;
 
     gtk_window_get_position(GTK_WINDOW(playlistwin), &xpos, &ypos);
 
@@ -1064,12 +1062,6 @@
                    event->button,
                    event->time);
     }
-    else if (event->button == 1 && REGION_R(82, 54, 15, 9)) {
-        if (cfg.timer_mode == TIMER_ELAPSED)
-            cfg.timer_mode = TIMER_REMAINING;
-        else
-            cfg.timer_mode = TIMER_ELAPSED;
-    }
     else if (event->button == 1 && event->type == GDK_BUTTON_PRESS &&
              (cfg.easy_move || event->y < 14))
     {
@@ -1093,18 +1085,6 @@
         ui_manager_popup_menu_show(GTK_MENU(mainwin_general_menu), event->x_root,
                                 event->y_root + 2, 3, event->time);
     }
-    else if (event->button == 1 && (event->state & GDK_MOD1_MASK))
-    {
-        GList *node;
-
-        node = playlist_get_selected(playlist);
-
-        if (node != NULL)
-        {
-            idx = GPOINTER_TO_INT(playlist_get_selected(playlist)->data);
-            playlist_queue_position(playlist, idx);
-        }
-    }
 
     return FALSE;
 }
@@ -1116,14 +1096,17 @@
     return TRUE;
 }
 
-static void
+static gboolean
 playlistwin_keypress_up_down_handler(UiSkinnedPlaylist * pl,
                                      gboolean up, guint state)
 {
     Playlist *playlist = playlist_get_active();
+    if ((!(pl->prev_selected || pl->first) && up) ||
+       ((pl->prev_selected >= playlist_get_length(playlist) - 1) && !up))
+         return FALSE;
 
     if ((state & GDK_MOD1_MASK) && (state & GDK_SHIFT_MASK))
-        return;
+        return FALSE;
     if (!(state & GDK_MOD1_MASK))
         playlist_select_all(playlist, FALSE);
 
@@ -1145,7 +1128,7 @@
         pl->first = MAX(pl->first, pl->prev_max -
                            pl->num_visible + 1);
         playlist_select_range(playlist, pl->prev_min, pl->prev_max, TRUE);
-        return;
+        return TRUE;
     }
     else if (state & GDK_MOD1_MASK) {
         if (up)
@@ -1156,7 +1139,7 @@
             pl->first = pl->prev_min;
         else if (pl->prev_max >= (pl->first + pl->num_visible))
             pl->first = pl->prev_max - pl->num_visible + 1;
-        return;
+        return TRUE;
     }
     else if (up)
         pl->prev_selected--;
@@ -1173,6 +1156,8 @@
 
     playlist_select_range(playlist, pl->prev_selected, pl->prev_selected, TRUE);
     pl->prev_min = -1;
+
+    return TRUE;
 }
 
 /* FIXME: Handle the keys through menu */
@@ -1193,11 +1178,10 @@
     case GDK_KP_Down:
     case GDK_Up:
     case GDK_Down:
-        playlistwin_keypress_up_down_handler(UI_SKINNED_PLAYLIST(playlistwin_list),
-                                             keyval == GDK_Up
-                                             || keyval == GDK_KP_Up,
-                                             event->state);
-        refresh = TRUE;
+        refresh = playlistwin_keypress_up_down_handler(UI_SKINNED_PLAYLIST(playlistwin_list),
+                                                       keyval == GDK_Up
+                                                       || keyval == GDK_KP_Up,
+                                                       event->state);
         break;
     case GDK_Page_Up:
         playlistwin_scroll(-UI_SKINNED_PLAYLIST(playlistwin_list)->num_visible);
@@ -1428,11 +1412,13 @@
     playlistwin_time_min = ui_skinned_textbox_new(SKINNED_WINDOW(playlistwin)->fixed,
                        playlistwin_get_width() - 82,
                        cfg.playlist_height - 15, 15, FALSE, SKIN_TEXT);
+    g_signal_connect(playlistwin_time_min, "button-press-event", G_CALLBACK(change_timer_mode_cb), NULL);
 
     /* track time (second) */
     playlistwin_time_sec = ui_skinned_textbox_new(SKINNED_WINDOW(playlistwin)->fixed,
                        playlistwin_get_width() - 64,
                        cfg.playlist_height - 15, 10, FALSE, SKIN_TEXT);
+    g_signal_connect(playlistwin_time_sec, "button-press-event", G_CALLBACK(change_timer_mode_cb), NULL);
 
     /* playlist information (current track length / total track length) */
     playlistwin_info = ui_skinned_textbox_new(SKINNED_WINDOW(playlistwin)->fixed,
--- a/src/audacious/ui_plugin_menu.h	Thu Aug 23 20:31:30 2007 -0500
+++ b/src/audacious/ui_plugin_menu.h	Thu Aug 23 20:31:48 2007 -0500
@@ -31,6 +31,10 @@
 #define AUDACIOUS_MENU_MAIN             0
 #define AUDACIOUS_MENU_PLAYLIST         1
 #define AUDACIOUS_MENU_PLAYLIST_RCLICK  2
+#define AUDACIOUS_MENU_PLAYLIST_ADD     3
+#define AUDACIOUS_MENU_PLAYLIST_REMOVE  4
+#define AUDACIOUS_MENU_PLAYLIST_SELECT  5
+#define AUDACIOUS_MENU_PLAYLIST_MISC    6
 
 gint audacious_menu_plugin_item_add( gint , GtkWidget * );
 gint audacious_menu_plugin_item_remove( gint , GtkWidget * );
--- a/src/audacious/ui_skinned_button.c	Thu Aug 23 20:31:30 2007 -0500
+++ b/src/audacious/ui_skinned_button.c	Thu Aug 23 20:31:48 2007 -0500
@@ -533,6 +533,7 @@
     if (ny > -1) priv->ny = ny;
     if (px > -1) priv->px = px;
     if (py > -1) priv->py = py;
+    gtk_widget_queue_draw(button);
 }
 
 void ui_skinned_button_set_skin_index(GtkWidget *button, SkinPixmapId si) {
--- a/src/audacious/ui_skinned_playlist.c	Thu Aug 23 20:31:30 2007 -0500
+++ b/src/audacious/ui_skinned_playlist.c	Thu Aug 23 20:31:48 2007 -0500
@@ -799,11 +799,6 @@
     UiSkinnedPlaylist *pl = UI_SKINNED_PLAYLIST (widget);
     UiSkinnedPlaylistPrivate *priv = UI_SKINNED_PLAYLIST_GET_PRIVATE(widget);
 
-    if (event->button == 3) {
-        ui_manager_popup_menu_show(GTK_MENU(playlistwin_popup_menu),
-                                   event->x_root, event->y_root + 5,
-                                   event->button, event->time);
-    }
     gint nr;
     Playlist *playlist = playlist_get_active();
 
@@ -812,6 +807,9 @@
         return FALSE;
 
     if (event->button == 3) {
+        ui_manager_popup_menu_show(GTK_MENU(playlistwin_popup_menu),
+                                   event->x_root, event->y_root + 5,
+                                   event->button, event->time);
         GList* selection = playlist_get_selected(playlist);
         if (g_list_find(selection, GINT_TO_POINTER(nr)) == NULL) {
             playlist_select_all(playlist, FALSE);
@@ -821,6 +819,9 @@
         if (!(event->state & GDK_CONTROL_MASK))
             playlist_select_all(playlist, FALSE);
 
+        if ((event->state & GDK_MOD1_MASK))
+            playlist_queue_position(playlist, nr);
+
         if (event->state & GDK_SHIFT_MASK && pl->prev_selected != -1) {
             playlist_select_range(playlist, pl->prev_selected, nr, TRUE);
             pl->prev_min = pl->prev_selected;