+2007-05-21 Murray Cumming <murrayc@murrayc.com>
+
+ * src/modest-tny-account-store.c: (modest_tny_account_store_alert):
+ Show a OK/Cancel dialog if the error is a question, though we still do not
+ know anything more about what we are asking the user.
+ * src/widgets/modest-folder-view.c: (on_drag_data_received):
+ Fix an uninitialized variable (helper). This is a logic error, however.
+
2007-05-21 Christian Kellner <ckellner@openismus.com>
* src/modest-search.h:
if (!prompt)
return FALSE;
- gboolean retval = FALSE;
#ifdef MODEST_PLATFORM_MAEMO
/* The Tinymail documentation says that we should show Yes and No buttons,
- * but these never seem to be questions: */
- GtkWidget *dialog = GTK_WIDGET (hildon_note_new_information (NULL, prompt));
+ * when it is a question.
+ * Obviously, we need tinymail to use more specific error codes instead,
+ * so we know what buttons to show. */
+ GtkWidget *dialog = NULL;
+ if (question) {
+ dialog = GTK_WIDGET (hildon_note_new_confirmation (NULL,
+ prompt));
+ } else {
+ dialog = GTK_WIDGET (hildon_note_new_information (NULL,
+ prompt));
+ }
#else
GtkMessageType gtktype = GTK_MESSAGE_ERROR;
gtktype, GTK_BUTTONS_YES_NO, prompt);
#endif /* #ifdef MODEST_PLATFORM_MAEMO */
- if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_YES)
- retval = TRUE;
-
-#ifdef MODEST_PLATFORM_MAEMO
- /* FIXME: for mameo, assume it's ok; thus, we can get passed
- * SSL cert notes etc.
- */
- retval = TRUE;
-#endif /*MODEST_PLATFORM_MAEMO*/
+ gboolean retval = TRUE;
+ const int response = gtk_dialog_run (GTK_DIALOG (dialog));
+ if (question) {
+ retval = (response == GTK_RESPONSE_YES) ||
+ (response == GTK_RESPONSE_OK);
+ }
-
gtk_widget_destroy (dialog);
/* TODO: Don't free this when we no longer strdup the message for testers. */
g_free (prompt);
-
+ printf("DEBUG: %s: returning %d\n", __FUNCTION__, retval);
return retval;
}
GtkTreePath *source_row, *dest_row;
GtkTreeViewDropPosition pos;
gboolean success = FALSE, delete_source = FALSE;
- DndHelper *helper;
+ DndHelper *helper = NULL;
/* Do not allow further process */
g_signal_stop_emission_by_name (widget, "drag-data-received");
won't longer exist. We can not wait for the end of
the operation, because the operation won't start if
the folder is in use */
- if (helper->delete_source && source_widget == widget)
+ /* TODO: helper was not instantiated before here: */
+ if (helper && helper->delete_source && source_widget == widget)
g_signal_emit (G_OBJECT (widget),
signals[FOLDER_SELECTION_CHANGED_SIGNAL], 0, NULL, TRUE);
}