* hildon-widgets/hildon-set-password-dialog.c (c_): new macro, calls dgettext on...
authorLuc Pionchon <luc.pionchon@nokia.com>
Wed, 26 Apr 2006 20:12:02 +0000 (20:12 +0000)
committerLuc Pionchon <luc.pionchon@nokia.com>
Wed, 26 Apr 2006 20:12:02 +0000 (20:12 +0000)
* hildon-widgets/hildon-set-password-dialog.h: indent cleanup

ChangeLog
hildon-widgets/hildon-set-password-dialog.c
hildon-widgets/hildon-set-password-dialog.h

index fc1ae6b..3f741bc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2006-04-26  Luc Pionchon  <luc.pionchon@nokia.com>
 
+       * hildon-widgets/hildon-set-password-dialog.c
+       (c_): new macro, calls dgettext on "hildon-common-strings" domain.
+       (hildon_set_password_response_set): use c_ for common strings
+       (hildon_set_password_response_change): likewise.
+       Fixes N#27749
+
+       * hildon-widgets/hildon-set-password-dialog.h: indent cleanup
+
+
+2006-04-26  Luc Pionchon  <luc.pionchon@nokia.com>
+
        * hildon-widgets/hildon-file-handling-note.c (gettext macro): use
        "hildon-fm" as textual domain. Fixes N#27702
 
index 93c20de..6688dc1 100644 (file)
@@ -61,7 +61,8 @@
 #include <hildon-widgets/hildon-defines.h>
 
 #include <libintl.h>
-#define _(String) dgettext(PACKAGE, String)
+#define  _(String) dgettext(PACKAGE, String)
+#define c_(String) dgettext("hildon-common-strings", String)
 
 static GtkDialogClass *parent_class;
 
