~ubuntu-branches/ubuntu/vivid/brasero/vivid-proposed

« back to all changes in this revision

Viewing changes to debian/patches/012_appindicator.patch

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Moya
  • Date: 2011-05-18 17:53:39 UTC
  • mfrom: (1.1.47 upstream) (1.4.3 experimental)
  • Revision ID: james.westby@ubuntu.com-20110518175339-so6a6fejezs5i1pc
Tags: 3.0.0-1ubuntu1
* Rebase from Debian and GNOME3 PPA. Remaining Ubuntu changes:
* debian/control:
  - Build-Depend on dh-autoreconf, libappindicator3-dev and
    liblaunchpad-integration-3.0-dev
  - Recommends: brasero-cdrkit
  - libbrasero-media3-1 Depends on dvd+rw-tools not growisofs and
    Suggests rather than Recommends gstreamer plugin packages
* debian/patches/010_lpi.patch:
  - Launchpad integration patch
* debian/patches/012_appindicator.patch:
  - Use application indicators
* debian/rules:
  - Include autoreconf.mk
* debian/watch:
  - Watch unstable releases also

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=606420
4
4
Bug-Ubuntu: https://launchpad.net/bugs/497853
5
5
 
6
 
Index: brasero-2.31.90/configure.in
 
6
Index: brasero-2.91.3/configure.in
7
7
===================================================================
8
 
--- brasero-2.31.90.orig/configure.in   2010-08-27 12:26:31.000000000 +1000
9
 
+++ brasero-2.31.90/configure.in        2010-08-27 12:28:39.614659002 +1000
10
 
@@ -402,6 +402,23 @@
 
8
--- brasero-2.91.3.orig/configure.in    2010-12-03 11:15:19.000000000 +1100
 
9
+++ brasero-2.91.3/configure.in 2010-12-03 11:15:41.661006001 +1100
 
10
@@ -363,6 +363,23 @@
11
11
 fi
12
12
 AM_CONDITIONAL(BUILD_GROWISOFS, test x"$build_growisofs" = "xyes")
13
13
 
21
21
+
22
22
+if test x$enable_appindicator = xyes ; then
23
23
+       PKG_CHECK_MODULES(APP_INDICATOR,
24
 
+                       appindicator-0.1 >= $APPINDICATOR_REQUIRED)
 
24
+                       appindicator3-0.1 >= $APPINDICATOR_REQUIRED)
25
25
+       AC_SUBST(APP_INDICATOR_CFLAGS)
26
26
+       AC_SUBST(APP_INDICATOR_LIBS)
27
27
+       AC_DEFINE(HAVE_APP_INDICATOR, 1, [Have AppIndicator])
31
31
 BEAGLE_REQUIRED=0.3.0
32
32
 TRACKER_REQUIRED=0.8.0
33
33
 
34
 
@@ -687,6 +704,7 @@
 
34
@@ -648,6 +665,7 @@
35
35
        Build growisofs plugins : ${build_growisofs}
36
36
        Build libburnia plugins : ${build_libburnia}
37
37
        Build GObject-Introspection : ${found_introspection}
39
39
 "
40
40
 echo
41
41
 echo
42
 
Index: brasero-2.31.90/libbrasero-burn/Makefile.am
 
42
Index: brasero-2.91.3/libbrasero-burn/Makefile.am
43
43
===================================================================
44
 
--- brasero-2.31.90.orig/libbrasero-burn/Makefile.am    2010-07-12 01:11:21.000000000 +1000
45
 
+++ brasero-2.31.90/libbrasero-burn/Makefile.am 2010-08-27 12:27:21.894659000 +1000
46
 
@@ -198,6 +198,12 @@
47
 
 libbrasero_burn@BRASERO_LIBRARY_SUFFIX@_la_SOURCES += brasero-file-monitor.c brasero-file-monitor.h
 
