~wongchiachen/ubuntu/precise/totem/hey_about_dialog

« back to all changes in this revision

Viewing changes to src/plugins/brasero-disc-recorder/totem-disc-recorder.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2011-05-20 16:38:02 UTC
  • mfrom: (1.11.13 upstream) (2.1.17 experimental)
  • Revision ID: james.westby@ubuntu.com-20110520163802-p3lohdmfvws2jqeo
Tags: 3.0.1-0ubuntu1
* Resynchronize on Debian, remaining diffs:
* debian/control.in:
  - use suggests rather than recommends for universe gstreamer components
  - add totem-plugins-extra for the components which have depends in universe
  - add build-depends on gnome-common, dh-autoreconf, 
    liblaunchpad-intrgration-3.0-dev, hardening-wrapper
  - drop build-depends on libepc-ui-dev, python-feedparser, xulrunner-dev,
    libtracker-sparql-0.10-dev
  - add XB-Npp-Description and XB-Npp-Filename header to the 
    totem-mozilla package to improve ubufox/ubuntu plugin db integration 
  - change refences from Iceweasel to Firefox
  - recommends gnome-icon-theme-symbolic rather than depending on it
  - list firefox as a totem-mozilla recommends before epiphany-browser
  - libtotem replaces totem (<< 3.0.1-1) for ppa upgrades
* debian/totem-common.install:
  - Install apport hook
* debian/totem-plugins-extra.install:
  - Plugins split out ouf totem-plugins
* debian/totem-plugins.install:    
  - Move some plugins to totem-plugins-extra
* debian/totem.preinst:
  - No longer required as Lucid has been released
* debian/patches/01_fake_keypresses.patch:
  - dropped it's an old workaround and should not be required
* debian/patches/02_lpi.patch:
  - Launchpad integration
* debian/patches/03_default_options.patch: 
  - enable the youtube option by default
* debian/patches/70_bbc_plugin.patch:
  - bbc content viewer, needs to be fixed for the new version
* debian/source_totem.py:
  - ubuntu apport debugging
* debian/rules:
  - run autoreconf on build
* debian/watch:
  - Watch for unstable versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include <glib/gstdio.h>
28
28
#include <gmodule.h>
29
29
#include <gdk/gdkx.h>
 
30
#include <libpeas/peas-extension-base.h>
 
31
#include <libpeas/peas-object-module.h>
 
32
#include <libpeas/peas-activatable.h>
30
33
 
31
34
#include <libxml/xmlerror.h>
32
35
#include <libxml/xmlwriter.h>
44
47
#define TOTEM_IS_DISC_RECORDER_PLUGIN_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), TOTEM_TYPE_DISC_RECORDER_PLUGIN))
45
48
#define TOTEM_DISC_RECORDER_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TOTEM_TYPE_DISC_RECORDER_PLUGIN, TotemDiscRecorderPluginClass))
46
49
 
47
 
typedef struct TotemDiscRecorderPluginPrivate         TotemDiscRecorderPluginPrivate;
48
 
 
49
 
typedef struct
50
 
{
51
 
        TotemPlugin parent;
52
 
 
 
50
typedef struct {
53
51
        TotemObject *totem;
54
52
 
55
53
        GtkActionGroup *action_group;
56
54
        guint ui_merge_id;
57
 
 
58
 
        gboolean enabled;
59
 
} TotemDiscRecorderPlugin;
60
 
 
61
 
typedef struct
62
 
{
63
 
        TotemPluginClass parent_class;
64
 
} TotemDiscRecorderPluginClass;
65
 
 
66
 
G_MODULE_EXPORT GType register_totem_plugin (GTypeModule *module);
67
 
GType totem_disc_recorder_plugin_get_type (void) G_GNUC_CONST;
68
 
 
69
 
TOTEM_PLUGIN_REGISTER (TotemDiscRecorderPlugin, totem_disc_recorder_plugin)
 
55
} TotemDiscRecorderPluginPrivate;
 
56
 
 
57
TOTEM_PLUGIN_REGISTER(TOTEM_TYPE_DISC_RECORDER_PLUGIN, TotemDiscRecorderPlugin, totem_disc_recorder_plugin)
70
58
 
71
59
static void totem_disc_recorder_plugin_burn (GtkAction *action,
72
60
                                             TotemDiscRecorderPlugin *pi);
