[vinagre] Make the action 'take screenshot' sensitive according to has-screenshot property
- From: Jonh Wendell <jwendell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vinagre] Make the action 'take screenshot' sensitive according to has-screenshot property
- Date: Fri, 8 Oct 2010 19:49:12 +0000 (UTC)
commit 383261fd4a90b72298b269f73fbe2b64ab9a92e4
Author: Jonh Wendell <jwendell gnome org>
Date: Fri Oct 8 16:49:29 2010 -0300
Make the action 'take screenshot' sensitive according to has-screenshot property
vinagre/vinagre-notebook.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/vinagre/vinagre-notebook.c b/vinagre/vinagre-notebook.c
index 6fefe0e..853725e 100644
--- a/vinagre/vinagre-notebook.c
+++ b/vinagre/vinagre-notebook.c
@@ -202,6 +202,7 @@ vinagre_notebook_update_ui_sentitivity (VinagreNotebook *nb)
{
gboolean active;
GtkActionGroup *action_group;
+ GtkAction *action;
active = gtk_notebook_get_n_pages (GTK_NOTEBOOK (nb)) > 0;
action_group = vinagre_window_get_connected_action (nb->priv->window);
@@ -212,6 +213,11 @@ vinagre_notebook_update_ui_sentitivity (VinagreNotebook *nb)
(vinagre_tab_get_state (VINAGRE_TAB (nb->priv->active_tab)) == VINAGRE_TAB_STATE_CONNECTED);
gtk_action_group_set_sensitive (action_group, active);
+ action = gtk_action_group_get_action (action_group, "MachineTakeScreenshot");
+ gtk_action_set_sensitive (action, active &&
+ nb->priv->active_tab &&
+ vinagre_tab_get_has_screenshot (nb->priv->active_tab));
+
if (nb->priv->active_tab)
{
GtkWidget *spinner, *icon;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]