[Commits] [SCM] claws branch, master, updated. 3.9.3-183-g668e757

ticho at claws-mail.org ticho at claws-mail.org
Mon May 12 19:05:52 CEST 2014


The branch master of project "claws" (Claws Mail) has been updated
       via  668e757b052ca98a6d26e453d19b00d10a0640a9 (commit)
       via  13b8ca1a51e99deed9e350865fc421216914efff (commit)
      from  a5a06781957dde46bf24e75d0c2e9919a980ea54 (commit)


- Log -----------------------------------------------------------------
commit 668e757b052ca98a6d26e453d19b00d10a0640a9
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Mon May 12 19:03:19 2014 +0200

    Use the GtkPaned's position value to store compose_notebook_height, since setting this position is what we're using it for now. Since GtkPaned doesn't have any "resize done" signal available, we have to do it in the notebook's "size-allocate" callback.

diff --git a/src/compose.c b/src/compose.c
index 7a1f177..3e98f2b 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -368,7 +368,7 @@ static void compose_add_field_list	( Compose *compose,
 
 static void compose_notebook_size_alloc (GtkNotebook *notebook,
 					 GtkAllocation *allocation,
-					 Compose *compose);
+					 GtkPaned *paned);
 static gboolean compose_edit_size_alloc (GtkEditable	*widget,
 					 GtkAllocation	*allocation,
 					 GtkSHRuler	*shruler);
@@ -7747,8 +7747,6 @@ static Compose *compose_create(PrefsAccount *account,
 	gtk_text_buffer_add_selection_clipboard(buffer, clipboard);
 	
 	gtk_container_add(GTK_CONTAINER(scrolledwin), text);
-	g_signal_connect(G_OBJECT(notebook), "size_allocate",
-			 G_CALLBACK(compose_notebook_size_alloc), compose);	
 	g_signal_connect_after(G_OBJECT(text), "size_allocate",
 			       G_CALLBACK(compose_edit_size_alloc),
 			       ruler);
@@ -7788,6 +7786,9 @@ static Compose *compose_create(PrefsAccount *account,
 	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);
+	g_signal_connect(G_OBJECT(notebook), "size_allocate",
+			 G_CALLBACK(compose_notebook_size_alloc), paned);
+
 	gtk_widget_show_all(paned);
 
 
@@ -9411,9 +9412,9 @@ static void compose_undo_state_changed(UndoMain *undostruct, gint undo_state,
 
 static void compose_notebook_size_alloc(GtkNotebook *notebook,
 					GtkAllocation *allocation,
-					Compose *compose)
+					GtkPaned *paned)
 {
-	prefs_common.compose_notebook_height = allocation->height;
+	prefs_common.compose_notebook_height = gtk_paned_get_position(paned);
 }
 
 /* compose_edit_size_alloc() - called when resized. don't know whether Gtk

commit 13b8ca1a51e99deed9e350865fc421216914efff
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Mon May 12 18:48:47 2014 +0200

    Remove test_strftime() that was mistakenly included in previous commits.

diff --git a/src/main.c b/src/main.c
index e042115..26c7e18 100644
--- a/src/main.c
+++ b/src/main.c
@@ -958,28 +958,6 @@ static void reset_statistics(void)
 	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
@@ -1574,7 +1552,6 @@ int main(int argc, char *argv[])
 
 	END_TIMING();
 
-	test_strftime();
 	gtk_main();
 
 #ifdef HAVE_NETWORKMANAGER_SUPPORT

-----------------------------------------------------------------------

Summary of changes:
 src/compose.c |   11 ++++++-----
 src/main.c    |   23 -----------------------
 2 files changed, 6 insertions(+), 28 deletions(-)


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list