From: Murray Cumming Date: Wed, 4 Apr 2007 16:50:04 +0000 (+0000) Subject: 2007-04-04 Murray Cumming X-Git-Tag: git_migration_finished~3944 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=136e8ca91dea441e09dce25175db851c51637cb3 2007-04-04 Murray Cumming * src/maemo/easysetup/modest-easysetup-wizard.c: (create_account): * src/maemo/easysetup/modest-presets.c: (modest_presets_new): * src/maemo/modest-msg-edit-window.c: (modest_msg_edit_window_insert_image): * src/modest-conf.c: (modest_conf_key_escape): * src/modest-mail-operation.c: (modest_mail_operation_send_new_mail): * src/modest-ui-actions.c: (modest_ui_actions_on_accounts), (modest_ui_actions_on_new_account): * src/widgets/modest-attachment-view.c: (update_filename_request): * src/widgets/modest-mail-header-view.c: Corrected warnings that were breaking the build, by commenting out unused variables, and a function, and by including a header. pmo-trunk-r1506 --- diff --git a/ChangeLog2 b/ChangeLog2 index e5c3531..df58198 100644 --- a/ChangeLog2 +++ b/ChangeLog2 @@ -1,5 +1,21 @@ 2007-04-04 Murray Cumming + * src/maemo/easysetup/modest-easysetup-wizard.c: (create_account): + * src/maemo/easysetup/modest-presets.c: (modest_presets_new): + * src/maemo/modest-msg-edit-window.c: + (modest_msg_edit_window_insert_image): + * src/modest-conf.c: (modest_conf_key_escape): + * src/modest-mail-operation.c: + (modest_mail_operation_send_new_mail): + * src/modest-ui-actions.c: (modest_ui_actions_on_accounts), + (modest_ui_actions_on_new_account): + * src/widgets/modest-attachment-view.c: (update_filename_request): + * src/widgets/modest-mail-header-view.c: + Corrected warnings that were breaking the build, by commenting out unused variables, + and a function, and by including a header. + +2007-04-04 Murray Cumming + * configure.ac: Define MODEST_PLATFORM_MAEMO and MODEST_PLATFORM_GNOME in config.h, so we can #ifdef around platform-specific code when necessary. * src/modest-ui-actions.c: (modest_ui_actions_on_new_account): Use MODEST_PLATFORM_MAEMO diff --git a/src/maemo/easysetup/modest-easysetup-wizard.c b/src/maemo/easysetup/modest-easysetup-wizard.c index 112c024..e2f523b 100644 --- a/src/maemo/easysetup/modest-easysetup-wizard.c +++ b/src/maemo/easysetup/modest-easysetup-wizard.c @@ -1265,8 +1265,10 @@ create_account (ModestEasysetupWizardDialog *self) protocol_authentication_outgoing = easysetup_secureauth_combo_box_get_active_secureauth ( EASYSETUP_SECUREAUTH_COMBO_BOX (self->combo_outgoing_auth)); + /* TODO: gboolean specific = gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON (self->checkbox_outgoing_smtp_specific)); + */ } diff --git a/src/maemo/easysetup/modest-presets.c b/src/maemo/easysetup/modest-presets.c index 051d284..572b9e5 100644 --- a/src/maemo/easysetup/modest-presets.c +++ b/src/maemo/easysetup/modest-presets.c @@ -94,6 +94,8 @@ modest_presets_new (const gchar *presetfile) return NULL; } + /* TODO: Unobfuscate an obfuscated file and then load it with g_key_file_load_from_data() instead. */ + if (!g_key_file_load_from_file (presets->keyfile, presetfile, G_KEY_FILE_NONE, &err)) { g_printerr ("modest: cannot open keyfile from %s:\n %s\n", presetfile, diff --git a/src/maemo/modest-msg-edit-window.c b/src/maemo/modest-msg-edit-window.c index dc6cf2f..714fe77 100644 --- a/src/maemo/modest-msg-edit-window.c +++ b/src/maemo/modest-msg-edit-window.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -860,8 +861,8 @@ modest_msg_edit_window_insert_image (ModestMsgEditWindow *window) ModestMsgEditWindowPrivate *priv; GtkWidget *dialog = NULL; - gint response; - gchar *filename; + gint response = 0; + gchar *filename = NULL; priv = MODEST_MSG_EDIT_WINDOW_GET_PRIVATE (window); diff --git a/src/modest-conf.c b/src/modest-conf.c index 4463246..183ef1b 100644 --- a/src/modest-conf.c +++ b/src/modest-conf.c @@ -384,7 +384,7 @@ gchar* modest_conf_key_escape (const gchar* key) { g_return_val_if_fail (key, NULL); - g_return_val_if_fail (strlen (key) > 0, key); + g_return_val_if_fail (strlen (key) > 0, g_strdup (key)); return gconf_escape_key (key, strlen(key)); } diff --git a/src/modest-mail-operation.c b/src/modest-mail-operation.c index 5062800..f57bd80 100644 --- a/src/modest-mail-operation.c +++ b/src/modest-mail-operation.c @@ -233,7 +233,7 @@ modest_mail_operation_send_new_mail (ModestMailOperation *self, { TnyMsg *new_msg; ModestMailOperationPrivate *priv = NULL; - GList *node = NULL; + /* GList *node = NULL; */ g_return_if_fail (MODEST_IS_MAIL_OPERATION (self)); g_return_if_fail (TNY_IS_TRANSPORT_ACCOUNT (transport_account)); diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index 8434837..29440a7 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -205,13 +205,16 @@ modest_ui_actions_on_add_to_contacts (GtkAction *action, ModestWindow *win) void modest_ui_actions_on_accounts (GtkAction *action, ModestWindow *win) { - /* GtkDialog *account_win; */ -/* account_win = GTK_DIALOG(modest_account_view_window_new ()); */ - - -/* gtk_dialog_run (account_win); */ - //gtk_widget_destroy (GTK_WIDGET(account_win)); - GtkWidget *dialog, *label; + /* This is currently only implemented for Maemo, + * because it requires a providers preset file which is not publically available. + */ +#ifdef MODEST_PLATFORM_MAEMO /* Defined in config.h */ + GtkDialog *account_win = GTK_DIALOG(modest_account_view_window_new ()); + gtk_window_set_transient_for (GTK_WINDOW (account_win), GTK_WINDOW(win)); + gtk_dialog_run (account_win); + gtk_widget_destroy (GTK_WIDGET(account_win)); +#else + GtkWidget *dialog, *label; /* Create the widgets */ @@ -234,6 +237,7 @@ modest_ui_actions_on_accounts (GtkAction *action, ModestWindow *win) gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), label); gtk_widget_show_all (dialog); +#endif /* MODEST_PLATFORM_MAEMO */ } void @@ -247,7 +251,7 @@ modest_ui_actions_on_new_account (GtkAction *action, ModestWindow *win) gtk_window_set_transient_for (GTK_WINDOW (wizard), GTK_WINDOW (win)); gtk_dialog_run (GTK_DIALOG (wizard)); gtk_widget_destroy (GTK_WIDGET (wizard)); -#endif MODEST_PLATFORM_MAEMO +#endif /* MODEST_PLATFORM_MAEMO */ } void diff --git a/src/widgets/modest-attachment-view.c b/src/widgets/modest-attachment-view.c index de8c74e..819185b 100644 --- a/src/widgets/modest-attachment-view.c +++ b/src/widgets/modest-attachment-view.c @@ -118,7 +118,7 @@ static void update_filename_request (ModestAttachmentView *self) { ModestAttachmentViewPriv *priv = MODEST_ATTACHMENT_VIEW_GET_PRIVATE (self); - gint width, height; + /* gint width, height; */ pango_layout_set_text (PANGO_LAYOUT (priv->layout_full_filename), gtk_label_get_text (GTK_LABEL (priv->filename_view)), -1); diff --git a/src/widgets/modest-mail-header-view.c b/src/widgets/modest-mail-header-view.c index 93d0e2c..5a312d4 100644 --- a/src/widgets/modest-mail-header-view.c +++ b/src/widgets/modest-mail-header-view.c @@ -122,6 +122,7 @@ activate_recpt (GtkWidget *recpt_view, const gchar *address, gpointer user_data) g_signal_emit (G_OBJECT (view), signals[RECPT_ACTIVATED_SIGNAL], 0, address); } +#if 0 /* This function is not used. murrayc. */ static void add_header (ModestMailHeaderView *widget, const gchar *field, const gchar *value) { @@ -152,6 +153,8 @@ add_header (ModestMailHeaderView *widget, const gchar *field, const gchar *value gtk_widget_show (hbox); } +#endif + static void add_recpt_header (ModestMailHeaderView *widget, const gchar *field, const gchar *value)