From e84757b92e0c767f79099d0cf738f1ca998abf5e Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Sun, 20 Jul 2008 19:19:03 +0000 Subject: Committing on behalf of Milan Crha 2008-07-16 Milan Crha ** Fix for bug #543134 * mail-notification.c: (get_cfg_widget), (do_properties), (popup_menu_status), (new_notify_status), (e_plugin_lib_get_configure_widget): Show popup menu when right-click over the status icon. svn path=/trunk/; revision=35782 --- plugins/mail-notification/ChangeLog | 9 ++ plugins/mail-notification/mail-notification.c | 137 +++++++++++++++++++++----- 2 files changed, 120 insertions(+), 26 deletions(-) (limited to 'plugins/mail-notification') diff --git a/plugins/mail-notification/ChangeLog b/plugins/mail-notification/ChangeLog index b14337ce9a..17dc034bee 100644 --- a/plugins/mail-notification/ChangeLog +++ b/plugins/mail-notification/ChangeLog @@ -1,3 +1,12 @@ +2008-07-16 Milan Crha + + ** Fix for bug #543134 + + * mail-notification.c: (get_cfg_widget), (do_properties), + (popup_menu_status), (new_notify_status), + (e_plugin_lib_get_configure_widget): + Show popup menu when right-click over the status icon. + 2008-01-28 Johnny Jacob * mail-notification.c (new_notify_status): Adding proper diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c index 8af29023b8..3625ecf9ee 100644 --- a/plugins/mail-notification/mail-notification.c +++ b/plugins/mail-notification/mail-notification.c @@ -55,6 +55,7 @@ #define GCONF_KEY_ENABLED_SOUND GCONF_KEY_ROOT "sound-enabled" static gboolean enabled = FALSE; +static GtkWidget *get_cfg_widget (void); /** * each part should "implement" its own "public" functions: @@ -347,6 +348,82 @@ toggled_status_cb (GtkWidget *widget, gpointer data) /* ------------------------------------------------------------------- */ +static void +do_properties (GtkMenuItem *item, gpointer user_data) +{ + GtkWidget *cfg, *dialog, *vbox, *label, *hbox; + char *text; + + cfg = get_cfg_widget (); + if (!cfg) + return; + + text = g_strconcat ("", _("Evolution's Mail Notification"), "", NULL); + + vbox = gtk_vbox_new (FALSE, 10); + label = gtk_label_new (NULL); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_label_set_use_markup (GTK_LABEL (label), TRUE); + gtk_label_set_markup (GTK_LABEL (label), text); + g_free (text); + + gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); + gtk_widget_show (label); + gtk_widget_show (vbox); + + hbox = gtk_hbox_new (FALSE, 10); + label = gtk_label_new (" "); + gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); + gtk_widget_show_all (hbox); + + gtk_box_pack_start (GTK_BOX (hbox), cfg, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0); + + dialog = gtk_dialog_new_with_buttons (_("Mail Notification Properties"), + NULL, + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, + NULL); + + gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox); + gtk_container_set_border_width (GTK_CONTAINER (vbox), 10); + gtk_widget_set_size_request (dialog, 400, -1); + g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog); + gtk_widget_show (dialog); +} + +static void +popup_menu_status (GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data) +{ + GtkMenu *menu; + GtkWidget *item; + + menu = GTK_MENU (gtk_menu_new ()); + + item = gtk_image_menu_item_new_from_stock (GTK_STOCK_CLOSE, NULL); + #ifdef HAVE_LIBNOTIFY + g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (icon_activated), notify); + #else + g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (icon_activated), NULL); + #endif + gtk_widget_show (item); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); + + item = gtk_separator_menu_item_new (); + gtk_widget_show (item); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); + + item = gtk_image_menu_item_new_from_stock (GTK_STOCK_PROPERTIES, NULL); + g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (do_properties), NULL); + gtk_widget_show (item); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); + + g_object_ref_sink (menu); + gtk_menu_popup (menu, NULL, NULL, NULL, NULL, button, activate_time); + g_object_unref (menu); +} + static void new_notify_status (EMEventTargetFolder *t) { @@ -399,6 +476,8 @@ new_notify_status (EMEventTargetFolder *t) #else g_signal_connect (G_OBJECT (status_icon), "activate", G_CALLBACK (icon_activated), NULL); #endif + + g_signal_connect (G_OBJECT (status_icon), "popup-menu", G_CALLBACK (popup_menu_status), NULL); } static void @@ -694,6 +773,37 @@ toggled_only_inbox_cb (GtkWidget *widget, gpointer data) set_part_enabled (GCONF_KEY_NOTIFY_ONLY_INBOX, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))); } +static GtkWidget * +get_cfg_widget (void) +{ + GtkWidget *cfg, *vbox, *check; + + vbox = gtk_vbox_new (FALSE, 6); + check = gtk_check_button_new_with_mnemonic (_("Notify new messages for _Inbox only")); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), is_part_enabled (GCONF_KEY_NOTIFY_ONLY_INBOX)); + g_signal_connect (G_OBJECT (check), "toggled", G_CALLBACK (toggled_only_inbox_cb), NULL); + gtk_widget_show (check); + gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0); + +#ifdef HAVE_DBUS + cfg = get_config_widget_dbus (); + if (cfg) + gtk_box_pack_start (GTK_BOX (vbox), cfg, FALSE, FALSE, 0); +#endif + cfg = get_config_widget_status (); + if (cfg) + gtk_box_pack_start (GTK_BOX (vbox), cfg, FALSE, FALSE, 0); + + cfg = get_config_widget_sound (); + if (cfg) + gtk_box_pack_start (GTK_BOX (vbox), cfg, FALSE, FALSE, 0); + + gtk_widget_show (vbox); + + return vbox; +} + void org_gnome_mail_new_notify (EPlugin *ep, EMEventTargetFolder *t); void org_gnome_mail_read_notify (EPlugin *ep, EMEventTargetMessage *t); @@ -779,30 +889,5 @@ e_plugin_lib_enable (EPluginLib *ep, int enable) GtkWidget * e_plugin_lib_get_configure_widget (EPlugin *epl) { - GtkWidget *cfg, *vbox, *check; - - vbox = gtk_vbox_new (FALSE, 6); - check = gtk_check_button_new_with_mnemonic (_("Notify new messages for _Inbox only")); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), is_part_enabled (GCONF_KEY_NOTIFY_ONLY_INBOX)); - g_signal_connect (G_OBJECT (check), "toggled", G_CALLBACK (toggled_only_inbox_cb), NULL); - gtk_widget_show (check); - gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0); - -#ifdef HAVE_DBUS - cfg = get_config_widget_dbus (); - if (cfg) - gtk_box_pack_start (GTK_BOX (vbox), cfg, FALSE, FALSE, 0); -#endif - cfg = get_config_widget_status (); - if (cfg) - gtk_box_pack_start (GTK_BOX (vbox), cfg, FALSE, FALSE, 0); - - cfg = get_config_widget_sound (); - if (cfg) - gtk_box_pack_start (GTK_BOX (vbox), cfg, FALSE, FALSE, 0); - - gtk_widget_show (vbox); - - return vbox; + return get_cfg_widget (); } -- cgit v1.2.3 From 5e4b6fcb89797b533b9a741c491ec592d2a06721 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 22 Jul 2008 08:43:06 +0000 Subject: ** Fix for bug #544022 2008-07-22 Milan Crha ** Fix for bug #544022 * configure.in: Do not redefine DBUS_VERSION define supplied by dbus itself, rather rename our define to FOUND_DBUS_VERSION. * mail/e-searching-tokenizer.c: (dump_trie): Define function only when required. (Compiler warning cleanup.) * shell/e-shell-window-commands.c: (char *authors[]): Break the escape sequence properly (compiler warning cleanup). * plugins/email-custom-header/email-custom-header.c: Compiler warning cleanup. * plugins/mail-notification/Makefile.am: * plugins/mail-notification/mail-notification.c: (send_dbus_message): Do not redefine DBUS_VERSION define, it's supplied by dbus itself. svn path=/trunk/; revision=35819 --- plugins/mail-notification/ChangeLog | 8 ++++++++ plugins/mail-notification/Makefile.am | 2 +- plugins/mail-notification/mail-notification.c | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'plugins/mail-notification') diff --git a/plugins/mail-notification/ChangeLog b/plugins/mail-notification/ChangeLog index 17dc034bee..0d1c8e60ca 100644 --- a/plugins/mail-notification/ChangeLog +++ b/plugins/mail-notification/ChangeLog @@ -1,3 +1,11 @@ +2008-07-22 Milan Crha + + ** Part of fix for bug #544022 + + * Makefile.am: + * mail-notification.c: (send_dbus_message): Do not redefine + DBUS_VERSION define, it's supplied by dbus itself. + 2008-07-16 Milan Crha ** Fix for bug #543134 diff --git a/plugins/mail-notification/Makefile.am b/plugins/mail-notification/Makefile.am index 38b4f051f7..86fc91cc11 100644 --- a/plugins/mail-notification/Makefile.am +++ b/plugins/mail-notification/Makefile.am @@ -5,7 +5,7 @@ INCLUDES = \ if ENABLE_DBUS INCLUDES += -DDBUS_API_SUBJECT_TO_CHANGE=1 \ - -DDBUS_VERSION=$(DBUS_VERSION) \ + -DFOUND_DBUS_VERSION=$(FOUND_DBUS_VERSION) \ $(NMN_CFLAGS) endif diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c index 3625ecf9ee..f9bfd4b8dd 100644 --- a/plugins/mail-notification/mail-notification.c +++ b/plugins/mail-notification/mail-notification.c @@ -136,7 +136,7 @@ send_dbus_message (const char *name, const char *data, guint new) /* Appends the data as an argument to the message */ dbus_message_append_args (message, -#if DBUS_VERSION >= 310 +#if FOUND_DBUS_VERSION >= 310 DBUS_TYPE_STRING, &data, #else DBUS_TYPE_STRING, data, @@ -146,7 +146,7 @@ send_dbus_message (const char *name, const char *data, guint new) if (new) { char * display_name = em_utils_folder_name_from_uri (data); dbus_message_append_args (message, -#if DBUS_VERSION >= 310 +#if FOUND_DBUS_VERSION >= 310 DBUS_TYPE_STRING, &display_name, DBUS_TYPE_UINT32, &new, #else DBUS_TYPE_STRING, display_name, DBUS_TYPE_UINT32, new, -- cgit v1.2.3 From a7fa2367752b6d3b0c74d3391b5cf861027f122c Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 1 Aug 2008 07:17:26 +0000 Subject: ** Fix for bug #353927 2008-08-01 Milan Crha ** Fix for bug #353927 * calendar/gui/alarm-notify/alarm-queue.c: (tray_icon_blink_cb), (display_notification): Do not blink the icon more than 15 seconds. * plugins/mail-notification/mail-notification.c: (icon_activated), (stop_blinking_cb), (new_notify_status): Do not blink the icon more than 15 seconds. svn path=/trunk/; revision=35875 --- plugins/mail-notification/ChangeLog | 7 +++++++ plugins/mail-notification/mail-notification.c | 27 +++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) (limited to 'plugins/mail-notification') diff --git a/plugins/mail-notification/ChangeLog b/plugins/mail-notification/ChangeLog index 0d1c8e60ca..d0f0766b07 100644 --- a/plugins/mail-notification/ChangeLog +++ b/plugins/mail-notification/ChangeLog @@ -1,3 +1,10 @@ +2008-08-01 Milan Crha + + ** Part of fix for bug #353927 + + * mail-notification.c: (icon_activated), (stop_blinking_cb), + (new_notify_status): Do not blink the icon more than 15 seconds. + 2008-07-22 Milan Crha ** Part of fix for bug #544022 diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c index f9bfd4b8dd..afa633c999 100644 --- a/plugins/mail-notification/mail-notification.c +++ b/plugins/mail-notification/mail-notification.c @@ -271,6 +271,7 @@ get_config_widget_dbus (void) #define GCONF_KEY_STATUS_NOTIFICATION GCONF_KEY_ROOT "status-notification" static GtkStatusIcon *status_icon = NULL; +static guint blink_timeout_id = 0; static unsigned int status_count = 0; #ifdef HAVE_LIBNOTIFY @@ -295,6 +296,11 @@ icon_activated (GtkStatusIcon *icon, gpointer pnotify) gtk_status_icon_set_visible (status_icon, FALSE); g_object_unref (status_icon); + if (blink_timeout_id) { + g_source_remove (blink_timeout_id); + blink_timeout_id = 0; + } + status_icon = NULL; status_count = 0; } @@ -307,6 +313,17 @@ notification_callback (gpointer notify) } #endif +static gboolean +stop_blinking_cb (gpointer data) +{ + blink_timeout_id = 0; + + if (status_icon) + gtk_status_icon_set_blinking (status_icon, FALSE); + + return FALSE; +} + struct _StatusConfigureWidgets { GtkWidget *enable; @@ -428,8 +445,9 @@ static void new_notify_status (EMEventTargetFolder *t) { char *msg; + gboolean new_icon = !status_icon; - if (!status_icon) { + if (new_icon) { status_icon = gtk_status_icon_new (); gtk_status_icon_set_from_pixbuf (status_icon, e_icon_factory_get_icon ("mail-unread", E_ICON_SIZE_LARGE_TOOLBAR)); } @@ -447,8 +465,13 @@ new_notify_status (EMEventTargetFolder *t) } gtk_status_icon_set_tooltip (status_icon, msg); + + if (new_icon && is_part_enabled (GCONF_KEY_STATUS_BLINK)) { + gtk_status_icon_set_blinking (status_icon, TRUE); + blink_timeout_id = g_timeout_add_seconds (15, stop_blinking_cb, NULL); + } + gtk_status_icon_set_visible (status_icon, TRUE); - gtk_status_icon_set_blinking (status_icon, is_part_enabled (GCONF_KEY_STATUS_BLINK)); #ifdef HAVE_LIBNOTIFY /* Now check whether we're supposed to send notifications */ -- cgit v1.2.3 From 97a20c1a2b84836a570b6d320d30244f9b515f9a Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 1 Aug 2008 19:39:15 +0000 Subject: ** Fixes bug #514006 2008-08-01 Matthew Barnes ** Fixes bug #514006 * mail/apps-evolution-mail-notification.schemas.in: * plugins/mail-notification/apps-evolution-mail-notification.schemas.in: Quote literal values. svn path=/trunk/; revision=35889 --- plugins/mail-notification/ChangeLog | 7 +++++++ .../mail-notification/apps-evolution-mail-notification.schemas.in | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'plugins/mail-notification') diff --git a/plugins/mail-notification/ChangeLog b/plugins/mail-notification/ChangeLog index d0f0766b07..278f8bb93a 100644 --- a/plugins/mail-notification/ChangeLog +++ b/plugins/mail-notification/ChangeLog @@ -1,3 +1,10 @@ +2008-08-01 Matthew Barnes + + ** Fixes part of bug #514006 + + * apps-evolution-mail-notification.schemas.in: + Quote literal values. + 2008-08-01 Milan Crha ** Part of fix for bug #353927 diff --git a/plugins/mail-notification/apps-evolution-mail-notification.schemas.in b/plugins/mail-notification/apps-evolution-mail-notification.schemas.in index 4bdafcfec1..c0a038068d 100644 --- a/plugins/mail-notification/apps-evolution-mail-notification.schemas.in +++ b/plugins/mail-notification/apps-evolution-mail-notification.schemas.in @@ -77,7 +77,7 @@ true Beep or play sound file. - If true, then beep, otherwise will play sound file when new messages arrive. + If "true", then beep, otherwise will play sound file when new messages arrive. -- cgit v1.2.3 From 434bc25ed6b3f458f3bf119e76bd8b2bcffe5178 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 11 Aug 2008 17:04:32 +0000 Subject: ** Fixes bug #546892 2008-08-11 Matthew Barnes ** Fixes bug #546892 * e-util/e-icon-factory.c (e_icon_factory_get_image): Kill this function. Use gtk_image_new_from_icon_name(). * e-util/e-icon-factory.c (e_icon_factory_get_icon_list): Kill this function. Use gtk_window_set_icon_name(). * widgets/misc/e-activity-handler.c: * widgets/misc/e-task-widget.c: Purge the GdkPixbuf arguments from the API. We've been ignoring them since the spinner icon was added. * addressbook/gui/contact-editor/e-contact-editor-fullname.c: * addressbook/gui/contact-editor/e-contact-editor-im.c: * addressbook/gui/contact-editor/e-contact-editor-address.c: * calendar/gui/alarm-notify/alarm-notify-dialog.c: * calendar/gui/dialogs/alarm-dialog.c: * calendar/gui/dialogs/alarm-list-dialog.c: * calendar/gui/dialogs/cal-attachment-select-file.c: * calendar/gui/dialogs/changed-comp.c: * calendar/gui/dialogs/delete-error.c: * calendar/gui/dialogs/select-source-dialog.c: * mail/mail-send-recv.c: * mail/message-tag-followup.c: * widgets/misc/e-combo-button.c: * widgets/misc/e-info-label.c: * widgets/misc/e-url-entry.c: * widgets/misc/e-task-widget.c: Prefer gtk_window_set_icon_name() over gtk_window_set_icon_list(). * addressbook/gui/contact-editor/e-contact-editor-im.c: * calendar/gui/dialogs/event-page.c: * calendar/gui/e-timezone-entry.c: * e-util/e-gui-utils.c: * e-util/e-popup.c: * plugins/import-ics-attachments/icsimporter.c: * plugins/itip-formatter/itip-view.c: * mail/em-folder-browser.c: * mail/em-format-html-display.c: * mail/mail-send-recv.c: * mail/message-tag-followup.c: Prefer gtk_image_new_from_icon_name() over e_icon_factory_get_image(). * calendar/gui/alarm-notify/alarm-queue.c: * plugins/mail-notification/mail-notification.c: Prefer gtk_status_icon_set_from_icon_name() over gtk_status_icon_set_from_pixbuf(). * addressbook/gui/component/addressbook-view.c: * calendar/gui/e-calendar-table.c: * calendar/gui/e-calendar-view.c: * calendar/gui/e-memo-table.c: * mail/mail-mt.c: e_activity_handler_operation_started() no longer takes a GdkPixbuf. It was ignoring the pixbuf anyway ever since we added a spinner icon. svn path=/trunk/; revision=35958 --- plugins/mail-notification/ChangeLog | 8 ++++++++ plugins/mail-notification/mail-notification.c | 3 +-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'plugins/mail-notification') diff --git a/plugins/mail-notification/ChangeLog b/plugins/mail-notification/ChangeLog index 278f8bb93a..7a42367563 100644 --- a/plugins/mail-notification/ChangeLog +++ b/plugins/mail-notification/ChangeLog @@ -1,3 +1,11 @@ +2008-08-11 Matthew Barnes + + ** Fixes part of bug #546892 + + * mail-notification.c: + Prefer gtk_status_icon_set_from_icon_name() over + gtk_status_icon_set_from_pixbuf(). + 2008-08-01 Matthew Barnes ** Fixes part of bug #514006 diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c index afa633c999..9826f5a06d 100644 --- a/plugins/mail-notification/mail-notification.c +++ b/plugins/mail-notification/mail-notification.c @@ -38,7 +38,6 @@ #include #include "e-util/e-config.h" -#include "e-util/e-icon-factory.h" #include "mail/em-utils.h" #include "mail/em-event.h" #include "mail/em-folder-tree-model.h" @@ -449,7 +448,7 @@ new_notify_status (EMEventTargetFolder *t) if (new_icon) { status_icon = gtk_status_icon_new (); - gtk_status_icon_set_from_pixbuf (status_icon, e_icon_factory_get_icon ("mail-unread", E_ICON_SIZE_LARGE_TOOLBAR)); + gtk_status_icon_set_from_icon_name (status_icon, "mail-unread"); } if (!status_count) { -- cgit v1.2.3 From e860673f10fd166bb28c78f0535b0eac635f4aa9 Mon Sep 17 00:00:00 2001 From: Bharath Acharya Date: Tue, 12 Aug 2008 04:19:31 +0000 Subject: Have a check for OS_WIN32 and handle the schema data differently. make 2008-08-12 Bharath Acharya * Makefile.am: Have a check for OS_WIN32 and handle the schema * data differently. make install error on win32. svn path=/trunk/; revision=35961 --- plugins/mail-notification/ChangeLog | 5 +++++ plugins/mail-notification/Makefile.am | 21 +++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) (limited to 'plugins/mail-notification') diff --git a/plugins/mail-notification/ChangeLog b/plugins/mail-notification/ChangeLog index 7a42367563..81039caa5c 100644 --- a/plugins/mail-notification/ChangeLog +++ b/plugins/mail-notification/ChangeLog @@ -1,3 +1,8 @@ +2008-08-12 Bharath Acharya + + * Makefile.am: Have a check for OS_WIN32 and handle the schema data + differently. make install error on win32. + 2008-08-11 Matthew Barnes ** Fixes part of bug #546892 diff --git a/plugins/mail-notification/Makefile.am b/plugins/mail-notification/Makefile.am index 86fc91cc11..80b4fbcc98 100644 --- a/plugins/mail-notification/Makefile.am +++ b/plugins/mail-notification/Makefile.am @@ -29,12 +29,25 @@ schema_DATA = $(schema_in_files:.schemas.in=.schemas) @INTLTOOL_SCHEMAS_RULE@ +if OS_WIN32 install-data-local: - if test -z "$(DESTDIR)" ; then \ - for p in $(schema_DATA) ; do \ - GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p; \ - done \ + if test -z "$(DESTDIR)" ; then \ + for p in $(schema_DATA) ; do \ + (echo set GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE); \ + echo $(GCONFTOOL) --makefile-install-rule $$p) >_temp.bat; \ + cmd /c _temp.bat; \ + rm _temp.bat; \ + done \ fi +else +install-data-local: + if test -z "$(DESTDIR)" ; then \ + for p in $(schema_DATA) ; do \ + GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ + $(GCONFTOOL) --makefile-install-rule $$p; \ + done \ + fi +endif BUILT_SOURCES = $(plugin_DATA) -- cgit v1.2.3 From 75bfbd29eeaec8d9949ffb7d6f2012af450e1ee0 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 15 Sep 2008 17:40:29 +0000 Subject: ** Fix for bug #514299 2008-09-15 Milan Crha ** Fix for bug #514299 * mail-notification.c: (new_notify_status): Connect to signals only once, when creating new status icon. svn path=/trunk/; revision=36338 --- plugins/mail-notification/ChangeLog | 7 +++++++ plugins/mail-notification/mail-notification.c | 14 ++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) (limited to 'plugins/mail-notification') diff --git a/plugins/mail-notification/ChangeLog b/plugins/mail-notification/ChangeLog index 81039caa5c..9854328ee7 100644 --- a/plugins/mail-notification/ChangeLog +++ b/plugins/mail-notification/ChangeLog @@ -1,3 +1,10 @@ +2008-09-15 Milan Crha + + ** Fix for bug #514299 + + * mail-notification.c: (new_notify_status): + Connect to signals only once, when creating new status icon. + 2008-08-12 Bharath Acharya * Makefile.am: Have a check for OS_WIN32 and handle the schema data diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c index 9826f5a06d..b568b0061d 100644 --- a/plugins/mail-notification/mail-notification.c +++ b/plugins/mail-notification/mail-notification.c @@ -493,13 +493,15 @@ new_notify_status (EMEventTargetFolder *t) g_free (msg); - #ifdef HAVE_LIBNOTIFY - g_signal_connect (G_OBJECT (status_icon), "activate", G_CALLBACK (icon_activated), notify); - #else - g_signal_connect (G_OBJECT (status_icon), "activate", G_CALLBACK (icon_activated), NULL); - #endif + if (new_icon) { + #ifdef HAVE_LIBNOTIFY + g_signal_connect (G_OBJECT (status_icon), "activate", G_CALLBACK (icon_activated), notify); + #else + g_signal_connect (G_OBJECT (status_icon), "activate", G_CALLBACK (icon_activated), NULL); + #endif - g_signal_connect (G_OBJECT (status_icon), "popup-menu", G_CALLBACK (popup_menu_status), NULL); + g_signal_connect (G_OBJECT (status_icon), "popup-menu", G_CALLBACK (popup_menu_status), NULL); + } } static void -- cgit v1.2.3 From 79d878670a311644f188f671cbc4e60193100558 Mon Sep 17 00:00:00 2001 From: Sankarasivasubramanian Pasupathilingam Date: Tue, 16 Sep 2008 10:52:29 +0000 Subject: License changes from GPL to LGPL svn path=/trunk/; revision=36344 --- plugins/mail-notification/ChangeLog | 6 ++++++ plugins/mail-notification/mail-notification.c | 27 ++++++++++++++------------- 2 files changed, 20 insertions(+), 13 deletions(-) (limited to 'plugins/mail-notification') diff --git a/plugins/mail-notification/ChangeLog b/plugins/mail-notification/ChangeLog index 9854328ee7..3e489aca96 100644 --- a/plugins/mail-notification/ChangeLog +++ b/plugins/mail-notification/ChangeLog @@ -1,3 +1,9 @@ +2008-09-16 Sankar P + +License Changes + + * mail-notification.c: + 2008-09-15 Milan Crha ** Fix for bug #514299 diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c index b568b0061d..f3da922a79 100644 --- a/plugins/mail-notification/mail-notification.c +++ b/plugins/mail-notification/mail-notification.c @@ -1,21 +1,22 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * Author: Miguel Angel Lopez Hernandez + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) + * 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 + * Lesser General Public License for more details. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see * - * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * Authors: + * Miguel Angel Lopez Hernandez + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * */ -- cgit v1.2.3 From 31e212934cb4fcb43eb0836758546e2a8ae294e5 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Wed, 19 Nov 2008 05:55:21 +0000 Subject: ** Fix for BNC bug #434320 2008-11-19 Srinivasa Ragavan ** Fix for BNC bug #434320 * plugins/mail-notification/mail-notification.c: When the popup is clicked close the status icon. svn path=/trunk/; revision=36802 --- plugins/mail-notification/ChangeLog | 7 +++++++ plugins/mail-notification/mail-notification.c | 21 ++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) (limited to 'plugins/mail-notification') diff --git a/plugins/mail-notification/ChangeLog b/plugins/mail-notification/ChangeLog index 3e489aca96..2612fd6ae5 100644 --- a/plugins/mail-notification/ChangeLog +++ b/plugins/mail-notification/ChangeLog @@ -1,3 +1,10 @@ +2008-11-19 Srinivasa Ragavan + + ** Fix for BNC bug #434320 + + * plugins/mail-notification/mail-notification.c: When the popup is + clicked close the status icon. + 2008-09-16 Sankar P License Changes diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c index f3da922a79..58db560c64 100644 --- a/plugins/mail-notification/mail-notification.c +++ b/plugins/mail-notification/mail-notification.c @@ -56,6 +56,7 @@ static gboolean enabled = FALSE; static GtkWidget *get_cfg_widget (void); +static GStaticMutex mlock = G_STATIC_MUTEX_INIT; /** * each part should "implement" its own "public" functions: @@ -441,6 +442,24 @@ popup_menu_status (GtkStatusIcon *status_icon, guint button, guint activate_time g_object_unref (menu); } +static void +notifyActionCallback (NotifyNotification *n, gchar *label, gpointer a) +{ + g_static_mutex_lock (&mlock); + + gtk_status_icon_set_visible (status_icon, FALSE); + g_object_unref (status_icon); + + if (blink_timeout_id) { + g_source_remove (blink_timeout_id); + blink_timeout_id = 0; + } + + status_icon = NULL; + status_count = 0; + g_static_mutex_unlock (&mlock); +} + static void new_notify_status (EMEventTargetFolder *t) { @@ -487,6 +506,7 @@ new_notify_status (EMEventTargetFolder *t) notify_notification_set_urgency (notify, NOTIFY_URGENCY_NORMAL); notify_notification_set_timeout (notify, NOTIFY_EXPIRES_DEFAULT); + notify_notification_add_action(notify, "default", "Default", notifyActionCallback, NULL, NULL); g_timeout_add (500, notification_callback, notify); } } @@ -835,7 +855,6 @@ void org_gnome_mail_read_notify (EPlugin *ep, EMEventTargetMessage *t); int e_plugin_lib_enable (EPluginLib *ep, int enable); GtkWidget *e_plugin_lib_get_configure_widget (EPlugin *epl); -static GStaticMutex mlock = G_STATIC_MUTEX_INIT; void org_gnome_mail_new_notify (EPlugin *ep, EMEventTargetFolder *t) -- cgit v1.2.3 From af0ebad402b39d919573b52973926caea8fee9d5 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Wed, 19 Nov 2008 16:12:13 +0000 Subject: Fix compilation error. 2008-11-19 Srinivasa Ragavan * mail-notification.c: Fix compilation error. svn path=/trunk/; revision=36804 --- plugins/mail-notification/ChangeLog | 4 ++++ plugins/mail-notification/mail-notification.c | 2 ++ 2 files changed, 6 insertions(+) (limited to 'plugins/mail-notification') diff --git a/plugins/mail-notification/ChangeLog b/plugins/mail-notification/ChangeLog index 2612fd6ae5..96c5abc9e4 100644 --- a/plugins/mail-notification/ChangeLog +++ b/plugins/mail-notification/ChangeLog @@ -1,3 +1,7 @@ +2008-11-19 Srinivasa Ragavan + + * mail-notification.c: Fix compilation error. + 2008-11-19 Srinivasa Ragavan ** Fix for BNC bug #434320 diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c index 58db560c64..a501d99bb1 100644 --- a/plugins/mail-notification/mail-notification.c +++ b/plugins/mail-notification/mail-notification.c @@ -442,6 +442,7 @@ popup_menu_status (GtkStatusIcon *status_icon, guint button, guint activate_time g_object_unref (menu); } +#ifdef HAVE_LIBNOTIFY static void notifyActionCallback (NotifyNotification *n, gchar *label, gpointer a) { @@ -459,6 +460,7 @@ notifyActionCallback (NotifyNotification *n, gchar *label, gpointer a) status_count = 0; g_static_mutex_unlock (&mlock); } +#endif static void new_notify_status (EMEventTargetFolder *t) -- cgit v1.2.3 From efc7b4570b9a2da63c19b66b207dd1f3b2aa5cd6 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 28 Jan 2009 17:27:47 +0000 Subject: Use -no-undefined and link with GNOME_PLATFORM_LIBS on Windows. 2009-01-28 Tor Lillqvist * Makefile.am: Use -no-undefined and link with GNOME_PLATFORM_LIBS on Windows. svn path=/trunk/; revision=37151 --- plugins/mail-notification/ChangeLog | 5 +++++ plugins/mail-notification/Makefile.am | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'plugins/mail-notification') diff --git a/plugins/mail-notification/ChangeLog b/plugins/mail-notification/ChangeLog index 96c5abc9e4..c08225cdda 100644 --- a/plugins/mail-notification/ChangeLog +++ b/plugins/mail-notification/ChangeLog @@ -1,3 +1,8 @@ +2009-01-28 Tor Lillqvist + + * Makefile.am: Use -no-undefined and link with GNOME_PLATFORM_LIBS + on Windows. + 2008-11-19 Srinivasa Ragavan * mail-notification.c: Fix compilation error. diff --git a/plugins/mail-notification/Makefile.am b/plugins/mail-notification/Makefile.am index 80b4fbcc98..627fd93bed 100644 --- a/plugins/mail-notification/Makefile.am +++ b/plugins/mail-notification/Makefile.am @@ -1,3 +1,7 @@ +if OS_WIN32 +NO_UNDEFINED_REQUIRED_LIBS = $(GNOME_PLATFORM_LIBS) +endif + INCLUDES = \ -I$(top_srcdir) \ $(EVOLUTION_MAIL_CFLAGS) \ @@ -16,8 +20,10 @@ plugin_LTLIBRARIES = liborg-gnome-mail-notification.la liborg_gnome_mail_notification_la_SOURCES = mail-notification.c liborg_gnome_mail_notification_la_LDFLAGS = \ - -module -avoid-version \ - $(LIBNOTIFY_LIBS) + -module -avoid-version $(NO_UNDEFINED) +liborg_gnome_mail_notification_la_LIBADD = \ + $(LIBNOTIFY_LIBS) \ + $(NO_UNDEFINED_REQUIRED_LIBS) if ENABLE_DBUS liborg_gnome_mail_notification_la_LDFLAGS += $(NMN_LIBS) -- cgit v1.2.3 From 31bda94d32b772af25f9e2dc725c22f95b4a4cd7 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 28 Jan 2009 18:18:17 +0000 Subject: Link with more libraries on Windows. 2009-01-28 Tor Lillqvist * Makefile.am: Link with more libraries on Windows. svn path=/trunk/; revision=37154 --- plugins/mail-notification/ChangeLog | 4 ++-- plugins/mail-notification/Makefile.am | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'plugins/mail-notification') diff --git a/plugins/mail-notification/ChangeLog b/plugins/mail-notification/ChangeLog index c08225cdda..ecbc34391d 100644 --- a/plugins/mail-notification/ChangeLog +++ b/plugins/mail-notification/ChangeLog @@ -1,7 +1,7 @@ 2009-01-28 Tor Lillqvist - * Makefile.am: Use -no-undefined and link with GNOME_PLATFORM_LIBS - on Windows. + * Makefile.am: Use -no-undefined and link with more libraries on + Windows. 2008-11-19 Srinivasa Ragavan diff --git a/plugins/mail-notification/Makefile.am b/plugins/mail-notification/Makefile.am index 627fd93bed..8915fe92ad 100644 --- a/plugins/mail-notification/Makefile.am +++ b/plugins/mail-notification/Makefile.am @@ -1,5 +1,8 @@ if OS_WIN32 -NO_UNDEFINED_REQUIRED_LIBS = $(GNOME_PLATFORM_LIBS) +NO_UNDEFINED_REQUIRED_LIBS = \ + $(top_builddir)/mail/libevolution-mail.la \ + $(top_builddir)/e-util/libeutil.la \ + $(GNOME_PLATFORM_LIBS) endif INCLUDES = \ -- cgit v1.2.3 From 658c9e0c8fdbab3a3f6f2b98213c752332a4cfa5 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 19 Feb 2009 03:25:13 +0000 Subject: ** Fixes part of bug #572348 2009-02-19 Matthew Barnes ** Fixes part of bug #572348 * calendar/gui/alarm-notify/alarm-queue.c (display_notification): * plugins/mail-notification/mail-notification.c (new_notify_status): Call gtk_status_icon_set_tooltip_text() instead of gtk_status_icon_set_tooltip() (deprecated). * calendar/gui/weekday-picker.c (configure_items): Remove dead code. * widgets/table/e-table-example-1.c (main): gtk_widget_push_visual() is a no-op. Remove it. svn path=/trunk/; revision=37291 --- plugins/mail-notification/ChangeLog | 8 ++++++++ plugins/mail-notification/mail-notification.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'plugins/mail-notification') diff --git a/plugins/mail-notification/ChangeLog b/plugins/mail-notification/ChangeLog index ecbc34391d..f14ef84080 100644 --- a/plugins/mail-notification/ChangeLog +++ b/plugins/mail-notification/ChangeLog @@ -1,3 +1,11 @@ +2009-02-19 Matthew Barnes + + ** Fixes part of bug #572348 + + * mail-notification.c (new_notify_status): + Call gtk_status_icon_set_tooltip_text() instead of + gtk_status_icon_set_tooltip() (decprecated). + 2009-01-28 Tor Lillqvist * Makefile.am: Use -no-undefined and link with more libraries on diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c index a501d99bb1..e7d0f2f898 100644 --- a/plugins/mail-notification/mail-notification.c +++ b/plugins/mail-notification/mail-notification.c @@ -485,7 +485,7 @@ new_notify_status (EMEventTargetFolder *t) "You have received %d new messages.", status_count), status_count); } - gtk_status_icon_set_tooltip (status_icon, msg); + gtk_status_icon_set_tooltip_text (status_icon, msg); if (new_icon && is_part_enabled (GCONF_KEY_STATUS_BLINK)) { gtk_status_icon_set_blinking (status_icon, TRUE); -- cgit v1.2.3 From 15b9f361f625d741794afc119724838a5beff89d Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 19 Feb 2009 03:40:14 +0000 Subject: Rats. gtk_status_icon_set_tooltip_text() is only in 2.16. Define some temporary macros to work around it. svn path=/trunk/; revision=37292 --- plugins/mail-notification/mail-notification.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins/mail-notification') diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c index e7d0f2f898..89f9daaccb 100644 --- a/plugins/mail-notification/mail-notification.c +++ b/plugins/mail-notification/mail-notification.c @@ -54,6 +54,10 @@ #define GCONF_KEY_ENABLED_STATUS GCONF_KEY_ROOT "status-enabled" #define GCONF_KEY_ENABLED_SOUND GCONF_KEY_ROOT "sound-enabled" +#if !GTK_CHECK_VERSION(2,16,0) +#define gtk_status_icon_set_tooltip_text gtk_status_icon_set_tooltip +#endif + static gboolean enabled = FALSE; static GtkWidget *get_cfg_widget (void); static GStaticMutex mlock = G_STATIC_MUTEX_INIT; -- cgit v1.2.3