use system = EVOLUTION_DATADIR "/file" instead of g_strdup_printf. Rename

2001-04-22  Gediminas Paulauskas <menesis@delfi.lt>

	* folder-browser.c, mail-autofilter.c, mail-callbacks.c, mail-ops.c,
	mail-summary.c, mail-vfolder.c: use system = EVOLUTION_DATADIR "/file"
	instead of g_strdup_printf. Rename userrules to user (and system) to be
	consistent.

	* mail-send-recv.c: set window icon to send-receive.xpm

2001-04-21  Gediminas Paulauskas <menesis@delfi.lt>

	* mail-summary.c: translate "Mail summary".

svn path=/trunk/; revision=9490
This commit is contained in:
Gediminas Paulauskas
2001-04-21 22:52:56 +00:00
committed by Gediminas Paulauskas
parent adb3761ed6
commit b50306c380
8 changed files with 41 additions and 34 deletions

View File

@ -1,3 +1,16 @@
2001-04-22 Gediminas Paulauskas <menesis@delfi.lt>
* folder-browser.c, mail-autofilter.c, mail-callbacks.c, mail-ops.c,
mail-summary.c, mail-vfolder.c: use system = EVOLUTION_DATADIR "/file"
instead of g_strdup_printf. Rename userrules to user (and system) to be
consistent.
* mail-send-recv.c: set window icon to send-receive.xpm
2001-04-21 Gediminas Paulauskas <menesis@delfi.lt>
* mail-summary.c: translate "Mail summary".
2001-04-20 Dan Winship <danw@ximian.com>
* mail-config-druid.c (make_default_account): Convert the result

View File

@ -839,9 +839,9 @@ folder_browser_gui_init (FolderBrowser *fb)
/* quick-search bar */
{
RuleContext *rc = (RuleContext *)rule_context_new ();
char *userrules = g_strdup_printf("%s/searches.xml", evolution_dir);
char *user = g_strdup_printf("%s/searches.xml", evolution_dir);
/* we reuse the vfolder types here, they should match */
char *systemrules = g_strdup_printf("%s/evolution/vfoldertypes.xml", EVOLUTION_DATADIR);
char *system = EVOLUTION_DATADIR "/evolution/vfoldertypes.xml";
rule_context_add_part_set((RuleContext *)rc, "partset", filter_part_get_type(),
rule_context_add_part, rule_context_next_part);
@ -849,11 +849,10 @@ folder_browser_gui_init (FolderBrowser *fb)
rule_context_add_rule_set((RuleContext *)rc, "ruleset", filter_rule_get_type(),
rule_context_add_rule, rule_context_next_rule);
fb->search = e_filter_bar_new(rc, systemrules, userrules, folder_browser_config_search, fb);
fb->search = e_filter_bar_new(rc, system, user, folder_browser_config_search, fb);
e_search_bar_set_menu((ESearchBar *)fb->search, folder_browser_search_menu_items);
/*e_search_bar_set_option((ESearchBar *)fb->search, folder_browser_search_option_items);*/
g_free(userrules);
g_free(systemrules);
g_free(user);
gtk_object_unref((GtkObject *)rc);
}

View File

@ -318,23 +318,22 @@ void
filter_gui_add_from_message (CamelMimeMessage *msg, int flags)
{
FilterContext *fc;
char *userrules, *systemrules;
char *user, *system;
FilterRule *rule;
extern char *evolution_dir;
g_return_if_fail (msg != NULL);
fc = filter_context_new ();
userrules = g_strdup_printf ("%s/filters.xml", evolution_dir);
systemrules = g_strdup_printf ("%s/evolution/filtertypes.xml", EVOLUTION_DATADIR);
rule_context_load ((RuleContext *)fc, systemrules, userrules);
user = g_strdup_printf ("%s/filters.xml", evolution_dir);
system = EVOLUTION_DATADIR "/evolution/filtertypes.xml";
rule_context_load ((RuleContext *)fc, system, user);
rule = filter_rule_from_message (fc, msg, flags);
filter_rule_set_source (rule, FILTER_SOURCE_INCOMING);
rule_context_add_rule_gui ((RuleContext *)fc, rule, _("Add Filter Rule"), userrules);
g_free (userrules);
g_free (systemrules);
rule_context_add_rule_gui ((RuleContext *)fc, rule, _("Add Filter Rule"), user);
g_free (user);
gtk_object_unref (GTK_OBJECT (fc));
}
@ -342,20 +341,19 @@ void
filter_gui_add_from_mlist (const char *mlist)
{
FilterContext *fc;
char *userrules, *systemrules;
char *user, *system;
FilterRule *rule;
extern char *evolution_dir;
fc = filter_context_new ();
userrules = g_strdup_printf ("%s/filters.xml", evolution_dir);
systemrules = g_strdup_printf ("%s/evolution/filtertypes.xml", EVOLUTION_DATADIR);
rule_context_load ((RuleContext *)fc, systemrules, userrules);
user = g_strdup_printf ("%s/filters.xml", evolution_dir);
system = EVOLUTION_DATADIR "/evolution/filtertypes.xml";
rule_context_load ((RuleContext *)fc, system, user);
rule = filter_rule_from_mlist(fc, mlist);
filter_rule_set_source (rule, FILTER_SOURCE_INCOMING);
rule_context_add_rule_gui ((RuleContext *)fc, rule, _("Add Filter Rule"), userrules);
g_free (userrules);
g_free (systemrules);
rule_context_add_rule_gui ((RuleContext *)fc, rule, _("Add Filter Rule"), user);
g_free (user);
gtk_object_unref (GTK_OBJECT (fc));
}

