From: Murray Cumming Date: Mon, 27 Aug 2007 12:38:29 +0000 (+0000) Subject: 2007-08-27 Murray Cumming X-Git-Tag: git_migration_finished~2512 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=1c8928c2d9bf74d0df67eacf38aaf4947800dfb5 2007-08-27 Murray Cumming * src/maemo/modest-account-settings-dialog.c: (modest_account_settings_dialog_init): * src/maemo/modest-connection-specific-smtp-edit-window.c: (modest_connection_specific_smtp_edit_window_init): * src/maemo/modest-connection-specific-smtp-window.c: (modest_connection_specific_smtp_window_init): * src/maemo/modest-maemo-utils.c: (modest_maemo_utils_get_supported_secure_authentication_methods): * src/maemo/modest-platform.c: (modest_platform_run_folder_name_dialog): * src/maemo/modest-signature-editor-dialog.c: (modest_signature_editor_dialog_init): * src/modest-ui-actions.c: (modest_ui_actions_on_item_not_found), (modest_ui_actions_on_password_requested), (create_move_to_dialog): * src/widgets/modest-global-settings-dialog.c: (modest_global_settings_dialog_init): Replace all uses of GTK_STOCK_OK (and GTK_BUTTONS_OK) with mcen_bd_dialog_ok, GTK_STOCK_CANCEL with mcen_bd_dialog_cancel, GTK_STOCK_EDIT with mcen_bd_edit, and GTK_STOCK_CLOSE with mcen_bd_close, to fix projects.maemo.org bug NB#64995. I strongly believe that Maemo's GTK+ should have the wanted translations instead of duplicating this in each application and complicating the code. pmo-trunk-r3092 --- diff --git a/ChangeLog b/ChangeLog index e326753..acb6b92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1 @@ -2007-08-27 Murray Cumming,,, - - reviewed by: - - * src/dbus_api/modest-dbus-callbacks.c: - * src/modest-search.c: (on_timeout_check_account_is_online), - (check_and_wait_for_account_is_online), - (modest_search_all_accounts): - * please check the svn log instead diff --git a/ChangeLog2 b/ChangeLog2 index 444adae..ead5f93 100644 --- a/ChangeLog2 +++ b/ChangeLog2 @@ -1,3 +1,30 @@ +2007-08-27 Murray Cumming + + * src/maemo/modest-account-settings-dialog.c: + (modest_account_settings_dialog_init): + * src/maemo/modest-connection-specific-smtp-edit-window.c: + (modest_connection_specific_smtp_edit_window_init): + * src/maemo/modest-connection-specific-smtp-window.c: + (modest_connection_specific_smtp_window_init): + * src/maemo/modest-maemo-utils.c: + (modest_maemo_utils_get_supported_secure_authentication_methods): + * src/maemo/modest-platform.c: + (modest_platform_run_folder_name_dialog): + * src/maemo/modest-signature-editor-dialog.c: + (modest_signature_editor_dialog_init): + * src/modest-ui-actions.c: (modest_ui_actions_on_item_not_found), + (modest_ui_actions_on_password_requested), (create_move_to_dialog): + * src/widgets/modest-global-settings-dialog.c: + (modest_global_settings_dialog_init): + Replace all uses of GTK_STOCK_OK (and GTK_BUTTONS_OK) with + mcen_bd_dialog_ok, + GTK_STOCK_CANCEL with mcen_bd_dialog_cancel, + GTK_STOCK_EDIT with mcen_bd_edit, and + GTK_STOCK_CLOSE with mcen_bd_close, + to fix projects.maemo.org bug NB#64995. + I strongly believe that Maemo's GTK+ should have the wanted translations + instead of duplicating this in each application and complicating the code. + 2007-08-27 Armin Burgmeier * src/maemo/modest-msg-edit-window.c: Fixed a crash due to endless diff --git a/src/maemo/modest-account-settings-dialog.c b/src/maemo/modest-account-settings-dialog.c index 12656cb..2fce90b 100644 --- a/src/maemo/modest-account-settings-dialog.c +++ b/src/maemo/modest-account-settings-dialog.c @@ -1175,8 +1175,8 @@ modest_account_settings_dialog_init (ModestAccountSettingsDialog *self) gtk_widget_show (GTK_WIDGET (self->notebook)); /* Add the buttons: */ - gtk_dialog_add_button (GTK_DIALOG(self), GTK_STOCK_OK, GTK_RESPONSE_OK); - gtk_dialog_add_button (GTK_DIALOG(self), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); + gtk_dialog_add_button (GTK_DIALOG(self), _("mcen_bd_dialog_ok"), GTK_RESPONSE_OK); + gtk_dialog_add_button (GTK_DIALOG(self), _("mcen_bd_dialog_cancel"), GTK_RESPONSE_CANCEL); /* Connect to the dialog's response signal: */ /* We use connect-before diff --git a/src/maemo/modest-connection-specific-smtp-edit-window.c b/src/maemo/modest-connection-specific-smtp-edit-window.c index 4ea4209..845aec9 100644 --- a/src/maemo/modest-connection-specific-smtp-edit-window.c +++ b/src/maemo/modest-connection-specific-smtp-edit-window.c @@ -317,8 +317,8 @@ modest_connection_specific_smtp_edit_window_init (ModestConnectionSpecificSmtpEd on_combo_security_changed (GTK_COMBO_BOX (priv->combo_outgoing_security), self); /* Add the buttons: */ - gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_OK, GTK_RESPONSE_OK); - gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); + gtk_dialog_add_button (GTK_DIALOG (self), _("mcen_bd_dialog_ok"), GTK_RESPONSE_OK); + gtk_dialog_add_button (GTK_DIALOG (self), _("mcen_bd_dialog_cancel"), GTK_RESPONSE_CANCEL); priv->is_dirty = FALSE; priv->range_error_occured = FALSE; diff --git a/src/maemo/modest-connection-specific-smtp-window.c b/src/maemo/modest-connection-specific-smtp-window.c index 59eb8af..be4ad5c 100644 --- a/src/maemo/modest-connection-specific-smtp-window.c +++ b/src/maemo/modest-connection-specific-smtp-window.c @@ -428,13 +428,13 @@ modest_connection_specific_smtp_window_init (ModestConnectionSpecificSmtpWindow gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, MODEST_MARGIN_HALF); gtk_widget_show (hbox); - priv->button_edit = gtk_button_new_from_stock (GTK_STOCK_EDIT); + priv->button_edit = gtk_button_new_from_stock (_("mcen_bd_edit")); gtk_box_pack_start (GTK_BOX (hbox), priv->button_edit, TRUE, FALSE, MODEST_MARGIN_HALF); gtk_widget_show (priv->button_edit); g_signal_connect (G_OBJECT (priv->button_edit), "clicked", G_CALLBACK (on_button_edit), self); - GtkWidget *button_cancel = gtk_button_new_from_stock (GTK_STOCK_CLOSE); + GtkWidget *button_cancel = gtk_button_new_from_stock (_("mcen_bd_close")); gtk_box_pack_start (GTK_BOX (hbox), button_cancel, TRUE, FALSE, MODEST_MARGIN_HALF); gtk_widget_show (button_cancel); g_signal_connect (G_OBJECT (button_cancel), "clicked", diff --git a/src/maemo/modest-maemo-utils.c b/src/maemo/modest-maemo-utils.c index 61976c9..c21f44b 100644 --- a/src/maemo/modest-maemo-utils.c +++ b/src/maemo/modest-maemo-utils.c @@ -440,9 +440,10 @@ GList* modest_maemo_utils_get_supported_secure_authentication_methods (ModestTra info->cancel = FALSE; info->error = NULL; info->progress = gtk_progress_bar_new(); + /* TODO: Need logical_ID for the title: */ info->dialog = gtk_dialog_new_with_buttons(_("Authentication"), parent_window, GTK_DIALOG_MODAL, - GTK_STOCK_CANCEL, + _("mcen_bd_dialog_cancel"), GTK_RESPONSE_REJECT, NULL); //gtk_window_set_default_size(GTK_WINDOW(info->dialog), 300, 100); diff --git a/src/maemo/modest-platform.c b/src/maemo/modest-platform.c index 9338c34..dc32449 100644 --- a/src/maemo/modest-platform.c +++ b/src/maemo/modest-platform.c @@ -815,9 +815,9 @@ modest_platform_run_folder_name_dialog (GtkWindow *parent_window, dialog = gtk_dialog_new_with_buttons (dialog_title, parent_window, GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR | GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_OK, + _("mcen_bd_dialog_ok"), GTK_RESPONSE_ACCEPT, - GTK_STOCK_CANCEL, + _("mcen_bd_dialog_cancel"), GTK_RESPONSE_REJECT, NULL); diff --git a/src/maemo/modest-signature-editor-dialog.c b/src/maemo/modest-signature-editor-dialog.c index 01d290a..eef6429 100644 --- a/src/maemo/modest-signature-editor-dialog.c +++ b/src/maemo/modest-signature-editor-dialog.c @@ -164,8 +164,8 @@ modest_signature_editor_dialog_init (ModestSignatureEditorDialog *self) gtk_text_buffer_set_text (buffer, "--\n", -1); /* Default, as per the UI spec. */ /* Add the buttons: */ - gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_OK, GTK_RESPONSE_OK); - gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); + gtk_dialog_add_button (GTK_DIALOG (self), _("mcen_bd_dialog_ok"), GTK_RESPONSE_OK); + gtk_dialog_add_button (GTK_DIALOG (self), _("mcen_bd_dialog_cancel"), GTK_RESPONSE_CANCEL); gtk_widget_show (box); diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index eae7965..f9da90a 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -1932,17 +1932,18 @@ modest_ui_actions_on_item_not_found (ModestHeaderView *header_view,ModestItemTyp dialog = gtk_message_dialog_new (GTK_WINDOW (win), GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, - GTK_BUTTONS_OK, + GTK_BUTTONS_NONE, _("The %s you selected cannot be found"), item); + gtk_dialog_add_button (GTK_DIALOG (dialog),_("mcen_bd_dialog_ok"), GTK_RESPONSE_ACCEPT); gtk_dialog_run (GTK_DIALOG(dialog)); } else { dialog = gtk_dialog_new_with_buttons (_("Connection requested"), GTK_WINDOW (win), GTK_DIALOG_MODAL, - GTK_STOCK_CANCEL, + _("mcen_bd_dialog_cancel"), GTK_RESPONSE_REJECT, - GTK_STOCK_OK, + _("mcen_bd_dialog_ok"), GTK_RESPONSE_ACCEPT, NULL); txt = g_strdup_printf (_("This %s is not available in offline mode.\n" @@ -2626,9 +2627,9 @@ modest_ui_actions_on_password_requested (TnyAccountStore *account_store, GtkWidget *dialog = gtk_dialog_new_with_buttons (_("mail_ti_password_protected"), NULL, GTK_DIALOG_MODAL, - GTK_STOCK_OK, + _("mcen_bd_dialog_ok"), GTK_RESPONSE_ACCEPT, - GTK_STOCK_CANCEL, + _("mcen_bd_dialog_cancel"), GTK_RESPONSE_REJECT, NULL); #else @@ -3433,12 +3434,12 @@ create_move_to_dialog (GtkWindow *win, GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR | GTK_DIALOG_DESTROY_WITH_PARENT, NULL); - gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_OK, GTK_RESPONSE_ACCEPT); + gtk_dialog_add_button (GTK_DIALOG (dialog), _("mcen_bd_dialog_ok"), GTK_RESPONSE_ACCEPT); /* We do this manually so GTK+ does not associate a response ID for * the button. */ - new_button = gtk_button_new_from_stock (GTK_STOCK_NEW); + new_button = gtk_button_new_from_stock (_("mcen_bd_new")); gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->action_area), new_button, FALSE, FALSE, 0); - gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT); + gtk_dialog_add_button (GTK_DIALOG (dialog), _("mcen_bd_dialog_cancel"), GTK_RESPONSE_REJECT); /* Create scrolled window */ scroll = gtk_scrolled_window_new (NULL, NULL); diff --git a/src/widgets/modest-global-settings-dialog.c b/src/widgets/modest-global-settings-dialog.c index e9dc3d1..936cd16 100644 --- a/src/widgets/modest-global-settings-dialog.c +++ b/src/widgets/modest-global-settings-dialog.c @@ -127,8 +127,8 @@ modest_global_settings_dialog_init (ModestGlobalSettingsDialog *self) priv->changed = FALSE; /* Add the buttons: */ - gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_OK, GTK_RESPONSE_OK); - gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); + gtk_dialog_add_button (GTK_DIALOG (self), _("mcen_bd_dialog_ok"), GTK_RESPONSE_OK); + gtk_dialog_add_button (GTK_DIALOG (self), _("mcen_bd_dialog_cancel"), GTK_RESPONSE_CANCEL); /* Connect to the dialog's response signal: */ g_signal_connect (G_OBJECT (self), "response", G_CALLBACK (on_response), self);