summaryrefslogtreecommitdiff
path: root/src/totem-menu.c
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2005-07-10 18:47:56 +0000
committerBastien Nocera <hadess@src.gnome.org>2005-07-10 18:47:56 +0000
commit985fab352c5243ead60b8ccc6fc78c883d3703b5 (patch)
tree3a8e8f598beacf29053f7d12a892976cea514da6 /src/totem-menu.c
parentbb8899a15836891bd670f1fe43e5a839483acb9b (diff)
add a totem_action_open_dialog() function to be called when a data disc is
2005-07-10 Bastien Nocera <hadess@hadess.net> * src/totem-menu.c: (on_play_disc_activate), (add_device_to_menu): * src/totem.c: (totem_action_open_dialog), (on_open1_activate): * src/totem.h: add a totem_action_open_dialog() function to be called when a data disc is inserted
Diffstat (limited to 'src/totem-menu.c')
-rw-r--r--src/totem-menu.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/totem-menu.c b/src/totem-menu.c
index 072caf30..6dbad6c9 100644
--- a/src/totem-menu.c
+++ b/src/totem-menu.c
@@ -28,6 +28,7 @@
#include <string.h>
#include "totem-menu.h"
+#include "totem.h"
#include "totem-private.h"
#include "bacon-video-widget.h"
#include "egg-recent-view.h"
@@ -545,10 +546,11 @@ on_play_disc_activate (GtkMenuItem *menu_item, Totem *totem)
* this device?... */
{
GtkWidget *item;
+ char *uri, *s;
- item = glade_xml_get_widget
- (totem->xml, "tmw_open_menu_item");
- gtk_menu_item_activate (GTK_MENU_ITEM (item));
+ uri = g_object_get_data (G_OBJECT (menu_item), "activation_uri");
+ s = totem_action_open_dialog (totem, uri);
+ g_free (s);
}
return;
case MEDIA_TYPE_DVD:
@@ -606,8 +608,13 @@ add_device_to_menu (GObject *device, GtkMenu *menu, gint position, Totem *totem)
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), icon);
g_object_set_data_full (G_OBJECT (menu_item), "device_path",
- g_strdup (device_path), (GDestroyNotify) g_free);
- g_free (device_path);
+ device_path, (GDestroyNotify) g_free);
+ if (GNOME_IS_VFS_VOLUME (device)) {
+ g_object_set_data_full (G_OBJECT (menu_item), "activation_uri",
+ gnome_vfs_volume_get_activation_uri (GNOME_VFS_VOLUME (device)),
+ (GDestroyNotify) g_free);
+ }
+
g_signal_connect (G_OBJECT (menu_item), "activate",
G_CALLBACK (on_play_disc_activate), totem);