[Commits] composewindowtype.c 1.1.2.16 1.1.2.17
holger at claws-mail.org
holger at claws-mail.org
Mon Aug 27 22:25:31 CEST 2012
Update of /home/claws-mail/plugins/python/src
In directory srv:/tmp/cvs-serv27675/src
Modified Files:
Tag: gtk2
composewindowtype.c
Log Message:
2012-08-27 [holger] 0.10cvs7
* src/composewindowtype.c
Flush gtk+ events after setting widgets programatically
Index: composewindowtype.c
===================================================================
RCS file: /home/claws-mail/plugins/python/src/Attic/composewindowtype.c,v
retrieving revision 1.1.2.16
retrieving revision 1.1.2.17
diff -u -d -r1.1.2.16 -r1.1.2.17
--- composewindowtype.c 8 Aug 2012 21:50:54 -0000 1.1.2.16
+++ composewindowtype.c 27 Aug 2012 20:25:29 -0000 1.1.2.17
@@ -50,6 +50,12 @@
self->ob_type->tp_free((PyObject*)self);
}
+static void flush_gtk_queue(void)
+{
+ while(gtk_events_pending())
+ gtk_main_iteration();
+}
+
static void store_py_object(PyObject **target, PyObject *obj)
{
Py_XDECREF(*target);
@@ -137,6 +143,8 @@
return -1;
composewindow_set_compose(self, compose);
+ gtk_widget_show_all(compose->window);
+ flush_gtk_queue();
}
return 0;
}
@@ -167,7 +175,10 @@
static PyObject* ComposeWindow_set_subject(clawsmail_ComposeWindowObject *self, PyObject *args)
{
- return set_gtk_entry_from_python_object(self->compose->subject_entry, args);
+ PyObject *ret;
+ ret = set_gtk_entry_from_python_object(self->compose->subject_entry, args);
+ flush_gtk_queue();
+ return ret;
}
static PyObject* ComposeWindow_get_from(clawsmail_ComposeWindowObject *self, PyObject *args)
@@ -177,7 +188,10 @@
static PyObject* ComposeWindow_set_from(clawsmail_ComposeWindowObject *self, PyObject *args)
{
- return set_gtk_entry_from_python_object(self->compose->from_name, args);
+ PyObject *ret;
+ ret = set_gtk_entry_from_python_object(self->compose->from_name, args);
+ flush_gtk_queue();
+ return ret;
}
static PyObject* ComposeWindow_add_To(clawsmail_ComposeWindowObject *self, PyObject *args)
@@ -189,6 +203,8 @@
compose_entry_append(self->compose, ss, COMPOSE_TO, PREF_NONE);
+ flush_gtk_queue();
+
Py_INCREF(Py_None);
return Py_None;
}
@@ -202,6 +218,8 @@
compose_entry_append(self->compose, ss, COMPOSE_CC, PREF_NONE);
+ flush_gtk_queue();
+
Py_INCREF(Py_None);
return Py_None;
}
@@ -215,6 +233,8 @@
compose_entry_append(self->compose, ss, COMPOSE_BCC, PREF_NONE);
+ flush_gtk_queue();
+
Py_INCREF(Py_None);
return Py_None;
}
@@ -250,6 +270,8 @@
compose_attach_from_list(self->compose, list, FALSE);
g_list_free(list);
+ flush_gtk_queue();
+
Py_INCREF(Py_None);
return Py_None;
}
@@ -309,6 +331,8 @@
}
}
+ flush_gtk_queue();
+
Py_INCREF(Py_None);
return Py_None;
}
@@ -370,6 +394,8 @@
return NULL;
}
+ flush_gtk_queue();
+
Py_INCREF(Py_None);
return Py_None;
}
@@ -408,6 +434,8 @@
g_free(subject);
}
+ flush_gtk_queue();
+
Py_INCREF(Py_None);
return Py_None;
}
More information about the Commits
mailing list