[empathy] Support desktop sharing in the Personas menu.
- From: Travis Reitter <treitter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Support desktop sharing in the Personas menu.
- Date: Mon, 16 Aug 2010 16:15:36 +0000 (UTC)
commit 383c3b1166a577e9fe5ae6bd6934c92f8499cc5f
Author: Travis Reitter <treitter gmail com>
Date: Thu Aug 12 16:08:25 2010 -0700
Support desktop sharing in the Personas menu.
libempathy-gtk/empathy-individual-menu.c | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
---
diff --git a/libempathy-gtk/empathy-individual-menu.c b/libempathy-gtk/empathy-individual-menu.c
index 994bdf1..10427cb 100644
--- a/libempathy-gtk/empathy-individual-menu.c
+++ b/libempathy-gtk/empathy-individual-menu.c
@@ -237,7 +237,7 @@ empathy_individual_menu_new (FolksIndividual *individual,
/* Share my desktop */
/* FIXME we should add the "Share my desktop" menu item if Vino is
a registered handler in MC5 */
- item = empathy_individual_share_my_desktop_menu_item_new (individual);
+ item = empathy_individual_share_my_desktop_menu_item_new (individual, NULL);
gtk_menu_shell_append (shell, item);
gtk_widget_show (item);
@@ -666,21 +666,33 @@ empathy_individual_share_my_desktop_menu_item_activated (GtkMenuItem *item,
}
GtkWidget *
-empathy_individual_share_my_desktop_menu_item_new (FolksIndividual *individual)
+empathy_individual_share_my_desktop_menu_item_new (FolksIndividual *individual,
+ EmpathyContact *contact)
{
GtkWidget *item;
GtkWidget *image;
- g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
+ g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual) ||
+ 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_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
gtk_widget_show (image);
- menu_item_set_first_contact (item, individual,
- G_CALLBACK (empathy_individual_share_my_desktop_menu_item_activated),
- empathy_contact_can_use_rfb_stream_tube);
+ if (contact != NULL)
+ {
+ menu_item_set_contact (item, contact,
+ G_CALLBACK (empathy_individual_share_my_desktop_menu_item_activated),
+ empathy_contact_can_use_rfb_stream_tube);
+ }
+ else
+ {
+ menu_item_set_first_contact (item, individual,
+ G_CALLBACK (empathy_individual_share_my_desktop_menu_item_activated),
+ empathy_contact_can_use_rfb_stream_tube);
+ }
return item;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]