44
--- brasero-2.91.3.orig/libbrasero-burn/Makefile.am     2010-11-30 07:18:00.000000000 +1100
 
45
+++ brasero-2.91.3/libbrasero-burn/Makefile.am  2010-12-03 11:15:41.661006001 +1100
 
46
@@ -197,6 +197,12 @@
 
47
 libbrasero_burn3_la_SOURCES += brasero-file-monitor.c brasero-file-monitor.h
48
48
 endif
49
49
 
50
50
+if HAVE_APP_INDICATOR
51
 
+libbrasero_burn@BRASERO_LIBRARY_SUFFIX@_la_SOURCES += brasero-app-indicator.h brasero-app-indicator.c
52
 
+libbrasero_burn@BRASERO_LIBRARY_SUFFIX@_la_LIBADD += @APP_INDICATOR_LIBS@
 
51
+libbrasero_burn3_la_SOURCES += brasero-app-indicator.h brasero-app-indicator.c
 
52
+libbrasero_burn3_la_LIBADD += @APP_INDICATOR_LIBS@
53
53
+INCLUDES += -DHAVE_APP_INDICATOR @APP_INDICATOR_CFLAGS@
54
54
+endif
55
55
+
56
56
 EXTRA_DIST =                   \
57
57
        libbrasero-marshal.list
58
58
 #      libbrasero-burn.symbols
59
 
Index: brasero-2.31.90/libbrasero-burn/brasero-app-indicator.c
 
59
Index: brasero-2.91.3/libbrasero-burn/brasero-app-indicator.c
60
60
===================================================================
61
61
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
62
 
+++ brasero-2.31.90/libbrasero-burn/brasero-app-indicator.c     2010-08-27 12:27:21.894659000 +1000
 
62
+++ brasero-2.91.3/libbrasero-burn/brasero-app-indicator.c      2010-12-03 11:15:41.661006001 +1100
63
63
@@ -0,0 +1,364 @@
64
64
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
65
65
+/*
425
425
+       action = gtk_ui_manager_get_action (indicator->priv->manager, "/ContextMenu/Show");
426
426
+       gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), show);
427
427
+}
428
 
Index: brasero-2.31.90/libbrasero-burn/brasero-app-indicator.h
 
428
Index: brasero-2.91.3/libbrasero-burn/brasero-app-indicator.h
429
429
===================================================================
430
430
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
431
 
+++ brasero-2.31.90/libbrasero-burn/brasero-app-indicator.h     2010-08-27 12:27:21.894659000 +1000
 
431
+++ brasero-2.91.3/libbrasero-burn/brasero-app-indicator.h      2010-12-03 11:15:41.661006001 +1100
432
432
@@ -0,0 +1,88 @@
433
433
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
434
434
+/*
518
518
+G_END_DECLS
519
519
+
520
520
+#endif /* APP_INDICATOR_H */
521
 
Index: brasero-2.31.90/libbrasero-burn/brasero-burn-dialog.c
 
521
Index: brasero-2.91.3/libbrasero-burn/brasero-burn-dialog.c
522
522
===================================================================
523
 
--- brasero-2.31.90.orig/libbrasero-burn/brasero-burn-dialog.c  2010-08-02 04:57:51.000000000 +1000
524
 
+++ brasero-2.31.90/libbrasero-burn/brasero-burn-dialog.c       2010-08-27 12:27:21.894659000 +1000
 
523
--- brasero-2.91.3.orig/libbrasero-burn/brasero-burn-dialog.c   2010-11-30 07:18:00.000000000 +1100
 