92
80
{
93
81
        GtkWindow *main_window;
94
82
        GdkScreen *screen;
95
 
        GPtrArray *array;
96
 
        char **args, *xid_str;
 
83
        gchar *command_line;
 
84
        GList *uris;
 
85
        GAppInfo *info;
 
86
        GdkAppLaunchContext *context;
97
87
        GError *error = NULL;
98
 
        gboolean ret;
99
88
        int xid;
100
89
 
101
 
        array = g_ptr_array_new ();
102
 
        g_ptr_array_add (array, (gpointer) "brasero");
103
 
        if (copy != FALSE)
104
 
                g_ptr_array_add (array, (gpointer) "-c");
105
 
        else
106
 
                g_ptr_array_add (array, (gpointer) "-r");
107
 
        g_ptr_array_add (array, (gpointer) path);
108
 
 
109
 
        main_window = totem_get_main_window (pi->totem);
 
90
        /* Build a command line to use */
 
91
        main_window = totem_get_main_window (pi->priv->totem);
110
92
        screen = gtk_widget_get_screen (GTK_WIDGET (main_window));
111
 
        xid = gdk_x11_drawable_get_xid (GDK_DRAWABLE (gtk_widget_get_window (GTK_WIDGET (main_window))));
112
 
        xid_str = g_strdup_printf ("%d", xid);
113
 
        g_ptr_array_add (array, (gpointer) "-x");
114
 
        g_ptr_array_add (array, xid_str);
115
 
 
116
 
        g_ptr_array_add (array, NULL);
117
 
        args = (char **) g_ptr_array_free (array, FALSE);
118
 
 
119
 
        ret = TRUE;
120
 
        if (gdk_spawn_on_screen (screen, NULL, args, NULL,
121
 
                                 G_SPAWN_SEARCH_PATH | G_SPAWN_FILE_AND_ARGV_ZERO,
122
 
                                 NULL, NULL, NULL, &error) == FALSE) {
123
 
                if (copy != FALSE) {
124
 
                        totem_interface_error (_("The video disc could not be duplicated."),
125
 
                                               error->message,
126
 
                                               totem_get_main_window (pi->totem));
127
 
                } else {
128
 
                        totem_interface_error (_("The movie could not be recorded."),
129
 
                                               error->message,
130
 
                                               totem_get_main_window (pi->totem));
131
 
                }
132
 
                ret = FALSE;
133
 
                g_error_free (error);
134
 
        }
135
 
 
136
 
        g_free (xid_str);
137
 
        g_free (args);
138
 
 
139
 
        return ret;
 
93
        xid = gdk_x11_window_get_xid (gtk_widget_get_window (GTK_WIDGET (main_window)));
 
94
        g_object_unref (main_window);
 
95
 
 
96
        if (copy != FALSE)
 
97
                command_line = g_strdup_printf ("brasero -x %d -c", xid);
 
98
        else
 
99
                command_line = g_strdup_printf ("brasero -x %d -r", xid);
 
100
 
 
101
        /* Build the app info */
 
102
        info = g_app_info_create_from_commandline (command_line, NULL,
 
103
                                                   G_APP_INFO_CREATE_SUPPORTS_URIS | G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION, &error);
 
104
        g_free (command_line);
 
105
 
 
106
        if (error != NULL)
 
107
                goto error;
 
108
 
 
109
        /* Create a launch context and launch it */
 
110
        context = gdk_display_get_app_launch_context (gtk_widget_get_display (GTK_WIDGET (main_window)));
 
111
        gdk_app_launch_context_set_screen (context, screen);
 
112
 
 
113
        uris = g_list_prepend (NULL, (gpointer) path);
 
114
        g_app_info_launch_uris (info, uris, G_APP_LAUNCH_CONTEXT (context), &error);
 
115
        g_list_free (uris);
 
116
 
 
117
        g_object_unref (info);
 
118
        g_object_unref (context);
 
119
 
 
120
        if (error != NULL)
 
121
                goto error;
 
122
 
 
123
        return TRUE;
 
124
 
 
125
error:
 
126
        main_window = totem_get_main_window (pi->priv->totem);
 
127
 
 
128
        if (copy != FALSE)
 
129
                totem_interface_error (_("The video disc could not be duplicated."), error->message, main_window);
 
130
        else
 
131
                totem_interface_error (_("The movie could not be recorded."), error->message, main_window);
 
132
 
 
133
        g_error_free (error);
 
134
        g_object_unref (main_window);
 
135
 
 
136
        return FALSE;
140
137
}
141
138
 
