[evolution-patches] 273885, translations problems
- From: Not Zed <notzed ximian com>
- To: asdf <evolution-patches lists ximian com>
- Subject: [evolution-patches] 273885, translations problems
- Date: Thu, 04 Aug 2005 18:13:32 +0800
This fixes just the translation of the filter source type. These
strings are already translated just not used.
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3673
diff -u -p -r1.3673 ChangeLog
--- mail/ChangeLog 4 Aug 2005 02:53:34 -0000 1.3673
+++ mail/ChangeLog 4 Aug 2005 10:13:55 -0000
@@ -1,3 +1,14 @@
+2005-08-04 Not Zed <NotZed Ximian com>
+
+ ** See bug #273885.
+
+ * em-utils.c (em_utils_edit_filters): setup filter source names
+ properly translated.
+
+ * em-filter-editor.c (em_filter_editor_construct): take an array
+ of structs for the filter source so the incoming/outgoing is
+ properly translated.
+
2005-08-03 Not Zed <NotZed Ximian com>
* em-folder-browser.c (emfb_set_folder): not here.
Index: mail/em-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-utils.c,v
retrieving revision 1.64
diff -u -p -r1.64 em-utils.c
--- mail/em-utils.c 2 Aug 2005 04:39:21 -0000 1.64
+++ mail/em-utils.c 4 Aug 2005 10:13:56 -0000
@@ -250,10 +250,10 @@ em_filter_editor_response (GtkWidget *di
filter_editor = NULL;
}
-static const char *em_filter_source_element_names[] = {
- "incoming",
- "outgoing",
- NULL,
+static EMFilterSource em_filter_source_element_names[] = {
+ { "incoming", },
+ { "outgoing", },
+ { 0 }
};
/**
@@ -286,7 +286,12 @@ em_utils_edit_filters (GtkWidget *parent
e_error_run((GtkWindow *)parent, "mail:filter-load-error", ((RuleContext *)fc)->error, NULL);
return;
}
-
+
+ if (em_filter_source_element_names[0].name == NULL) {
+ em_filter_source_element_names[0].name = _("Incoming");
+ em_filter_source_element_names[1].name = _("Outgoing");
+ }
+
filter_editor = (GtkWidget *) em_filter_editor_new (fc, em_filter_source_element_names);
if (parent != NULL)
e_dialog_set_transient_for ((GtkWindow *) filter_editor, parent);
Index: mail/em-filter-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-filter-editor.c,v
retrieving revision 1.1
diff -u -p -r1.1 em-filter-editor.c
--- mail/em-filter-editor.c 17 Jun 2004 07:34:49 -0000 1.1
+++ mail/em-filter-editor.c 4 Aug 2005 10:13:56 -0000
@@ -101,7 +101,7 @@ em_filter_editor_finalise (GObject *obj)
* Return value: A new #EMFilterEditor object.
**/
EMFilterEditor *
-em_filter_editor_new (EMFilterContext *fc, const char **source_names)
+em_filter_editor_new (EMFilterContext *fc, const EMFilterSource *source_names)
{
EMFilterEditor *fe = (EMFilterEditor *) g_object_new (em_filter_editor_get_type(), NULL);
GladeXML *gui;
@@ -125,7 +125,7 @@ select_source (GtkMenuItem *mi, EMFilter
}
void
-em_filter_editor_construct (EMFilterEditor *fe, EMFilterContext *fc, GladeXML *gui, const char **source_names)
+em_filter_editor_construct (EMFilterEditor *fe, EMFilterContext *fc, GladeXML *gui, const EMFilterSource *source_names)
{
GtkWidget *menu, *item, *omenu;
int i;
@@ -134,9 +134,9 @@ em_filter_editor_construct (EMFilterEdit
gtk_option_menu_remove_menu (GTK_OPTION_MENU (omenu));
menu = gtk_menu_new ();
- for (i = 0; source_names[i]; i++) {
- item = gtk_menu_item_new_with_label (_(source_names[i]));
- g_object_set_data_full (G_OBJECT (item), "source", g_strdup (source_names[i]), g_free);
+ for (i = 0; source_names[i].source; i++) {
+ item = gtk_menu_item_new_with_label(source_names[i].name);
+ g_object_set_data_full((GObject *)item, "source", g_strdup(source_names[i].source), g_free);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
gtk_widget_show (item);
g_signal_connect (item, "activate", G_CALLBACK (select_source), fe);
@@ -144,7 +144,7 @@ em_filter_editor_construct (EMFilterEdit
gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
gtk_widget_show (omenu);
- rule_editor_construct ((RuleEditor *) fe, (RuleContext *) fc, gui, source_names[0], _("_Filter Rules"));
+ rule_editor_construct ((RuleEditor *) fe, (RuleContext *) fc, gui, source_names[0].source, _("_Filter Rules"));
}
static FilterRule *
Index: mail/em-filter-editor.h
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-filter-editor.h,v
retrieving revision 1.1
diff -u -p -r1.1 em-filter-editor.h
--- mail/em-filter-editor.h 17 Jun 2004 07:34:49 -0000 1.1
+++ mail/em-filter-editor.h 4 Aug 2005 10:13:56 -0000
@@ -35,22 +35,24 @@
typedef struct _EMFilterEditor EMFilterEditor;
typedef struct _EMFilterEditorClass EMFilterEditorClass;
+typedef struct _EMFilterSource EMFilterSource;
+
+struct _EMFilterSource {
+ char *source;
+ char *name;
+};
+
struct _EMFilterEditor {
RuleEditor parent_object;
-
};
struct _EMFilterEditorClass {
RuleEditorClass parent_class;
-
- /* virtual methods */
-
- /* signals */
};
GtkType em_filter_editor_get_type (void);
-EMFilterEditor *em_filter_editor_new (EMFilterContext *f, const char **source_names);
-void em_filter_editor_construct (EMFilterEditor *fe, EMFilterContext *fc, GladeXML *gui, const char **source_names);
+EMFilterEditor *em_filter_editor_new (EMFilterContext *f, const EMFilterSource *source_names);
+void em_filter_editor_construct (EMFilterEditor *fe, EMFilterContext *fc, GladeXML *gui, const EMFilterSource *source_names);
#endif /* ! _EM_FILTER_EDITOR_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]