Wrap timer string for now. Bug #4913
[stopish] / src / stopish.c
index e44879d..bf561d6 100644 (file)
@@ -166,6 +166,10 @@ static GtkWindow *stopish_new( void )
                           "<span font_family=\"monospace\" "
                           "size=\"70000\" weight=\"ultrabold\">"
                           "00:00:00.0</span>" );
+    gtk_widget_set_size_request( timerLabel, 700, -1 );
+    gtk_label_set_line_wrap( GTK_LABEL( timerLabel ), TRUE );
+    gtk_label_set_line_wrap_mode( GTK_LABEL( timerLabel ), PANGO_WRAP_CHAR );
+    gtk_misc_set_alignment( GTK_MISC( timerLabel ), 1.0f, 0.5f );
     gtk_container_add( GTK_CONTAINER( vBox0 ), timerLabel );
 
     // history area
@@ -379,12 +383,16 @@ static DBusHandlerResult mce_filter_func( DBusConnection * connection,
             dbus_message_iter_get_basic( &iter, &rotation );
 
             // Rotate main window
-            if ( !strcmp( rotation, MCE_ORIENTATION_PORTRAIT ) )
+            if ( !strcmp( rotation, MCE_ORIENTATION_PORTRAIT ) ) {
                 hildon_gtk_window_set_portrait_flags( GTK_WINDOW( appdata.main_window ),
                                                       HILDON_PORTRAIT_MODE_REQUEST );
-            else
+                gtk_widget_set_size_request( timerLabel, 400, -1 );
+            }
+            else {
                 hildon_gtk_window_set_portrait_flags( GTK_WINDOW( appdata.main_window ),
                                                       ~HILDON_PORTRAIT_MODE_REQUEST );
+                gtk_widget_set_size_request( timerLabel, 700, -1 );
+            }
         }
         else
             g_printerr( "ERROR: dbus_message_iter_init() failed.\n" );