142
139
static char*
192
189
        if (success < 0)
193
190
                goto error;
194
191
 
195
 
        title = totem_get_short_title (pi->totem);
 
192
        title = totem_get_short_title (pi->priv->totem);
196
193
        if (title) {
197
194
                success = xmlTextWriterWriteElement (project,
198
195
                                                     (xmlChar *) "label",
211
208
        if (success < 0)
212
209
                goto error;
213
210
 
214
 
        uri = totem_get_current_mrl (pi->totem);
 
211
        uri = totem_get_current_mrl (pi->priv->totem);
215
212
        escaped = (unsigned char *) g_uri_escape_string (uri, NULL, FALSE);
216
213
        g_free (uri);
217
214
 
278
275
        if (!path) {
279
276
                totem_interface_error (_("The movie could not be recorded."),
280
277
                                       error,
281
 
                                       totem_get_main_window (pi->totem));
 
278
                                       totem_get_main_window (pi->priv->totem));
282
279
                g_free (error);
283
280
                return;
284
281
        }
295
292
{
296
293
        char *mrl;
297
294
 
298
 
        mrl = totem_get_current_mrl (pi->totem);
 
295
        mrl = totem_get_current_mrl (pi->priv->totem);
299
296
        if (!g_str_has_prefix (mrl, "dvd:") && !g_str_has_prefix (mrl, "vcd:")) {
300
297
                g_free (mrl);
301
298
                g_assert_not_reached ();
311
308
{
312
309
        GtkAction *action;
313
310
 
314
 
        action = gtk_action_group_get_action (pi->action_group, "VideoBurnToDisc");
315
 
        gtk_action_set_visible (action, FALSE);
316
 
        action = gtk_action_group_get_action (pi->action_group, "VideoDVDCopy");
317
 
        gtk_action_set_visible (action, FALSE);
318
 
        action = gtk_action_group_get_action (pi->action_group, "VideoVCDCopy");
 
311
        action = gtk_action_group_get_action (pi->priv->action_group, "VideoBurnToDisc");
 
312
        gtk_action_set_visible (action, FALSE);
 
313
        action = gtk_action_group_get_action (pi->priv->action_group, "VideoDVDCopy");
 
314
        gtk_action_set_visible (action, FALSE);
 
315
        action = gtk_action_group_get_action (pi->priv->action_group, "VideoVCDCopy");
319
316
        gtk_action_set_visible (action, FALSE);
320
317
}
321
318
 
324
321
                                 const char *mrl,
325
322
                                 TotemDiscRecorderPlugin *pi)
326
323
{
 
324
        TotemDiscRecorderPluginPrivate *priv = pi->priv;
327
325
        GtkAction *action;
328
326
 
329
327
        /* Check if that stream is supported by brasero */
330
328
        if (g_str_has_prefix (mrl, "file:")) {
331
329
                /* If the file is supported we can always burn, even if there
332
330
                 * aren't any burner since we can still create an image. */
333
 
                action = gtk_action_group_get_action (pi->action_group, "VideoBurnToDisc");
 
331
                action = gtk_action_group_get_action (priv->action_group, "VideoBurnToDisc");
334
332
                gtk_action_set_visible (action, TRUE);
335
 
                action = gtk_action_group_get_action (pi->action_group, "VideoDVDCopy");
 
333
                action = gtk_action_group_get_action (priv->action_group, "VideoDVDCopy");
336
334
                gtk_action_set_visible (action, FALSE);
337
 
                action = gtk_action_group_get_action (pi->action_group, "VideoVCDCopy");
 
335
                action = gtk_action_group_get_action (priv->action_group, "VideoVCDCopy");
338
336
                gtk_action_set_visible (action, FALSE);
339
337
        }
340
338
        else if (g_str_has_prefix (mrl, "dvd:")) {
341
 
                action = gtk_action_group_get_action (pi->action_group, "VideoBurnToDisc");
 
339
                action = gtk_action_group_get_action (priv->action_group, "VideoBurnToDisc");
342
340
                gtk_action_set_visible (action, FALSE);
343
 
                action = gtk_action_group_get_action (pi->action_group, "VideoDVDCopy");
 
341
                action = gtk_action_group_get_action (priv->action_group, "VideoDVDCopy");
344
342
                gtk_action_set_visible (action, TRUE);
345
 
                action = gtk_action_group_get_action (pi->action_group, "VideoVCDCopy");
 
343
                action = gtk_action_group_get_action (priv->action_group, "VideoVCDCopy");
346
344
                gtk_action_set_visible (action, FALSE);
347
345
        }
348
346
        else if (g_str_has_prefix (mrl, "vcd:")) {
349
 
                action = gtk_action_group_get_action (pi->action_group, "VideoBurnToDisc");
350
 
                gtk_action_set_visible (action, FALSE);
351
 
                action = gtk_action_group_get_action (pi->action_group, "VideoDVDCopy");
352
 
                gtk_action_set_visible (action, FALSE);
353
 
                action = gtk_action_group_get_action (pi->action_group, "VideoVCDCopy");
 
347
                action = gtk_action_group_get_action (priv->action_group, "VideoBurnToDisc");
 
348
                gtk_action_set_visible (action, FALSE);
 
349
                action = gtk_action_group_get_action (priv->action_group, "VideoDVDCopy");
 
350
                gtk_action_set_visible (action, FALSE);
 
351
                action = gtk_action_group_get_action (priv->action_group, "VideoVCDCopy");
354
352
                gtk_action_set_visible (action, TRUE);
355
353
        }
356
354
        else {
357
 
                action = gtk_action_group_get_action (pi->action_group, "VideoBurnToDisc");
358
 
                gtk_action_set_visible (action, FALSE);
359
 
                action = gtk_action_group_get_action (pi->action_group, "VideoDVDCopy");
360
 
                gtk_action_set_visible (action, FALSE);
361
 
                action = gtk_action_group_get_action (pi->action_group, "VideoVCDCopy");
 
355
                action = gtk_action_group_get_action (priv->action_group, "VideoBurnToDisc");
 
356
                gtk_action_set_visible (action, FALSE);
 
357
                action = gtk_action_group_get_action (priv->action_group, "VideoDVDCopy");
 
358
                gtk_action_set_visible (action, FALSE);
 
359
                action = gtk_action_group_get_action (priv->action_group, "VideoVCDCopy");
362
360
                gtk_action_set_visible (action, FALSE);
363
361
        }
364
362
}
365
363
 
366
 
static gboolean
367
 
impl_activate (TotemPlugin *plugin, TotemObject *totem, GError **error)
 
364
static void
 
365
impl_activate (PeasActivatable *plugin)
368
366
{
369
367
        TotemDiscRecorderPlugin *pi = TOTEM_DISC_RECORDER_PLUGIN (plugin);
 
368
        TotemDiscRecorderPluginPrivate *priv = pi->priv;
370
369
        GtkUIManager *uimanager = NULL;
371
370
        GtkAction *action;
372
371
        char *path;
374
373
        /* make sure brasero is in the path */
375
374
        path = g_find_program_in_path ("brasero");
376
375
        if (!path)
377
 
                return FALSE;
 
376
                return;
378
377
        g_free (path);
379
378
 
380
379
        //FIXME this shouldn't be necessary
385
384
        g_free (path);
386
385
#endif
387
386
 
388
 
        pi->totem = totem;
 
387
        priv->totem = g_object_get_data (G_OBJECT (plugin), "object");
389
388
 
390
 
        g_signal_connect (totem,
 
389
        g_signal_connect (priv->totem,
391
390
                          "file-opened",
392
391
                          G_CALLBACK (totem_disc_recorder_file_opened),
393
392
                          plugin);
394
 
        g_signal_connect (totem,
 
393
        g_signal_connect (priv->totem,
395
394
                          "file-closed",
396
395
                          G_CALLBACK (totem_disc_recorder_file_closed),
397
396
                          plugin);
398
397
 
399
398
        /* add UI */
400
 
        pi->action_group = gtk_action_group_new ("DiscRecorderActions");
401
 
        gtk_action_group_set_translation_domain (pi->action_group, GETTEXT_PACKAGE);
402
 
        gtk_action_group_add_actions (pi->action_group,
 
399
        priv->action_group = gtk_action_group_new ("DiscRecorderActions");
 
400
        gtk_action_group_set_translation_domain (priv->action_group, GETTEXT_PACKAGE);
 
401
        gtk_action_group_add_actions (priv->action_group,
403
402
                                      totem_disc_recorder_plugin_actions,
404
403
                                      G_N_ELEMENTS (totem_disc_recorder_plugin_actions),
405
404
                                      pi);
406
405
 
407
 
        uimanager = totem_get_ui_manager (totem);
408
 
        gtk_ui_manager_insert_action_group (uimanager, pi->action_group, -1);
409
 
        g_object_unref (pi->action_group);
410
 
 
411
 
        pi->ui_merge_id = gtk_ui_manager_new_merge_id (uimanager);
412
 
 
413
 
        gtk_ui_manager_add_ui (uimanager,
414
 
                               pi->ui_merge_id,
415
 
                               "/ui/tmw-menubar/movie/burn-placeholder",
416
 
                               "VideoBurnToDisc",
417
 
                               "VideoBurnToDisc",
418
 
                               GTK_UI_MANAGER_MENUITEM,
419
 
                               TRUE);
420
 
        gtk_ui_manager_add_ui (uimanager,
421
 
                               pi->ui_merge_id,
422
 
                               "/ui/totem-main-popup/burn-placeholder",
423
 
                               "VideoBurnToDisc",
424
 
                               "VideoBurnToDisc",
425
 
                               GTK_UI_MANAGER_MENUITEM,
426
 
                               TRUE);
427
 
 
428
 
        gtk_ui_manager_add_ui (uimanager,
429
 
                               pi->ui_merge_id,
430
 
                               "/ui/tmw-menubar/movie/burn-placeholder",
431
 
                               "VideoDVDCopy",
432
 
                               "VideoDVDCopy",
433
 
                               GTK_UI_MANAGER_MENUITEM,
434
 
                               TRUE);
435
 
        gtk_ui_manager_add_ui (uimanager,
436
 
                               pi->ui_merge_id,
437
 
                               "/ui/totem-main-popup/burn-placeholder",
438
 
                               "VideoDVDCopy",
439
 
                               "VideoDVDCopy",
440
 
                               GTK_UI_MANAGER_MENUITEM,
441
 
                               TRUE);
442
 
 
443
 
        gtk_ui_manager_add_ui (uimanager,
444
 
                               pi->ui_merge_id,
445
 
                               "/ui/tmw-menubar/movie/burn-placeholder",
446
 
                               "VideoVCDCopy",
447
 
                               "VideoVCDCopy",
448
 
                               GTK_UI_MANAGER_MENUITEM,
449
 
                               TRUE);
450
 
        gtk_ui_manager_add_ui (uimanager,
451
 
                               pi->ui_merge_id,
452
 
                               "/ui/totem-main-popup/burn-placeholder",
453
 
                               "VideoVCDCopy",
454
 
                               "VideoVCDCopy",
455
 
                               GTK_UI_MANAGER_MENUITEM,
456
 
                               TRUE);
457
 
 
458
 
        if (!totem_is_paused (totem) && !totem_is_playing (totem)) {
459
 
                action = gtk_action_group_get_action (pi->action_group, "VideoBurnToDisc");
460
 
                gtk_action_set_visible (action, FALSE);
461
 
                action = gtk_action_group_get_action (pi->action_group, "VideoDVDCopy");
462
 
                gtk_action_set_visible (action, FALSE);
463
 
                action = gtk_action_group_get_action (pi->action_group, "VideoVCDCopy");
 
406
        uimanager = totem_get_ui_manager (priv->totem);
 
407
        gtk_ui_manager_insert_action_group (uimanager, priv->action_group, -1);
 
408
        g_object_unref (priv->action_group);
 
409
 
 
410
        priv->ui_merge_id = gtk_ui_manager_new_merge_id (uimanager);
 
411
 
 
412
        gtk_ui_manager_add_ui (uimanager,
 
413
                               priv->ui_merge_id,
 
414
                               "/ui/tmw-menubar/movie/burn-placeholder",
 
415
                               "VideoBurnToDisc",
 
416
                               "VideoBurnToDisc",
 
417
                               GTK_UI_MANAGER_MENUITEM,
 
418
                               TRUE);
 
419
 
 
420
        gtk_ui_manager_add_ui (uimanager,
 
421
                               priv->ui_merge_id,
 
422
                               "/ui/tmw-menubar/movie/burn-placeholder",
 
423
                               "VideoDVDCopy",
 
424
                               "VideoDVDCopy",
 
425
                               GTK_UI_MANAGER_MENUITEM,
 
426
                               TRUE);
 
427
 
 
428
        gtk_ui_manager_add_ui (uimanager,
 
429
                               priv->ui_merge_id,
 
430
                               "/ui/tmw-menubar/movie/burn-placeholder",
 
431
                               "VideoVCDCopy",
 
432
                               "VideoVCDCopy",
 
433
                               GTK_UI_MANAGER_MENUITEM,
 
434
                               TRUE);
 
435
 
 
436
        if (!totem_is_paused (priv->totem) && !totem_is_playing (priv->totem)) {
 
437
                action = gtk_action_group_get_action (priv->action_group, "VideoBurnToDisc");
 
438
                gtk_action_set_visible (action, FALSE);
 
439
                action = gtk_action_group_get_action (priv->action_group, "VideoDVDCopy");
 
440
                gtk_action_set_visible (action, FALSE);
 
441
                action = gtk_action_group_get_action (priv->action_group, "VideoVCDCopy");
464
442
                gtk_action_set_visible (action, FALSE); }
465
443
        else {
466
444
                char *mrl;
467
445
 
468
 
                mrl = totem_get_current_mrl (totem);
469
 
                totem_disc_recorder_file_opened (totem, mrl, pi);
 
446
                mrl = totem_get_current_mrl (priv->totem);
 
447
                totem_disc_recorder_file_opened (priv->totem, mrl, pi);
470
448
                g_free (mrl);
471
449
        }
472
 
 
473
 
        return TRUE;
474
450
}
475
451
 
476
452
static void
477
 
impl_deactivate (TotemPlugin *plugin, TotemObject *totem)
 
453
impl_deactivate (PeasActivatable *plugin)
478
454
{
479
455
        TotemDiscRecorderPlugin *pi = TOTEM_DISC_RECORDER_PLUGIN (plugin);
 
456
        TotemDiscRecorderPluginPrivate *priv = pi->priv;
480
457
        GtkUIManager *uimanager = NULL;
481
458
 
482
 
        pi->enabled = FALSE;
483
 
 
484
 
        g_signal_handlers_disconnect_by_func (totem, totem_disc_recorder_file_opened, plugin);
485
 
        g_signal_handlers_disconnect_by_func (totem, totem_disc_recorder_file_closed, plugin);
486
 
 
487
 
        uimanager = totem_get_ui_manager (totem);
488
 
        gtk_ui_manager_remove_ui (uimanager, pi->ui_merge_id);
489
 
        gtk_ui_manager_remove_action_group (uimanager, pi->action_group);
490
 
 
491
 
        pi->totem = NULL;
492
 
}
493
 
 
494
 
static void
495
 
totem_disc_recorder_plugin_finalize (GObject *object)
496
 
{
497
 
        G_OBJECT_CLASS (totem_disc_recorder_plugin_parent_class)->finalize (object);
498
 
}
499
 
 
500
 
static void
501
 
totem_disc_recorder_plugin_class_init (TotemDiscRecorderPluginClass *klass)
502
 
{
503
 
        GObjectClass *object_class = G_OBJECT_CLASS (klass);
504
 
        TotemPluginClass *plugin_class = TOTEM_PLUGIN_CLASS (klass);
505
 
 
506
 
        object_class->finalize = totem_disc_recorder_plugin_finalize;
507
 
 
508
 
        plugin_class->activate = impl_activate;
509
 
        plugin_class->deactivate = impl_deactivate;
510
 
}
511
 
 
512
 
static void
513
 
totem_disc_recorder_plugin_init (TotemDiscRecorderPlugin *pi)
514
 
{
515
 
}
516
 
 
 
459
        g_signal_handlers_disconnect_by_func (priv->totem, totem_disc_recorder_file_opened, plugin);
 
460
        g_signal_handlers_disconnect_by_func (priv->totem, totem_disc_recorder_file_closed, plugin);
 
461
 
 
462
        uimanager = totem_get_ui_manager (priv->totem);
 
463
        gtk_ui_manager_remove_ui (uimanager, priv->ui_merge_id);
 
464
        gtk_ui_manager_remove_action_group (uimanager, priv->action_group);
 
465
 
 
466
        priv->totem = NULL;
 
467
}