11.06.11 18:59, Maksym Veremeyenko написав(ла):
Hi,

next e-mails will be attached with a patches makes (IMHO) more
comfortable work with rugen.

[...]
*0005-split-status-string-format-for-status-string-and-sta.patch* - use
another formatting of status string for status line and units list


--
________________________________________
Maksym Veremeyenko
>From 11eaa4b7c688211e0cd65880990ce6debada0d8c Mon Sep 17 00:00:00 2001
From: Maksym Veremeyenko <ve...@m1stereo.tv>
Date: Sat, 11 Jun 2011 18:30:57 +0300
Subject: [PATCH 5/6] split status string format for 'status string' and
 'status plane'

---
 src/page_status.c |   26 +++++++++++++++++---------
 1 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/src/page_status.c b/src/page_status.c
index aec2168..1047ec6 100644
--- a/src/page_status.c
+++ b/src/page_status.c
@@ -68,22 +68,29 @@ static char* status_to_text( mvcp_status status )
 	return "unknown";
 }
 
+static void format_status_string(char* buf, int size, mvcp_status status , char* sep)
+{
+	char tc1[12], tc2[12], tc3[12];
+
+	snprintf( buf, size,
+		"[%s]%sIN:%s%sPOS:%s%sOUT:%s%s%s%s",
+		status_to_text( status ), sep,
+		frames2tc(status->in,       status->fps, tc1), sep,
+		frames2tc(status->position, status->fps, tc2), sep,
+		frames2tc(status->out,      status->fps, tc3), sep,
+		status->clip, sep
+	);
+
+}
+
 static int show_status( page_status this, mvcp_status status )
 {
 	GtkWidget *widget = this_page_get_widget( ( page )this );
 	char temp[ 1024 ] = "";
 	char temp2[ 1024 ];
 	char label_name[ 256 ];
-	char tc1[12], tc2[12], tc3[12];
-
-	sprintf( temp, "[%s] IN:%s POS:%s OUT:%s %s",
-		status_to_text( status ),
-		frames2tc(status->in,       status->fps, tc1),
-		frames2tc(status->position, status->fps, tc2),
-		frames2tc(status->out,      status->fps, tc3),
-		status->clip
-	);
 
+	format_status_string(temp, sizeof(temp), status , "\n");
 	sprintf( label_name, "label_unit_%d", status->unit );
 
 	gdk_threads_enter();
@@ -91,6 +98,7 @@ static int show_status( page_status this, mvcp_status status )
 	gtk_label_set_text( GTK_LABEL( widget ), temp );
 	if ( status->unit == dv1394app_get_selected_unit( this->app ) )
 	{
+		format_status_string(temp, sizeof(temp), status , " ");
 		sprintf( temp2, "U%d - %s", status->unit, temp );
 		widget = lookup_widget( dv1394app_get_widget( this->app ), "statusbar" );
 		gtk_statusbar_pop( GTK_STATUSBAR( widget ), this->context );
-- 
1.7.4.4

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to