aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2010-06-03 17:06:08 +0300
committerClaudio Saavedra <csaavedra@igalia.com>2010-06-03 17:17:48 +0300
commitd8c0c23d9a7a2dff0f8e8394803f2b318c2233b4 (patch)
tree1f64d969b25c35117a0e1a2a125b515babd3685d
parent18192db2f941314fd14053b380d00a2dec696c99 (diff)
Use Hildon stock items in all widgets where it makes sense
-rw-r--r--hildon/hildon-calendar-popup.c3
-rw-r--r--hildon/hildon-code-dialog.c3
-rw-r--r--hildon/hildon-color-chooser-dialog.c3
-rw-r--r--hildon/hildon-font-selection-dialog.c11
-rw-r--r--hildon/hildon-get-password-dialog.c9
-rw-r--r--hildon/hildon-login-dialog.c5
-rw-r--r--hildon/hildon-note.c11
-rw-r--r--hildon/hildon-picker-dialog.c5
-rw-r--r--hildon/hildon-set-password-dialog.c5
-rw-r--r--hildon/hildon-sort-dialog.c4
-rw-r--r--hildon/hildon-time-picker.c7
-rw-r--r--hildon/hildon-wizard-dialog.c7
12 files changed, 36 insertions, 37 deletions
diff --git a/hildon/hildon-calendar-popup.c b/hildon/hildon-calendar-popup.c
index 1396a31..607008b 100644
--- a/hildon/hildon-calendar-popup.c
+++ b/hildon/hildon-calendar-popup.c
@@ -86,6 +86,7 @@
#include "hildon-calendar-popup.h"
#include "hildon-calendar-popup-private.h"
#include "hildon-calendar.h"
+#include "hildon-stock.h"
#define _(String)\
dgettext("hildon-libs", String)
@@ -347,7 +348,7 @@ hildon_calendar_popup_init (HildonCalendarPopup *cal)
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (cal)->vbox), priv->cal,
TRUE, TRUE, 0);
gtk_dialog_set_has_separator (GTK_DIALOG (cal), FALSE);
- gtk_dialog_add_button (GTK_DIALOG (cal), _("wdgt_bd_done"), GTK_RESPONSE_OK);
+ gtk_dialog_add_button (GTK_DIALOG (cal), HILDON_STOCK_DONE, GTK_RESPONSE_OK);
gtk_widget_show(priv->cal);
/* Connect signals */
diff --git a/hildon/hildon-code-dialog.c b/hildon/hildon-code-dialog.c
index 80e78d3..45d987f 100644
--- a/hildon/hildon-code-dialog.c
+++ b/hildon/hildon-code-dialog.c
@@ -46,6 +46,7 @@
#include "hildon-code-dialog.h"
#include "hildon-defines.h"
#include "hildon-banner.h"
+#include "hildon-stock.h"
#include "hildon-code-dialog-private.h"
#define HEIGHT (48-HILDON_MARGIN_DEFAULT)
@@ -60,7 +61,7 @@
#define c_(String) \
dgettext("hildon-common-strings", String)
-#define DEVICELOCK_OK _("wdgt_bd_done")
+#define DEVICELOCK_OK HILDON_STOCK_DONE
#define DEVICELOCK_TITLE dgettext("osso-system-lock", "secu_application_title")
diff --git a/hildon/hildon-color-chooser-dialog.c b/hildon/hildon-color-chooser-dialog.c
index 10676e4..2b03461 100644
--- a/hildon/hildon-color-chooser-dialog.c
+++ b/hildon/hildon-color-chooser-dialog.c
@@ -53,6 +53,7 @@
#include "hildon-color-chooser.h"
#include "hildon-defines.h"
#include "hildon-banner.h"
+#include "hildon-stock.h"
#include "hildon-color-chooser-dialog-private.h"
#define _(String) dgettext("hildon-libs", String)
@@ -214,7 +215,7 @@ hildon_color_chooser_dialog_init (HildonColorChooserDialog *objec
gtk_box_pack_start (GTK_BOX (priv->vbox), priv->separator, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (priv->vbox), priv->align_custom, FALSE, FALSE, 0);
- gtk_dialog_add_button (GTK_DIALOG (object), _("wdgt_bd_done"), GTK_RESPONSE_OK);
+ gtk_dialog_add_button (GTK_DIALOG (object), HILDON_STOCK_DONE, GTK_RESPONSE_OK);
gtk_dialog_set_default_response (GTK_DIALOG (object), GTK_RESPONSE_OK);
g_signal_connect (G_OBJECT (priv->chooser),
diff --git a/hildon/hildon-font-selection-dialog.c b/hildon/hildon-font-selection-dialog.c
index 175edc2..f69899b 100644
--- a/hildon/hildon-font-selection-dialog.c
+++ b/hildon/hildon-font-selection-dialog.c
@@ -49,6 +49,7 @@
#include "hildon-caption.h"
#include "hildon-color-button.h"
#include "hildon-font-selection-dialog-private.h"
+#include "hildon-stock.h"
/* These are what we use as the standard font sizes, for the size list */
@@ -764,8 +765,7 @@ hildon_font_selection_dialog_init (HildonFontSelectionDialog *font
/* Add dialog buttons */
gtk_dialog_add_button (GTK_DIALOG (fontseldiag),
- _("wdgt_bd_done"),
- GTK_RESPONSE_OK);
+ HILDON_STOCK_DONE, GTK_RESPONSE_OK);
#if 0
preview_button = gtk_button_new_with_label (_("ecdg_bd_font_dialog_preview"));
@@ -1148,11 +1148,8 @@ hildon_font_selection_dialog_show_preview (HildonFontSelectionDialog *font
/* preview dialog init */
preview_dialog =
gtk_dialog_new_with_buttons (_("ecdg_ti_preview_font"), NULL,
- GTK_DIALOG_MODAL |
- GTK_DIALOG_DESTROY_WITH_PARENT |
- GTK_DIALOG_NO_SEPARATOR,
- _("wdgt_bd_done"),
- GTK_RESPONSE_ACCEPT,
+ GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR,
+ HILDON_STOCK_DONE, GTK_RESPONSE_ACCEPT,
NULL);
str = (show_ref) ? g_strconcat (_("ecdg_fi_preview_font_preview_reference"), priv->preview_text, 0) :
diff --git a/hildon/hildon-get-password-dialog.c b/hildon/hildon-get-password-dialog.c
index e25c4ab..a1eabcd 100644
--- a/hildon/hildon-get-password-dialog.c
+++ b/hildon/hildon-get-password-dialog.c
@@ -85,6 +85,7 @@
#include "hildon-banner.h"
#include "hildon-get-password-dialog-private.h"
#include "hildon-entry.h"
+#include "hildon-stock.h"
#define _(String) dgettext("hildon-libs", String)
@@ -92,7 +93,7 @@
#define HILDON_GET_PASSWORD_DIALOG_PASSWORD "ecdg_fi_get_old_pwd_enter_pwd"
-#define HILDON_GET_PASSWORD_DIALOG_OK "wdgt_bd_done"
+#define HILDON_GET_PASSWORD_DIALOG_OK HILDON_STOCK_DONE
#define HILDON_GET_PASSWORD_DIALOG_CANCEL "ecdg_bd_get_old_password_dialog_cancel"
@@ -100,7 +101,7 @@
#define HILDON_GET_PASSWORD_VERIFY_DIALOG_PASSWORD "ecdg_fi_verify_pwd_enter_pwd"
-#define HILDON_GET_PASSWORD_VERIFY_DIALOG_OK "wdgt_bd_done"
+#define HILDON_GET_PASSWORD_VERIFY_DIALOG_OK HILDON_STOCK_DONE
#define HILDON_GET_PASSWORD_VERIFY_DIALOG_CANCEL "ecdg_bd_verify_password_dialog_cancel"
@@ -410,8 +411,8 @@ create_contents (HildonGetPasswordDialog *dialog
/* Create buttons */
gtk_dialog_add_button (GTK_DIALOG (dialog),
(priv->get_old
- ? _(HILDON_GET_PASSWORD_DIALOG_OK)
- : _(HILDON_GET_PASSWORD_VERIFY_DIALOG_OK)),
+ ? HILDON_GET_PASSWORD_DIALOG_OK
+ : HILDON_GET_PASSWORD_VERIFY_DIALOG_OK),
GTK_RESPONSE_OK);
gtk_dialog_add_button (GTK_DIALOG (dialog),
diff --git a/hildon/hildon-login-dialog.c b/hildon/hildon-login-dialog.c
index f0ab92e..4f4f150 100644
--- a/hildon/hildon-login-dialog.c
+++ b/hildon/hildon-login-dialog.c
@@ -52,6 +52,7 @@
#include "hildon-caption.h"
#include "hildon-login-dialog-private.h"
#include "hildon-entry.h"
+#include "hildon-stock.h"
enum
{
@@ -85,7 +86,7 @@ hildon_login_dialog_get_property (GObject *object,
#define HILDON_LOGIN_DIALOG_PASSWORD "frw_ti_get_user_name_and_pwd_enter_pwd"
-#define HILDON_LOGIN_DIALOG_OK "wdgt_bd_done"
+#define HILDON_LOGIN_DIALOG_OK HILDON_STOCK_DONE
#define _(String) dgettext("hildon-libs", String)
@@ -270,7 +271,7 @@ hildon_login_dialog_init (HildonLoginDialog *dialog)
GTK_WIDGET (priv->message_label), FALSE, FALSE, 0);
/* Create buttons */
- gtk_dialog_add_button (GTK_DIALOG (dialog), _(HILDON_LOGIN_DIALOG_OK), GTK_RESPONSE_OK);
+ gtk_dialog_add_button (GTK_DIALOG (dialog), HILDON_STOCK_DONE, GTK_RESPONSE_OK);
/* Setup username entry */
priv->username_entry = hildon_entry_new (HILDON_SIZE_FINGER_HEIGHT | HILDON_SIZE_AUTO_WIDTH);
diff --git a/hildon/hildon-note.c b/hildon/hildon-note.c
index d9b0444..698e9b5 100644
--- a/hildon/hildon-note.c
+++ b/hildon/hildon-note.c
@@ -97,6 +97,7 @@
#include "hildon-defines.h"
#include "hildon-sound.h"
#include "hildon-gtk.h"
+#include "hildon-stock.h"
#include "hildon-enum-types.h"
#include "hildon-note-private.h"
@@ -110,8 +111,6 @@
#define INFORMATION_SOUND_PATH \
"/usr/share/sounds/ui-information_note.wav"
-#define _(String) dgettext("hildon-libs", String)
-
static void
hildon_note_class_init (HildonNoteClass *class);
@@ -772,9 +771,9 @@ hildon_note_rebuild (HildonNote *note)
{
case HILDON_NOTE_TYPE_CONFIRMATION:
priv->okButton = gtk_dialog_add_button (dialog,
- _("wdgt_bd_yes"), GTK_RESPONSE_OK);
+ HILDON_STOCK_YES, GTK_RESPONSE_OK);
priv->cancelButton = gtk_dialog_add_button (dialog,
- _("wdgt_bd_no"), GTK_RESPONSE_CANCEL);
+ HILDON_STOCK_NO, GTK_RESPONSE_CANCEL);
gtk_widget_show (priv->cancelButton);
g_object_get (priv->okButton, "width-request",
&priv->button_width, NULL);
@@ -790,7 +789,7 @@ hildon_note_rebuild (HildonNote *note)
case HILDON_NOTE_TYPE_PROGRESSBAR:
priv->cancelButton = gtk_dialog_add_button (dialog,
- _("wdgt_bd_stop"), GTK_RESPONSE_CANCEL);
+ HILDON_STOCK_STOP, GTK_RESPONSE_CANCEL);
gtk_widget_show (priv->cancelButton);
gtk_widget_set_no_show_all (priv->cancelButton, FALSE);
break;
@@ -1113,7 +1112,7 @@ hildon_note_set_button_text (HildonNote *note,
if (priv->okButton) {
gtk_button_set_label (GTK_BUTTON (priv->okButton), text);
gtk_button_set_label (GTK_BUTTON (priv->cancelButton),
- _("wdgt_bd_no"));
+ HILDON_STOCK_NO);
} else {
gtk_button_set_label (GTK_BUTTON (priv->cancelButton), text);
}
diff --git a/hildon/hildon-picker-dialog.c b/hildon/hildon-picker-dialog.c
index 3fb4ce8..bf3ab95 100644
--- a/hildon/hildon-picker-dialog.c
+++ b/hildon/hildon-picker-dialog.c
@@ -51,8 +51,7 @@
#include "hildon-touch-selector.h"
#include "hildon-touch-selector-entry.h"
#include "hildon-picker-dialog.h"
-
-#define _(String) dgettext("hildon-libs", String)
+#include "hildon-stock.h"
#define HILDON_PICKER_DIALOG_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), HILDON_TYPE_PICKER_DIALOG, HildonPickerDialogPrivate))
@@ -86,7 +85,7 @@ enum
LAST_SIGNAL
};
-#define DEFAULT_DONE_BUTTON_TEXT _("wdgt_bd_done")
+#define DEFAULT_DONE_BUTTON_TEXT HILDON_STOCK_DONE
static void
hildon_picker_dialog_set_property (GObject * object,
diff --git a/hildon/hildon-set-password-dialog.c b/hildon/hildon-set-password-dialog.c
index e4c0ca3..11246e4 100644
--- a/hildon/hildon-set-password-dialog.c
+++ b/hildon/hildon-set-password-dialog.c
@@ -54,6 +54,7 @@
#include <glib.h>
#include <gdk/gdkkeysyms.h>
+#include "hildon-stock.h"
#include "hildon-set-password-dialog.h"
#include "hildon-caption.h"
#include "hildon-note.h"
@@ -69,7 +70,7 @@
#define HILDON_SET_PASSWORD_DIALOG_VERIFY_PASSWORD "ecdg_fi_set_passwd_confirm"
-#define HILDON_SET_PASSWORD_DIALOG_OK "wdgt_bd_done"
+#define HILDON_SET_PASSWORD_DIALOG_OK HILDON_STOCK_DONE
#define HILDON_SET_PASSWORD_DIALOG_CANCEL "ecdg_bd_set_password_dialog_cancel"
@@ -81,7 +82,7 @@
#define HILDON_SET_MODIFY_PASSWORD_DIALOG_VERIFY_PASSWORD "ckdg_fi_dialog_c_passwd_ver_pwd"
-#define HILDON_SET_MODIFY_PASSWORD_DIALOG_OK "wdgt_bd_done"
+#define HILDON_SET_MODIFY_PASSWORD_DIALOG_OK HILDON_STOCK_DONE
#define HILDON_SET_MODIFY_PASSWORD_DIALOG_CANCEL "ckdg_bd_change_password_dialog_cancel"
diff --git a/hildon/hildon-sort-dialog.c b/hildon/hildon-sort-dialog.c
index 1a93f2d..75ba953 100644
--- a/hildon/hildon-sort-dialog.c
+++ b/hildon/hildon-sort-dialog.c
@@ -103,6 +103,7 @@
#include "hildon-sort-dialog.h"
#include "hildon-caption.h"
#include "hildon-sort-dialog-private.h"
+#include "hildon-stock.h"
#define _(String) \
dgettext("hildon-libs", String)
@@ -310,8 +311,7 @@ hildon_sort_dialog_init (HildonSortDialog * dialog)
/* Create the OK/CANCEL buttons */
(void) gtk_dialog_add_button (GTK_DIALOG(dialog),
- _("wdgt_bd_sort"),
- GTK_RESPONSE_OK);
+ HILDON_STOCK_SORT, GTK_RESPONSE_OK);
/* FIXME: Hardcoded sizes are bad */
gtk_window_resize (GTK_WINDOW (dialog), 370, 100);
gtk_widget_show_all (GTK_DIALOG (dialog)->vbox);
diff --git a/hildon/hildon-time-picker.c b/hildon/hildon-time-picker.c
index 5052e10..237d9c3 100644
--- a/hildon/hildon-time-picker.c
+++ b/hildon/hildon-time-picker.c
@@ -86,12 +86,10 @@
#include "hildon-time-picker.h"
#include "hildon-defines.h"
+#include "hildon-stock.h"
#include "hildon-time-picker-private.h"
#include "hildon-time-editor.h"
-#define _(String) \
- dgettext("hildon-libs", String)
-
#define DEFAULT_HOURS 1
#define DEFAULT_MINUTES 1
@@ -475,8 +473,7 @@ hildon_time_picker_init (HildonTimePicker *picker)
gtk_window_set_modal (GTK_WINDOW (dialog), FALSE);
/* And final dialog packing */
gtk_dialog_set_has_separator (dialog, FALSE);
- gtk_dialog_add_button (dialog, _("wdgt_bd_done"),
- GTK_RESPONSE_OK);
+ gtk_dialog_add_button (dialog, HILDON_STOCK_DONE, GTK_RESPONSE_OK);
gtk_container_add (GTK_CONTAINER (maintocenter), GTK_WIDGET(table));
gtk_box_pack_start (GTK_BOX (dialog->vbox), maintocenter, TRUE, FALSE, 0);
diff --git a/hildon/hildon-wizard-dialog.c b/hildon/hildon-wizard-dialog.c
index 17c1842..d4b0948 100644
--- a/hildon/hildon-wizard-dialog.c
+++ b/hildon/hildon-wizard-dialog.c
@@ -55,6 +55,7 @@
#include "hildon-wizard-dialog.h"
#include "hildon-defines.h"
#include "hildon-wizard-dialog-private.h"
+#include "hildon-stock.h"
#define _(String) dgettext("hildon-libs", String)
@@ -274,9 +275,9 @@ hildon_wizard_dialog_init (HildonWizardDialog *wizard_dial
priv->forward_data_destroy = NULL;
/* Add response buttons: finish, previous, next */
- gtk_dialog_add_button (dialog, _("wdgt_bd_finish"), HILDON_WIZARD_DIALOG_FINISH);
- gtk_dialog_add_button (dialog, _("wdgt_bd_previous"), HILDON_WIZARD_DIALOG_PREVIOUS);
- gtk_dialog_add_button (dialog, _("wdgt_bd_next"), HILDON_WIZARD_DIALOG_NEXT);
+ gtk_dialog_add_button (dialog, HILDON_STOCK_FINISH, HILDON_WIZARD_DIALOG_FINISH);
+ gtk_dialog_add_button (dialog, HILDON_STOCK_PREVIOUS, HILDON_WIZARD_DIALOG_PREVIOUS);
+ gtk_dialog_add_button (dialog, HILDON_STOCK_NEXT, HILDON_WIZARD_DIALOG_NEXT);
/* Set initial button states: previous and finish buttons are disabled */
make_buttons_sensitive (wizard_dialog, FALSE, FALSE, TRUE);