/* Add sorting keys */
cols = modest_header_view_get_columns (header_view);
- if (cols == NULL) return;
- int sort_model_ids[6];
- int sort_ids[6];
-
+ if (cols == NULL)
+ return;
+#define SORT_ID_NUM 6
+ int sort_model_ids[SORT_ID_NUM];
+ int sort_ids[SORT_ID_NUM];
outgoing = (GPOINTER_TO_INT (g_object_get_data(G_OBJECT(cols->data), MODEST_HEADER_VIEW_COLUMN))==
MODEST_HEADER_VIEW_COLUMN_COMPACT_HEADER_OUT);
/* Look for another folder with the same name */
if (modest_tny_folder_has_subfolder_with_name (parent,
- gtk_entry_get_text (GTK_ENTRY (entry)))) {
+ gtk_entry_get_text (GTK_ENTRY (entry)),
+ TRUE)) {
+
/* Show an error */
hildon_banner_show_information (gtk_widget_get_parent (GTK_WIDGET (dialog)),
NULL, _CS("ckdg_ib_folder_already_exists"));
else
real_suggested_name = g_strdup_printf (_("mcen_ia_default_folder_name_s"),
num_str);
-
exists = modest_tny_folder_has_subfolder_with_name (parent_folder,
- real_suggested_name);
+ real_suggested_name,
+ TRUE);
if (!exists)
break;
#define NUMBER_OF_TRIES 10 /* Try approx every second, ten times. */
static gboolean
-on_timeout_check_account_is_online(gpointer user_data)
+on_timeout_check_account_is_online(CheckAccountIdleData* data)
{
- printf ("DEBUG: %s:\n", __FUNCTION__);
- CheckAccountIdleData *data = (CheckAccountIdleData*)user_data;
-
+ gboolean stop_trying = FALSE;
g_return_val_if_fail (data && data->account, FALSE);
printf ("DEBUG: %s: tny_account_get_connection_status()==%d\n", __FUNCTION__,
tny_account_get_connection_status (data->account));
- gboolean stop_trying = FALSE;
if (data && data->account &&
/* We want to wait until TNY_CONNECTION_STATUS_INIT has changed to something else,
* after which the account is likely to be usable, or never likely to be usable soon: */
data->is_online = TRUE;
stop_trying = TRUE;
- }
- else {
+ } else {
/* Give up if we have tried too many times: */
- if (data->count_tries >= NUMBER_OF_TRIES)
- {
+ if (data->count_tries >= NUMBER_OF_TRIES) {
stop_trying = TRUE;
- }
- else {
+ } else {
/* Wait for another timeout: */
++(data->count_tries);
}
GMainContext *context = NULL; /* g_main_context_new (); */
data->loop = g_main_loop_new (context, FALSE /* not running */);
- g_timeout_add (1000, on_timeout_check_account_is_online, data);
+ g_timeout_add (1000, (GSourceFunc)(on_timeout_check_account_is_online), data);
/* This main loop will run until the idle handler has stopped it: */
g_main_loop_run (data->loop);