/* Get any already-associated connection-specific server account: */
gchar *server_account_name = NULL;
server_account_name = modest_account_mgr_get_connection_specific_smtp (
- priv->account_manager, connection_name);
+ priv->account_manager, connection_id);
/* Add the row to the model: */
GtkTreeIter iter;
/* associate the specific server account with this connection for this account: */
success = success && modest_account_mgr_set_connection_specific_smtp (
- priv->account_manager, connection_name, server_account_name);
+ priv->account_manager, id, server_account_name);
/* Save the new name in the treemodel, so it can be edited again later: */
gtk_list_store_set (GTK_LIST_STORE (priv->model), &iter,
} else {
modest_account_mgr_save_server_settings (mgr, server_settings);
}
- } else if (connection_name && server_name &&
+ } else if (id && server_name &&
!strcmp (server_name, _("mcen_ia_optionalsmtp_notdefined"))) {
modest_account_mgr_remove_connection_specific_smtp (priv->account_manager,
- connection_name);
+ id);
gtk_list_store_set (GTK_LIST_STORE (priv->model), &iter,
MODEL_COL_SERVER_ACCOUNT_NAME, NULL, -1);
}
gboolean modest_account_mgr_set_connection_specific_smtp (ModestAccountMgr *self,
- const gchar* connection_name, const gchar* server_account_name)
+ const gchar* connection_id, const gchar* server_account_name)
{
- modest_account_mgr_remove_connection_specific_smtp (self, connection_name);
+ modest_account_mgr_remove_connection_specific_smtp (self, connection_id);
ModestConf *conf = MODEST_ACCOUNT_MGR_GET_PRIVATE (self)->modest_conf;
result = FALSE;
} else {
/* The server account is in the item after the connection name: */
- list = g_slist_append (list, (gpointer)connection_name);
+ list = g_slist_append (list, (gpointer)connection_id);
list = g_slist_append (list, (gpointer)server_account_name);
/* Reset the changed list: */
* modest_account_mgr_remove_connection_specific_smtp
* @self: a ModestAccountMgr instance
* @name: the account name
- * @connection_name: A libconic IAP connection name
+ * @connection_id: A libconic IAP connection id
*
* Disassacoiate a server account to use with the specific connection for this account.
*
* Returns: TRUE if it worked, FALSE otherwise
*/
gboolean modest_account_mgr_remove_connection_specific_smtp (ModestAccountMgr *self,
- const gchar* connection_name)
+ const gchar* connection_id)
{
ModestAccountMgrPrivate *priv = MODEST_ACCOUNT_MGR_GET_PRIVATE (self);
gboolean result = TRUE;
GError *err = NULL;
GSList *list = modest_conf_get_list (priv->modest_conf,
- MODEST_CONF_CONNECTION_SPECIFIC_SMTP_LIST,
- MODEST_CONF_VALUE_STRING, &err);
+ MODEST_CONF_CONNECTION_SPECIFIC_SMTP_LIST,
+ MODEST_CONF_VALUE_STRING, &err);
if (err) {
g_printerr ("modest: %s: error getting list: %s.\n", __FUNCTION__, err->message);
g_error_free (err);
return FALSE;
/* The server account is in the item after the connection name: */
- GSList *list_connection = g_slist_find_custom (list, connection_name, (GCompareFunc)strcmp);
+ GSList *list_connection = g_slist_find_custom (list, connection_id, (GCompareFunc)strcmp);
if (list_connection) {
GSList *account_node = g_slist_next (list_connection);
/* remove both items: */
/**
* modest_account_mgr_get_connection_specific_smtp
* @self: a ModestAccountMgr instance
- * @connection_name: A libconic IAP connection name
+ * @connection_id: A libconic IAP connection id
*
* Retrieve a server account to use with this specific connection for this account.
*
* Returns: a server account name to use for this connection, or NULL if none is specified.
*/
-gchar* modest_account_mgr_get_connection_specific_smtp (ModestAccountMgr *self, const gchar* connection_name)
+gchar* modest_account_mgr_get_connection_specific_smtp (ModestAccountMgr *self, const gchar* connection_id)
{
gchar *result = NULL;
/* The server account is in the item after the connection name: */
GSList *iter = list;
while (iter) {
- const gchar* this_connection_name = (const gchar*)(iter->data);
- if (strcmp (this_connection_name, connection_name) == 0) {
+ const gchar* this_connection_id = (const gchar*)(iter->data);
+ if (strcmp (this_connection_id, connection_id) == 0) {
iter = g_slist_next (iter);
if (iter) {
/*
if (!result) {
- printf (" debug: no server found for connection_name=%s.\n", connection_name);
+ printf (" debug: no server found for connection_id=%s.\n", connection_id);
}
*/
/**
* modest_account_mgr_set_connection_specific_smtp
* @self: a ModestAccountMgr instance
- * @connection_name: A libconic IAP connection name
+ * @connection_id: A libconic IAP connection name
* @server_account_name: a server account name to use for this connection.
*
* Specify a server account to use with the specific connection for this account.
* Returns: TRUE if it worked, FALSE otherwise
*/
gboolean modest_account_mgr_set_connection_specific_smtp (ModestAccountMgr *self,
- const gchar* connection_name, const gchar* server_account_name);
+ const gchar* connection_id, const gchar* server_account_name);
/**
* modest_account_mgr_remove_connection_specific_smtp
* @self: a ModestAccountMgr instance
- * @connection_name: A libconic IAP connection name
+ * @connection_id: A libconic IAP connection name
*
* Disassociate a server account to use with the specific connection for this account.
*
* Returns: TRUE if it worked, FALSE otherwise
*/
gboolean modest_account_mgr_remove_connection_specific_smtp (ModestAccountMgr *self,
- const gchar* connection_name);
+ const gchar* connection_id);
/**
* modest_account_mgr_get_use_connection_specific_smtp
/**
* modest_account_mgr_get_connection_specific_smtp
* @self: a ModestAccountMgr instance
- * @connection_name: A libconic IAP connection name
+ * @connection_id: A libconic IAP connection id
*
* Retrieve a server account to use with this specific connection for this account.
*
* Returns: a server account name to use for this connection, or NULL if none is specified.
*/
gchar* modest_account_mgr_get_connection_specific_smtp (ModestAccountMgr *self,
- const gchar* connection_name);
+ const gchar* connection_id);
/**
if (!connection)
return NULL;
- const gchar *connection_name = con_ic_iap_get_name (connection);
- /* printf ("DEBUG: %s: connection_name=%s\n", __FUNCTION__, connection_name); */
- if (!connection_name)
+ const gchar *connection_id = con_ic_iap_get_id (connection);
+ /* printf ("DEBUG: %s: connection_id=%s\n", __FUNCTION__, connection_id); */
+ if (!connection_id)
return NULL;
/* Get the connection-specific transport acccount, if any: */
}
gchar* server_account_name = modest_account_mgr_get_connection_specific_smtp (account_manager,
- connection_name);
+ connection_id);
/* printf ("DEBUG: %s: server_account_name=%s\n", __FUNCTION__, server_account_name); */
if (!server_account_name) {
if (!dimmed) {
ModestEmailClipboard *e_clipboard = modest_runtime_get_email_clipboard ();
+ const gchar *clipboard_text = modest_msg_edit_window_get_clipboard_text (MODEST_MSG_EDIT_WINDOW (win));
+
dimmed = modest_email_clipboard_cleared (e_clipboard) &&
- (modest_msg_edit_window_get_clipboard_text(MODEST_MSG_EDIT_WINDOW (win)) == NULL) &&
- !gtk_clipboard_wait_is_text_available(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD));
+ ((clipboard_text == NULL) || (clipboard_text[0] == '\0'));
}
return dimmed;
priv = MODEST_WINDOW_MGR_GET_PRIVATE (self);
priv->banner_counter++;
- g_message ("REGISTER BANNER -> %d", priv->banner_counter);
}
priv = MODEST_WINDOW_MGR_GET_PRIVATE (self);
priv->banner_counter--;
- g_message ("UNREGISTER BANNER -> %d", priv->banner_counter);
if (priv->window_list == NULL && priv->banner_counter == 0) {
g_signal_emit (self, signals[WINDOW_LIST_EMPTY_SIGNAL], 0);
- g_message ("WINDOW LIST EMPTY");
}
}