~walkerlee/totem/pre-interview

« back to all changes in this revision

Viewing changes to src/totem-menu.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-05-26 00:07:51 UTC
  • mfrom: (1.6.1) (24.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20130526000751-kv8ap3x1di4qq8j2
Tags: 3.8.2-0ubuntu1
* Sync with Debian. Remaining changes: 
* debian/control.in:
  - Drop build-depends on libepc-ui-dev and libgrilo-0.2-dev (in universe)
  - Drop libxtst-dev build-depends so that the (redundant) fake key presses
    for inhibiting the screensaver are disabled (LP: #1007438)
  - Build-depend on libzeitgeist-dev
  - Suggest rather than recommend gstreamer components in universe
  - Add totem-plugins-extra
  - Add XB-Npp-Description and XB-Npp-Filename header to the 
    totem-mozilla package to improve ubufox/ubuntu plugin db integration 
  - Refer to Firefox in totem-mozilla description instead of Iceweasel
  - Don't have totem-mozilla recommend any particular browser
  - Drop obsolete python library dependencies since iplayer is no longer
    included
* debian/totem-common.install, debian/source_totem.py:
  - Install Ubuntu apport debugging hook
* debian/totem-plugins-extra.install:
  - Universe plugins split out of totem-plugins (currently only gromit)
* debian/totem-plugins.install:    
  - Skip the plugins split to -extra and add the zeitgeist plugin
* debian/rules:
  - Build with --fail-missing, to ensure we install everything. 
    + Ignore libtotem.{,l}a since we delibrately don't install these.
  - Re-enable hardening, make sure both PIE and BINDNOW are used
    by setting hardening=+all. (LP: #1039604)
* debian/patches/91_quicklist_entries.patch:
  - Add static quicklist
* debian/patches/92_gst-plugins-good.patch:
  - Build without unnecessary gstreamer1.0-bad dependency
* debian/patches/93_grilo_optional.patch:
  - Allow building without grilo while grilo MIR is still pending
* debian/patches/correct_desktop_mimetypes.patch:
  - Don't list the mimetypes after the unity lists
* debian/patches/revert_shell_menu.patch: 
  - revert the use of a shell menu until indicator-appmenu can handle
    the mixed shell/traditional menus itself
* New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
#include <gtk/gtk.h>
26
26
#include <glib/gi18n.h>
 
27
#define GST_USE_UNSTABLE_API 1
27
28
#include <gst/tag/tag.h>
28
29
#include <string.h>
29
30
#include <libpeas-gtk/peas-gtk-plugin-manager.h>
215
216
                add_lang_action (totem, action_group, ui_id, paths, prefix,
216
217
                                 action_data, i, num + 1, &group);
217
218
                g_free (action_data);
218
 
                i++;
 
219
                i++;
219
220
        }
220
221
 
221
222
        g_hash_table_destroy (lookup);
276
277
                action = create_lang_actions (totem, totem->languages_action_group,
277
278
                                totem->languages_ui_id,
278
279
                                paths,
279
 
                                "languages", list, TRUE);
 
280
                                "languages", list, TRUE);
280
281
                gtk_ui_manager_ensure_update (totem->ui_manager);
281
282
 
282
283
                current = bacon_video_widget_get_language (totem->bvw);
316
317
                action = create_lang_actions (totem, totem->subtitles_action_group,
317
318
                                totem->subtitles_ui_id,
318
319
                                paths,
319
 
                                "subtitles", list, FALSE);
 
320
                                "subtitles", list, FALSE);
320
321
                gtk_ui_manager_ensure_update (totem->ui_manager);
321
322
 
322
323
                current = bacon_video_widget_get_subtitle (totem->bvw);
386
387
        uri = gtk_recent_info_get_uri (recent_info);
387
388
        display_name = gtk_recent_info_get_display_name (recent_info);
388
389
 
389
 
        totem_add_to_playlist_and_play (totem, uri, display_name, FALSE);
 
