#include "empathy-log-window.h"
#include "empathy-contact-dialogs.h"
#include "empathy-ui-utils.h"
+#include "empathy-share-my-desktop.h"
GtkWidget *
empathy_contact_menu_new (EmpathyContact *contact,
gtk_menu_shell_append (shell, item);
gtk_widget_show (item);
+ /* Share my desktop */
+ /* FIXME we should add the "Share my desktop" menu item if Vino is
+ a registered handler in MC5 */
+ item = empathy_contact_share_my_desktop_menu_item_new (contact);
+ gtk_menu_shell_append (shell, item);
+ gtk_widget_show (item);
+
/* Separator */
if (features & (EMPATHY_CONTACT_FEATURE_EDIT |
EMPATHY_CONTACT_FEATURE_INFO)) {
return item;
}
+/* FIXME we should check if the contact supports vnc stream tube */
+GtkWidget *
+empathy_contact_share_my_desktop_menu_item_new (EmpathyContact *contact)
+{
+ GtkWidget *item;
+ GtkWidget *image;
+
+ g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
+
+ item = gtk_image_menu_item_new_with_mnemonic (_("Share my desktop"));
+ image = gtk_image_new_from_icon_name (GTK_STOCK_NETWORK,
+ GTK_ICON_SIZE_MENU);
+ gtk_widget_set_sensitive (item, empathy_contact_can_use_stream_tube (contact));
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
+ gtk_widget_show (image);
+
+ g_signal_connect_swapped (item, "activate",
+ G_CALLBACK (empathy_share_my_desktop_share_with_contact),
+ contact);
+
+ return item;
+}
+
static void
contact_info_menu_item_activate_cb (EmpathyContact *contact)
{