524
+++ brasero-2.91.3/libbrasero-burn/brasero-burn-dialog.c        2010-12-03 11:20:46.177007379 +1100
525
525
@@ -2,6 +2,7 @@
526
526
 /*
527
527
  * Libbrasero-burn
530
530
  *
531
531
  * Libbrasero-burn is free software; you can redistribute it and/or modify
532
532
  * it under the terms of the GNU General Public License as published by
533
 
@@ -49,7 +50,11 @@
 
533
@@ -49,6 +50,9 @@
534
534
 
535
535
 #include "brasero-burn-dialog.h"
536
536
 
537
537
+#ifdef HAVE_APP_INDICATOR
538
538
+#include "brasero-app-indicator.h"
539
 
+#else
540
 
 #include "brasero-tray.h"
541
 
+#endif /* HAVE_APP_INDICATOR */
 
539
+#endif
542
540
 #include "brasero-session-cfg.h"
543
541
 #include "brasero-session-helper.h"
544
542
 
545
 
@@ -75,6 +80,16 @@
 
543
@@ -70,6 +74,16 @@
 
544
 
 
545
 G_DEFINE_TYPE (BraseroBurnDialog, brasero_burn_dialog, GTK_TYPE_DIALOG);
 
546
 
 
547
+#ifdef HAVE_APP_INDICATOR
 
548
+static void
 
549
+brasero_burn_dialog_indicator_cancel_cb (BraseroAppIndicator *indicator,
 
550
+                                        BraseroBurnDialog *dialog);
 
551
+
 
552
+static void
 
553
+brasero_burn_dialog_indicator_show_dialog_cb (BraseroAppIndicator *indicator,
 
554
+                                             gboolean show,
 
555
+                                             GtkWidget *dialog);
 
556
+#endif
 
557
 static void
546
558
 brasero_burn_dialog_cancel_clicked_cb (GtkWidget *button,
547
559
                                       BraseroBurnDialog *dialog);
548
 
 
549
 
+#ifdef HAVE_APP_INDICATOR
550
 
+static void
551
 
+brasero_burn_dialog_indicator_cancel_cb (BraseroAppIndicator *indicator,
552
 
+                                        BraseroBurnDialog *dialog);
553
 
+
554
 
+static void
555
 
+brasero_burn_dialog_indicator_show_dialog_cb (BraseroAppIndicator *indicator,
556
 
+                                             gboolean show,
557
 
+                                             GtkWidget *dialog);
558
 
+#else
559
 
 static void
560
 
 brasero_burn_dialog_tray_cancel_cb (BraseroTrayIcon *tray,
561
 
                                    BraseroBurnDialog *dialog);
562
 
@@ -83,6 +98,7 @@
563
 
 brasero_burn_dialog_tray_show_dialog_cb (BraseroTrayIcon *tray,
564
 
                                         gboolean show,
565
 
                                         GtkWidget *dialog);
566
 
+#endif /* HAVE_APP_INDICATOR */
567
 
 
568
 
 typedef struct BraseroBurnDialogPrivate BraseroBurnDialogPrivate;
569
 
 struct BraseroBurnDialogPrivate {
570
 
@@ -97,7 +113,12 @@
571
 
        GtkWidget *header;
 
560
@@ -88,6 +102,10 @@
572
561
        GtkWidget *cancel;
573
562
        GtkWidget *image;
574
 
+
 
563
 
575
564
+#ifdef HAVE_APP_INDICATOR
576
565
+       BraseroAppIndicator *indicator;
577
 
+#else
578
 
        BraseroTrayIcon *tray;
579
 
+#endif /* HAVE_APP_INDICATOR */
580
 
 
 
566
+#endif
 
567
+
581
568
        /* for our final statistics */
582
569
        GTimer *total_time;
583
 
@@ -1220,9 +1241,15 @@
584
 
                                          mb_written,
585
 
                                          rate);
 
570
        gint64 total_size;
 
571
@@ -1234,6 +1252,12 @@
 
572
                             &written,
 
573
                             &rate);
586
574
 
587
575
+#ifdef HAVE_APP_INDICATOR
588
576
+       brasero_app_indicator_set_progress (BRASERO_APPINDICATOR (priv->indicator),
589
577
+                                           task_progress,
590
578
+                                           remaining);
591
 