390
        totem_add_to_playlist_and_play (totem, uri, display_name);
390
391
}
391
392
 
392
393
static gint
447
448
                info = (GtkRecentInfo *) l->data;
448
449
 
449
450
                if (gtk_recent_info_has_group (info, "Totem")) {
450
 
                        gtk_recent_info_ref (info);
451
 
                        totem_items = g_list_prepend (totem_items, info);
 
451
                        gtk_recent_info_ref (info);
 
452
                        totem_items = g_list_prepend (totem_items, info);
452
453
                }
453
454
        }
454
455
        g_list_foreach (items, (GFunc) gtk_recent_info_unref, NULL);
532
533
        totem_recent_manager_changed_callback (totem->recent_manager, totem);
533
534
}
534
535
 
535
 
static void
536
 
recent_info_cb (GFile *file,
537
 
                GAsyncResult *res,
538
 
                Totem *totem)
539
 
{
540
 
        GtkRecentData data;
541
 
        char *groups[] = { NULL, NULL };
542
 
        GFileInfo *file_info;
543
 
        const char *uri, *display_name;
544
 
 
545
 
        memset (&data, 0, sizeof (data));
546
 
 
547
 
        file_info = g_file_query_info_finish (file, res, NULL);
548
 
        uri = g_object_get_data (G_OBJECT (file), "uri");
549
 
        display_name = g_object_get_data (G_OBJECT (file), "display_name");
550
 
 
551
 
        /* Probably an unsupported URI scheme */
552
 
        if (file_info == NULL) {
553
 
                data.display_name = g_strdup (display_name);
554
 
                /* Bogus mime-type, we just want it added */
555
 
                data.mime_type = g_strdup ("video/x-totem-stream");
556
 
                groups[0] = (gchar*) "TotemStreams";
557
 
        } else {
558
 
                data.mime_type = g_strdup (g_file_info_get_content_type (file_info));
559
 
                data.display_name = g_strdup (g_file_info_get_display_name (file_info));
560
 
                g_object_unref (file_info);
561
 
                groups[0] = (gchar*) "Totem";
562
 
        }
563
 
 
564
 
        data.app_name = g_strdup (g_get_application_name ());
565
 
        data.app_exec = g_strjoin (" ", g_get_prgname (), "%u", NULL);
566
 
        data.groups = groups;
567
 
        if (gtk_recent_manager_add_full (totem->recent_manager,
568
 
                                         uri, &data) == FALSE) {
569
 
                g_warning ("Couldn't add recent file for '%s'", uri);
570
 
        }
571
 
 
572
 
        g_free (data.display_name);
573
 
        g_free (data.mime_type);
574
 
        g_free (data.app_name);
575
 
        g_free (data.app_exec);
576
 
 
577
 
        g_object_unref (file);
578
 
}
579
 
 
580
 
void
581
 
totem_action_add_recent (Totem      *totem,
582
 
                         const char *uri,
583
 
                         const char *display_name,
584
 
                         const char *content_type)
585
 
{
586
 
        GFile *file;
587
 
 
588
 
        if (totem_is_special_mrl (uri) != FALSE)
589
 
                return;
590
 
 
591
 
        /* If we already have a content-type, the display_name is
592
 
         * probably decent as well */
593
 
        if (content_type != NULL) {
594
 
                GtkRecentData data;
595
 
                char *groups[] = { NULL, NULL };
596
 
 
597
 
                memset (&data, 0, sizeof (data));
598
 
 
599
 
                data.mime_type = (char *) content_type;
600
 
                data.display_name = (char *) display_name;
601
 
                groups[0] = (char*) "Totem";
602
 
                data.app_name = (char *) g_get_application_name ();
603
 
                data.app_exec = g_strjoin (" ", g_get_prgname (), "%u", NULL);
604
 
                data.groups = groups;
605
 
 
606
 
                if (gtk_recent_manager_add_full (totem->recent_manager,
607
 
                                                 uri, &data) == FALSE) {
608
 
                        g_warning ("Couldn't add recent file for '%s'", uri);
609
 
                }
610
 
                g_free (data.app_exec);
611
 
 
612
 
                return;
613
 
        }
614
 
 
615
 
        file = g_file_new_for_uri (uri);
616
 
        g_object_set_data_full (G_OBJECT (file), "uri", g_strdup (uri), g_free);
617
 
        g_object_set_data_full (G_OBJECT (file), "display_name", g_strdup (display_name), g_free);
618
 
        g_file_query_info_async (file,
619
 
                                 G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE "," G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME,
620
 
                                 G_FILE_QUERY_INFO_NONE, 0, NULL, (GAsyncReadyCallback) recent_info_cb, totem);
621
 
}
622
 
 
623
 
