[Commits] [SCM] claws branch, master, updated. 3.10.1-123-gae895c8

holger at claws-mail.org holger at claws-mail.org
Thu Jul 10 21:27:04 CEST 2014


#	This is an automated email from the git hooks/post-receive script. It was
#	generated because a ref change was pushed to the repository containing
#	the project "claws" (Claws Mail).

The branch, master has been updated
       via  ae895c83393ec495cdf3454de4ff12e89dcc65c8 (commit)
      from  c3b1f98e46c26df4d33de4b280960b301c0555a6 (commit)

Summary of changes:
 src/plugins/python/composewindowtype.c |   18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)


- Log -----------------------------------------------------------------
commit ae895c83393ec495cdf3454de4ff12e89dcc65c8
Author: Holger Berndt <hb at claws-mail.org>
Date:   Thu Jul 10 21:15:58 2014 +0200

    Python plugin: Fix ComposeWindow.get_account_selection

diff --git a/src/plugins/python/composewindowtype.c b/src/plugins/python/composewindowtype.c
index 65ba864..d07a735 100644
--- a/src/plugins/python/composewindowtype.c
+++ b/src/plugins/python/composewindowtype.c
@@ -344,23 +344,11 @@ static PyObject* ComposeWindow_add_header(clawsmail_ComposeWindowObject *self, P
   return Py_None;
 }
 
-/* this is pretty ugly, as the compose struct does not maintain a pointer to the account selection combo */
 static PyObject* ComposeWindow_get_account_selection(clawsmail_ComposeWindowObject *self, PyObject *args)
 {
-  GList *children, *walk;
-
-  children = gtk_container_get_children(GTK_CONTAINER(self->compose->header_table));
-  for(walk = children; walk; walk = walk->next) {
-    if(GTK_IS_HBOX(walk->data)) {
-      GList *children2, *walk2;
-      children2 = gtk_container_get_children(GTK_CONTAINER(walk->data));
-      for(walk2 = children2; walk2; walk2 = walk2->next) {
-        if(GTK_IS_EVENT_BOX(walk2->data)) {
-          return get_gobj_from_address(gtk_container_get_children(GTK_CONTAINER(walk2->data))->data);
-        }
-      }
-    }
-  }
+  if(GTK_IS_COMBO_BOX(self->compose->account_combo))
+    return get_gobj_from_address(self->compose->account_combo);
+
   Py_INCREF(Py_None);
   return Py_None;
 }

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list