X-Git-Url: http://vcs.maemo.org/git/?p=stopish;a=blobdiff_plain;f=src%2Fstopish.c;fp=src%2Fstopish.c;h=9b8b4947e512330c922811ef2f695f42abc69de4;hp=a201cd453b3da6f17ac4f3ec76ea9c27790f596b;hb=2c57c527ded4c22792d14500582d9833fcc6946d;hpb=5474e4a2f6f2f455bdaedb7630ba7eef8ed21db1
diff --git a/src/stopish.c b/src/stopish.c
index a201cd4..9b8b494 100644
--- a/src/stopish.c
+++ b/src/stopish.c
@@ -29,6 +29,7 @@ static GtkWidget *timerLabel = NULL;
static GtkWidget *timerHistoryLabel1 = NULL;
static GtkWidget *timerHistoryLabel2 = NULL;
static GtkWidget *timerHistoryLabel3 = NULL;
+static GtkWidget *timerHistoryLabel4 = NULL;
static GSList *historyList = NULL;
static int stopishMode = STOPISH_MODE_START;
static int timerHandle = -1;
@@ -119,9 +120,10 @@ static GtkWindow *stopish_new( void )
// main timer
timerLabel = gtk_label_new( NULL );
+ gtk_widget_set_size_request( timerLabel, -1, 150 );
gtk_label_set_markup( GTK_LABEL( timerLabel ),
"00:00:00.0" );
- gtk_container_add( GTK_CONTAINER( vBox0 ), timerLabel );
+ gtk_box_pack_start( GTK_BOX( vBox0 ), timerLabel, FALSE, FALSE, 0 );
// history area
timerHistoryLabel1 = gtk_label_new( NULL );
@@ -130,6 +132,8 @@ static GtkWindow *stopish_new( void )
gtk_box_pack_start( GTK_BOX( vBox0 ), timerHistoryLabel2, FALSE, FALSE, 0 );
timerHistoryLabel3 = gtk_label_new( NULL );
gtk_box_pack_start( GTK_BOX( vBox0 ), timerHistoryLabel3, FALSE, FALSE, 0 );
+ timerHistoryLabel4 = gtk_label_new( NULL );
+ gtk_box_pack_start( GTK_BOX( vBox0 ), timerHistoryLabel4, FALSE, FALSE, 0 );
label = gtk_label_new( NULL );
gtk_container_add( GTK_CONTAINER( vBox0 ), label );
@@ -199,6 +203,7 @@ static void reset_cb( GtkButton* button, gpointer data )
{
GSList *tempList;
char *tempString;
+ char formatString[64];
if ( stopishMode == STOPISH_MODE_RESUME )
stopish_timer_resume( );
@@ -217,15 +222,28 @@ static void reset_cb( GtkButton* button, gpointer data )
( char * ) historyList->data );
tempList = historyList;
tempList = g_slist_next( tempList );
- if ( tempList )
- gtk_label_set_text( GTK_LABEL( timerHistoryLabel2 ),
- ( char * ) tempList->data );
+ if ( tempList ) {
+ sprintf( formatString, "%s",
+ ( char * ) tempList->data );
+ gtk_label_set_markup( GTK_LABEL( timerHistoryLabel2 ),
+ formatString );
+ }
tempList = g_slist_next( tempList );
- if ( tempList )
- gtk_label_set_text( GTK_LABEL( timerHistoryLabel3 ),
- ( char * ) tempList->data );
+ if ( tempList ) {
+ sprintf( formatString, "%s",
+ ( char * ) tempList->data );
+ gtk_label_set_markup( GTK_LABEL( timerHistoryLabel3 ),
+ formatString );
+ }
+ tempList = g_slist_next( tempList );
+ if ( tempList ) {
+ sprintf( formatString, "%s",
+ ( char * ) tempList->data );
+ gtk_label_set_markup( GTK_LABEL( timerHistoryLabel4 ),
+ formatString );
+ }
- // remove the history time after the 3rd
+ // remove the history time after the 4th
tempList = g_slist_next( tempList );
if ( tempList ) {
tempString = tempList->data;