aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac10
-rw-r--r--embed/downloader-view.c84
-rw-r--r--src/ephy-main.c9
3 files changed, 0 insertions, 103 deletions
diff --git a/configure.ac b/configure.ac
index ee5dafc7e..9a6cc9f53 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,21 +97,12 @@ GTK_REQUIRED=2.91.1
LIBXML_REQUIRED=2.6.12
LIBXSLT_REQUIRED=1.1.7
LIBSTARTUP_NOTIFICATION_REQUIRED=0.5
-LIBNOTIFY_REQUIRED=0.5.1
DBUS_GLIB_REQUIRED=0.35
WEBKIT_GTK_REQUIRED=1.3.5
LIBSOUP_GNOME_REQUIRED=2.29.91
GNOME_KEYRING_REQUIRED=2.26.0
GSETTINGS_DESKTOP_SCHEMAS_REQUIRED=0.0.1
-PKG_CHECK_EXISTS([libnotify >= $LIBNOTIFY_REQUIRED],[have_libnotify=yes],[have_libnotify=no])
-
-LIBNOTIFY_PACKAGE=
-if test "$have_libnotify" = "yes"; then
- LIBNOTIFY_PACKAGE="libnotify >= $LIBNOTIFY_REQUIRED"
- AC_DEFINE([HAVE_LIBNOTIFY],[1],[Define if libnotify is available])
-fi
-
# Tests
AC_MSG_CHECKING([whether to build tests])
@@ -135,7 +126,6 @@ PKG_CHECK_MODULES([DEPENDENCIES], [
libxml-2.0 >= $LIBXML_REQUIRED
libxslt >= $LIBXSLT_REQUIRED
libstartup-notification-1.0 >= $LIBSTARTUP_NOTIFICATION_REQUIRED
- $LIBNOTIFY_PACKAGE
webkitgtk-3.0 >= $WEBKIT_GTK_REQUIRED
libsoup-gnome-2.4 >= $LIBSOUP_GNOME_REQUIRED
gnome-keyring-1 >= $GNOME_KEYRING_REQUIRED
diff --git a/embed/downloader-view.c b/embed/downloader-view.c
index 698a0fe6e..fd1cfcc3a 100644
--- a/embed/downloader-view.c
+++ b/embed/downloader-view.c
@@ -34,10 +34,6 @@
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
-#ifdef HAVE_LIBNOTIFY
-#include <libnotify/notify.h>
-#endif
-
enum
{
COL_STATUS,
@@ -279,65 +275,6 @@ downloader_view_new (void)
NULL));
}
-#ifdef HAVE_LIBNOTIFY
-static void
-notification_closed_cb (NotifyNotification *notification,
- DownloaderView *dv)
-{
- g_object_unref (dv);
-}
-
-static gboolean
-show_notification_cb (NotifyNotification *notification)
-{
- DownloaderView *dv;
- GError *error = NULL;
-
- dv = g_object_get_data (G_OBJECT (notification), "dv");
- notify_notification_show (notification, &error);
-
- if (error)
- {
- /* notification_closed_cb () will never be called. */
- g_warning ("Error showing download notification: %s",
- error->message);
- g_object_unref (dv);
- g_error_free (error);
- }
-
- return FALSE;
-}
-
-static void
-show_notification (DownloaderView *dv, const char *title, const char *msg)
-{
- NotifyNotification *notification;
- GtkStatusIcon *status_icon;
-
- status_icon = dv->priv->status_icon;
-
- /* We keep the DownloaderView alive until the notification is gone. */
- g_object_ref (dv);
-
- notification = notify_notification_new (title, msg,
- GTK_STOCK_INFO, NULL);
-
- g_signal_connect_after (notification, "closed",
- G_CALLBACK (notification_closed_cb), dv);
- g_object_set_data (G_OBJECT (notification), "dv", dv);
-
- notify_notification_set_timeout (notification, NOTIFY_EXPIRES_DEFAULT);
- notify_notification_set_urgency (notification, NOTIFY_URGENCY_LOW);
-
- notify_notification_attach_to_status_icon (notification, status_icon);
-
- /* There are some visual glitches when the notification is shown and
- * the GtkStatusIcon is still not visible. To avoid that, we delay the
- * popup a bit. */
- g_timeout_add (500, (GSourceFunc) show_notification_cb, notification);
-}
-#endif
-
static char *
format_interval (gdouble interval)
{
@@ -510,9 +447,6 @@ update_download_row (DownloaderView *dv, WebKitDownload *download)
struct tm;
int percent = 0;
DownloadAction action;
-#ifdef HAVE_LIBNOTIFY
- char *downloaded;
-#endif
row_ref = get_row_from_download (dv, download);
/* In downloader_view_add_download() we call this function manually to
@@ -556,11 +490,6 @@ update_download_row (DownloaderView *dv, WebKitDownload *download)
break;
}
-#ifdef HAVE_LIBNOTIFY
- downloaded = g_strdup_printf (_("The file ā€œ%sā€ has been downloaded."), name);
- show_notification (dv, _("Download finished"), downloaded);
- g_free (downloaded);
-#endif
downloader_view_remove_download (dv, download);
return;
@@ -738,19 +667,6 @@ downloader_view_add_download (DownloaderView *dv,
if (g_settings_get_boolean (EPHY_SETTINGS_UI,
EPHY_PREFS_UI_DOWNLOADS_HIDDEN) && !visible)
{
-#ifdef HAVE_LIBNOTIFY
- char *name;
- char *downloading;
-
- name = ephy_download_get_name (download);
- downloading = g_strdup_printf(_("The file ā€œ%sā€ has been added to the downloads queue."), name);
-
- show_notification (dv, _("Download started"), downloading);
-
- g_free (name);
- g_free (downloading);
-#endif
-
ephy_dialog_hide (EPHY_DIALOG (dv));
}
else
diff --git a/src/ephy-main.c b/src/ephy-main.c
index 1f0692884..5b7693264 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -733,20 +733,11 @@ main (int argc,
queue_commands (user_time);
-#ifdef HAVE_LIBNOTIFY
- /* Init notifications for the download manager */
- notify_init (PACKAGE);
-#endif
-
gtk_main ();
/* Shutdown */
g_object_unref (ephy_shell);
-#ifdef HAVE_LIBNOTIFY
- if (notify_is_initted ())
- notify_uninit ();
-#endif
save_accels ();
ephy_state_save ();
ephy_settings_shutdown ();