~kaozilon/totem/test

« back to all changes in this revision

Viewing changes to browser-plugin/totem-plugin-viewer.c

  • Committer: Bazaar Package Importer
  • Author(s): Raphaël Hertzog, Josselin Mouette, Emilio Pozuelo Monfort, Sjoerd Simons, Frederic Peters, Michael Biebl, Raphaël Hertzog
  • Date: 2011-04-10 18:12:25 UTC
  • mfrom: (1.4.6 upstream) (5.1.19 sid)
  • Revision ID: james.westby@ubuntu.com-20110410181225-srhkesant1gx38pw
Tags: 3.0.0-1
* Team upload to experimental.

[ Josselin Mouette ]
* Only suggest totem-mozilla. Closes: #599638.
* totem-coherence depends on totem-plugins. Closes: #607436.

[ Emilio Pozuelo Monfort ]
* New upstream development release.
  - debian/patches/80_webm.patch,
    debian/patches/81_mpegts.patch,
    debian/patches/82_youtube_api.patch:
    + Removed, applied upstream.
  - debian/patches/90_autotools.patch:
    + Removed, no longer needed.
  - debian/patches/70_bbc_plugin.patch:
    + Disabled, needs porting.
  - debian/control.in:
    + Updated build dependencies and dependencies.
    + Removed transitional totem-xine and totem-gstreamer packages.
    + Don't build totem-coherence for now, it hasn't been ported
      to PyGI and so it's that plugin or all the others.
  - debian/totem-common.install:
    + Don't install the gconf schemas, they're gone. Install the
      gsettings files instead.
  - debian/totem.install:
    + Ship libtotem here.
  - debian/control.in,
    debian/rules,
    debian/gir1.2-totem-1.0.install:
    + Add a gir package and update the plugins package dependencies
      for the new gir dependencies.
* debian/rules,
  debian/control.in,
  debian/source/format:
  - Switch to source format 3.0 (quilt).
* debian/control.in:
  - Remove obsolete build dependency on libhal-dev. Closes: #615214.

[ Sjoerd Simons ]
* New upstream release (2.91.7)
* debian/totem-plugins.install:
  * Don't install the grommit plugin
  * Install the chapters plugin

[ Frederic Peters ]
* New upstream release (2.91.91)
* debian/control.in: bump build-dep on libpeas.
* debian/control.in, debian/totem-plugins.install:
  * The galago plugin has been renamed to im-status, and no longer uses
    libgalago.

[ Michael Biebl ]
* debian/control.in:
  - Add Build-Depends on libtracker-sparql-0.10-dev for media search support
    using Tracker.

[ Raphaël Hertzog ]
* New upstream release (3.0.0).
* Added Build-Depends on gstreamer0.10-gconf.
* Bumped minimal version of build-dependency on totem-plparser-dev to
  2.32.4-2 to match the ./configure requirements and to ensure libquvi-dev
  is there as required by the totem-plparser.pc.
* Add some copyright notices to debian/copyright to please lintian.
* Call dh_pysupport on totem to generate the python dependency for
  totem-bugreport.py
* Tell dh_makeshlibs to skip /usr/lib/nautilus. This avoids generating
  an shlib entry for the plugin it contains.
* Tweaked the totem description to fix lintian warning description-
  synopsis-starts-with-article.
* Updated dependencies of totem-coherence to match the new code using
  introspection but keep the package disabled as python-coherence is
  still PyGTK based and thus incompatible.
* Add lintian overrides for menu-icon-missing (icon is in totem-
  common).
* Add gnome-icon-theme-symbolic to totem's dependencies.
* Bump build-dep on libgdata >= 0.8.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include <glib.h>
34
34
#include <glib/gi18n.h>
35
35
#include <gio/gio.h>
36
 
#include <gdk/gdkx.h>
 
36
#include <gtk/gtkx.h>
37
37
#include <gtk/gtk.h>
38
 
#include <gconf/gconf-client.h>
39
38
 