/* Play Disc menu items */
624
 
 
625
 
static void
626
 
on_play_disc_activate (GtkAction *action, Totem *totem)
627
 
{
628
 
        char *device_path;
629
 
 
630
 
        device_path = g_object_get_data (G_OBJECT (action), "device_path");
631
 
        totem_action_play_media_device (totem, device_path);
632
 
}
633
 
 
634
 
static const char *
635
 
get_icon_name_for_gicon (GtkIconTheme *theme,
636
 
                         GIcon *icon)
637
 
{
638
 
        const char * const *icon_names;
639
 
        const char *icon_name;
640
 
        guint j;
641
 
 
642
 
        icon_name = NULL;
643
 
 
644
 
        if (G_IS_EMBLEMED_ICON (icon) != FALSE) {
645
 
                GIcon *new_icon;
646
 
                new_icon = g_emblemed_icon_get_icon (G_EMBLEMED_ICON (icon));
647
 
                g_object_unref (icon);
648
 
                icon = g_object_ref (new_icon);
649
 
        }
650
 
 
651
 
        if (G_IS_THEMED_ICON (icon)) {
652
 
                icon_names = g_themed_icon_get_names (G_THEMED_ICON (icon));
653
 
 
654
 
                for (j = 0; icon_names[j] != NULL; j++) {
655
 
                        icon_name = icon_names[j];
656
 
                        if (gtk_icon_theme_has_icon (theme, icon_name) != FALSE)
657
 
                                break;
658
 
                }
659
 
        }
660
 
 
661
 
        return icon_name;
662
 
}
663
 
 
664
 
static char *
665
 
unescape_archive_name (GFile *root)
666
 
{
667
 
        char *uri;
668
 
        guint len;
669
 
        char *escape1, *escape2;
670
 
 
671
 
        uri = g_file_get_uri (root);
672
 
 
673
 
        /* Remove trailing slash */
674
 
        len = strlen (uri);
675
 
        if (uri[len - 1] == '/')
676
 
                uri[len - 1] = '\0';
677
 
 
678
 
        /* Unescape the path */
679
 
        escape1 = g_uri_unescape_string (uri + strlen ("archive://"), NULL);
680
 
        escape2 = g_uri_unescape_string (escape1, NULL);
681
 
        g_free (escape1);
682
 
        g_free (uri);
683
 
 
684
 
        return escape2;
685
 
}
686
 
 
687
 
static void
688
 
add_mount_to_menu (GMount *mount,
689
 
                   GtkIconTheme *theme,
690
 
                   guint position,
691
 
                   Totem *totem)
692
 