View File

@ -1365,10 +1365,9 @@ filter_edit (BonoboUIComponent *uih, void *user_data, const char *path)
fc = filter_context_new ();
user = g_strdup_printf ("%s/filters.xml", evolution_dir);
system = g_strdup_printf ("%s/evolution/filtertypes.xml", EVOLUTION_DATADIR);
system = EVOLUTION_DATADIR "/evolution/filtertypes.xml";
rule_context_load ((RuleContext *)fc, system, user);
g_free (user);
g_free (system);
if (((RuleContext *)fc)->error) {
gchar *err;

View File

@ -52,16 +52,15 @@
FilterContext *
mail_load_filter_context(void)
{
char *userrules;
char *systemrules;
char *user;
char *system;
FilterContext *fc;
userrules = g_strdup_printf ("%s/filters.xml", evolution_dir);
systemrules = g_strdup_printf ("%s/evolution/filtertypes.xml", EVOLUTION_DATADIR);
user = g_strdup_printf ("%s/filters.xml", evolution_dir);
system = EVOLUTION_DATADIR "/evolution/filtertypes.xml";
fc = filter_context_new ();
rule_context_load ((RuleContext *)fc, systemrules, userrules);
g_free (userrules);
g_free (systemrules);
rule_context_load ((RuleContext *)fc, system, user);
g_free (user);
return fc;
}

View File

@ -231,7 +231,7 @@ static struct _send_data *build_dialogue(GSList *sources, CamelFolder *outbox, c
data = setup_send_data();
gd = (GnomeDialog *)gnome_dialog_new(_("Send & Receive mail"), GNOME_STOCK_BUTTON_CANCEL, NULL);
gnome_window_icon_set_from_file((GtkWindow *)gd, EVOLUTION_DATADIR "images/evolution/evolution-inbox.png");
gnome_window_icon_set_from_file((GtkWindow *)gd, EVOLUTION_ICONSDIR "/send-receive.xpm");
frame= (GtkFrame *)gtk_frame_new(_("Receiving"));
gtk_box_pack_start((GtkBox *)gd->vbox, (GtkWidget *)frame, TRUE, TRUE, 0);

View File

@ -42,6 +42,7 @@
#include <evolution-services/executive-summary-component.h>
#include <evolution-services/executive-summary-html-view.h>
#include <gal/widgets/e-unicode.h>
typedef struct {
CamelFolder *folder;
@ -297,12 +298,11 @@ generate_folder_summaries (MailSummary *summary)
int i;
user = g_strdup_printf ("%s/vfolders.xml", evolution_dir);
system = g_strdup_printf ("%s/evolution/vfoldertypes.xml", EVOLUTION_DATADIR);
system = EVOLUTION_DATADIR "/evolution/vfoldertypes.xml";
context = vfolder_context_new ();
rule_context_load ((RuleContext *)context, system, user);
g_free (user);
g_free (system);
rule = NULL;
while ((rule = rule_context_next_rule ((RuleContext *)context, rule, NULL))){
@ -465,7 +465,7 @@ create_summary_view (ExecutiveSummaryComponentFactory *_factory,
summary->folders = 0;
summary->in_summary = FALSE;
summary->folder_to_summary = g_hash_table_new (NULL, NULL);
summary->title = g_strdup ("Mail Summary");
summary->title = e_utf8_from_locale_string (_("Mail Summary"));
summary->icon = g_strdup ("envelope.png");
summary->idle = 0;

View File

@ -255,7 +255,7 @@ vfolder_create_storage(EvolutionShellComponent *shell_component)
vfolder_storage = storage;
user = g_strdup_printf ("%s/vfolders.xml", evolution_dir);
system = g_strdup_printf("%s/evolution/vfoldertypes.xml", EVOLUTION_DATADIR);
system = EVOLUTION_DATADIR "/evolution/vfoldertypes.xml";
context = vfolder_context_new();
printf("loading rules %s %s\n", system, user);
@ -263,7 +263,6 @@ vfolder_create_storage(EvolutionShellComponent *shell_component)
g_warning("cannot load vfolders: %s\n", ((RuleContext *)context)->error);
}
g_free(user);
g_free(system);
vfolder_refresh();
}