tisdagen den 18 november 2003 21.03 skrev Guillaume Cottenceau:
> Oden Eriksson <[EMAIL PROTECTED]> writes:

[...]

> If no tooltip is possible, I'd suggest at least a README.MDK
> holding all mandrake specific stuff?

As in the new attached patches?

--- /dev/null	1970-01-01 01:00:00.000000000 +0100
+++ README.MDK	2003-11-18 21:24:25.000000000 +0100
@@ -0,0 +1,24 @@
+Additional features for the Mandrake Linux XMMS package.
+
+
+The A-B feature
+---------------
+
+The A-B feature by Rodrigo Martins de Matos Ventura was found here:
+http://lists.xmms.org/pipermail/xmms-devel/2002-January/002282.html
+And was rediffed by Oden Eriksson Tue 18 Nov 2003.
+
+Here's Rodrigos explaination what it is about:
+
+"I just did a minor patch to CVS version of xmms, in order to
+add a small but very useful (at least to me) feature: A-B
+repetition. My old CD player has it, and it is extremely useful,
+namely for transcribing music.
+
+The idea is simple: anytime during play, you press the "A" key
+(marks A point), the music keeps playing, when you press the "A" key
+again (marks B point), it loops endlessly between the two marked
+points, until the "S" key is pressed (clear), or a new A point is
+marked. Morover, whenever a A-B range is defined, the "play"
+button/menu jumps straight to the A position."
+
--- xmms/about.c	2003-11-18 21:15:59.000000000 +0100
+++ xmms/about.c.oden	2003-11-18 21:15:21.000000000 +0100
@@ -73,6 +73,7 @@
 	N_("Chris Wilson"),
 	N_("Dave Yearke"),
 	N_("Stephan K. Zitz"),
+	N_("Rodrigo Martins de Matos Ventura (the A-B patch)"),
 	NULL,
  N_("Homepage and Graphics:"),
 	N_("Thomas Nilsson"),
--- xmms/main.c	2002-02-27 15:30:28.000000000 +0100
+++ xmms/main.c.oden	2003-11-12 15:23:36.000000000 +0100
@@ -56,8 +56,8 @@
 SButton *mainwin_srew, *mainwin_splay, *mainwin_spause, *mainwin_sstop,
        *mainwin_sfwd, *mainwin_seject, *mainwin_about;
 TButton *mainwin_shuffle, *mainwin_repeat, *mainwin_eq, *mainwin_pl;
-TextBox *mainwin_info, *mainwin_rate_text, *mainwin_freq_text, *mainwin_stime_min,
-       *mainwin_stime_sec;
+TextBox *mainwin_info, *mainwin_rate_text, *mainwin_freq_text, *mainwin_ab_text,
+       *mainwin_stime_min,*mainwin_stime_sec;
 MenuRow *mainwin_menurow;
 HSlider *mainwin_volume, *mainwin_balance, *mainwin_position, *mainwin_sposition = NULL;
 MonoStereo *mainwin_monostereo;
@@ -80,6 +80,9 @@
 static gchar *mainwin_title_text = NULL;
 static gboolean mainwin_info_text_locked = FALSE;
 
+static int ab_position_a = -1;
+static int ab_position_b = -1;
+
 #if 0
 /* For x11r5 session management */
 static gchar **restart_argv;
@@ -259,7 +262,7 @@
 	MAINWIN_GENERAL_STOPFADE, MAINWIN_GENERAL_BACK5SEC,
 	MAINWIN_GENERAL_FWD5SEC, MAINWIN_GENERAL_START, MAINWIN_GENERAL_BACK10,
 	MAINWIN_GENERAL_FWD10, MAINWIN_GENERAL_JTT, MAINWIN_GENERAL_JTF,
-	MAINWIN_GENERAL_EXIT
+	MAINWIN_GENERAL_EXIT, MAINWIN_GENERAL_SETAB, MAINWIN_GENERAL_CLEARAB
 };
 
 void mainwin_general_menu_callback(gpointer cb_data, guint action, GtkWidget * w);
@@ -294,6 +297,9 @@
 	{N_("/Playback/-"), NULL, NULL, 0, "<Separator>"},
 	{N_("/Playback/Jump to Time"), "<control>J", mainwin_general_menu_callback, MAINWIN_GENERAL_JTT, "<Item>"},
 	{N_("/Playback/Jump to File"), "J", mainwin_general_menu_callback, MAINWIN_GENERAL_JTF, "<Item>"},
+	{N_("/Playback/-"), NULL, NULL, 0, "<Separator>"},
+        {N_("/Playback/Set A-B"), "A", mainwin_general_menu_callback, MAINWIN_GENERAL_SETAB, "<Item>"},
+        {N_("/Playback/Clear A-B"), "S", mainwin_general_menu_callback, MAINWIN_GENERAL_CLEARAB, "<Item>"},
 	{N_("/Visualization"), NULL, NULL, 0, "<Item>"},
 	{N_("/-"), NULL, NULL, 0, "<Separator>"},
 	{N_("/Exit"), NULL, mainwin_general_menu_callback, MAINWIN_GENERAL_EXIT, "<Item>"}