40
39
#include <gdk/gdk.h>
41
40
#include <gdk/gdkkeysyms.h>
102
101
typedef struct _TotemEmbedded {
103
102
        GObject parent;
104
103
 
 
104
        DBusGConnection *conn;
105
105
        GtkWidget *window;
106
106
        GtkBuilder *menuxml, *xml;
107
107
        GtkWidget *about;
119
119
        char *href_uri;
120
120
        char *target;
121
121
        char *stream_uri;
 
122
        gint64 size; /* the size of the streamed file for fd://0 */
122
123
        BaconVideoWidget *bvw;
123
124
        TotemStates state;
124
125
        GdkCursor *cursor;
287
288
static void
288
289
totem_embedded_error_and_exit (char *title, char *reason, TotemEmbedded *emb)
289
290
{
 
291
        /* Avoid any more contacts, so drop off the bus */
 
292
        if (emb->conn != NULL) {
 
293
                dbus_g_connection_unregister_g_object(emb->conn, G_OBJECT (emb));
 
294
                emb->conn = NULL;
 
295
        }
 
296
 
290
297
        /* FIXME send a signal to the plugin with the error message instead! */
291
298
        totem_interface_error_blocking (title, reason,
292
299
                        GTK_WINDOW (emb->window));
365
372
                                 NULL);
366
373
                }
367
374
                break;
 
375
        case TOTEM_STATE_INVALID:
368
376
        default:
369
377
                g_assert_not_reached ();
370
378
                break;
403
411
                              GError **error)