+#else
592
 
        brasero_tray_icon_set_progress (BRASERO_TRAYICON (priv->tray),
593
 
                                        task_progress,
594
 
                                        remaining);
595
 
+#endif /* HAVE_APP_INDICATOR */
596
 
 
597
 
        if (rate > 0 && priv->is_writing)
598
 
                priv->rates = g_slist_prepend (priv->rates, GINT_TO_POINTER ((gint) rate));
599
 
@@ -1273,9 +1300,15 @@
 
579
+#endif
 
580
+
 
581
        brasero_burn_dialog_progress_changed_real (dialog,
 
582
                                                   written,
 
583
                                                   isosize,
 
584
@@ -1258,6 +1282,12 @@
600
585
        brasero_burn_progress_set_action (BRASERO_BURN_PROGRESS (priv->progress),
601
586
                                          action,
602
587
                                          string);
 
588
+
603
589
+#ifdef HAVE_APP_INDICATOR
604
590
+       brasero_app_indicator_set_action (BRASERO_APPINDICATOR (priv->indicator),
605
591
+                                         action,
606
592
+                                         string);
607
 
+#else
608
 
        brasero_tray_icon_set_action (BRASERO_TRAYICON (priv->tray),
609
 
                                      action,
610
 
                                      string);
611
 
+#endif /* HAVE_APP_INDICATOR */
612
 
 }
613
 
 
614
 
 static void
615
 
@@ -1470,6 +1503,11 @@
 
593
+#endif
 
594
 }
 
595
 
 
596
 static void
 
597
@@ -1419,6 +1449,12 @@
 
598
                                          -1,
 
599
                                          -1,
 
600
                                          -1);
 
601
+
 
602
+#ifdef HAVE_APP_INDICATOR
 
603
+       brasero_app_indicator_set_progress (BRASERO_APPINDICATOR (priv->indicator),
 
604
+                                           0.0,
 
605
+                                           -1);
 
606
+#endif
 
607
 }
 
608
 
 
609
 static void
 
610
@@ -1452,6 +1488,11 @@
616
611
                                          -1,
617
612
                                          -1,
618
613
                                          -1);
619
614
+
620
615
+#ifdef HAVE_APP_INDICATOR
621
616
+       brasero_app_indicator_hide (priv->indicator);
622
 
+#endif /* HAVE_APP_INDICATOR */
 
617
+#endif
623
618
+
624
619
        /* Restore title */
625
620
        if (priv->initial_title)
626
621
                gtk_window_set_title (GTK_WINDOW (dialog), priv->initial_title);
627
 
@@ -1617,17 +1655,29 @@
628
 
                                          -1,
629
 
                                          -1);
630
 
 
631
 
+#ifdef HAVE_APP_INDICATOR
632
 
+       brasero_app_indicator_set_progress (BRASERO_APPINDICATOR (priv->indicator),
633
 
+                                           0.0,
634
 
+                                           -1);
635
 
+#else
636
 
        brasero_tray_icon_set_progress (BRASERO_TRAYICON (priv->tray),
637
 
                                        0.0,
638
 
                                        -1);
639
 
+#endif /* HAVE_APP_INDICATOR */
640
 
 
641
 
        brasero_burn_progress_set_action (BRASERO_BURN_PROGRESS (priv->progress),
 
622
@@ -1603,6 +1644,12 @@
642
623
                                          BRASERO_BURN_ACTION_NONE,
643
624
                                          NULL);
644
625
 
646
627
+       brasero_app_indicator_set_action (BRASERO_APPINDICATOR (priv->indicator),
647
628
+                                         BRASERO_BURN_ACTION_NONE,
648
629
+                                         NULL);
649
 
+#else
650
 
        brasero_tray_icon_set_action (BRASERO_TRAYICON (priv->tray),
651
 
                                      BRASERO_BURN_ACTION_NONE,
652
 
                                      NULL);
653
 
