talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit f7b587992455c454657ffa65cb47a04c066c32c0
parent d8592a0f73658dc2e5e7fb685a81f4dda9bfe843
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Sun, 11 May 2014 21:39:51 +0200

Do not allow the compose window's slider between headers and body to hide widgets on either side.

Diffstat:
Msrc/compose.c | 6+++---
Msrc/main.c | 25++++++++++++++++++++++++-
2 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/src/compose.c b/src/compose.c @@ -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); diff --git a/src/main.c b/src/main.c @@ -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