{
693
 
        char *name, *escaped_name, *label;
694
 
        GtkAction *action;
695
 
        GIcon *icon;
696
 
        const char *icon_name;
697
 
        char *device_path;
698
 
 
699
 
        GVolume *volume;
700
 
        GFile *root, *iso;
701
 
        char **content_types;
702
 
        gboolean has_content;
703
 
        guint i;
704
 
 
705
 
        /* Check whether we have an archive mount */
706
 
        volume = g_mount_get_volume (mount);
707
 
        if (volume != NULL) {
708
 
                g_object_unref (volume);
709
 
                return;
710
 
        }
711
 
 
712
 
        root = g_mount_get_root (mount);
713
 
        if (g_file_has_uri_scheme (root, "archive") == FALSE) {
714
 
                g_object_unref (root);
715
 
                return;
716
 
        }
717
 
 
718
 
        /* Check whether it's a DVD or VCD image */
719
 
        content_types = g_content_type_guess_for_tree (root);
720
 
        if (content_types == NULL ||
721
 
            g_strv_length (content_types) == 0) {
722
 
                g_strfreev (content_types);
723
 
                g_object_unref (root);
724
 
                return;
725
 
        }
726
 
 
727
 
        has_content = FALSE;
728
 
        for (i = 0; content_types[i] != NULL; i++) {
729
 
                /* XXX: Keep in sync with mime-type-list.txt */
730
 
                if (g_str_equal (content_types[i], "x-content/video-dvd") ||
731
 
                    g_str_equal (content_types[i], "x-content/video-vcd") ||
732
 
                    g_str_equal (content_types[i], "x-content/video-svcd")) {
733
 
                        has_content = TRUE;
734
 
                        break;
735
 
                }
736
 
        }
737
 
        g_strfreev (content_types);
738
 
 
739
 
        if (has_content == FALSE) {
740
 
                g_object_unref (root);
741
 
                return;
742
 
        }
743
 
 
744
 
        device_path = unescape_archive_name (root);
745
 
        g_object_unref (root);
746
 
 
747
 
        /* And ensure it's a local path */
748
 
        iso = g_file_new_for_uri (device_path);
749
 
        g_free (device_path);
750
 
        device_path = g_file_get_path (iso);
751
 
        g_object_unref (iso);
752
 
 
753
 
        /* Work out an icon to display */
754
 
        icon = g_mount_get_icon (mount);
755
 
        icon_name = get_icon_name_for_gicon (theme, icon);
756
 
 
757
 
        /* Get the mount's pretty name for the menu label */
758
 
        name = g_mount_get_name (mount);
759
 
        g_strstrip (name);
760
 
        escaped_name = escape_label_for_menu (name);
761
 
        g_free (name);
762
 
        /* Translators:
763
 
         * This is not a JPEG image, but a disc image, for example,
764
 
         * an ISO file */
765
 
        label = g_strdup_printf (_("Play Image '%s'"), escaped_name);
766
 
        g_free (escaped_name);
767
 
 
768
 
        name = g_strdup_printf (_("device%d"), position);
769
 
 
770
 
        action = gtk_action_new (name, label, NULL, NULL);
771
 
        g_object_set (G_OBJECT (action),
772
 
                      "icon-name", icon_name, NULL);
773
 
        gtk_action_set_always_show_image (action, TRUE);
774
 
        gtk_action_group_add_action (totem->devices_action_group, action);
775
 
        g_object_unref (action);
776
 
 
777
 
        gtk_ui_manager_add_ui (totem->ui_manager, totem->devices_ui_id,
778
 
                               "/tmw-menubar/movie/devices-placeholder", name, name,
779
 
                               GTK_UI_MANAGER_MENUITEM, FALSE);
780
 
 
781
 
        g_free (name);
782
 
        g_free (label);
783
 
        g_object_unref (icon);
784
 
 
785
 
        g_object_set_data_full (G_OBJECT (action),
786
 
                                "device_path", device_path,
787
 
                                (GDestroyNotify) g_free);
788
 
 
789
 
        g_signal_connect (G_OBJECT (action), "activate",
790
 
                          G_CALLBACK (on_play_disc_activate), totem);
791
 
}
792
 
 
793
 
static void
794
 
add_volume_to_menu (GVolume *volume,
795
 
                    GDrive *drive,
796
 
                    GtkIconTheme *theme,
797
 
                    guint position,
798
 
                    Totem *totem)
