summaryrefslogtreecommitdiffstats
path: root/gtk/src
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/src')
-rw-r--r--gtk/src/callbacks.c23
-rw-r--r--gtk/src/main.c5
-rw-r--r--gtk/src/makedeps.c1
3 files changed, 27 insertions, 2 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index 9e8bc23bb..456a863f7 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -29,6 +29,7 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
#include <gio/gio.h>
+#include <libnotify/notify.h>
#include "hb.h"
#include "callbacks.h"
@@ -48,6 +49,7 @@
static void update_chapter_list(signal_user_data_t *ud);
static GList* dvd_device_list();
static void prune_logs(signal_user_data_t *ud);
+void ghb_notify_done(signal_user_data_t *ud);
// This is a dependency map used for greying widgets
// that are dependent on the state of another widget.
@@ -1560,6 +1562,7 @@ ghb_start_next_job(signal_user_data_t *ud, gboolean find_first)
}
// Nothing pending
ghb_uninhibit_gpm();
+ ghb_notify_done(ud);
return NULL;
}
// Find the next pending item after the current running item
@@ -1599,6 +1602,7 @@ ghb_start_next_job(signal_user_data_t *ud, gboolean find_first)
}
// Nothing found
ghb_uninhibit_gpm();
+ ghb_notify_done(ud);
return NULL;
}
@@ -3147,3 +3151,22 @@ check_stable_update(signal_user_data_t *ud)
return NULL;
}
+static void
+notify_closed_cb(NotifyNotification *notification, signal_user_data_t *ud)
+{
+ g_object_unref(G_OBJECT(notification));
+}
+
+void
+ghb_notify_done(signal_user_data_t *ud)
+{
+ NotifyNotification *notification;
+
+ notification = notify_notification_new(
+ "Encode Complete",
+ "Put down that cocktail, Your HandBrake queue is done!",
+ "hb-icon",
+ NULL);
+ g_signal_connect(notification, "closed", (GCallback)notify_closed_cb, ud);
+ notify_notification_show(notification, NULL);
+}
diff --git a/gtk/src/main.c b/gtk/src/main.c
index 7a0e66f63..559d9799e 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -36,6 +36,7 @@
#include <gst/gst.h>
#include <glib/gstdio.h>
#include <gio/gio.h>
+#include <libnotify/notify.h>
#include "hb.h"
#include "renderer_button.h"
#include "hb-backend.h"
@@ -80,7 +81,7 @@
GtkBuilder*
create_builder_or_die(const gchar * name)
{
- guint res;
+ guint res = 0;
GValue *gval;
const gchar *ghb_ui;
@@ -521,6 +522,7 @@ main (int argc, char *argv[])
gtk_set_locale ();
gtk_init (&argc, &argv);
+ notify_init("HandBrake");
ghb_register_transforms();
ghb_resource_init();
ghb_load_icons();
@@ -636,6 +638,7 @@ main (int argc, char *argv[])
ghb_value_free(ud->settings);
g_io_channel_unref(ud->activity_log);
ghb_settings_close();
+ notify_uninit();
g_free(ud);
return 0;
}
diff --git a/gtk/src/makedeps.c b/gtk/src/makedeps.c
index 98b8aeede..c11e7b353 100644
--- a/gtk/src/makedeps.c
+++ b/gtk/src/makedeps.c
@@ -25,7 +25,6 @@ static dependency_t dep_map[] =
{"title", "picture_tab", "none", TRUE, FALSE},
{"title", "chapters_label", "none", TRUE, FALSE},
{"title", "chapters_tab", "none", TRUE, FALSE},
- {"title", "title", "none", TRUE, FALSE},
{"title", "start_chapter", "none", TRUE, FALSE},
{"title", "end_chapter", "none", TRUE, FALSE},
{"vquality_type_bitrate", "VideoAvgBitrate", "TRUE", FALSE, FALSE},