+#endif /* HAVE_APP_INDICATOR */
654
 
 
 
630
+#endif
 
631
+
655
632
        g_timer_continue (priv->total_time);
656
633
 
657
 
@@ -2504,7 +2554,12 @@
 
634
        return BRASERO_BURN_OK;
 
635
@@ -1620,6 +1667,11 @@
658
636
 
659
 
        priv = BRASERO_BURN_DIALOG_PRIVATE (widget);
 
637
        priv = BRASERO_BURN_DIALOG_PRIVATE (dialog);
660
638
 
661
639
+#ifdef HAVE_APP_INDICATOR
662
640
+       brasero_app_indicator_set_show_dialog (BRASERO_APPINDICATOR (priv->indicator),
663
641
+                                              FALSE);
664
 
+#else
665
 
        brasero_tray_icon_set_show_dialog (BRASERO_TRAYICON (priv->tray), FALSE);
666
 
+#endif /* HAVE_APP_INDICATOR */
667
 
        return TRUE;
668
 
 }
669
 
 
670
 
@@ -2516,6 +2571,40 @@
 
642
+#endif
 
643
+
 
644
        chooser = gtk_file_chooser_dialog_new (_("Save Current Session"),
 
645
                                               GTK_WINDOW (dialog),
 
646
                                               GTK_FILE_CHOOSER_ACTION_SAVE,
 
647
@@ -2478,6 +2530,41 @@
671
648
        brasero_burn_dialog_cancel (dialog, FALSE);
672
649
 }
673
650
 
704
681
+       else
705
682
+               gtk_widget_hide (dialog);
706
683
+}
707
 
+#else
708
 
 static void
709
 
 brasero_burn_dialog_tray_cancel_cb (BraseroTrayIcon *tray,
710
 
                                    BraseroBurnDialog *dialog)
711
 
@@ -2548,6 +2637,7 @@
712
 
        else
713
 
                gtk_widget_hide (dialog);
714
 
 }
715
 
+#endif /* HAVE_APP_INDICATOR */
716
 
 
 
684
+#endif
 
685
+
717
686
 static void
718
687
 brasero_burn_dialog_init (BraseroBurnDialog * obj)
719
 
@@ -2563,6 +2653,17 @@
 
688
 {
 
689
@@ -2490,6 +2577,18 @@
720
690
 
721
691
        gtk_window_set_default_size (GTK_WINDOW (obj), 500, 0);
722
692
 
730
700
+                         "show-dialog",
731
701
+                         G_CALLBACK (brasero_burn_dialog_indicator_show_dialog_cb),
732
702
+                         obj);
733
 
+#else
734
 
        priv->tray = brasero_tray_icon_new ();
735
 
        g_signal_connect (priv->tray,
736
 
                          "cancel",
737
 
@@ -2572,6 +2673,7 @@
738
 
                          "show-dialog",
739
 
                          G_CALLBACK (brasero_burn_dialog_tray_show_dialog_cb),
740
 
                          obj);
741
 
+#endif /* HAVE_APP_INDICATOR */
742
 
 
 
703
+#endif
 
704
+
743
705
        alignment = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
744
706
        gtk_widget_show (alignment);
745
 
@@ -2664,10 +2766,17 @@
 
707
        gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 6, 8, 6, 6);
 
708
@@ -2565,6 +2664,13 @@
746
709
                priv->burn = NULL;
747
710
        }
748
711
 
751
714
+               g_object_unref (priv->indicator);
752
715
+               priv->indicator = NULL;
753
716
+       }
754
 
+#else
755
 
        if (priv->tray) {
756
 
                g_object_unref (priv->tray);
757
 
                priv->tray = NULL;
758
 
        }
759
 
+#endif /* HAVE_APP_INDICATOR */
760
 
 
 
717
+#endif
 
718
+
761
719
        if (priv->session) {
762
720
                g_object_unref (priv->session);
 
721
                priv->session = NULL;