Commit c6b15957 authored by Philippe Rouquier's avatar Philippe Rouquier

Fix for 631957 - drop status icon use

parent 222c0206
......@@ -229,6 +229,16 @@ AC_SUBST(BRASERO_LIBRARY_SUFFIX)
AC_SUBST(BRASERO_GTK_CFLAGS)
AC_SUBST(BRASERO_GTK_LIBS)
#
# libnotify check
#
LIBNOTIFY_REQUIRED=0.6.1
PKG_CHECK_MODULES([BRASERO_LIBNOTIFY],[libnotify >= $LIBNOTIFY_REQUIRED])
AC_SUBST(BRASERO_LIBNOTIFY_CFLAGS)
AC_SUBST(BRASERO_LIBNOTIFY_LIBS)
#
# Canberra
#
......
......@@ -17,6 +17,7 @@ INCLUDES = \
$(BRASERO_GLIB_CFLAGS) \
$(BRASERO_GIO_CFLAGS) \
$(BRASERO_GTK_CFLAGS) \
$(BRASERO_LIBNOTIFY_CFLAGS) \
$(BRASERO_GSTREAMER_CFLAGS) \
$(BRASERO_CANBERRA_CFLAGS)
......@@ -65,6 +66,7 @@ libbrasero_burn@BRASERO_LIBRARY_SUFFIX@_la_LIBADD = \
$(BRASERO_GIO_LIBS) \
$(BRASERO_GTK_LIBS) \
$(BRASERO_GSTREAMER_LIBS) \
$(BRASERO_LIBNOTIFY_LIBS) \
$(BRASERO_CANBERRA_LIBS)
libbrasero_burn@BRASERO_LIBRARY_SUFFIX@_la_LDFLAGS = \
......
......@@ -46,6 +46,7 @@
#include <gtk/gtk.h>
#include <canberra-gtk.h>
#include <libnotify/notify.h>
#include "brasero-burn-dialog.h"
......@@ -135,6 +136,52 @@ brasero_burn_dialog_update_media (BraseroBurnDialog *dialog)
priv->media = media;
}
static void
brasero_burn_dialog_notify_daemon_close (NotifyNotification *notification,
BraseroBurnDialog *dialog)
{
g_object_unref (notification);
}
static gboolean
brasero_burn_dialog_notify_daemon (BraseroBurnDialog *dialog,
const char *message)
{
BraseroBurnDialogPrivate *priv;
NotifyNotification *notification;
GError *error = NULL;
gboolean result;
priv = BRASERO_BURN_DIALOG_PRIVATE (dialog);
if (!notify_is_initted ()) {
notify_init (_("Brasero notification"));
}
notification = notify_notification_new (primary,
NULL,
GTK_STOCK_CDROM);
if (!notification)
return FALSE;
g_signal_connect (notification,
"closed",
G_CALLBACK (brasero_burn_dialog_notify_daemon_close),
dialog);
notify_notification_set_timeout (notification, 10000);
notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL);
result = notify_notification_show (notification, &error);
if (error) {
g_warning ("Error showing notification");
g_error_free (error);
}
return result;
}
static GtkWidget *
brasero_burn_dialog_create_message (BraseroBurnDialog *dialog,
GtkMessageType type,
......@@ -1721,6 +1768,8 @@ brasero_burn_dialog_notify_error (BraseroBurnDialog *dialog,
GTK_STOCK_CLOSE,
GTK_RESPONSE_CLOSE);
brasero_burn_dialog_notify_daemon (dialog, _("Error while burning."));
response = gtk_dialog_run (GTK_DIALOG (message));
while (response == GTK_RESPONSE_OK) {
brasero_burn_dialog_save_log (dialog);
......@@ -1751,7 +1800,6 @@ brasero_burn_dialog_get_success_message (BraseroBurnDialog *dialog)
else
return g_strdup (_("Audio CD successfully burned"));
}
return g_strdup (_("Image successfully created"));
}
else if (brasero_track_type_get_has_medium (&priv->input)) {
......@@ -1783,7 +1831,6 @@ brasero_burn_dialog_get_success_message (BraseroBurnDialog *dialog)
else
return g_strdup (_("Data CD successfully burned"));
}
return g_strdup (_("Image successfully created"));
}
......@@ -1865,6 +1912,7 @@ brasero_burn_dialog_notify_copy_finished (BraseroBurnDialog *dialog,
NULL);
g_free (main_message);
brasero_burn_dialog_notify_daemon (dialog, main_message);
response = gtk_dialog_run (GTK_DIALOG (message));
g_signal_handler_disconnect (drive, added_id);
......@@ -1943,6 +1991,7 @@ brasero_burn_dialog_notify_success (BraseroBurnDialog *dialog)
g_free (primary);
brasero_burn_dialog_notify_daemon (dialog, primary);
res = brasero_burn_dialog_success_run (dialog);
if (make_another)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment