Do not allow the compose window's slider between headers and body to hide widgets...
authorAndrej Kacian <ticho@claws-mail.org>
Sun, 11 May 2014 19:39:51 +0000 (21:39 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Sun, 11 May 2014 19:39:51 +0000 (21:39 +0200)
src/compose.c
src/main.c

index b23d091..2306477 100644 (file)
@@ -7657,7 +7657,6 @@ static Compose *compose_create(PrefsAccount *account,
        
        /* Notebook */
        notebook = gtk_notebook_new();
-       gtk_widget_set_size_request(notebook, -1, prefs_common.compose_notebook_height);
        gtk_widget_show(notebook);
 
        /* header labels and entries */
@@ -7785,8 +7784,9 @@ static Compose *compose_create(PrefsAccount *account,
        /* pane between attach clist and text */
        paned = gtk_vpaned_new();
        gtk_container_add(GTK_CONTAINER(vbox2), paned);
-       gtk_paned_add1(GTK_PANED(paned), notebook);
-       gtk_paned_add2(GTK_PANED(paned), edit_vbox);
+       gtk_paned_pack1(GTK_PANED(paned), notebook, FALSE, FALSE);
+       gtk_paned_pack2(GTK_PANED(paned), edit_vbox, TRUE, FALSE);
+       gtk_paned_set_position(GTK_PANED(paned), prefs_common.compose_notebook_height);
        gtk_widget_show_all(paned);
 
 
index 0b62821..e042115 100644 (file)
@@ -957,7 +957,29 @@ static void reset_statistics(void)
        session_stats.forwarded = 0;
        session_stats.time_started = time(NULL);
 }
-               
+
+static void test_strftime(void)
+{
+       int i;
+       char buf[64];
+       time_t dummy = time(NULL);
+       struct tm tbuf;
+       struct tm *lt = localtime_r(&dummy, &tbuf);
+
+       {
+       START_TIMING("fast_strftime");
+       for (i = 0; i < 100000; i++)
+               fast_strftime(buf, 64, "%x %X %r", lt);
+       END_TIMING();
+       }
+       {
+       START_TIMING("strftime");
+       for (i = 0; i < 100000; i++)
+               strftime(buf, 64, "%x %X %r", lt);
+       END_TIMING();
+       }
+}
+
 int main(int argc, char *argv[])
 {
 #ifdef HAVE_DBUS_GLIB
@@ -1552,6 +1574,7 @@ int main(int argc, char *argv[])
 
        END_TIMING();
 
+       test_strftime();
        gtk_main();
 
 #ifdef HAVE_NETWORKMANAGER_SUPPORT