[vinagre] Move the fullscreen initial state code to VinagreNotebook.



commit 01ec4204b202671023dbcba0169f670b2d7f8293
Author: Jonh Wendell <jwendell gnome org>
Date:   Mon Aug 10 12:08:55 2009 -0300

    Move the fullscreen initial state code to VinagreNotebook.
    
    It checks for fullscreen flag at initialized signal.

 plugins/vnc/vinagre-vnc-tab.c |    4 ----
 vinagre/vinagre-notebook.c    |    5 +++++
 2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/plugins/vnc/vinagre-vnc-tab.c b/plugins/vnc/vinagre-vnc-tab.c
index 0a75818..2218c53 100644
--- a/plugins/vnc/vinagre-vnc-tab.c
+++ b/plugins/vnc/vinagre-vnc-tab.c
@@ -359,7 +359,6 @@ vnc_initialized_cb (VncDisplay *vnc, VinagreVncTab *vnc_tab)
   gboolean scaling, view_only, fullscreen;
   VinagreTab *tab = VINAGRE_TAB (vnc_tab);
   VinagreConnection *conn = vinagre_tab_get_conn (tab);
-  VinagreWindow *window = vinagre_tab_get_window (tab);
 
   g_object_get (conn,
 		"view-only", &view_only,
@@ -373,9 +372,6 @@ vnc_initialized_cb (VncDisplay *vnc, VinagreVncTab *vnc_tab)
   vnc_display_set_keyboard_grab (VNC_DISPLAY(vnc_tab->priv->vnc), TRUE);
   vnc_display_set_pointer_grab (VNC_DISPLAY(vnc_tab->priv->vnc), TRUE);
 
-  if (fullscreen)
-    vinagre_window_toggle_fullscreen (window);
-
   vinagre_vnc_connection_set_desktop_name (VINAGRE_VNC_CONNECTION (conn),
 					   vnc_display_get_name (VNC_DISPLAY (vnc_tab->priv->vnc)));
 
diff --git a/vinagre/vinagre-notebook.c b/vinagre/vinagre-notebook.c
index 374561e..4c10138 100644
--- a/vinagre/vinagre-notebook.c
+++ b/vinagre/vinagre-notebook.c
@@ -479,8 +479,13 @@ tab_auth_failed_cb (VinagreTab *tab, const gchar *msg, VinagreNotebook *nb)
 static void
 tab_initialized_cb (VinagreTab *tab, VinagreNotebook *nb)
 {
+  VinagreConnection *conn = vinagre_tab_get_conn (tab);
+
   vinagre_notebook_update_ui_sentitivity (nb);
   vinagre_notebook_update_tab_tooltip (nb, tab);
+
+  if (vinagre_connection_get_fullscreen (conn) && (!vinagre_window_is_fullscreen (nb->priv->window)))
+    vinagre_window_toggle_fullscreen (nb->priv->window);
 }
 
 static GtkWidget *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]