1
Description: Add appindicator support.
2
Author: Travis B. Hartwell <nafai@travishartwell.net>
3
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=606420
4
Bug-Ubuntu: https://launchpad.net/bugs/497853
6
Index: brasero-2.29.91/configure.in
7
===================================================================
8
--- brasero-2.29.91.orig/configure.in 2010-03-04 11:29:27.000000000 +0100
9
+++ brasero-2.29.91/configure.in 2010-03-04 11:29:17.000000000 +0100
12
dnl AM_CONDITIONAL(HAVE_LIBNOTIFY, test x"$build_libnotify" = "xyes")
14
+dnl ****************check for appindicators (optional) **************
15
+APPINDICATOR_REQUIRED=0.0.7
17
+AC_ARG_ENABLE(appindicator,
18
+ AS_HELP_STRING([--enable-appindicator],[Build support for application indicators [[default=yes]]]),
19
+ [enable_appindicator=$enableval],
20
+ [enable_appindicator="yes"])
22
+if test x$enable_appindicator = xyes ; then
23
+ PKG_CHECK_MODULES(APP_INDICATOR,
24
+ appindicator-0.1 >= $APPINDICATOR_REQUIRED)
25
+ AC_SUBST(APP_INDICATOR_CFLAGS)
26
+ AC_SUBST(APP_INDICATOR_LIBS)
27
+ AC_DEFINE(HAVE_APP_INDICATOR, 1, [Have AppIndicator])
29
+AM_CONDITIONAL(HAVE_APP_INDICATOR, test x"$enable_appindicator" = xyes)
31
dnl ****************check for search (optional)**************
33
TRACKER_REQUIRED=0.7.0
35
Build growisofs plugins : ${build_growisofs}
36
Build libburnia plugins : ${build_libburnia}
37
Build GObject-Introspection : ${found_introspection}
38
+ Build Application Indicators : ${enable_appindicator}
42
Index: brasero-2.29.91/libbrasero-burn/Makefile.am
43
===================================================================
44
--- brasero-2.29.91.orig/libbrasero-burn/Makefile.am 2010-03-04 11:29:27.000000000 +0100
45
+++ brasero-2.29.91/libbrasero-burn/Makefile.am 2010-03-04 11:29:17.000000000 +0100
47
libbrasero_burn_la_SOURCES += brasero-file-monitor.c brasero-file-monitor.h
50
+if HAVE_APP_INDICATOR
51
+libbrasero_burn_la_SOURCES += brasero-app-indicator.h brasero-app-indicator.c
52
+libbrasero_burn_la_LIBADD += @APP_INDICATOR_LIBS@
53
+INCLUDES += -DHAVE_APP_INDICATOR @APP_INDICATOR_CFLAGS@
57
libbrasero-marshal.list
58
# libbrasero-burn.symbols
59
Index: brasero-2.29.91/libbrasero-burn/brasero-app-indicator.c
60
===================================================================
61
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
62
+++ brasero-2.29.91/libbrasero-burn/brasero-app-indicator.c 2010-03-04 11:29:17.000000000 +0100
64
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
67
+ * Copyright (C) Canonical 2010
69
+ * Libbrasero-burn is free software; you can redistribute it and/or modify
70
+ * it under the terms of the GNU General Public License as published by
71
+ * the Free Software Foundation; either version 2 of the License, or
72
+ * (at your option) any later version.
74
+ * The Libbrasero-burn authors hereby grant permission for non-GPL compatible
75
+ * GStreamer plugins to be used and distributed together with GStreamer
76
+ * and Libbrasero-burn. This permission is above and beyond the permissions granted
77
+ * by the GPL license by which Libbrasero-burn is covered. If you modify this code
78
+ * you may extend this exception to your version of the code, but you are not
79
+ * obligated to do so. If you do not wish to do so, delete this exception
80
+ * statement from your version.
82
+ * Libbrasero-burn is distributed in the hope that it will be useful,
83
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
84
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
85
+ * GNU Library General Public License for more details.
87
+ * You should have received a copy of the GNU General Public License
88
+ * along with this program; if not, write to:
89
+ * The Free Software Foundation, Inc.,
90
+ * 51 Franklin Street, Fifth Floor
91
+ * Boston, MA 02110-1301, USA.
99
+#include <glib/gi18n.h>
101
+#include <gtk/gtk.h>
103
+#include <libappindicator/app-indicator.h>
105
+#include "burn-basics.h"
106
+#include "brasero-app-indicator.h"
108
+static void brasero_app_indicator_class_init (BraseroAppIndicatorClass *klass);
109
+static void brasero_app_indicator_init (BraseroAppIndicator *sp);
110
+static void brasero_app_indicator_finalize (GObject *object);
113
+brasero_app_indicator_cancel_cb (GtkAction *action, BraseroAppIndicator *indicator);
116
+brasero_app_indicator_show_cb (GtkAction *action, BraseroAppIndicator *indicator);
118
+struct BraseroAppIndicatorPrivate {
119
+ AppIndicator *indicator;
120
+ BraseroBurnAction action;
121
+ gchar *action_string;
123
+ GtkUIManager *manager;
125
+ int rounded_percent;
131
+ CLOSE_AFTER_SIGNAL,
132
+ SHOW_DIALOG_SIGNAL,
134
+} BraseroAppIndicatorSignalType;
136
+static guint brasero_app_indicator_signals[LAST_SIGNAL] = { 0 };
137
+static GObjectClass *parent_class = NULL;
139
+static GtkActionEntry entries[] = {
140
+ {"ContextualMenu", NULL, N_("Menu")},
141
+ {"Progress", NULL, "Progress"},
142
+ {"Cancel", GTK_STOCK_CANCEL, NULL, NULL, N_("Cancel ongoing burning"),
143
+ G_CALLBACK (brasero_app_indicator_cancel_cb)},
146
+static GtkToggleActionEntry toggle_entries[] = {
147
+ {"Show", NULL, N_("Show _Dialog"), NULL, N_("Show dialog"),
148
+ G_CALLBACK (brasero_app_indicator_show_cb), TRUE,},
151
+static const char *description = {
153
+ "<popup action='ContextMenu'>"
154
+ "<menuitem action='Progress'/>"
156
+ "<menuitem action='Show'/>"
158
+ "<menuitem action='Cancel'/>"
163
+G_DEFINE_TYPE (BraseroAppIndicator, brasero_app_indicator, G_TYPE_OBJECT);
166
+brasero_app_indicator_class_init (BraseroAppIndicatorClass *klass)
168
+ GObjectClass *object_class = G_OBJECT_CLASS(klass);
170
+ parent_class = g_type_class_peek_parent(klass);
171
+ object_class->finalize = brasero_app_indicator_finalize;
173
+ brasero_app_indicator_signals[SHOW_DIALOG_SIGNAL] =
174
+ g_signal_new ("show_dialog",
175
+ G_OBJECT_CLASS_TYPE (object_class),
176
+ G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
177
+ G_STRUCT_OFFSET (BraseroAppIndicatorClass,
178
+ show_dialog), NULL, NULL,
179
+ g_cclosure_marshal_VOID__BOOLEAN,
183
+ brasero_app_indicator_signals[CANCEL_SIGNAL] =
184
+ g_signal_new ("cancel",
185
+ G_OBJECT_CLASS_TYPE (object_class),
186
+ G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
187
+ G_STRUCT_OFFSET (BraseroAppIndicatorClass,
188
+ cancel), NULL, NULL,
189
+ g_cclosure_marshal_VOID__VOID,
192
+ brasero_app_indicator_signals[CLOSE_AFTER_SIGNAL] =
193
+ g_signal_new ("close_after",
194
+ G_OBJECT_CLASS_TYPE (object_class),
195
+ G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
196
+ G_STRUCT_OFFSET (BraseroAppIndicatorClass,
197
+ close_after), NULL, NULL,
198
+ g_cclosure_marshal_VOID__BOOLEAN,
205
+brasero_app_indicator_build_menu (BraseroAppIndicator *indicator)
207
+ GtkActionGroup *action_group;
208
+ GtkWidget *menu = NULL,
210
+ GError *error = NULL;
212
+ action_group = gtk_action_group_new ("MenuAction");
213
+ gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE);
214
+ gtk_action_group_add_actions (action_group,
216
+ G_N_ELEMENTS (entries),
218
+ gtk_action_group_add_toggle_actions (action_group,
220
+ G_N_ELEMENTS (toggle_entries),
223
+ indicator->priv->manager = gtk_ui_manager_new ();
224
+ gtk_ui_manager_insert_action_group (indicator->priv->manager,
228
+ if (!gtk_ui_manager_add_ui_from_string (indicator->priv->manager,
232
+ g_message ("building menus failed: %s", error->message);
233
+ g_error_free (error);
235
+ menu = gtk_ui_manager_get_widget (indicator->priv->manager, "/ContextMenu");
236
+ menu_item = gtk_ui_manager_get_widget (indicator->priv->manager, "/ContextMenu/Progress");
237
+ gtk_widget_set_sensitive (menu_item, FALSE);
239
+ menu_item = gtk_ui_manager_get_widget (indicator->priv->manager, "/ContextMenu/Cancel");
240
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), GTK_WIDGET (gtk_image_new ()));
247
+brasero_app_indicator_hide (BraseroAppIndicator *indicator)
249
+ app_indicator_set_status (indicator->priv->indicator, APP_INDICATOR_STATUS_PASSIVE);
253
+brasero_app_indicator_init (BraseroAppIndicator *obj)
255
+ GtkWidget *indicator_menu;
257
+ obj->priv = g_new0 (BraseroAppIndicatorPrivate, 1);
258
+ indicator_menu = brasero_app_indicator_build_menu (obj);
260
+ if (indicator_menu != NULL) {
261
+ obj->priv->indicator = app_indicator_new_with_path ("brasero",
263
+ APP_INDICATOR_CATEGORY_APPLICATION_STATUS,
264
+ BRASERO_DATADIR "/icons");
266
+ app_indicator_set_status (obj->priv->indicator,
267
+ APP_INDICATOR_STATUS_ACTIVE);
269
+ app_indicator_set_menu (obj->priv->indicator, GTK_MENU (indicator_menu));
274
+brasero_app_indicator_finalize (GObject *object)
276
+ BraseroAppIndicator *cobj;
278
+ cobj = BRASERO_APPINDICATOR (object);
280
+ if (cobj->priv->action_string) {
281
+ g_free (cobj->priv->action_string);
282
+ cobj->priv->action_string = NULL;
285
+ g_object_unref (cobj->priv->indicator);
286
+ g_free (cobj->priv);
287
+ G_OBJECT_CLASS (parent_class)->finalize (object);
290
+BraseroAppIndicator *
291
+brasero_app_indicator_new ()
293
+ BraseroAppIndicator *obj;
295
+ obj = BRASERO_APPINDICATOR (g_object_new (BRASERO_TYPE_APPINDICATOR, NULL));
301
+brasero_app_indicator_set_progress_menu_text (BraseroAppIndicator *indicator,
305
+ GtkWidget *progress;
306
+ const gchar *action_string;
308
+ if (!indicator->priv->action_string)
309
+ action_string = brasero_burn_action_to_string (indicator->priv->action);
311
+ action_string = indicator->priv->action_string;
313
+ if (remaining > 0) {
314
+ gchar *remaining_string;
316
+ remaining_string = brasero_units_get_time_string ((double) remaining * 1000000000, TRUE, FALSE);
317
+ text = g_strdup_printf (_("%s, %d%% done, %s remaining"),
319
+ indicator->priv->percent,
321
+ g_free (remaining_string);
323
+ else if (indicator->priv->percent > 0)
324
+ text = g_strdup_printf (_("%s, %d%% done"),
326
+ indicator->priv->percent);
328
+ text = g_strdup (action_string);
330
+ /* Set the text on the menu */
331
+ progress = gtk_ui_manager_get_widget (indicator->priv->manager,
332
+ "/ContextMenu/Progress");
333
+ gtk_menu_item_set_label (GTK_MENU_ITEM (progress), text);
338
+brasero_app_indicator_set_action (BraseroAppIndicator *indicator,
339
+ BraseroBurnAction action,
340
+ const gchar *string)
342
+ indicator->priv->action = action;
343
+ if (indicator->priv->action_string)
344
+ g_free (indicator->priv->action_string);
347
+ indicator->priv->action_string = g_strdup (string);
349
+ indicator->priv->action_string = NULL;
351
+ brasero_app_indicator_set_progress_menu_text (indicator, -1);
355
+brasero_app_indicator_set_progress (BraseroAppIndicator *indicator,
363
+ percent = fraction * 100;
364
+ indicator->priv->percent = percent;
366
+ /* set the tooltip */
367
+ brasero_app_indicator_set_progress_menu_text (indicator, remaining);
369
+ /* change image if need be */
370
+ remains = percent % 5;
372
+ percent += 5 - remains;
374
+ percent -= remains;
376
+ if (indicator->priv->rounded_percent == percent
377
+ || percent < 0 || percent > 100)
380
+ indicator->priv->rounded_percent = percent;
382
+ icon_name = g_strdup_printf ("brasero-disc-%02i", percent);
383
+ app_indicator_set_icon(indicator->priv->indicator,
385
+ g_free (icon_name);
389
+brasero_app_indicator_change_show_dialog_state (BraseroAppIndicator *indicator)
395
+ action = gtk_ui_manager_get_action (indicator->priv->manager, "/ContextMenu/Show");
396
+ active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
398
+ /* signal show dialog was requested the dialog again */
399
+ g_signal_emit (indicator,
400
+ brasero_app_indicator_signals [SHOW_DIALOG_SIGNAL],
406
+brasero_app_indicator_cancel_cb (GtkAction *action, BraseroAppIndicator *indicator)
408
+ g_signal_emit (indicator,
409
+ brasero_app_indicator_signals [CANCEL_SIGNAL],
414
+brasero_app_indicator_show_cb (GtkAction *action, BraseroAppIndicator *indicator)
416
+ brasero_app_indicator_change_show_dialog_state (indicator);
420
+brasero_app_indicator_set_show_dialog (BraseroAppIndicator *indicator, gboolean show)
425
+ action = gtk_ui_manager_get_action (indicator->priv->manager, "/ContextMenu/Show");
426
+ gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), show);
428
Index: brasero-2.29.91/libbrasero-burn/brasero-app-indicator.h
429
===================================================================
430
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
431
+++ brasero-2.29.91/libbrasero-burn/brasero-app-indicator.h 2010-03-04 11:29:17.000000000 +0100
433
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
436
+ * Copyright (C) Canonical 2010
438
+ * Libbrasero-burn is free software; you can redistribute it and/or modify
439
+ * it under the terms of the GNU General Public License as published by
440
+ * the Free Software Foundation; either version 2 of the License, or
441
+ * (at your option) any later version.
443
+ * The Libbrasero-burn authors hereby grant permission for non-GPL compatible
444
+ * GStreamer plugins to be used and distributed together with GStreamer
445
+ * and Libbrasero-burn. This permission is above and beyond the permissions granted
446
+ * by the GPL license by which Libbrasero-burn is covered. If you modify this code
447
+ * you may extend this exception to your version of the code, but you are not
448
+ * obligated to do so. If you do not wish to do so, delete this exception
449
+ * statement from your version.
451
+ * Libbrasero-burn is distributed in the hope that it will be useful,
452
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
453
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
454
+ * GNU Library General Public License for more details.
456
+ * You should have received a copy of the GNU General Public License
457
+ * along with this program; if not, write to:
458
+ * The Free Software Foundation, Inc.,
459
+ * 51 Franklin Street, Fifth Floor
460
+ * Boston, MA 02110-1301, USA.
463
+#ifndef APP_INDICATOR_H
464
+#define APP_INDICATOR_H
467
+#include <glib-object.h>
469
+#include <gtk/gtk.h>
471
+#include "burn-basics.h"
475
+#define BRASERO_TYPE_APPINDICATOR (brasero_app_indicator_get_type ())
476
+#define BRASERO_APPINDICATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), BRASERO_TYPE_APPINDICATOR, BraseroAppIndicator))
477
+#define BRASERO_APPINDICATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), BRASERO_TYPE_APPINDICATOR, BraseroAppIndicatorClass))
478
+#define BRASERO_IS_APPINDICATOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), BRASERO_TYPE_APPINDICATOR))
479
+#define BRASERO_IS_APPINDICATOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), BRASERO_TYPE_APPINDICATOR))
480
+#define BRASERO_APPINDICATOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), BRASERO_TYPE_APPINDICATOR, BraseroAppIndicatorClass))
482
+typedef struct BraseroAppIndicatorPrivate BraseroAppIndicatorPrivate;
486
+ BraseroAppIndicatorPrivate *priv;
487
+} BraseroAppIndicator;
490
+ GObjectClass parent_class;
492
+ void (*show_dialog) (BraseroAppIndicator *indicator, gboolean show);
493
+ void (*close_after) (BraseroAppIndicator *indicator, gboolean close);
494
+ void (*cancel) (BraseroAppIndicator *indicator);
496
+} BraseroAppIndicatorClass;
498
+GType brasero_app_indicator_get_type (void);
499
+BraseroAppIndicator *brasero_app_indicator_new (void);
502
+brasero_app_indicator_set_progress (BraseroAppIndicator *indicator,
507
+brasero_app_indicator_set_action (BraseroAppIndicator *indicator,
508
+ BraseroBurnAction action,
509
+ const gchar *string);
512
+brasero_app_indicator_set_show_dialog (BraseroAppIndicator *indicator,
516
+brasero_app_indicator_hide (BraseroAppIndicator *indicator);
520
+#endif /* APP_INDICATOR_H */
521
Index: brasero-2.29.91/libbrasero-burn/brasero-burn-dialog.c
522
===================================================================
523
--- brasero-2.29.91.orig/libbrasero-burn/brasero-burn-dialog.c 2010-03-04 11:29:27.000000000 +0100
524
+++ brasero-2.29.91/libbrasero-burn/brasero-burn-dialog.c 2010-03-04 11:29:17.000000000 +0100
528
* Copyright (C) Philippe Rouquier 2005-2009 <bonfire-app@wanadoo.fr>
529
+ * Copyright (C) Canonical 2010
531
* Libbrasero-burn is free software; you can redistribute it and/or modify
532
* it under the terms of the GNU General Public License as published by
535
#include "brasero-burn-dialog.h"
537
+#ifdef HAVE_APP_INDICATOR
538
+#include "brasero-app-indicator.h"
540
#include "brasero-tray.h"
541
+#endif /* HAVE_APP_INDICATOR */
542
#include "brasero-session-cfg.h"
543
#include "brasero-session-helper.h"
546
brasero_burn_dialog_cancel_clicked_cb (GtkWidget *button,
547
BraseroBurnDialog *dialog);
549
+#ifdef HAVE_APP_INDICATOR
551
+brasero_burn_dialog_indicator_cancel_cb (BraseroAppIndicator *indicator,
552
+ BraseroBurnDialog *dialog);
555
+brasero_burn_dialog_indicator_show_dialog_cb (BraseroAppIndicator *indicator,
557
+ GtkWidget *dialog);
560
brasero_burn_dialog_tray_cancel_cb (BraseroTrayIcon *tray,
561
BraseroBurnDialog *dialog);
563
brasero_burn_dialog_tray_show_dialog_cb (BraseroTrayIcon *tray,
566
+#endif /* HAVE_APP_INDICATOR */
568
typedef struct BraseroBurnDialogPrivate BraseroBurnDialogPrivate;
569
struct BraseroBurnDialogPrivate {
575
+#ifdef HAVE_APP_INDICATOR
576
+ BraseroAppIndicator *indicator;
578
BraseroTrayIcon *tray;
579
+#endif /* HAVE_APP_INDICATOR */
581
/* for our final statistics */
583
@@ -1196,9 +1217,15 @@
587
+#ifdef HAVE_APP_INDICATOR
588
+ brasero_app_indicator_set_progress (BRASERO_APPINDICATOR (priv->indicator),
592
brasero_tray_icon_set_progress (BRASERO_TRAYICON (priv->tray),
595
+#endif /* HAVE_APP_INDICATOR */
597
if (rate > 0 && priv->is_writing)
598
priv->rates = g_slist_prepend (priv->rates, GINT_TO_POINTER ((gint) rate));
599
@@ -1249,9 +1276,15 @@
600
brasero_burn_progress_set_action (BRASERO_BURN_PROGRESS (priv->progress),
603
+#ifdef HAVE_APP_INDICATOR
604
+ brasero_app_indicator_set_action (BRASERO_APPINDICATOR (priv->indicator),
608
brasero_tray_icon_set_action (BRASERO_TRAYICON (priv->tray),
611
+#endif /* HAVE_APP_INDICATOR */
615
@@ -1446,6 +1479,11 @@
620
+#ifdef HAVE_APP_INDICATOR
621
+ brasero_app_indicator_hide (priv->indicator);
622
+#endif /* HAVE_APP_INDICATOR */
625
if (priv->initial_title)
626
gtk_window_set_title (GTK_WINDOW (dialog), priv->initial_title);
627
@@ -1589,17 +1627,29 @@
631
+#ifdef HAVE_APP_INDICATOR
632
+ brasero_app_indicator_set_progress (BRASERO_APPINDICATOR (priv->indicator),
636
brasero_tray_icon_set_progress (BRASERO_TRAYICON (priv->tray),
639
+#endif /* HAVE_APP_INDICATOR */
641
brasero_burn_progress_set_action (BRASERO_BURN_PROGRESS (priv->progress),
642
BRASERO_BURN_ACTION_NONE,
645
+#ifdef HAVE_APP_INDICATOR
646
+ brasero_app_indicator_set_action (BRASERO_APPINDICATOR (priv->indicator),
647
+ BRASERO_BURN_ACTION_NONE,
650
brasero_tray_icon_set_action (BRASERO_TRAYICON (priv->tray),
651
BRASERO_BURN_ACTION_NONE,
653
+#endif /* HAVE_APP_INDICATOR */
655
g_timer_continue (priv->total_time);
657
@@ -2468,7 +2518,12 @@
659
priv = BRASERO_BURN_DIALOG_PRIVATE (widget);
661
+#ifdef HAVE_APP_INDICATOR
662
+ brasero_app_indicator_set_show_dialog (BRASERO_APPINDICATOR (priv->indicator),
665
brasero_tray_icon_set_show_dialog (BRASERO_TRAYICON (priv->tray), FALSE);
666
+#endif /* HAVE_APP_INDICATOR */
670
@@ -2480,6 +2535,40 @@
671
brasero_burn_dialog_cancel (dialog, FALSE);
674
+#ifdef HAVE_APP_INDICATOR
676
+brasero_burn_dialog_indicator_cancel_cb (BraseroAppIndicator *indicator,
677
+ BraseroBurnDialog *dialog)
679
+ brasero_burn_dialog_cancel (dialog, FALSE);
683
+brasero_burn_dialog_indicator_show_dialog_cb (BraseroAppIndicator *indicator,
687
+ BraseroBurnDialogPrivate *priv;
689
+ priv = BRASERO_BURN_DIALOG_PRIVATE (dialog);
691
+ /* we prevent to show the burn dialog once the success dialog has been
692
+ * shown to avoid the following strange behavior:
695
+ * - move to another workspace (ie, virtual desktop)
696
+ * - when the burning finishes, double-click the notification icon
697
+ * - you'll be unable to dismiss the dialogues normally and their behaviour will
698
+ * be generally strange */
703
+ gtk_widget_show (dialog);
705
+ gtk_widget_hide (dialog);
709
brasero_burn_dialog_tray_cancel_cb (BraseroTrayIcon *tray,
710
BraseroBurnDialog *dialog)
711
@@ -2512,6 +2601,7 @@
713
gtk_widget_hide (dialog);
715
+#endif /* HAVE_APP_INDICATOR */
718
brasero_burn_dialog_init (BraseroBurnDialog * obj)
719
@@ -2527,6 +2617,17 @@
721
gtk_dialog_set_has_separator (GTK_DIALOG (obj), FALSE);
723
+#ifdef HAVE_APP_INDICATOR
724
+ priv->indicator = brasero_app_indicator_new ();
725
+ g_signal_connect (priv->indicator,
727
+ G_CALLBACK (brasero_burn_dialog_indicator_cancel_cb),
729
+ g_signal_connect (priv->indicator,
731
+ G_CALLBACK (brasero_burn_dialog_indicator_show_dialog_cb),
734
priv->tray = brasero_tray_icon_new ();
735
g_signal_connect (priv->tray,
737
@@ -2536,6 +2637,7 @@
739
G_CALLBACK (brasero_burn_dialog_tray_show_dialog_cb),
741
+#endif /* HAVE_APP_INDICATOR */
743
alignment = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
744
gtk_widget_show (alignment);
745
@@ -2628,10 +2730,17 @@
749
+#ifdef HAVE_APP_INDICATOR
750
+ if (priv->indicator) {
751
+ g_object_unref (priv->indicator);
752
+ priv->indicator = NULL;
756
g_object_unref (priv->tray);
759
+#endif /* HAVE_APP_INDICATOR */
762
g_object_unref (priv->session);