@@ -1931,6 +1937,8 @@
 
 void mainwin_play_pushed(void)
 {
+        if (-1!=ab_position_a)
+                input_seek(ab_position_a/1000);
 	if (get_input_paused())
 	{
 		input_pause();
@@ -2447,7 +2455,26 @@
 		break;
 	case MAINWIN_GENERAL_EXIT:
 		mainwin_quit_cb();
-		break;
+		break;	
+        case MAINWIN_GENERAL_SETAB:
+                if (playlist_get_current_length() != -1)
+                        if (-1==ab_position_a) {
+              			ab_position_a = input_get_time();
+              			ab_position_b = -1;
+            		} else if (-1==ab_position_b) {
+                                int time=input_get_time();
+                                if (time>ab_position_a) ab_position_b=time;
+        		} else {
+              			ab_position_a = input_get_time();
+              			ab_position_b = -1;
+            		}
+                break;
+        case MAINWIN_GENERAL_CLEARAB:
+                if (playlist_get_current_length() != -1) {
+                        ab_position_a = -1;
+                        ab_position_b = -1;
+                }
+                break;
 	}
 }
 
@@ -2756,6 +2783,7 @@
 	textbox_set_xfont(mainwin_info, cfg.mainwin_use_xfont, cfg.mainwin_font);
 	mainwin_rate_text = create_textbox(&mainwin_wlist, mainwin_bg, mainwin_gc, 111, 43, 15, 0, SKIN_TEXT);
 	mainwin_freq_text = create_textbox(&mainwin_wlist, mainwin_bg, mainwin_gc, 156, 43, 10, 0, SKIN_TEXT);
+	mainwin_ab_text = create_textbox(&mainwin_wlist, mainwin_bg, mainwin_gc, 195, 43, 15, 0, SKIN_TEXT);
 
 	mainwin_menurow = create_menurow(&mainwin_wlist, mainwin_bg, mainwin_gc, 10, 22, 304, 0, 304, 44, mainwin_mr_change, mainwin_mr_release, SKIN_TITLEBAR);
 	mainwin_menurow->mr_doublesize_selected = cfg.doublesize;
@@ -2968,6 +2996,19 @@
 		}
 		else
 		{
+                        if ( -1!=ab_position_a ) {
+                                if ( -1!=ab_position_b ) {
+                                        textbox_set_text(mainwin_ab_text, "A-B");
+                                        if ( time>ab_position_b ) {
+                                                input_seek(ab_position_a/1000);
+                                        }
+                                } else {
+                                        textbox_set_text(mainwin_ab_text, "A- ");
+                                }
+                        } else {
+                                textbox_set_text(mainwin_ab_text, "   ");
+                        }
+
 			length = playlist_get_current_length();
 			playlistwin_set_time(time, length, cfg.timer_mode);
 			input_update_vis(time);
@@ -3046,6 +3087,8 @@
 	{
 		GDK_THREADS_ENTER();
 		vis_playback_stop();
+                if (-1!=ab_position_a) ab_position_a=-1;
+                if (-1!=ab_position_b) ab_position_b=-1;
 		GDK_THREADS_LEAVE();
 	}
 
--- xmms.spec	2003-08-29 21:43:00.000000000 +0200
+++ xmms.spec.oden	2003-11-18 21:27:57.000000000 +0100
@@ -13,7 +13,7 @@
 Name: xmms
 Summary: The Sound player with the WinAmp GUI
 Version: 1.2.7
-Release: 25mdk
+Release: 26mdk
 License: GPL
 Group: Sound
 URL: http://www.xmms.org/
@@ -53,6 +53,10 @@
 Patch50: xmms-1.2.5-3dse-11.patch.bz2
 Patch51: xmms-3dse-niqueluisarace.patch.bz2
 
+# rediffed from this mail:
+# http://lists.xmms.org/pipermail/xmms-devel/2002-January/002282.html
+Patch60: xmms-1.2.7-AB-repeat.diff.bz2
+
 Packager: Guillaume Cottenceau <[EMAIL PROTECTED]>
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 BuildRequires: libglib-devel libgtk+-devel libxml-devel libvorbis-devel libogg-devel
@@ -169,6 +173,9 @@
 %endif
 %patch51 -p1
 
+# rediffed from this mail:
+# http://lists.xmms.org/pipermail/xmms-devel/2002-January/002282.html
+%patch60 -p0
 
 %build
 autoconf # (gc) patched configure.in
@@ -299,7 +306,7 @@
 
 %files -f %{name}.lang
 %defattr(-, root, root)
-%doc AUTHORS COPYING NEWS README FAQ
+%doc AUTHORS COPYING NEWS README FAQ README.MDK
 %{_bindir}/xmms
 %{_bindir}/wmxmms
 %{_bindir}/xmms-shell
@@ -382,6 +389,9 @@
 %endif
 
 %changelog
+* Tue Nov 18 2003 Oden Eriksson <[EMAIL PROTECTED]> 1.2.7-26mdk
+- added P60
+
 * Fri Aug 29 2003 Pablo Saratxaga <[EMAIL PROTECTED]> 1.2.7-25mdk
 - included new translations
 

Reply via email to