799
 
{
800
 
        char *name, *escaped_name, *label;
801
 
        GtkAction *action;
802
 
        gboolean disabled;
803
 
        GIcon *icon;
804
 
        const char *icon_name;
805
 
        char *device_path;
806
 
        GtkWidget *menu_item;
807
 
        char *menu_item_path;
808
 
 
809
 
        disabled = FALSE;
810
 
        device_path = NULL;
811
 
 
812
 
        /* Add devices with blank CDs and audio CDs in them, but disable them */
813
 
        if (drive != NULL) {
814
 
                device_path = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
815
 
                if (device_path == NULL)
816
 
                        return;
817
 
        }
818
 
 
819
 
        /* Check whether we have a media... */
820
 
        if (drive != NULL &&
821
 
            g_drive_has_media (drive) == FALSE) {
822
 
                disabled = TRUE;
823
 
        } else {
824
 
                /* ... Or an audio CD or a blank media */
825
 
                GMount *mount;
826
 
                GFile *root;
827
 
 
828
 
                mount = g_volume_get_mount (volume);
829
 
                if (mount != NULL) {
830
 
                        root = g_mount_get_root (mount);
831
 
                        g_object_unref (mount);
832
 
 
833
 
                        if (g_file_has_uri_scheme (root, "burn") != FALSE || g_file_has_uri_scheme (root, "cdda") != FALSE)
834
 
                                disabled = TRUE;
835
 
                        g_object_unref (root);
836
 
                }
837
 
        }
838
 
 
839
 
        /* Work out an icon to display */
840
 
        icon = g_volume_get_icon (volume);
841
 
        icon_name = get_icon_name_for_gicon (theme, icon);
842
 
 
843
 
        /* Get the volume's pretty name for the menu label */
844
 
        name = g_volume_get_name (volume);
845
 
        g_strstrip (name);
846
 
        escaped_name = escape_label_for_menu (name);
847
 
        g_free (name);
848
 
        label = g_strdup_printf (_("Play Disc '%s'"), escaped_name);
849
 
        g_free (escaped_name);
850
 
 
851
 
        name = g_strdup_printf (_("device%d"), position);
852
 
 
853
 
        action = gtk_action_new (name, label, NULL, NULL);
854
 
        g_object_set (G_OBJECT (action),
855
 
                      "icon-name", icon_name,
856
 
                      "sensitive", !disabled, NULL);
857
 
        gtk_action_group_add_action (totem->devices_action_group, action);
858
 
        g_object_unref (action);
859
 
 
860
 
        gtk_ui_manager_add_ui (totem->ui_manager, totem->devices_ui_id,
861
 
                               "/tmw-menubar/movie/devices-placeholder", name, name,
862
 
                               GTK_UI_MANAGER_MENUITEM, FALSE);
863
 
 
864
 
        /* TODO: This can be made cleaner once bug #589842 is fixed */
865
 
        menu_item_path = g_strdup_printf ("/tmw-menubar/movie/devices-placeholder/%s", name);
866
 
        menu_item = gtk_ui_manager_get_widget (totem->ui_manager, menu_item_path);
867
 
        g_free (menu_item_path);
868
 
 
869
 
        if (menu_item != NULL)
870
 
                gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (menu_item), TRUE);
871
 
 
872
 
        g_free (name);
873
 
        g_free (label);
874
 
        g_object_unref (icon);
875
 
 
876
 
        if (disabled != FALSE) {
877
 
                g_free (device_path);
878
 
                return;
879
 
        }
880
 
 
881
 
        g_object_set_data_full (G_OBJECT (action),
882
 
                                "device_path", device_path,
883
 
                                (GDestroyNotify) g_free);
884
 
 
885
 
        g_signal_connect (G_OBJECT (action), "activate",
886
 
                          G_CALLBACK (on_play_disc_activate), totem);
887
 
}
888
 
 
889
 
static void
890
 
