+static inline ThreePixbufs *
+get_account_protocol_pixbufs (ModestProtocolType protocol_type,
+ GObject *object)
+{
+ ModestProtocol *protocol;
+ const GdkPixbuf *pixbuf = NULL;
+
+ protocol = modest_protocol_registry_get_protocol_by_type (modest_runtime_get_protocol_registry (),
+ protocol_type);
+
+ if (MODEST_IS_ACCOUNT_PROTOCOL (protocol)) {
+ pixbuf = modest_account_protocol_get_icon (MODEST_ACCOUNT_PROTOCOL (protocol),
+ MODEST_ACCOUNT_PROTOCOL_ICON_FOLDER,
+ object, FOLDER_ICON_SIZE);
+ }
+
+ if (pixbuf) {
+ ThreePixbufs *retval;
+ retval = g_slice_new0 (ThreePixbufs);
+ retval->pixbuf = g_object_ref ((GObject *) pixbuf);
+ retval->pixbuf_open = g_object_ref ((GObject *) pixbuf);
+ retval->pixbuf_close = g_object_ref ((GObject *) pixbuf);
+ return retval;
+ } else {
+ return NULL;
+ }
+}
+