404
412
{
405
413
        gboolean retval;
406
 
        const char *uri;
 
414
        char *uri;
407
415
 
408
416
        /* FIXME: stop previous content, or is that automatic ? */
409
417
 
410
 
        if (emb->is_browser_stream)
411
 
                uri = "fd://0";
412
 
        else
413
 
                uri = emb->current_uri;
 
418
        if (emb->is_browser_stream) {
 
419
                if (emb->size > 0)
 
420
                        uri = g_strdup_printf ("fd://0?size=%"G_GINT64_FORMAT, emb->size);
 
421
                else
 
422
                        uri = g_strdup ("fd://0");
 
423
        } else {
 
424
                uri = g_strdup (emb->current_uri);
 
425
        }
414
426
 
415
427
        if (!uri) {
416
428
                g_set_error_literal (error,
428
440
        bacon_video_widget_set_logo_mode (emb->bvw, FALSE);
429
441
 
430
442
        retval = bacon_video_widget_open (emb->bvw, uri, emb->current_subtitle_uri, NULL);
 
443
        g_free (uri);
 
444
 
431
445
        /* FIXME we shouldn't even do that here */
432
446
        if (start_play)
433
447
                totem_embedded_play (emb, NULL);
567
581
{
568
582
        GList *uris = NULL;
569
583
        GdkScreen *screen;
570
 
        GAppLaunchContext *ctx;
 
584
        GdkAppLaunchContext *ctx;
571
585
        gboolean result;
572
 
        const char *uri;
573
586
 
574
587
        g_return_val_if_fail (embedded->app != NULL, FALSE);
575
588
 
576
589
        if (embedded->type == TOTEM_PLUGIN_TYPE_NARROWSPACE
577
590
                   && embedded->href_uri != NULL) {
578
591
                uris = g_list_prepend (uris, embedded->href_uri);
579
 
                uri = embedded->href_uri;
580
592
        } else {
581
593
                uris = g_list_prepend (uris, embedded->current_uri);
582
 
                uri = embedded->current_uri;
583
594
        }
584
595
 
585
 
        ctx = G_APP_LAUNCH_CONTEXT (gdk_app_launch_context_new ());
 
596
        ctx = gdk_display_get_app_launch_context (gtk_widget_get_display (embedded->window));
586
597
        screen = gtk_widget_get_screen (embedded->window);
587
 
        gdk_app_launch_context_set_screen (GDK_APP_LAUNCH_CONTEXT (ctx), screen);
588
 
 
589
 
        gdk_app_launch_context_set_timestamp (GDK_APP_LAUNCH_CONTEXT (ctx), user_time);
590
 
        gdk_app_launch_context_set_icon (GDK_APP_LAUNCH_CONTEXT (ctx), g_app_info_get_icon (embedded->app));
591
 
 
592
 
        result = g_app_info_launch_uris (embedded->app, uris, ctx, NULL);
 
598
        gdk_app_launch_context_set_screen (ctx, screen);
 
599
 
 
600
        gdk_app_launch_context_set_timestamp (ctx, user_time);
 
601
        gdk_app_launch_context_set_icon (ctx, g_app_info_get_icon (embedded->app));
 
602
 
 
603
        result = g_app_info_launch_uris (embedded->app, uris, G_APP_LAUNCH_CONTEXT (ctx), NULL);
593
604
 
594
605
        g_list_free (uris);
595
606
 
748
759
 
749
760
                totem_fullscreen_set_fullscreen (emb->fs, FALSE);
750
761
                gtk_widget_reparent (GTK_WIDGET (emb->bvw), container);
751
 
                gtk_widget_hide_all (emb->fs_window);
 
762
                gtk_widget_hide (emb->fs_window);
752
763
 
753
764
                gtk_action_set_sensitive (fs_action, TRUE);
754
765
        } else {
782
793
}
783
794
 
784
795
static gboolean
 
796
totem_embedded_set_time (TotemEmbedded *emb,
 
797
                         guint64 _time,
 
798
                         GError **error)
 
799
{
 
800
        g_message ("totem_embedded_set_time: %"G_GUINT64_FORMAT, _time);
 
801
 
 
802
        bacon_video_widget_seek_time (emb->bvw, _time, FALSE, NULL);
 
803
 
 
804
        return TRUE;
 
805
}
 
806
 
 
807
static gboolean
785
808
totem_embedded_open_uri (TotemEmbedded *emb,
786
809
                         const char *uri,
787
810
                         const char *base_uri,
800
823
}
801
824
 
802
825
static gboolean
803
 
totem_embedded_open_stream (TotemEmbedded *emb,
804
 
                            const char *uri,
805
 
                            const char *base_uri,
806
 
                            GError **error)
 
826
totem_embedded_setup_stream (TotemEmbedded *emb,
 
827
                             const char *uri,
 
828
                             const char *base_uri,
 
829
                             GError **error)
807
830
{
808
 
        g_message ("totem_embedded_open_stream called: uri %s, base_uri: %s", uri, base_uri);
 
831
        g_message ("totem_embedded_setup_stream called: uri %s, base_uri: %s", uri, base_uri);
809
832
 
810
833
        totem_embedded_clear_playlist (emb, NULL);
811
834
 
816
839
 
817
840
        /* FIXME: consume any remaining input from stdin */
818
841
 
 
842
        return TRUE;
 
843
}
 
844
 
 
845
static gboolean
 
846
totem_embedded_open_stream (TotemEmbedded *emb,
 
847
                            gint64 size,
 
848
                            GError **error)
 
849
{
 
850
        g_message ("totem_embedded_open_stream called: with size %"G_GINT64_FORMAT, size);
 
851
 
 
852
        emb->size = size;
 
853
 
819
854
        return totem_embedded_open_internal (emb, TRUE, error);
820
855
}
821
856
 
875
910
                        g_message ("Seeking to %d seconds for starttime", plitem->starttime);
876
911
                        retval = bacon_video_widget_seek_time (emb->bvw,
877
912
                                                               plitem->starttime * 1000,
 
913
                                                               FALSE,
878
914
                                                               NULL /* FIXME */);
879
915
                        if (!retval)
880
916
                                return TRUE;
1154
1190
        GtkClipboard *clip;
1155
1191
        const char *uri;
1156
1192
 
1157
 
        if (emb->href_uri != NULL) {
 
1193
        if (emb->stream_uri != NULL) {
 
1194
                uri = emb->stream_uri;
 
1195
        } else if (emb->href_uri != NULL) {
1158
1196
                uri = emb->href_uri;
1159
1197
        } else {
1160
1198
                uri = emb->current_uri;
1202
1240
        GtkTextDirection direction;
1203
1241
        GtkAllocation allocation;
1204
1242
 
1205
 
        gtk_widget_size_request (GTK_WIDGET (menu), &menu_req);
 
1243
        gtk_widget_get_preferred_size (GTK_WIDGET (menu), NULL, &menu_req);
1206
1244
 
1207
1245
        direction = gtk_widget_get_direction (widget);
1208
1246
 
1634
1672
static gboolean
1635
1673
on_seek_start (GtkWidget *widget, GdkEventButton *event, TotemEmbedded *emb)
1636
1674
{
 
1675
        /* HACK: we want the behaviour you get with the middle button, so we
 
1676
         * mangle the event.  clicking with other buttons moves the slider in
 
1677
         * step increments, clicking with the middle button moves the slider to
 
1678
         * the location of the click.
 
1679
         */
 
1680
        event->button = 2;
 
1681
 
1637
1682
        emb->seeking = TRUE;
1638
1683
        totem_time_label_set_seeking (TOTEM_TIME_LABEL (emb->fs->time_label),
1639
1684
                                      TRUE);
1644
1689
static gboolean
1645
1690
cb_on_seek (GtkWidget *widget, GdkEventButton *event, TotemEmbedded *emb)
1646
1691
{
 
1692
        /* HACK: see on_seek_start */
 
1693
        event->button = 2;
 
1694
 
1647
1695
        bacon_video_widget_seek (emb->bvw,
1648
1696
                gtk_range_get_value (GTK_RANGE (widget)) / 65535, NULL);
1649
1697
        totem_time_label_set_seeking (TOTEM_TIME_LABEL (emb->fs->time_label),
1669
1717
                               GtkAllocation *allocation,
1670
1718
                               BaconVideoWidget *bvw)
1671
1719
{
1672
 
        bacon_video_widget_set_show_visuals (bvw, allocation->height > MINIMUM_VIDEO_SIZE);
 
1720
        bacon_video_widget_set_show_visualizations (bvw, allocation->height > MINIMUM_VIDEO_SIZE);
1673
1721
        g_signal_handlers_disconnect_by_func (controls, G_CALLBACK (video_widget_size_allocate_cb), NULL);
1674
1722
}
1675
1723
 
1690
1738
totem_embedded_handle_key_press (TotemEmbedded *emb, GdkEventKey *event)
1691
1739
{
1692
1740
        switch (event->keyval) {
1693
 
        case GDK_Escape:
 
1741
        case GDK_KEY_Escape:
1694
1742
                if (totem_fullscreen_is_fullscreen (emb->fs) != FALSE)
1695
1743
                        totem_embedded_toggle_fullscreen (emb);
1696
1744
                return TRUE;
1697
 
        case GDK_F11:
1698
 
        case GDK_f:
1699
 
        case GDK_F:
 
1745
        case GDK_KEY_F11:
 
1746
        case GDK_KEY_f:
 
1747
        case GDK_KEY_F:
1700
1748
                totem_embedded_toggle_fullscreen (emb);
1701
1749
                return TRUE;
1702
 
        case GDK_space:
 
1750
        case GDK_KEY_space:
1703
1751
                on_play_pause (NULL, emb);
1704
1752
                return TRUE;
1705
 
        case GDK_Up:
 
1753
        case GDK_KEY_Up:
1706
1754
                totem_embedded_action_volume_relative (emb, VOLUME_UP_OFFSET);
1707
1755
                return TRUE;
1708
 
        case GDK_Down:
 
1756
        case GDK_KEY_Down:
1709
1757
                totem_embedded_action_volume_relative (emb, VOLUME_DOWN_OFFSET);
1710
1758
                return TRUE;
1711
 
        case GDK_Left:
1712
 
        case GDK_Right:
 
1759
        case GDK_KEY_Left:
 
1760
        case GDK_KEY_Right:
1713
1761
                /* FIXME: */
1714
 
                break;
 
1762
        default:
 
1763
                return FALSE;
1715
1764
        }
1716
 
 
1717
 
        return FALSE;
1718
1765
}
1719
1766
 
1720
1767
static gboolean
1727
1774
        if (event->state & GDK_CONTROL_MASK)
1728
1775
        {
1729
1776
                switch (event->keyval) {
1730
 
                case GDK_Left:
1731
 
                case GDK_Right:
 
1777
                case GDK_KEY_Left:
 
1778
                case GDK_KEY_Right:
1732
1779
                        return totem_embedded_handle_key_press (emb, event);
 
1780
                default:
 
1781
                        break;
1733
1782
                }
1734
1783
        }
1735
1784
 
1745
1794
 
1746
1795
static gboolean
1747
1796
totem_embedded_construct (TotemEmbedded *emb,
1748
 
                          GdkNativeWindow xid,
 
1797
                          Window xid,
1749
1798
                          int width,
1750
1799
                          int height)
1751
1800
{
1754
1803
        GtkWidget *menu;
1755
1804
        BvwUseType type;
1756
1805
        GError *err = NULL;
1757
 
        GConfClient *gc;
1758
 
        double volume;
1759
1806
 
1760
1807
        emb->xml = totem_interface_load ("mozilla-viewer.ui", TRUE,
1761
1808
                                         GTK_WINDOW (emb->window), emb);
1897
1944
        g_signal_connect (G_OBJECT (popup_button), "button-press-event",
1898
1945
                          G_CALLBACK (on_popup_button_button_pressed), emb);
1899
1946
 
1900
 
        gc = gconf_client_get_default ();
1901
 
        volume = ((double) gconf_client_get_int (gc, GCONF_PREFIX"/volume", NULL)) / 100.0;
1902
 
        g_object_unref (G_OBJECT (gc));
1903
 
 
1904
1947
        emb->volume = GTK_WIDGET (gtk_builder_get_object (emb->xml, "volume_button"));
1905
1948
        gtk_scale_button_set_adjustment (GTK_SCALE_BUTTON (emb->fs->volume),
1906
1949
                                         gtk_scale_button_get_adjustment 
1907
1950
                                         (GTK_SCALE_BUTTON (emb->volume)));
1908
1951
        gtk_button_set_focus_on_click (GTK_BUTTON (emb->volume), FALSE);
1909
 
        gtk_scale_button_set_value (GTK_SCALE_BUTTON (emb->volume), volume);
1910
1952
        g_signal_connect (G_OBJECT (emb->volume), "value-changed",
1911
1953
                          G_CALLBACK (cb_vol), emb);
1912
 
        bacon_video_widget_set_volume (emb->bvw, volume);
1913
 
        totem_embedded_volume_changed (emb, volume);
1914
1954
 
1915
1955
        emb->statusbar = TOTEM_STATUSBAR (gtk_builder_get_object (emb->xml, "statusbar"));
1916
 
        gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (emb->statusbar), FALSE);
1917
1956
 
1918
1957
        if (!emb->hidden) {
1919
1958
                gtk_widget_set_size_request (emb->window, width, height);
1920
1959
                emb->scrsaver = totem_scrsaver_new ();
 
1960
                g_object_set (emb->scrsaver,
 
1961
                              "reason", _("Playing a movie"),
 
1962
                              NULL);
1921
1963
        }
1922
1964
 
1923
1965
#ifdef GNOME_ENABLE_DEBUG
1936
1978
 
1937
1979
        /* Try to make controls smaller */
1938
1980
        {
1939
 
                GtkRcStyle *rcstyle;
1940
 
 
1941
 
                rcstyle = gtk_rc_style_new ();
1942
 
                rcstyle->xthickness = rcstyle->ythickness = 0;
1943
 
 
1944
 
                gtk_widget_modify_style (emb->pp_button, rcstyle);
1945
 
                
1946
 
                child = GTK_WIDGET (gtk_builder_get_object (emb->xml, "time_hscale"));
1947
 
                gtk_widget_modify_style (child, rcstyle);
1948
 
 
1949
 
                gtk_widget_modify_style (emb->volume, rcstyle);
1950
 
 
1951
 
                g_object_unref (rcstyle);
 
1981
                GtkCssProvider *provider;
 
1982
                gchar *css_path;
 
1983
                GError *error = NULL;
 
1984
 
 
1985
                css_path = totem_interface_get_full_path ("mozilla-viewer.css");
 
1986
                provider = gtk_css_provider_new ();
 
1987
                gtk_css_provider_load_from_path (provider, css_path, &error);
 
1988
                g_free (css_path);
 
1989
 
 
1990
                if (error != NULL) {
 
1991
                        /* Error loading the CSS */
 
1992
                        g_warning ("Couldn't load the CSS file '%s' for the browser plugin. The interface might not be styled correctly.", css_path);
 
1993
                        g_error_free (error);
 
1994
                } else {
 
1995
                        /* Success! Apply the styling to various widgets */
 
1996
                        GtkStyleContext *context;
 
1997
 
 
1998
                        context = gtk_widget_get_style_context (emb->pp_button);
 
1999
                        gtk_style_context_add_provider (context, GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
 
2000
 
 
2001
                        context = gtk_widget_get_style_context (GTK_WIDGET (gtk_builder_get_object (emb->xml, "time_hscale")));
 
2002
                        gtk_style_context_add_provider (context, GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
 
2003
 
 
2004
                        context = gtk_widget_get_style_context (emb->volume);
 
2005
                        gtk_style_context_add_provider (context, GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
 
2006
                }
 
2007
 
 
2008
                g_object_unref (provider);
1952
2009
        }
1953
2010
 
1954
2011
        /* Create the cursor before setting the state */
2026
2083
        embedded->width = width;
2027
2084
        embedded->height = height;
2028
2085
 
2029
 
        totem_embedded_construct (embedded, (GdkNativeWindow) window,
 
2086
        totem_embedded_construct (embedded, (Window) window,
2030
2087
                                  width, height);
2031
2088
 
2032
2089
        return TRUE;
2109
2166
        g_file_delete (file, NULL, NULL);
2110
2167
        g_object_unref (file);
2111
2168
 
2112
 
        if (res != TOTEM_PL_PARSER_RESULT_SUCCESS) {
2113
 
                //FIXME show a proper error message
2114
 
                switch (res) {
2115
 
                case TOTEM_PL_PARSER_RESULT_UNHANDLED:
2116
 
                        g_print ("url '%s' unhandled\n", emb->current_uri);
2117
 
                        break;
2118
 
                case TOTEM_PL_PARSER_RESULT_ERROR:
2119
 
                        g_print ("error handling url '%s'\n", emb->current_uri);
2120
 
                        break;
2121
 
                case TOTEM_PL_PARSER_RESULT_IGNORED:
2122
 
                        g_print ("ignored url '%s'\n", emb->current_uri);
2123
 
                        break;
2124
 
                default:
2125
 
                        g_assert_not_reached ();
2126
 
                        ;;
2127
 
                }
 
2169
        /* FIXME: show a proper error message */
 
2170
        switch (res) {
 
2171
        case TOTEM_PL_PARSER_RESULT_SUCCESS:
 
2172
                /* Success! */
 
2173
                break;
 
2174
        case TOTEM_PL_PARSER_RESULT_UNHANDLED:
 
2175
                g_print ("url '%s' unhandled\n", emb->current_uri);
 
2176
                break;
 
2177
        case TOTEM_PL_PARSER_RESULT_ERROR:
 
2178
                g_print ("error handling url '%s'\n", emb->current_uri);
 
2179
                break;
 
2180
        case TOTEM_PL_PARSER_RESULT_IGNORED:
 
2181
                g_print ("ignored url '%s'\n", emb->current_uri);
 
2182
                break;
 
2183
        case TOTEM_PL_PARSER_RESULT_CANCELLED:
 
2184
                g_print ("cancelled url '%s'\n", emb->current_uri);
 
2185
                break;
 
2186
        default:
 
2187
                g_assert_not_reached ();
 
2188
                ;;
2128
2189
        }
2129
2190
 
2130
2191
        /* Check if we have anything in the playlist now */
2249
2310
 
2250
2311
                env = g_getenv ("TOTEM_EMBEDDED_GDB");
2251
2312
                if (env && g_ascii_strtoull (env, NULL, 10) == 1) {
2252
 
                        char *gdbargv[4];
 
2313
                        const char *gdbargv[4];
2253
2314
                        char *gdb;
2254
2315
                        GError *gdberr = NULL;
2255
2316
                        int gdbargc = 0;
2262
2323
                        gdbargv[gdbargc++] = NULL;
2263
2324
 
2264
2325
                        if (!g_spawn_async (NULL,
2265
 
                                            gdbargv,
 
2326
                                            (gchar**) gdbargv,
2266
2327
                                            NULL /* env */,
2267
2328
                                            0,
2268
2329
                                            NULL, NULL,
2274
2335
                                g_print ("Sleeping....\n");
2275
2336
                                g_usleep (10* 1000 * 1000); /* 10s */
2276
2337
                        }
 
2338
 
 
2339
                        g_free (gdb);
2277
2340
                }
2278
2341
        }
2279
2342
#endif
2347
2410
        emb->referrer_uri = arg_referrer;
2348
2411
 
2349
2412
        /* FIXME: register this BEFORE requesting the service name? */
2350
 
        dbus_g_connection_register_g_object
2351
 
        (conn, TOTEM_PLUGIN_VIEWER_DBUS_PATH, G_OBJECT (emb));
 
2413
        dbus_g_connection_register_g_object (conn,
 
2414
                                             TOTEM_PLUGIN_VIEWER_DBUS_PATH,
 
2415
                                             G_OBJECT (emb));
 
2416
        emb->conn = conn;
2352
2417
 
2353
2418
        /* If we're hidden, construct a hidden window;
2354
2419
         * else wait to be plugged in.