@@ -381,7 +382,7 @@ hildon_set_password_response_change(GtkDialog * dialog, gint arg1,
            g_signal_stop_emission_by_name(G_OBJECT(dialog),
                                           "response");
            gtk_infoprint (NULL,
-                          _(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
+                          c_(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
            gtk_widget_grab_focus(GTK_WIDGET(pwd2ndEntry));
          } else {
            /* Error: Passwords don't match, so start over */
@@ -390,7 +391,7 @@ hildon_set_password_response_change(GtkDialog * dialog, gint arg1,
            gtk_entry_set_text(pwd1stEntry, "");
            gtk_entry_set_text(pwd2ndEntry, "");
            gtk_infoprint (NULL,
-                          _(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
+                          c_(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
            gtk_widget_grab_focus(GTK_WIDGET(pwd1stEntry));
          }
        } else {
@@ -398,11 +399,11 @@ hildon_set_password_response_change(GtkDialog * dialog, gint arg1,
          g_signal_stop_emission_by_name(G_OBJECT(dialog), "response");
          if (text2[0] == '\0') {
            /* Error: Both fields are empty */
-           gtk_infoprint (NULL, _(HILDON_SET_PASSWORD_DIALOG_EMPTY));
+           gtk_infoprint (NULL, c_(HILDON_SET_PASSWORD_DIALOG_EMPTY));
          } else {
            /* Error: Second field doesn't match
               the empty first field, so start over */
-           gtk_infoprint (NULL, _(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
+           gtk_infoprint (NULL, c_(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
            gtk_entry_set_text(pwd2ndEntry, "");
          }
          gtk_widget_grab_focus(GTK_WIDGET(pwd1stEntry));
@@ -412,13 +413,13 @@ hildon_set_password_response_change(GtkDialog * dialog, gint arg1,
            Confirm remove password protection */
        note = HILDON_NOTE(hildon_note_new_confirmation
                           (GTK_WINDOW(dialog),
-                           _(HILDON_SET_PASSWORD_DIALOG_REMOVE_PROTECTION
+                           c_(HILDON_SET_PASSWORD_DIALOG_REMOVE_PROTECTION
                              )));
       
        hildon_note_set_button_texts
          (HILDON_NOTE(note),
-          _(HILDON_REMOVE_PROTECTION_CONFIRMATION_REMOVE), 
-          _(HILDON_REMOVE_PROTECTION_CONFIRMATION_CANCEL));
+          c_(HILDON_REMOVE_PROTECTION_CONFIRMATION_REMOVE), 
+          c_(HILDON_REMOVE_PROTECTION_CONFIRMATION_CANCEL));
        
         /* Display confirmation note */
        i = gtk_dialog_run(GTK_DIALOG(note));
@@ -474,14 +475,14 @@ hildon_set_password_response_set(GtkDialog * dialog, gint arg1,
                 /* Second field is empty, so show error,
                    but don't clear the fields */
                 g_signal_stop_emission_by_name(G_OBJECT(dialog), "response");
-                gtk_infoprint (NULL, _(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
+                gtk_infoprint (NULL, c_(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
                 gtk_widget_grab_focus (GTK_WIDGET (priv->pwd2ndEntry));
             } else {
                 /* Error: Passwords don't match, so start over */
                 g_signal_stop_emission_by_name(G_OBJECT(dialog), "response");
                gtk_entry_set_text(pwd1stEntry, "");
                gtk_entry_set_text(pwd2ndEntry, "");
-               gtk_infoprint (NULL, _(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
+               gtk_infoprint (NULL, c_(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
                 gtk_widget_grab_focus(GTK_WIDGET(priv->pwd1stEntry));
            }
         } else {
@@ -489,11 +490,11 @@ hildon_set_password_response_set(GtkDialog * dialog, gint arg1,
           g_signal_stop_emission_by_name(G_OBJECT(dialog), "response");
          if (text2[0] == '\0') {
            /* Error: Both fields are empty */
-           gtk_infoprint (NULL, _(HILDON_SET_PASSWORD_DIALOG_EMPTY));
+           gtk_infoprint (NULL, c_(HILDON_SET_PASSWORD_DIALOG_EMPTY));
          } else {
            /* Error: Second field doesn't match
               the empty first field, so start over */
-           gtk_infoprint (NULL, _(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
+           gtk_infoprint (NULL, c_(HILDON_SET_PASSWORD_DIALOG_MISMATCH));
            gtk_entry_set_text(pwd2ndEntry, "");
          }
          gtk_widget_grab_focus(GTK_WIDGET(pwd1stEntry));
index 8d27427..63673a3 100644 (file)
@@ -28,6 +28,8 @@
 #include <gtk/gtkdialog.h>
 
 G_BEGIN_DECLS
+
+
 #define HILDON_TYPE_SET_PASSWORD_DIALOG \
   ( hildon_set_password_dialog_get_type() )
 #define HILDON_SET_PASSWORD_DIALOG(obj) \
@@ -41,46 +43,31 @@ G_BEGIN_DECLS
 #define HILDON_IS_SET_PASSWORD_DIALOG_CLASS(klass) \
   (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_SET_PASSWORD_DIALOG))
 
-#define HILDON_SET_PASSWORD_DIALOG_TITLE \
-         "ecdg_ti_set_password"
-#define HILDON_SET_PASSWORD_DIALOG_PASSWORD \
-         "ecdg_fi_set_passwd_enter_pwd"
-#define HILDON_SET_PASSWORD_DIALOG_VERIFY_PASSWORD \
-         "ecdg_fi_set_passwd_confirm"
-#define HILDON_SET_PASSWORD_DIALOG_OK \
-         "ecdg_bd_set_password_dialog_ok"
-#define HILDON_SET_PASSWORD_DIALOG_CANCEL \
-         "ecdg_bd_set_password_dialog_cancel"
-
-#define HILDON_SET_MODIFY_PASSWORD_DIALOG_TITLE \
-         "ckdg_ti_dialog_c_passwd_change_password"
-#define HILDON_SET_MODIFY_PASSWORD_DIALOG_LABEL \
-         "ckdg_fi_dialog_c_passwd_pwd_protect"
-#define HILDON_SET_MODIFY_PASSWORD_DIALOG_PASSWORD \
-         "ckdg_fi_dialog_c_passwd_new_pwd"
-#define HILDON_SET_MODIFY_PASSWORD_DIALOG_VERIFY_PASSWORD \
-         "ckdg_fi_dialog_c_passwd_ver_pwd"
-#define HILDON_SET_MODIFY_PASSWORD_DIALOG_OK \
-         "ckdg_bd_change_password_dialog_ok"
-#define HILDON_SET_MODIFY_PASSWORD_DIALOG_CANCEL \
-         "ckdg_bd_change_password_dialog_cancel"
-
-#define HILDON_SET_PASSWORD_DIALOG_MISMATCH \
-         "ecdg_ib_passwords_do_not_match"
-
-#define HILDON_SET_PASSWORD_DIALOG_EMPTY \
-         "ecdg_ib_password_is_empty"
-
-#define HILDON_SET_PASSWORD_DIALOG_REMOVE_PROTECTION \
-         "ckdg_nc_dialog_c_passwd_remove_pwd"
-
-#define HILDON_REMOVE_PROTECTION_CONFIRMATION_REMOVE \
-         "ckdg_bd_dialog_c_passwd_remove_button"
-
-#define HILDON_REMOVE_PROTECTION_CONFIRMATION_CANCEL \
-         "ckdg_bd_dialog_c_passwd_cancel_button"
-
-typedef struct _HildonSetPasswordDialog HildonSetPasswordDialog;
+
+
+#define HILDON_SET_PASSWORD_DIALOG_TITLE                  "ecdg_ti_set_password"
+#define HILDON_SET_PASSWORD_DIALOG_PASSWORD               "ecdg_fi_set_passwd_enter_pwd"
+#define HILDON_SET_PASSWORD_DIALOG_VERIFY_PASSWORD        "ecdg_fi_set_passwd_confirm"
+#define HILDON_SET_PASSWORD_DIALOG_OK                     "ecdg_bd_set_password_dialog_ok"
+#define HILDON_SET_PASSWORD_DIALOG_CANCEL                 "ecdg_bd_set_password_dialog_cancel"
+
+#define HILDON_SET_MODIFY_PASSWORD_DIALOG_TITLE           "ckdg_ti_dialog_c_passwd_change_password"
+#define HILDON_SET_MODIFY_PASSWORD_DIALOG_LABEL           "ckdg_fi_dialog_c_passwd_pwd_protect"
+#define HILDON_SET_MODIFY_PASSWORD_DIALOG_PASSWORD        "ckdg_fi_dialog_c_passwd_new_pwd"
+#define HILDON_SET_MODIFY_PASSWORD_DIALOG_VERIFY_PASSWORD "ckdg_fi_dialog_c_passwd_ver_pwd"
+#define HILDON_SET_MODIFY_PASSWORD_DIALOG_OK              "ckdg_bd_change_password_dialog_ok"
+#define HILDON_SET_MODIFY_PASSWORD_DIALOG_CANCEL          "ckdg_bd_change_password_dialog_cancel"
+
+#define HILDON_SET_PASSWORD_DIALOG_MISMATCH               "ecdg_ib_passwords_do_not_match"
+#define HILDON_SET_PASSWORD_DIALOG_EMPTY                  "ecdg_ib_password_is_empty"
+#define HILDON_SET_PASSWORD_DIALOG_REMOVE_PROTECTION      "ckdg_nc_dialog_c_passwd_remove_pwd"
+
+#define HILDON_REMOVE_PROTECTION_CONFIRMATION_REMOVE      "ckdg_bd_dialog_c_passwd_remove_button"
+#define HILDON_REMOVE_PROTECTION_CONFIRMATION_CANCEL      "ckdg_bd_dialog_c_passwd_cancel_button"
+
+
+
+typedef struct _HildonSetPasswordDialog      HildonSetPasswordDialog;
 typedef struct _HildonSetPasswordDialogClass HildonSetPasswordDialogClass;
 
 struct _HildonSetPasswordDialog {
@@ -92,25 +79,24 @@ struct _HildonSetPasswordDialogClass {
 };
 
 
-GtkWidget *hildon_set_password_dialog_new(GtkWindow * parent,
-                                          gboolean modify_protection);
 
-GtkWidget *hildon_set_password_dialog_new_with_default
-                                         (GtkWindow *parent,
-                                         const gchar *password,
-                                          gboolean modify_protection);
+GtkWidget *  hildon_set_password_dialog_new              (GtkWindow   *parent,
+                                                          gboolean     modify_protection);
 
-GType hildon_set_password_dialog_get_type(void) G_GNUC_CONST;
+GtkWidget *  hildon_set_password_dialog_new_with_default (GtkWindow   *parent,
+                                                          const gchar *password,
+                                                          gboolean     modify_protection);
 
-const gchar
-    *hildon_set_password_dialog_get_password(HildonSetPasswordDialog *
-                                             dialog);
+GType        hildon_set_password_dialog_get_type         (void) G_GNUC_CONST;
 
-gboolean hildon_set_password_dialog_get_protected(HildonSetPasswordDialog *
-                                                  dialog);
+const gchar *hildon_set_password_dialog_get_password     (HildonSetPasswordDialog *dialog);
+
+gboolean     hildon_set_password_dialog_get_protected    (HildonSetPasswordDialog *dialog);
+
+void         hildon_set_password_dialog_set_domain       (HildonSetPasswordDialog *dialog,
+                                                          const gchar             *domain);
 
-void hildon_set_password_dialog_set_domain(HildonSetPasswordDialog *dialog,
-                                          const gchar *domain);
 
 G_END_DECLS
-#endif /* HILDON_SET_PASSWORD_DIALOG_H */
+
+#endif /* __HILDON_SET_PASSWORD_DIALOG_H__ */