[evolution-patches] Mailer bug #127516 New mail notification applet (reviewed)
- From: Miguel Angel Lopez Hernandez <miguel gulev org mx>
- To: evolution-patches ximian com
- Subject: [evolution-patches] Mailer bug #127516 New mail notification applet (reviewed)
- Date: Mon, 26 Jan 2004 20:33:35 -0600
Hi,
I've modified shome things of the applet respect to the first version,
and of course I've added the modifications asked by notzed and fejj.
You can find 3 files attached:
- em-panel-applet.[ch]: Applet's code
- new-mail-notification.diff: diff for the mail directory.
You can view some screenshots here:
http://www.gulev.org.mx/~miguel/newmail-applet-bountie/Screenshots/
Greetings,
Miguel
/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 c-style: "K&R" -*- */
/*
* Author: Miguel Angel L� Hern�ez <miguel gulev org mx>
*
* Copyright 2004 Novell, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
*
*/
#include <gtk/gtk.h>
#include <gnome.h>
#include <gconf/gconf-client.h>
#include "e-util/eggtrayicon.h"
#include <libxml/parser.h>
#include <libxml/tree.h>
#include "em-folder-tree.h"
#include "em-folder-selector.h"
#include "em-panel-applet.h"
#include "em-mailer-prefs.h"
#include "mail-component.h"
#include <libgnomeui/libgnomeui.h>
#define DEFAULT_IMAGE_NOTIFY EVOLUTION_IMAGES "/ico-mail.png"
static gboolean em_tray_check_running ();
static gboolean em_tray_blink_icon ();
static void em_tray_update_status ();
static gboolean em_tray_folder_registered (const char *uri);
static EMFolderTrayNotify *em_tray_get_folder_info (const char *uri);
static EMFolderTrayNotify *em_tray_get_folders_from_xml (const char *xml);
static gboolean em_tray_icon_press (GtkWidget *widget, GdkEventButton *event, EMTrayNotify *evo_tray);
static void em_tray_about (GtkMenuItem *menuitem, gpointer user_data);
static GdkPixbuf *em_tray_blank_icon ();
static void em_tray_create_ui (EMTrayNotify *evo_tray);
static EMTrayNotify *evo_tray;
void
em_tray_folder_free (EMFolderTrayNotify *folder)
{
g_free (folder->id);
g_free (folder->name);
g_free (folder->image);
g_free (folder->sound);
folder->id = NULL;
folder->name = NULL;
folder->image = NULL;
folder->sound = NULL;
}
const char *
em_tray_default_sound ()
{
char *path = g_strdup_printf ("=%s/mailcheck.soundlist=/new-mail/",
gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_CONFIG,
"sound/events", TRUE, NULL));
gnome_config_push_prefix (path);
char *file = gnome_config_get_string ("file");
gnome_config_pop_prefix ();
const char *sound = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_SOUND,
file, TRUE, NULL);
g_free (path);
g_free (file);
return sound;
}
static gboolean
em_tray_check_running ()
{
Screen *xscreen = GDK_SCREEN_XSCREEN (gdk_screen_get_default ());
Atom selection_atom;
char *selection_atom_name;
gboolean ret;
selection_atom_name = g_strdup_printf ("_NET_SYSTEM_TRAY_S%d",
XScreenNumberOfScreen (xscreen));
selection_atom = XInternAtom (DisplayOfScreen (xscreen),
selection_atom_name, True);
ret = XGetSelectionOwner (DisplayOfScreen (xscreen), selection_atom);
g_free (selection_atom_name);
return ret;
}
void
em_tray_add_folder (EMMailerPrefs *prefs)
{
EMFolderTreeModel *model = mail_component_peek_tree_model (mail_component_peek ());
EMFolderTree *emft = (EMFolderTree *) em_folder_tree_new_with_model (model);
GtkWidget *dialog = em_folder_selector_new (emft, 0, _("Select Folder"), NULL);
int response;
response = gtk_dialog_run (GTK_DIALOG (dialog));
if (response == GTK_RESPONSE_OK) {
const char *uri = em_folder_selector_get_selected_uri ((EMFolderSelector *) dialog);
const char *path = em_folder_selector_get_selected_path ((EMFolderSelector *) dialog);
const char *name = em_tray_get_name (path);
if (em_tray_folder_registered (uri)) {
GtkWidget *msg = gtk_message_dialog_new (GTK_WINDOW (dialog),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"The folder '%s' is already registered.",
name);
gtk_dialog_run (GTK_DIALOG (msg));
} else {
GtkTreeIter iter;
gtk_list_store_append (GTK_LIST_STORE (evo_tray->model), &iter);
gtk_list_store_set (GTK_LIST_STORE (evo_tray->model), &iter,
NOTIFY_PIXBUF_COLUMN, em_tray_get_image_scaled (DEFAULT_IMAGE_NOTIFY),
NOTIFY_NAME_COLUMN, name,
NOTIFY_SOUND_COLUMN, em_tray_default_sound (),
NOTIFY_ID_COLUMN, uri,
NOTIFY_IMAGE_COLUMN, DEFAULT_IMAGE_NOTIFY,
NOTIFY_BEEP_COLUMN, TRUE,
NOTIFY_SOUND_SHOW_COLUMN, em_tray_get_name (em_tray_default_sound ()),
-1);
GtkTreePath *treepath = gtk_tree_model_get_path (evo_tray->model, &iter);
gtk_tree_view_set_cursor (prefs->notify_folders, treepath, NULL, FALSE);
gtk_tree_path_free (treepath);
if (prefs->control)
evolution_config_control_changed (prefs->control);
}
}
gtk_widget_destroy (dialog);
}
char *
em_folder_tray_notify_to_xml (EMFolderTrayNotify *folder)
{
xmlDocPtr doc;
xmlNodePtr root;
xmlChar *xmlbuf;
int n;
char *tmp;
doc = xmlNewDoc ("1.0");
root = xmlNewDocNode (doc, NULL, "folder", NULL);
xmlDocSetRootElement (doc, root);
xmlSetProp (root, "id", folder->id);
xmlNewTextChild (root, NULL, "name", folder->name);
xmlNewTextChild (root, NULL, "image", folder->image);
xmlNewTextChild (root, NULL, "sound", folder->sound);
xmlNewTextChild (root, NULL, "beep", folder->beep ? "yes" : "no");
xmlDocDumpMemory (doc, &xmlbuf, &n);
xmlFreeDoc (doc);
tmp = g_malloc (n + 1);
memcpy (tmp, xmlbuf, n);
tmp[n] = '\0';
xmlFree (xmlbuf);
return tmp;
}
static gboolean
em_tray_blink_icon ()
{
evo_tray->blink = !evo_tray->blink;
if (em_tray_check_running ()) {
if (evo_tray->newmail) {
gtk_image_set_from_pixbuf (GTK_IMAGE (evo_tray->image),
evo_tray->blink ? evo_tray->blink_icon : evo_tray->blank_icon);
return TRUE;
} else {
gtk_image_set_from_pixbuf (GTK_IMAGE (evo_tray->image),
evo_tray->icon);
gtk_tooltips_set_tip (evo_tray->tray_icon_tooltip, GTK_WIDGET (evo_tray->tray_icon),
_("Evolution New Mail Notification"),
NULL);
}
}
return FALSE;
}
static void
em_tray_update_status ()
{
if (em_tray_check_running ())
g_timeout_add (500, em_tray_blink_icon, evo_tray);
}
static gboolean
em_tray_folder_registered (const char *uri)
{
gboolean cont;
GtkTreeIter iter;
for (cont = gtk_tree_model_get_iter_first ((GtkTreeModel *) evo_tray->model, &iter); cont;
cont = gtk_tree_model_iter_next ((GtkTreeModel *) evo_tray->model, &iter)) {
char *id;
gboolean find;
gtk_tree_model_get (evo_tray->model, &iter,
NOTIFY_ID_COLUMN, &id,
-1);
find = strcmp (uri, id) == 0;
g_free (id);
if (find)
return TRUE;
}
return FALSE;
}
static EMFolderTrayNotify *
em_tray_get_folder_info (const char *uri)
{
gboolean cont;
GtkTreeIter iter;
for (cont = gtk_tree_model_get_iter_first ((GtkTreeModel *) evo_tray->model, &iter); cont;
cont = gtk_tree_model_iter_next ((GtkTreeModel *) evo_tray->model, &iter)) {
char *id;
gboolean find;
gtk_tree_model_get (evo_tray->model, &iter,
NOTIFY_ID_COLUMN, &id,
-1);
find = strcmp (uri, id) == 0;
g_free (id);
if (find) {
gboolean beep;
char *name, *image, *sound;
EMFolderTrayNotify *folder = g_new0 (EMFolderTrayNotify, 1);
gtk_tree_model_get (evo_tray->model, &iter,
NOTIFY_ID_COLUMN, &id,
NOTIFY_NAME_COLUMN, &name,
NOTIFY_IMAGE_COLUMN, &image,
NOTIFY_SOUND_COLUMN, &sound,
NOTIFY_BEEP_COLUMN, &beep,
-1);
folder->id = g_strdup (id);
folder->name = g_strdup (name);
folder->image = g_strdup (image);
folder->sound = g_strdup (sound);
folder->beep = beep;
g_free (id);
g_free (name);
g_free (image);
g_free (sound);
return folder;
}
}
return NULL;
}
static gboolean
em_tray_icon_press (GtkWidget *widget, GdkEventButton *event, EMTrayNotify *evo_tray)
{
switch (event->button) {
case 1:
evo_tray->newmail = FALSE;
return TRUE;
break;
case 3:
gtk_menu_popup (GTK_MENU (evo_tray->popup_menu),
NULL,
NULL,
NULL,
NULL,
event->button,
event->time);
return TRUE;
break;
default:
return FALSE;
break;
}
}
void
em_tray_notify_uri (char *uri)
{
evo_tray->newmail = strcmp (evo_tray->newmail_uri, uri);
}
static EMFolderTrayNotify *
em_tray_get_folders_from_xml (const char *xml)
{
xmlDocPtr doc;
if (!(doc = xmlParseDoc ((char *) xml)))
return NULL;
xmlNodePtr node;
node = doc->children;
if (strcmp (node->name, "folder") != 0) {
xmlFreeDoc (doc);
return NULL;
}
EMFolderTrayNotify *folder = g_new0 (EMFolderTrayNotify, 1);
folder->id = g_strdup (xmlGetProp (node, "id"));
for (node = node->children; node; node = node->next) {
if (!strcmp (node->name, "name"))
folder->name = g_strdup (xmlNodeGetContent (node));
if (!strcmp (node->name, "image"))
folder->image = g_strdup (xmlNodeGetContent (node));
if (!strcmp (node->name, "sound"))
folder->sound = g_strdup (xmlNodeGetContent (node));
if (!strcmp (node->name, "beep"))
folder->beep = strcmp (xmlNodeGetContent (node), "yes") ? FALSE : TRUE;
}
xmlFree (node);
xmlFreeDoc (doc);
return folder;
}
void
em_tray_folders_refresh ()
{
GSList *list;
list = gconf_client_get_list (evo_tray->conf_client,
"/apps/evolution/mail/notify/folders",
GCONF_VALUE_STRING,
NULL);
if (!list)
return;
EMFolderTrayNotify *folder;
gtk_list_store_clear (GTK_LIST_STORE (evo_tray->model));
for (; list; list = list->next) {
folder = em_tray_get_folders_from_xml (list->data);
if (folder) {
GtkTreeIter iter;
gtk_list_store_append (GTK_LIST_STORE (evo_tray->model), &iter);
gtk_list_store_set (GTK_LIST_STORE (evo_tray->model),
&iter,
NOTIFY_PIXBUF_COLUMN, em_tray_get_image_scaled (folder->image),
NOTIFY_NAME_COLUMN, folder->name,
NOTIFY_SOUND_COLUMN, folder->sound,
NOTIFY_ID_COLUMN, folder->id,
NOTIFY_IMAGE_COLUMN, folder->image,
NOTIFY_BEEP_COLUMN, folder->beep,
NOTIFY_SOUND_SHOW_COLUMN, em_tray_get_name (folder->sound),
-1);
}
em_tray_folder_free (folder);
}
g_free (folder);
g_slist_foreach (list, (GFunc) g_free, NULL);
g_slist_free (list);
}
static void
em_tray_about (GtkMenuItem *menuitem, gpointer user_data)
{
static GtkWidget *about = NULL;
const char *authors[] = {"Miguel Angel L� Hern�ez <miguel gulev org mx>", NULL};
const char *documenters[] = {NULL};
const char *translator_credits = "translator_credits";
if (about != NULL) {
gdk_window_raise (about->window);
gdk_window_show (about->window);
return;
}
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file (EVOLUTION_IMAGES "/ico-mail.png", NULL);
about = gnome_about_new ("New Mail Notification",
"0.2.3",
"Copyright \xc2\xa9 2004 Novell, Inc.",
"Evolution New Mail Notification Applet",
(const char**)authors,
(const char**)documenters,
strcmp (translator_credits, "translator_credits") != 0 ? translator_credits : NULL,
pixbuf);
if (pixbuf != NULL)
gdk_pixbuf_unref (pixbuf);
g_signal_connect (about, "destroy", G_CALLBACK (gtk_widget_destroyed), &about);
g_object_add_weak_pointer (G_OBJECT (about), (void **)&(about));
gtk_widget_show (about);
}
GdkPixbuf *
em_tray_get_image_scaled (const char *image_file)
{
GdkPixbuf *tmp, *scaled;
int width, height;
tmp = gdk_pixbuf_new_from_file (image_file, NULL);
gtk_icon_size_lookup (GTK_ICON_SIZE_LARGE_TOOLBAR, &width, &height);
scaled = gdk_pixbuf_scale_simple (tmp, width, height, GDK_INTERP_BILINEAR);
gdk_pixbuf_unref (tmp);
return scaled;
}
static GdkPixbuf *
em_tray_blank_icon ()
{
GdkPixbuf *blank;
int width, height;
gtk_icon_size_lookup (GTK_ICON_SIZE_LARGE_TOOLBAR, &width, &height);
blank = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, width, height);
gdk_pixbuf_fill (blank, 0);
return blank;
}
static void
em_tray_create_ui (EMTrayNotify *evo_tray)
{
evo_tray->tray_icon = egg_tray_icon_new (_("Evolution Tray Icon"));
evo_tray->icon = em_tray_get_image_scaled (DEFAULT_IMAGE_NOTIFY);
evo_tray->image = gtk_image_new_from_pixbuf (evo_tray->icon);
evo_tray->blank_icon = em_tray_blank_icon ();
/* Tooltip */
evo_tray->tray_icon_tooltip = gtk_tooltips_new ();
gtk_tooltips_set_tip (evo_tray->tray_icon_tooltip, GTK_WIDGET (evo_tray->tray_icon),
_("Evolution New Mail Notification"),
NULL);
/* Event box */
evo_tray->evbox = gtk_event_box_new ();
g_signal_connect (evo_tray->evbox, "button_press_event", G_CALLBACK (em_tray_icon_press),
(gpointer) evo_tray);
/* Popup menu */
evo_tray->popup_menu = gtk_menu_new ();
GtkWidget *item = gtk_image_menu_item_new_from_stock (GNOME_STOCK_ABOUT, NULL);
g_signal_connect (item, "activate", G_CALLBACK (em_tray_about), (gpointer) evo_tray);
gtk_widget_show (item);
gtk_menu_shell_append (GTK_MENU_SHELL (evo_tray->popup_menu), item);
// g_object_unref (item);
gtk_container_add (GTK_CONTAINER (evo_tray->evbox), evo_tray->image);
gtk_container_add (GTK_CONTAINER (evo_tray->tray_icon), evo_tray->evbox);
gtk_widget_show_all (GTK_WIDGET (evo_tray->tray_icon));
evo_tray->created = TRUE;
}
GtkTreeModel *
em_tray_get_model ()
{
return evo_tray->model;
}
void
em_tray_init ()
{
evo_tray = g_new0 (EMTrayNotify, 1);
evo_tray->conf_client = gconf_client_get_default ();
evo_tray->model = GTK_TREE_MODEL (gtk_list_store_new (NOTIFY_NUM_COLUMNS,
GDK_TYPE_PIXBUF,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_BOOLEAN,
G_TYPE_STRING));
em_tray_folders_refresh ();
if (em_tray_check_running ())
em_tray_create_ui (evo_tray);
}
const char *
em_tray_get_name (const char *uri)
{
if (uri) {
char *name = strrchr (uri, '/');
if (!name)
return NULL;
else
return name + 1;
} else {
return NULL;
}
}
void
em_tray_notify (char *uri, int type)
{
const char *name;
char *sound, *image_name, *tooltip;
gboolean beep;
switch (type) {
case MAIL_CONFIG_NOTIFY_ALL:
beep = gconf_client_get_bool (evo_tray->conf_client,
"/apps/evolution/mail/notify/beep", NULL);
sound = gconf_client_get_string (evo_tray->conf_client,
"/apps/evolution/mail/notify/sound", NULL);
image_name = gconf_client_get_string (evo_tray->conf_client,
"/apps/evolution/mail/notify/image", NULL);
name = em_tray_get_name (uri);
break;
case MAIL_CONFIG_NOTIFY_SELECTED:
if (!em_tray_folder_registered (uri))
return;
EMFolderTrayNotify *folder;
folder = em_tray_get_folder_info (uri);
beep = folder->beep;
sound = g_strdup (folder->sound);
image_name = g_strdup (folder->image);
name = g_strdup (folder->name);
em_tray_folder_free (folder);
g_free (folder);
break;
default:
g_assert_not_reached ();
}
g_free (evo_tray->newmail_uri);
evo_tray->newmail_uri = g_strdup (uri);
evo_tray->blink_icon = em_tray_get_image_scaled (image_name);
tooltip = g_strdup_printf (_("New mail on %s"), name);
if (em_tray_check_running ()) {
if (!evo_tray->created) {
em_tray_create_ui (evo_tray);
evo_tray->newmail = FALSE;
}
gtk_tooltips_set_tip (evo_tray->tray_icon_tooltip,
GTK_WIDGET (evo_tray->tray_icon),
tooltip,
NULL);
}
if (beep) {
gdk_beep ();
} else {
if (sound != NULL)
gnome_sound_play (sound);
}
g_free (sound);
g_free (image_name);
g_free (tooltip);
evo_tray->notify_type = type;
if (evo_tray->newmail)
return;
evo_tray->newmail = TRUE;
em_tray_update_status (evo_tray);
}
/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 c-style: "K&R" -*- */
/*
* Author: Miguel Angel L� Hern�ez <miguel gulev org mx>
*
* Copyright 2004 Novell, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
*
*/
#ifndef __EM_PANEL_APPLET_H__
#define __EM_PANEL_APPLET_H__
#include "e-util/eggtrayicon.h"
#include "mail-config.h"
#include <glade/glade.h>
#include "em-mailer-prefs.h"
static struct {
const char *name;
const char *description;
} EMNotifyType[MAIL_CONFIG_NOTIFY_TYPES] = {
{ N_("None"),
N_("Do not notify when new mail arrives.") },
{ N_("All Folders"),
N_("Notify when new mail arrives to any folder.") },
{ N_("Selected Folders"),
N_("Notify when new mail arrives to any of the selected folders.") },
};
typedef struct {
GConfClient *conf_client;
GtkTreeModel *model;
EggTrayIcon *tray_icon;
GtkTooltips *tray_icon_tooltip;
GtkWidget *image;
GtkWidget *evbox;
GtkWidget *popup_menu;
GdkPixbuf *icon;
GdkPixbuf *blank_icon;
GdkPixbuf *blink_icon;
gboolean blink;
gboolean newmail;
char *newmail_uri;
gboolean created;
int notify_type;
} EMTrayNotify;
typedef struct {
char *id;
char *name;
char *image;
char *sound;
gboolean beep;
} EMFolderTrayNotify;
enum {
NOTIFY_PIXBUF_COLUMN,
NOTIFY_NAME_COLUMN,
NOTIFY_SOUND_COLUMN,
NOTIFY_ID_COLUMN,
NOTIFY_IMAGE_COLUMN,
NOTIFY_BEEP_COLUMN,
NOTIFY_SOUND_SHOW_COLUMN,
NOTIFY_NUM_COLUMNS,
};
void em_tray_init ();
void em_tray_notify (char *uri, int type);
GtkTreeModel *em_tray_get_model ();
void em_tray_add_folder (EMMailerPrefs *prefs);
void em_tray_folders_refresh ();
char *em_folder_tray_notify_to_xml (EMFolderTrayNotify *folder_notify);
GdkPixbuf *em_tray_get_image_scaled (const char *image_file);
void em_tray_notify_uri (char *uri);
const char *em_tray_get_name (const char *uri);
void em_tray_folder_free (EMFolderTrayNotify *folder);
const char *em_tray_default_sound ();
#endif
? default
? em-panel-applet.c
? em-panel-applet.h
? evolution-mail-1.5.schemas
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3009
diff -u -r1.3009 ChangeLog
--- ChangeLog 17 Jan 2004 00:26:20 -0000 1.3009
+++ ChangeLog 27 Jan 2004 02:09:57 -0000
@@ -1,3 +1,33 @@
+2004-01-26 Miguel Angel L� Hern�ez <miguel gulev org mx>
+
+ * em-panel-applet.[ch] files added
+
+ * Makefile.am em-panel-applet.[ch] added
+
+ * em-mailer-prefs.[ch]: functions added
+ - settings_notify_changed
+ - notify_folder_selected
+ - notify_beep_changed
+ - notify_sound_changed
+ - notify_image_changed
+ - notify_add_folder
+ - notify_remove_folder
+ (em_mailer_prefs_construct): Code for new mail notification
+ configuration tab added.
+
+ * evolution-mail.schemas.in.in New mail notification schemas
+ added.
+
+ * mail-component-factory.c New mail notification applet
+ initialization added.
+
+ * mail-config.glade New mail notification tab added to preferences.
+
+ * mail-config.h MailConfigNewMailNotify enum updated.
+
+ * mail-folder-cache.c Code for hook new mail arrival to new mail
+ notification applet added.
+
2004-01-16 JP Rosevear <jpr ximian com>
* em-format-html-display.c (efhd_bonobo_object): pass in an
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/evolution/mail/Makefile.am,v
retrieving revision 1.239
diff -u -r1.239 Makefile.am
--- Makefile.am 16 Jan 2004 18:48:03 -0000 1.239
+++ Makefile.am 27 Jan 2004 02:09:57 -0000
@@ -117,6 +117,8 @@
em-junk-plugin.h \
em-html-stream.c \
em-html-stream.h \
+ em-panel-applet.c \
+ em-panel-applet.h \
mail-account-editor.c \
mail-account-editor.h \
mail-account-gui.c \
Index: em-mailer-prefs.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-mailer-prefs.c,v
retrieving revision 1.5
diff -u -r1.5 em-mailer-prefs.c
--- em-mailer-prefs.c 12 Jan 2004 17:11:12 -0000 1.5
+++ em-mailer-prefs.c 27 Jan 2004 02:09:58 -0000
@@ -36,7 +36,8 @@
#include <bonobo/bonobo-generic-factory.h>
#include "mail-config.h"
-
+#include "em-panel-applet.h"
+#include <libgnomeui/gnome-icon-entry.h>
static void em_mailer_prefs_class_init (EMMailerPrefsClass *class);
static void em_mailer_prefs_init (EMMailerPrefs *dialog);
@@ -387,6 +388,194 @@
}
static void
+settings_notify_changed (GtkWidget *widget, gpointer user_data)
+{
+ EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
+
+ prefs->notify_type = gtk_option_menu_get_history (prefs->notify_menu);
+
+ gtk_label_set_text (prefs->notify_desc, EMNotifyType[prefs->notify_type].description);
+
+ if (prefs->notify_type == MAIL_CONFIG_NOTIFY_NONE) {
+ gtk_widget_hide (GTK_WIDGET (prefs->frame_folders));
+ gtk_widget_hide (GTK_WIDGET (prefs->frame_image));
+ gtk_widget_hide (GTK_WIDGET (prefs->frame_sound));
+ } else if (prefs->notify_type == MAIL_CONFIG_NOTIFY_ALL) {
+ gnome_icon_entry_set_filename (prefs->img_notify, prefs->image_file);
+ gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (prefs->notify_sound_file)),
+ prefs->sound_file);
+ gtk_toggle_button_set_active (prefs->notify_beep, prefs->play_beep);
+ gtk_toggle_button_set_active (prefs->notify_play_sound, !prefs->play_beep);
+
+ gtk_widget_hide (GTK_WIDGET (prefs->frame_folders));
+ gtk_widget_show (GTK_WIDGET (prefs->frame_image));
+ gtk_widget_show (GTK_WIDGET (prefs->frame_sound));
+ gtk_widget_set_sensitive (GTK_WIDGET (prefs->frame_image), TRUE);
+ gtk_widget_set_sensitive (GTK_WIDGET (prefs->frame_sound), TRUE);
+ } else if (prefs->notify_type == MAIL_CONFIG_NOTIFY_SELECTED) {
+ gtk_widget_show (GTK_WIDGET (prefs->frame_folders));
+ gtk_widget_show (GTK_WIDGET (prefs->frame_image));
+ gtk_widget_show (GTK_WIDGET (prefs->frame_sound));
+ gtk_widget_set_sensitive (GTK_WIDGET (prefs->frame_image), FALSE);
+ gtk_widget_set_sensitive (GTK_WIDGET (prefs->frame_sound), FALSE);
+ }
+}
+
+static void
+notify_folder_selected (GtkTreeSelection *selection, gpointer user_data)
+{
+ GtkTreeIter iter;
+ EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
+
+ if (gtk_tree_selection_get_selected (selection, NULL, &iter)) {
+ gchar *sound, *image;
+ gboolean beep;
+
+ gtk_tree_model_get ((GtkTreeModel *) prefs->notify_folders_store, &iter,
+ NOTIFY_SOUND_COLUMN, &sound,
+ NOTIFY_IMAGE_COLUMN, &image,
+ NOTIFY_BEEP_COLUMN, &beep,
+ -1);
+ gnome_icon_entry_set_filename (prefs->img_notify, image ? image : "");
+ gtk_toggle_button_set_active (prefs->notify_beep, beep);
+ gtk_toggle_button_set_active (prefs->notify_play_sound, !beep);
+ gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (prefs->notify_sound_file)),
+ sound);
+ g_free (sound);
+ g_free (image);
+ gtk_widget_set_sensitive (GTK_WIDGET (prefs->del_folder), TRUE);
+ gtk_widget_set_sensitive (GTK_WIDGET (prefs->frame_image), TRUE);
+ gtk_widget_set_sensitive (GTK_WIDGET (prefs->frame_sound), TRUE);
+ } else {
+ gtk_widget_set_sensitive (GTK_WIDGET (prefs->del_folder), FALSE);
+ gtk_widget_set_sensitive (GTK_WIDGET (prefs->frame_image), FALSE);
+ gtk_widget_set_sensitive (GTK_WIDGET (prefs->frame_sound), FALSE);
+ }
+}
+
+static void
+notify_beep_changed (GtkWidget *widget, gpointer user_data)
+{
+ EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
+ gboolean beep = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+ gchar *snd_file;
+
+ if (prefs->notify_type == MAIL_CONFIG_NOTIFY_SELECTED) {
+ GtkTreeIter iter;
+ GtkTreeSelection *selection = gtk_tree_view_get_selection (prefs->notify_folders);
+
+ if (gtk_tree_selection_get_selected (selection, NULL, &iter)) {
+ gtk_list_store_set (GTK_LIST_STORE (prefs->notify_folders_store), &iter,
+ NOTIFY_BEEP_COLUMN, beep,
+ -1);
+ gtk_tree_model_get (GTK_TREE_MODEL (prefs->notify_folders_store), &iter,
+ NOTIFY_SOUND_COLUMN, &snd_file,
+ -1);
+ if (!beep)
+ snd_file = g_strdup (strcmp (snd_file, "") ? snd_file : em_tray_default_sound ());
+ else
+ snd_file = g_strdup (strcmp (snd_file, "") ? snd_file : "");
+ }
+
+ if (snd_file)
+ gtk_list_store_set (GTK_LIST_STORE (prefs->notify_folders_store), &iter,
+ NOTIFY_SOUND_COLUMN, g_strdup (snd_file),
+ NOTIFY_SOUND_SHOW_COLUMN, g_strdup (em_tray_get_name (snd_file)),
+ -1);
+ } else if (prefs->notify_type == MAIL_CONFIG_NOTIFY_ALL) {
+ prefs->play_beep = beep;
+
+ if (!beep)
+ snd_file = g_strdup (strcmp (prefs->sound_file, "") ? prefs->sound_file : em_tray_default_sound ());
+ else
+ snd_file = g_strdup (strcmp (prefs->sound_file, "") ? prefs->sound_file : "");
+ }
+
+ if (snd_file)
+ gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (prefs->notify_sound_file)),
+ snd_file);
+ g_free (snd_file);
+
+ if (prefs->control)
+ evolution_config_control_changed (prefs->control);
+}
+
+static void
+notify_sound_changed (GtkWidget *widget, gpointer user_data)
+{
+ EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
+ char *snd_file;
+
+ snd_file = g_strdup (gtk_entry_get_text (GTK_ENTRY (widget)));
+
+ if (prefs->notify_type == MAIL_CONFIG_NOTIFY_SELECTED && snd_file) {
+ GtkTreeIter iter;
+ GtkTreeSelection *selection = gtk_tree_view_get_selection (prefs->notify_folders);
+
+ if (gtk_tree_selection_get_selected (selection, NULL, &iter))
+ gtk_list_store_set (GTK_LIST_STORE (prefs->notify_folders_store), &iter,
+ NOTIFY_SOUND_COLUMN, g_strdup (snd_file),
+ NOTIFY_SOUND_SHOW_COLUMN, g_strdup (em_tray_get_name (snd_file)),
+ -1);
+ else if (prefs->notify_type == MAIL_CONFIG_NOTIFY_ALL)
+ prefs->sound_file = g_strdup (snd_file);
+ }
+
+ g_free (snd_file);
+
+ if (prefs->control)
+ evolution_config_control_changed (prefs->control);
+}
+
+static void
+notify_image_changed (GtkWidget *widget, gpointer user_data)
+{
+ EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
+
+ if (prefs->notify_type == MAIL_CONFIG_NOTIFY_SELECTED) {
+ GtkTreeIter iter;
+ GtkTreeSelection *selection = gtk_tree_view_get_selection (prefs->notify_folders);
+
+ if (gtk_tree_selection_get_selected (selection, NULL, &iter)) {
+ GdkPixbuf *pixbuf;
+ gchar *img_file = gnome_icon_entry_get_filename (prefs->img_notify);
+
+ pixbuf = em_tray_get_image_scaled (img_file);
+ gtk_list_store_set (GTK_LIST_STORE (prefs->notify_folders_store), &iter,
+ NOTIFY_PIXBUF_COLUMN, pixbuf,
+ NOTIFY_IMAGE_COLUMN, img_file,
+ -1);
+ g_free (img_file);
+ gdk_pixbuf_unref (pixbuf);
+ }
+ }
+
+ if (prefs->control)
+ evolution_config_control_changed (prefs->control);
+}
+
+static void
+notify_add_folder (GtkWidget *button, gpointer user_data)
+{
+ EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
+
+ em_tray_add_folder (prefs);
+}
+
+static void
+notify_remove_folder (GtkWidget *button, gpointer user_data)
+{
+ EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
+ GtkTreeIter iter;
+
+ if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (prefs->notify_folders), NULL, &iter))
+ gtk_list_store_remove (GTK_LIST_STORE (prefs->notify_folders_store), &iter);
+
+ if (prefs->control)
+ evolution_config_control_changed (prefs->control);
+}
+
+static void
em_mailer_prefs_construct (EMMailerPrefs *prefs)
{
GSList *list, *header_config_list, *header_add_list, *p;
@@ -394,6 +583,7 @@
GtkWidget *toplevel, *menu;
GtkTreeSelection *selection;
GtkCellRenderer *renderer;
+ GtkTreeViewColumn *column;
GtkTreeIter iter;
char *font, *buf;
GladeXML *gui;
@@ -455,25 +645,73 @@
g_signal_connect (prefs->confirm_expunge, "toggled", G_CALLBACK (settings_changed), prefs);
/* New Mail Notification */
- val = gconf_client_get_int (prefs->gconf, "/apps/evolution/mail/notify/type", NULL);
- prefs->notify_not = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radNotifyNot"));
- gtk_toggle_button_set_active (prefs->notify_not, val == MAIL_CONFIG_NOTIFY_NOT);
- g_signal_connect (prefs->notify_not, "toggled", G_CALLBACK (settings_changed), prefs);
+ prefs->notify_type = gconf_client_get_int (prefs->gconf, "/apps/evolution/mail/notify/type", NULL);
+
+ prefs->notify_menu = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenu_NotifyType"));
+ g_signal_connect (prefs->notify_menu, "changed", G_CALLBACK (settings_notify_changed), prefs);
+
+ prefs->none_notify = GTK_MENU_ITEM (glade_xml_get_widget (gui, "none_notify"));
+ g_signal_connect (prefs->none_notify, "activate", G_CALLBACK (settings_changed), prefs);
+ prefs->all_folders_notify = GTK_MENU_ITEM (glade_xml_get_widget (gui, "all_folders_notify"));
+ g_signal_connect (prefs->all_folders_notify, "activate", G_CALLBACK (settings_changed), prefs);
+ prefs->selected_folders_notify = GTK_MENU_ITEM (glade_xml_get_widget (gui, "selected_folders_notify"));
+ g_signal_connect (prefs->selected_folders_notify, "activate", G_CALLBACK (settings_changed), prefs);
+
+ prefs->notify_folders = GTK_TREE_VIEW (glade_xml_get_widget (gui, "treeviewFolders"));
+ prefs->notify_folders_store = GTK_LIST_STORE (em_tray_get_model ());
+ selection = gtk_tree_view_get_selection (prefs->notify_folders);
+ g_signal_connect (selection, "changed", G_CALLBACK (notify_folder_selected), prefs);
+ gtk_tree_view_set_model (prefs->notify_folders, GTK_TREE_MODEL (prefs->notify_folders_store));
+
+ column = gtk_tree_view_column_new ();
+ gtk_tree_view_column_set_title (column, N_("Name"));
+ renderer = gtk_cell_renderer_pixbuf_new ();
+ gtk_tree_view_column_pack_start (column, renderer, FALSE);
+ gtk_tree_view_column_set_attributes (column, renderer, "pixbuf", NOTIFY_PIXBUF_COLUMN, NULL);
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_column_pack_start (column, renderer, TRUE);
+ gtk_tree_view_column_set_attributes (column, renderer, "text", NOTIFY_NAME_COLUMN, NULL);
+ gtk_tree_view_append_column (prefs->notify_folders, column);
+
+ column = gtk_tree_view_column_new_with_attributes (N_("Sound"), renderer, "text", NOTIFY_SOUND_SHOW_COLUMN, NULL);
+ gtk_tree_view_append_column (prefs->notify_folders, column);
+
+ prefs->frame_folders = GTK_FRAME(glade_xml_get_widget (gui, "frameFolders"));
+ prefs->frame_image = GTK_FRAME(glade_xml_get_widget (gui, "frameImage"));
+ prefs->frame_sound = GTK_FRAME(glade_xml_get_widget (gui, "frameSound"));
+ prefs->notify_desc = GTK_LABEL (glade_xml_get_widget (gui, "lblDescNotifyType"));
+
+ prefs->img_notify = GNOME_ICON_ENTRY(glade_xml_get_widget (gui, "iconentryImageNotify"));
+ prefs->image_file = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/notify/image", NULL);
+
+ gnome_icon_entry_set_filename (prefs->img_notify, prefs->image_file ? prefs->image_file : "");
+ g_signal_connect (prefs->img_notify, "changed", G_CALLBACK (notify_image_changed), prefs);
+
+ prefs->notify_sound_file = GNOME_FILE_ENTRY (glade_xml_get_widget (gui, "fileNotifyPlaySound"));
+ prefs->sound_file = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/notify/sound", NULL);
+
+ gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (prefs->notify_sound_file)),
+ prefs->sound_file ? prefs->sound_file : "");
+ g_signal_connect (gnome_file_entry_gtk_entry (prefs->notify_sound_file), "changed",
+ G_CALLBACK (notify_sound_changed), prefs);
+
+ prefs->add_folder = GTK_BUTTON(glade_xml_get_widget (gui, "buttonAddFolder"));
+ g_signal_connect (prefs->add_folder, "clicked", G_CALLBACK (notify_add_folder), prefs);
+
+ prefs->del_folder = GTK_BUTTON(glade_xml_get_widget (gui, "buttonDelFolder"));
+ g_signal_connect (prefs->del_folder, "clicked", G_CALLBACK (notify_remove_folder), prefs);
prefs->notify_beep = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radNotifyBeep"));
- gtk_toggle_button_set_active (prefs->notify_beep, val == MAIL_CONFIG_NOTIFY_BEEP);
- g_signal_connect (prefs->notify_beep, "toggled", G_CALLBACK (settings_changed), prefs);
+ prefs->play_beep = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/notify/beep", NULL);
+ gtk_toggle_button_set_active (prefs->notify_beep, prefs->play_beep);
+ g_signal_connect (prefs->notify_beep, "toggled", G_CALLBACK (notify_beep_changed), prefs);
prefs->notify_play_sound = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radNotifyPlaySound"));
- gtk_toggle_button_set_active (prefs->notify_play_sound, val == MAIL_CONFIG_NOTIFY_PLAY_SOUND);
+ gtk_toggle_button_set_active (prefs->notify_play_sound, !prefs->play_beep);
g_signal_connect (prefs->notify_play_sound, "toggled", G_CALLBACK (settings_changed), prefs);
- prefs->notify_sound_file = GNOME_FILE_ENTRY (glade_xml_get_widget (gui, "fileNotifyPlaySound"));
- buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/notify/sound", NULL);
- gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (prefs->notify_sound_file)), buf ? buf : "");
- g_signal_connect (gnome_file_entry_gtk_entry (prefs->notify_sound_file), "changed",
- G_CALLBACK (settings_changed), prefs);
- g_free (buf);
+ em_tray_folders_refresh ();
+ gtk_option_menu_set_history (prefs->notify_menu, prefs->notify_type);
/* Mail Fonts */
font = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/fonts/monospace", NULL);
@@ -687,8 +925,10 @@
guint32 rgb;
int i, val;
GtkTreeIter iter;
- gboolean valid;
+ gboolean valid, beep;
GSList *header_list;
+ EMFolderTrayNotify *folder;
+ char *name, *sound, *id, *image, *folder_xml;
/* General tab */
@@ -721,18 +961,52 @@
gtk_toggle_button_get_active (prefs->confirm_expunge), NULL);
/* New Mail Notification */
- if (gtk_toggle_button_get_active (prefs->notify_not))
- val = MAIL_CONFIG_NOTIFY_NOT;
- else if (gtk_toggle_button_get_active (prefs->notify_beep))
- val = MAIL_CONFIG_NOTIFY_BEEP;
- else
- val = MAIL_CONFIG_NOTIFY_PLAY_SOUND;
-
- gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/notify/type", val, NULL);
-
- entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (prefs->notify_sound_file));
- cstring = gtk_entry_get_text (GTK_ENTRY (entry));
- gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/notify/sound", cstring, NULL);
+ gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/notify/type",
+ prefs->notify_type, NULL);
+
+ if (prefs->notify_type == MAIL_CONFIG_NOTIFY_ALL) {
+ gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/notify/beep",
+ gtk_toggle_button_get_active (prefs->notify_beep), NULL);
+ cstring = gnome_icon_entry_get_filename (prefs->img_notify);
+ gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/notify/image",
+ cstring, NULL);
+ entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (prefs->notify_sound_file));
+ cstring = gtk_entry_get_text (GTK_ENTRY (entry));
+ gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/notify/sound",
+ cstring, NULL);
+ }
+
+ list = NULL;
+ folder = g_new0 (EMFolderTrayNotify, 1);
+ for (valid = gtk_tree_model_get_iter_first ((GtkTreeModel *) prefs->notify_folders_store, &iter); valid;
+ valid = gtk_tree_model_iter_next ((GtkTreeModel *) prefs->notify_folders_store, &iter)) {
+ gtk_tree_model_get ((GtkTreeModel *) prefs->notify_folders_store, &iter,
+ NOTIFY_NAME_COLUMN, &name,
+ NOTIFY_SOUND_COLUMN, &sound,
+ NOTIFY_ID_COLUMN, &id,
+ NOTIFY_IMAGE_COLUMN, &image,
+ NOTIFY_BEEP_COLUMN, &beep,
+ -1);
+
+ folder->name = name;
+ folder->sound = sound;
+ folder->id = id;
+ folder->image = image;
+ folder->beep = beep;
+
+ folder_xml = em_folder_tray_notify_to_xml (folder);
+
+ list = g_slist_append (list, folder_xml);
+ }
+ gconf_client_set_list (prefs->gconf, "/apps/evolution/mail/notify/folders",
+ GCONF_VALUE_STRING, list, NULL);
+ g_slist_foreach (list, (GFunc) g_free, NULL);
+ g_slist_free (list);
+
+ em_tray_folder_free (folder);
+ g_free (folder);
+
+ em_tray_folders_refresh ();
/* HTML Mail */
if (gtk_toggle_button_get_active (prefs->images_always))
Index: em-mailer-prefs.h
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-mailer-prefs.h,v
retrieving revision 1.6
diff -u -r1.6 em-mailer-prefs.h
--- em-mailer-prefs.h 12 Jan 2004 17:11:12 -0000 1.6
+++ em-mailer-prefs.h 27 Jan 2004 02:09:58 -0000
@@ -35,6 +35,7 @@
#include <libgnomeui/gnome-file-entry.h>
#include <libgnomeui/gnome-color-picker.h>
#include <libgnomeui/gnome-font-picker.h>
+#include <libgnomeui/gnome-icon-entry.h>
#include "evolution-config-control.h"
#include "em-format.h"
@@ -81,7 +82,28 @@
GtkToggleButton *confirm_expunge;
/* New Mail Notification */
- GtkToggleButton *notify_not;
+ guint notify_type;
+ GtkLabel *notify_desc;
+ GtkTreeView *notify_folders;
+ GtkListStore *notify_folders_store;
+
+ GtkOptionMenu *notify_menu;
+ GtkMenuItem *none_notify;
+ GtkMenuItem *all_folders_notify;
+ GtkMenuItem *selected_folders_notify;
+
+ GtkFrame *frame_folders;
+ GtkFrame *frame_image;
+ GtkFrame *frame_sound;
+
+ GnomeIconEntry *img_notify;
+
+ GtkButton *add_folder;
+ GtkButton *del_folder;
+
+ char *image_file;
+ char *sound_file;
+ gboolean play_beep;
GtkToggleButton *notify_beep;
GtkToggleButton *notify_play_sound;
GnomeFileEntry *notify_sound_file;
Index: evolution-mail.schemas.in.in
===================================================================
RCS file: /cvs/gnome/evolution/mail/evolution-mail.schemas.in.in,v
retrieving revision 1.5
diff -u -r1.5 evolution-mail.schemas.in.in
--- evolution-mail.schemas.in.in 14 Jan 2004 22:34:54 -0000 1.5
+++ evolution-mail.schemas.in.in 27 Jan 2004 02:09:58 -0000
@@ -499,6 +499,65 @@
<!-- New Mail Notification settings -->
<schema>
+ <key>/schemas/apps/evolution/mail/notify/beep</key>
+ <applyto>/apps/evolution/mail/notify/beep</applyto>
+ <owner>evolution-mail</owner>
+ <type>bool</type>
+ <default>1</default>
+ <locale name="C">
+ <short>Beep when new mail arrives</short>
+ <long>
+ Specify if the system must beep when new mail
+ arrives and all folders are selected
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/evolution/mail/notify/folders</key>
+ <applyto>/apps/evolution/mail/notify/folders</applyto>
+ <owner>evolution-mail</owner>
+ <type>list</type>
+ <list_type>string</list_type>
+ <locale name="C">
+ <short>List of folders</short>
+ <long>
+ List of folders for notify when new mail arrives
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/evolution/mail/notify/image</key>
+ <applyto>/apps/evolution/mail/notify/image</applyto>
+ <owner>evolution-mail</owner>
+ <type>string</type>
+ <default></default>
+ <locale name="C">
+ <short>Name of image</short>
+ <long>
+ Name of image to blink when new mail arrives and
+ all folders are selected
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/evolution/mail/notify/sound</key>
+ <applyto>/apps/evolution/mail/notify/sound</applyto>
+ <owner>evolution-mail</owner>
+ <type>string</type>
+ <default></default>
+ <locale name="C">
+ <short>Name of sound</short>
+ <long>
+ Name of sound to play when new mail arrives and
+ all folders are selected
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
<key>/schemas/apps/evolution/mail/notify/type</key>
<applyto>/apps/evolution/mail/notify/type</applyto>
<owner>evolution-mail</owner>
Index: mail-component-factory.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-component-factory.c,v
retrieving revision 1.7
diff -u -r1.7 mail-component-factory.c
--- mail-component-factory.c 3 Dec 2003 15:37:55 -0000 1.7
+++ mail-component-factory.c 27 Jan 2004 02:09:58 -0000
@@ -36,13 +36,13 @@
#include "mail-config-factory.h"
#include "mail-config.h"
#include "mail-mt.h"
+#include "em-panel-applet.h"
#include <bonobo-activation/bonobo-activation.h>
#include <bonobo/bonobo-shlib-factory.h>
#include <string.h>
-
#define FACTORY_ID "OAFIID:GNOME_Evolution_Mail_Factory:" BASE_VERSION
#define COMPONENT_ID "OAFIID:GNOME_Evolution_Mail_Component:" BASE_VERSION
@@ -88,6 +88,7 @@
static int init = 0;
if (!init) {
+ em_tray_init ();
mail_config_init ();
mail_msg_init ();
init = 1;
Index: mail-component.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-component.c,v
retrieving revision 1.42
diff -u -r1.42 mail-component.c
--- mail-component.c 13 Jan 2004 22:45:47 -0000 1.42
+++ mail-component.c 27 Jan 2004 02:09:58 -0000
@@ -68,6 +68,7 @@
#include <bonobo/bonobo-control.h>
#include <bonobo/bonobo-widget.h>
+#include "em-panel-applet.h"
#define d(x) x
Index: mail-config-factory.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-config-factory.c,v
retrieving revision 1.17
diff -u -r1.17 mail-config-factory.c
--- mail-config-factory.c 1 Dec 2003 22:14:33 -0000 1.17
+++ mail-config-factory.c 27 Jan 2004 02:09:58 -0000
@@ -84,7 +84,7 @@
data->prefs = prefs;
g_object_ref (prefs);
- gtk_widget_show_all (prefs);
+ gtk_widget_show (prefs);
control = evolution_config_control_new (prefs);
Index: mail-config.glade
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-config.glade,v
retrieving revision 1.128
diff -u -r1.128 mail-config.glade
--- mail-config.glade 12 Jan 2004 17:11:12 -0000 1.128
+++ mail-config.glade 27 Jan 2004 02:09:59 -0000
@@ -11,6 +11,11 @@
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
<widget class="GnomeDruid" id="druid">
@@ -158,6 +163,11 @@
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
<widget class="GtkNotebook" id="account_editor_notebook">
@@ -281,6 +291,7 @@
<property name="label" translatable="yes">_Make this my default account</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -630,6 +641,7 @@
<property name="label" translatable="yes">Add new signature...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<signal name="clicked" handler="sigAddNewClicked"/>
</widget>
<packing>
@@ -1263,6 +1275,10 @@
<property name="yalign">0.5</property>
<property name="xscale">1</property>
<property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
<child>
<widget class="GtkButton" id="source_check_supported">
@@ -1271,6 +1287,7 @@
<property name="label" translatable="yes"> _Check for supported types </property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
</widget>
</child>
</widget>
@@ -1296,6 +1313,7 @@
<property name="label" translatable="yes">Re_member this password</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -1434,6 +1452,7 @@
<property name="label" translatable="yes">_Automatically check for new mail every</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -1885,6 +1904,7 @@
<property name="label" translatable="yes">Ser_ver requires authentication</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -2008,6 +2028,10 @@
<property name="yalign">0.5</property>
<property name="xscale">1</property>
<property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
<child>
<widget class="GtkButton" id="transport_check_supported">
@@ -2016,6 +2040,7 @@
<property name="label" translatable="yes"> _Check for supported types </property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
</widget>
</child>
</widget>
@@ -2095,6 +2120,7 @@
<property name="label" translatable="yes">Remember this _password</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -2287,6 +2313,7 @@
<property name="label" translatable="yes">Restore Defaults</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -2362,6 +2389,7 @@
<property name="label" translatable="yes">Always _carbon-copy (Cc) to:</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -2383,6 +2411,7 @@
<property name="label" translatable="yes">Always _blind carbon-copy (Bcc) to:</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -2602,6 +2631,7 @@
<property name="label" translatable="yes">_Always sign outgoing messages when using this account</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -2620,6 +2650,7 @@
<property name="label" translatable="yes">Don't sign _meeting requests (for Outlook compatibility)</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -2638,6 +2669,7 @@
<property name="label" translatable="yes">Al_ways encrypt to myself when sending encrypted mail</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -2656,6 +2688,7 @@
<property name="label" translatable="yes">Always _trust keys in my keyring when encrypting</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -2815,6 +2848,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<child>
<widget class="GtkAlignment" id="alignment28">
@@ -2823,6 +2857,10 @@
<property name="yalign">0.5</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
<child>
<widget class="GtkHBox" id="hbox175">
@@ -2887,6 +2925,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<child>
<widget class="GtkAlignment" id="alignment29">
@@ -2895,6 +2934,10 @@
<property name="yalign">0.5</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
<child>
<widget class="GtkHBox" id="hbox176">
@@ -2961,6 +3004,7 @@
<property name="label">gtk-clear</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">3</property>
@@ -2979,6 +3023,7 @@
<property name="label">gtk-clear</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">3</property>
@@ -2997,6 +3042,7 @@
<property name="label" translatable="yes">A_lso encrypt to self when sending encrypted mail</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -3018,6 +3064,7 @@
<property name="label" translatable="yes">_Encrypt outgoing messages (by default)</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -3054,6 +3101,7 @@
<property name="label" translatable="yes">Digitally _sign outgoing messages (by default)</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -3138,6 +3186,11 @@
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
<widget class="GtkHBox" id="toplevel">
@@ -3203,6 +3256,7 @@
<property name="label">gtk-add</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
</widget>
</child>
@@ -3215,6 +3269,7 @@
<property name="label" translatable="yes">_Edit</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
</widget>
</child>
@@ -3227,6 +3282,7 @@
<property name="label">gtk-remove</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
</widget>
</child>
</widget>
@@ -3274,6 +3330,7 @@
<property name="label" translatable="yes">De_fault</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
</widget>
</child>
@@ -3286,6 +3343,7 @@
<property name="label" translatable="yes">E_nable</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
</widget>
</child>
</widget>
@@ -3313,6 +3371,11 @@
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
<widget class="GtkNotebook" id="toplevel">
@@ -3352,6 +3415,7 @@
<property name="label" translatable="yes">_Use the same fonts as other applications</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -3406,6 +3470,7 @@
<property name="show_size">True</property>
<property name="use_font_in_label">False</property>
<property name="label_font_size">14</property>
+ <property name="focus_on_click">True</property>
<signal name="font_set" handler="changed"/>
</widget>
<packing>
@@ -3427,6 +3492,7 @@
<property name="show_size">True</property>
<property name="use_font_in_label">False</property>
<property name="label_font_size">14</property>
+ <property name="focus_on_click">True</property>
<signal name="font_set" handler="changed"/>
</widget>
<packing>
@@ -3526,6 +3592,7 @@
<property name="label" translatable="yes">_Mark messages as read after</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -3667,6 +3734,7 @@
<property name="label" translatable="yes">Highlight _quotations with</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -3685,6 +3753,7 @@
<property name="dither">True</property>
<property name="use_alpha">False</property>
<property name="title" translatable="yes">Pick a color</property>
+ <property name="focus_on_click">True</property>
</widget>
<packing>
<property name="padding">0</property>
@@ -3770,6 +3839,7 @@
<property name="label" translatable="yes">Empty _trash folders on exit</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -3788,6 +3858,7 @@
<property name="label" translatable="yes">_Confirm when expunging a folder</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -3822,172 +3893,13 @@
</widget>
<packing>
<property name="padding">0</property>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
<child>
- <widget class="GtkFrame" id="frameNewMailNotify">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vboxNewMailNotify">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkRadioButton" id="radNotifyNot">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Do not notify me when new mail arrives</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="radNotifyBeep">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Beep when new mail arrives</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">radNotifyNot</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="radNotifyPlaySound">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Play sound file when new mail arrives</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">radNotifyNot</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox154">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="lblNotifyFilename">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Specify _filename:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">txtNotifyPlaySound</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeFileEntry" id="fileNotifyPlaySound">
- <property name="visible">True</property>
- <property name="max_saved">10</property>
- <property name="browse_dialog_title" translatable="yes">Execute Command...</property>
- <property name="directory_entry">False</property>
- <property name="modal">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="txtNotifyPlaySound">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label454">
- <property name="visible">True</property>
- <property name="label" translatable="yes">New Mail Notification</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
+ <placeholder/>
</child>
</widget>
<packing>
@@ -4043,6 +3955,7 @@
<property name="label" translatable="yes">_Never load images off the net</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -4061,6 +3974,7 @@
<property name="label" translatable="yes">_Load images if sender is in address book</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -4080,6 +3994,7 @@
<property name="label" translatable="yes">_Always load images off the net</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -4127,6 +4042,7 @@
<property name="label" translatable="yes">_Show animated images</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -4145,6 +4061,7 @@
<property name="label" translatable="yes">_Prompt when sending HTML messages to contacts that don't want them</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -4212,6 +4129,7 @@
<property name="dither">True</property>
<property name="use_alpha">False</property>
<property name="title" translatable="yes">Pick a color</property>
+ <property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -4230,6 +4148,7 @@
<property name="dither">True</property>
<property name="use_alpha">False</property>
<property name="title" translatable="yes">Pick a color</property>
+ <property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -4248,6 +4167,7 @@
<property name="dither">True</property>
<property name="use_alpha">False</property>
<property name="title" translatable="yes">Pick a color</property>
+ <property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -4266,6 +4186,7 @@
<property name="dither">True</property>
<property name="use_alpha">False</property>
<property name="title" translatable="yes">Pick a color</property>
+ <property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -4284,6 +4205,7 @@
<property name="dither">True</property>
<property name="use_alpha">False</property>
<property name="title" translatable="yes">Pick a color</property>
+ <property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -4412,6 +4334,7 @@
<property name="label" translatable="yes">_Restore defaults</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">2</property>
@@ -4585,6 +4508,7 @@
<property name="label">gtk-add</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
</widget>
<packing>
<property name="padding">6</property>
@@ -4600,6 +4524,7 @@
<property name="label">gtk-remove</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
</widget>
<packing>
<property name="padding">0</property>
@@ -4668,6 +4593,7 @@
<property name="label" translatable="yes">Check _Incoming Mail</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -4707,6 +4633,7 @@
<property name="label" translatable="yes">_Local Tests Only</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -4725,6 +4652,7 @@
<property name="label" translatable="yes">Use _Daemon</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -4788,6 +4716,539 @@
<property name="type">tab</property>
</packing>
</child>
+
+ <child>
+ <widget class="GtkVBox" id="vboxNewMailTab">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">3</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox177">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">3</property>
+
+ <child>
+ <widget class="GtkLabel" id="label478">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Notification _Type:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">omenu_NotifyType</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkOptionMenu" id="omenu_NotifyType">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="history">0</property>
+
+ <child>
+ <widget class="GtkMenu" id="menu1">
+
+ <child>
+ <widget class="GtkMenuItem" id="none_notify">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">None</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="all_folders_notify">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">All Folders</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="selected_folders_notify">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Selected Folders</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox178">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">3</property>
+
+ <child>
+ <widget class="GtkLabel" id="label479">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Description:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="lblDescNotifyType">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Do not notify when new mail arrived.</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox165">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">3</property>
+
+ <child>
+ <widget class="GtkFrame" id="frameFolders">
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox179">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">3</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow50">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="treeviewFolders">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">True</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox166">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">3</property>
+
+ <child>
+ <widget class="GtkButton" id="buttonAddFolder">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-add</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="buttonDelFolder">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-remove</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label485">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">
+
+
+
+
+
+</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label484">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Folders</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox181">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkFrame" id="frameImage">
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox180">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">3</property>
+
+ <child>
+ <widget class="GnomeIconEntry" id="iconentryImageNotify">
+ <property name="visible">True</property>
+ <property name="max_saved">10</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label486">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Image</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkFrame" id="frameSound">
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+ <child>
+ <widget class="GtkVBox" id="vboxNewMailNotify">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">3</property>
+
+ <child>
+ <widget class="GtkRadioButton" id="radNotifyBeep">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Beep when new mail arrives</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="radNotifyPlaySound">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Play sound file when new mail arrives</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">radNotifyBeep</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox154">
+ <property name="border_width">3</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">3</property>
+
+ <child>
+ <widget class="GtkLabel" id="lblNotifyFilename">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Specify _filename:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">txtNotifyPlaySound</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GnomeFileEntry" id="fileNotifyPlaySound">
+ <property name="visible">True</property>
+ <property name="max_saved">10</property>
+ <property name="browse_dialog_title" translatable="yes">Execute Command...</property>
+ <property name="directory_entry">False</property>
+ <property name="modal">False</property>
+
+ <child internal-child="entry">
+ <widget class="GtkEntry" id="txtNotifyPlaySound">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label454">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Sound</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="lblnewmail">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_New mail notify</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
</widget>
</child>
</widget>
@@ -4799,6 +5260,11 @@
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
<widget class="GtkNotebook" id="toplevel">
@@ -4895,6 +5361,10 @@
<property name="yalign">0.5</property>
<property name="xscale">0</property>
<property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
<child>
<widget class="GtkHBox" id="hboxReplyStyle">
@@ -5093,6 +5563,7 @@
<property name="label" translatable="yes">Format messages in _HTML</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -5111,6 +5582,7 @@
<property name="label" translatable="yes">_Automatically insert smiley images</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -5171,6 +5643,7 @@
<property name="label" translatable="yes">_Prompt when sending messages with an empty subject line</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -5189,6 +5662,7 @@
<property name="label" translatable="yes">Pr_ompt when sending messages with only Bcc recipients defined</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -5334,6 +5808,7 @@
<property name="label">gtk-add</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
</widget>
</child>
@@ -5345,6 +5820,7 @@
<property name="label" translatable="yes">Add Sc_ript</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<signal name="clicked" handler="cmdSignatureAddScriptClicked"/>
</widget>
</child>
@@ -5357,6 +5833,7 @@
<property name="label" translatable="yes">_Edit</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
</widget>
</child>
@@ -5368,6 +5845,7 @@
<property name="label">gtk-remove</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
</widget>
</child>
</widget>
@@ -5601,6 +6079,7 @@
<property name="label" translatable="yes">_Enable</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<signal name="clicked" handler="spellLanguageEnable"/>
</widget>
</child>
@@ -5647,6 +6126,7 @@
<property name="label" translatable="yes">Check spelling while I _type</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
@@ -5693,6 +6173,7 @@
<property name="dither">True</property>
<property name="use_alpha">False</property>
<property name="title" translatable="yes">Pick a color</property>
+ <property name="focus_on_click">True</property>
<signal name="color_set" handler="spellColorSet"/>
</widget>
<packing>
@@ -5772,6 +6253,11 @@
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
<widget class="GtkVBox" id="toplevel">
@@ -5860,6 +6346,7 @@
<property name="show_size">True</property>
<property name="use_font_in_label">False</property>
<property name="label_font_size">14</property>
+ <property name="focus_on_click">True</property>
<signal name="font_set" handler="changed"/>
</widget>
<packing>
@@ -5881,6 +6368,7 @@
<property name="show_size">True</property>
<property name="use_font_in_label">False</property>
<property name="label_font_size">14</property>
+ <property name="focus_on_click">True</property>
<signal name="font_set" handler="changed"/>
</widget>
<packing>
@@ -5931,6 +6419,11 @@
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="has_separator">True</property>
<child internal-child="vbox">
@@ -5952,6 +6445,7 @@
<property name="label" translatable="yes">_Add Signature</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="response_id">0</property>
</widget>
</child>
@@ -5964,6 +6458,7 @@
<property name="label">gtk-cancel</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<property name="response_id">0</property>
</widget>
</child>
Index: mail-config.h
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-config.h,v
retrieving revision 1.113
diff -u -r1.113 mail-config.h
--- mail-config.h 1 Dec 2003 18:28:26 -0000 1.113
+++ mail-config.h 27 Jan 2004 02:09:59 -0000
@@ -73,9 +73,10 @@
} MailConfigDisplayStyle;
typedef enum {
- MAIL_CONFIG_NOTIFY_NOT,
- MAIL_CONFIG_NOTIFY_BEEP,
- MAIL_CONFIG_NOTIFY_PLAY_SOUND,
+ MAIL_CONFIG_NOTIFY_NONE,
+ MAIL_CONFIG_NOTIFY_ALL,
+ MAIL_CONFIG_NOTIFY_SELECTED,
+ MAIL_CONFIG_NOTIFY_TYPES,
} MailConfigNewMailNotify;
typedef enum {
Index: mail-folder-cache.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-folder-cache.c,v
retrieving revision 1.78
diff -u -r1.78 mail-folder-cache.c
--- mail-folder-cache.c 16 Jan 2004 07:14:15 -0000 1.78
+++ mail-folder-cache.c 27 Jan 2004 02:09:59 -0000
@@ -46,6 +46,7 @@
#include "mail-ops.h"
#include "mail-session.h"
#include "mail-component.h"
+#include "em-panel-applet.h"
/* For notifications of changes */
#include "mail-vfolder.h"
@@ -147,28 +148,10 @@
static gboolean
notify_idle_cb (gpointer user_data)
{
- GConfClient *gconf;
- char *filename;
-
- gconf = mail_config_get_gconf_client ();
-
- switch (notify_type) {
- case MAIL_CONFIG_NOTIFY_PLAY_SOUND:
- filename = gconf_client_get_string (gconf, "/apps/evolution/mail/notify/sound", NULL);
- if (filename != NULL) {
- gnome_sound_play (filename);
- g_free (filename);
- }
- break;
- case MAIL_CONFIG_NOTIFY_BEEP:
- gdk_beep ();
- break;
- default:
- break;
- }
-
+ char *uri = (char *) user_data;
+
+ em_tray_notify (uri, notify_type);
time (&last_notify);
-
notify_idle_id = 0;
return FALSE;
@@ -189,6 +172,7 @@
struct _folder_update *up;
struct _store_info *si;
time_t now;
+ char *uri;
component = mail_component_peek ();
model = mail_component_peek_tree_model (component);
@@ -238,8 +222,10 @@
}
time (&now);
- if (notify_type != 0 && up->new && notify_idle_id == 0 && (now - last_notify >= 5))
- notify_idle_id = g_idle_add_full (G_PRIORITY_LOW, notify_idle_cb, NULL, NULL);
+ if (notify_type != 0 && up->new && notify_idle_id == 0 && (now - last_notify >= 5)) {
+ uri = g_strdup (notify_type == MAIL_CONFIG_NOTIFY_ALL ? up->path : up->uri);
+ notify_idle_id = g_idle_add_full (G_PRIORITY_LOW, notify_idle_cb, uri, NULL);
+ }
free_update(up);
@@ -353,6 +339,7 @@
up = g_malloc0(sizeof(*up));
up->path = g_strdup(mfi->path);
+ up->uri = g_strdup (mfi->uri);
up->unread = unread;
up->new = new ? 1 : 0;
up->store = mfi->store_info->store;
Index: mail-tools.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-tools.c,v
retrieving revision 1.124
diff -u -r1.124 mail-tools.c
--- mail-tools.c 4 Dec 2003 20:31:48 -0000 1.124
+++ mail-tools.c 27 Jan 2004 02:10:00 -0000
@@ -354,7 +354,7 @@
camel_url_free (url);
g_free(curi);
-
+
return folder;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]