add_drive_to_menu (GDrive *drive,
891
 
                   GtkIconTheme *theme,
892
 
                   guint position,
893
 
                   Totem *totem)
894
 
{
895
 
        GList *volumes, *i;
896
 
 
897
 
        /* FIXME: We used to explicitly check whether it was a CD/DVD drive
898
 
         * Use:
899
 
         * udi = g_volume_get_identifier (i->data, G_VOLUME_IDENTIFIER_KIND_HAL_UDI); */
900
 
        if (g_drive_can_eject (drive) == FALSE)
901
 
                return;
902
 
 
903
 
        /* Repeat for all the drive's volumes */
904
 
        volumes = g_drive_get_volumes (drive);
905
 
 
906
 
        for (i = volumes; i != NULL; i = i->next) {
907
 
                GVolume *volume = i->data;
908
 
                add_volume_to_menu (volume, drive, theme, position, totem);
909
 
                g_object_unref (volume);
910
 
        }
911
 
 
912
 
        g_list_free (volumes);
913
 
}
914
 
 
915
 
static void
916
 
update_drive_menu_items (GtkMenuItem *movie_menuitem, Totem *totem)
917
 
{
918
 
        GList *drives, *mounts, *i;
919
 
        GtkIconTheme *theme;
920
 
        guint position;
921
 
 
922
 
        /* Add any suitable devices to the menu */
923
 
        position = 0;
924
 
 
925
 
        theme = gtk_icon_theme_get_default ();
926
 
 
927
 
        drives = g_volume_monitor_get_connected_drives (totem->monitor);
928
 
        for (i = drives; i != NULL; i = i->next) {
929
 
                GDrive *drive = i->data;
930
 
 
931
 
                position++;
932
 
                add_drive_to_menu (drive, theme, position, totem);
933
 
                g_object_unref (drive);
934
 
        }
935
 
        g_list_free (drives);
936
 
 
937
 
        /* Look for mounted archives */
938
 
        mounts = g_volume_monitor_get_mounts (totem->monitor);
939
 
        for (i = mounts; i != NULL; i = i->next) {
940
 
                GMount *mount = i->data;
941
 
 
942
 
                position++;
943
 
                add_mount_to_menu (mount, theme, position, totem);
944
 
                g_object_unref (mount);
945
 
        }
946
 
        g_list_free (mounts);
947
 
 
948
 
        totem->drives_changed = FALSE;
949
 
}
950
 
 
951
 
static void
952
 
on_movie_menu_select (GtkMenuItem *movie_menuitem, Totem *totem)
953
 
{
954
 
        if (totem->drives_changed == FALSE)
955
 
                return;
956
 
 
957
 
        /* Remove old UI */
958
 
        gtk_ui_manager_remove_ui (totem->ui_manager, totem->devices_ui_id);
959
 
        gtk_ui_manager_ensure_update (totem->ui_manager);
960
 
 
961
 
        /* Create new ActionGroup */
962
 
        if (totem->devices_action_group) {
963
 
                gtk_ui_manager_remove_action_group (totem->ui_manager,
964
 
                                totem->devices_action_group);
965
 
                g_object_unref (totem->devices_action_group);
966
 
        }
967
 
        totem->devices_action_group = gtk_action_group_new ("devices-action-group");
968
 
        gtk_ui_manager_insert_action_group (totem->ui_manager,
969
 
                        totem->devices_action_group, -1);
970
 
 
971
 
        update_drive_menu_items (movie_menuitem, totem);
972
 
 
973
 
        gtk_ui_manager_ensure_update (totem->ui_manager);
974
 
}
975
 
 
976
 
static void
977
 
on_g_volume_monitor_event (GVolumeMonitor *monitor,
978
 
                           gpointer *device,
979
 
                           Totem *totem)
980
 
{
981
 
        totem->drives_changed = TRUE;
982
 
}
983
 
 
984
 
void
985
 
totem_setup_play_disc (Totem *totem)
986
 
{
987
 
        GtkWidget *item;
988
 
 
989
 
        item = gtk_ui_manager_get_widget (totem->ui_manager, "/tmw-menubar/movie");
990
 
        g_signal_connect (G_OBJECT (item), "select",
991
 
                        G_CALLBACK (on_movie_menu_select), totem);
992
 
 
993
 
        g_signal_connect (G_OBJECT (totem->monitor),
994
 
                        "volume-added",
995
 
                        G_CALLBACK (on_g_volume_monitor_event), totem);
996
 
        g_signal_connect (G_OBJECT (totem->monitor),
997
 
                        "volume-removed",
998
 
                        G_CALLBACK (on_g_volume_monitor_event), totem);
999
 
        g_signal_connect (G_OBJECT (totem->monitor),
1000
 
                        "mount-added",
1001
 
                        G_CALLBACK (on_g_volume_monitor_event), totem);
1002
 
        g_signal_connect (G_OBJECT (totem->monitor),
1003
 
                        "mount-removed",
1004
 
                        G_CALLBACK (on_g_volume_monitor_event), totem);
1005
 
 
1006
 
        totem->drives_changed = TRUE;
1007
 
}
1008
 
 
1009
536
void
1010
537
open_action_callback (GtkAction *action, Totem *totem)
1011
538
{
1057
584
void
1058
585
zoom_1_2_action_callback (GtkAction *action, Totem *totem)
1059
586
{
1060
 
        totem_action_set_scale_ratio (totem, 0.5); 
 
587
        totem_action_set_scale_ratio (totem, 0.5);
1061
588
}
1062
589
 
1063
590
void
1085
612
{
1086
613
        totem_playlist_select_subtitle_dialog (totem->playlist,
1087
614
                                               TOTEM_PLAYLIST_DIALOG_PLAYING);
1088
 
 
615
}
1089
616
 
1090
617
void
1091
618
next_angle_action_callback (GtkAction *action, Totem *totem)
1168
695
void
1169
696
about_action_callback (GtkAction *action, Totem *totem)
1170
697
{
1171
 
        char *backend_version, *description;
1172
 
 
1173
698
        const char *authors[] =
1174
699
        {
1175
700
                "Bastien Nocera <hadess@hadess.net>",
1180
705
                NULL
1181
706
        };
1182
707
        const char *artists[] = { "Jakub Steiner <jimmac@ximian.com>", NULL };
1183
 
        #include "../help/totem-docs.h"
1184
708
        char *license = totem_interface_get_license ();
1185
709
 
1186
 
        backend_version = bacon_video_widget_get_backend_name (totem->bvw);
1187
 
        /* This lists the back-end type and version, such as
1188
 
         * Movie Player using GStreamer 0.10.1 */
1189
 
        description = g_strdup_printf (_("Movie Player using %s"), backend_version);
1190
 
 
1191
710
        gtk_show_about_dialog (GTK_WINDOW (totem->win),
1192
711
                                     "version", VERSION,
1193
712
                                     "copyright", _("Copyright \xc2\xa9 2002-2009 Bastien Nocera"),
1194
 
                                     "comments", description,
 
713
                                     "comments", _("Videos"),
1195
714
                                     "authors", authors,
1196
 
                                     "documenters", documentation_credits,
1197
715
                                     "artists", artists,
1198
716
                                     "translator-credits", _("translator-credits"),
1199
717
                                     "logo-icon-name", "totem",
1200
718
                                     "license", license,
1201
719
                                     "wrap-license", TRUE,
1202
720
                                     "website-label", _("Totem Website"),
1203
 
                                     "website", "http://projects.gnome.org/totem/",
 
721
                                     "website", PACKAGE_URL,
1204
722
                                     NULL);
1205
 
 
1206
 
        g_free (backend_version);
1207
 
        g_free (description);
1208
723
        g_free (license);
1209
724
}
1210
725