vinagre r266 - in trunk: . data src



Author: jwendell
Date: Tue Mar 18 13:39:09 2008
New Revision: 266
URL: http://svn.gnome.org/viewvc/vinagre?rev=266&view=rev

Log:
Revert experimental (scaling) code, which depends on development version of gtk-vnc


Modified:
   trunk/ChangeLog
   trunk/README
   trunk/configure.ac
   trunk/data/vinagre-ui.xml
   trunk/src/vinagre-commands.c
   trunk/src/vinagre-commands.h
   trunk/src/vinagre-tab.c
   trunk/src/vinagre-tab.h
   trunk/src/vinagre-ui.h
   trunk/src/vinagre-window-private.h
   trunk/src/vinagre-window.c

Modified: trunk/README
==============================================================================
--- trunk/README	(original)
+++ trunk/README	Tue Mar 18 13:39:09 2008
@@ -23,12 +23,3 @@
 ======================
 
   - See the file 'AUTHORS'
-
-
-Enabling scaling
-================
-
-  - In order to enable scaling in Vinagre, gtk-vnc widget must have been
-  compiled with this feature enabled.
-    Simply build gtk-vnc with the flag '--with-gtkglext=yes', in the
-    configure stage.

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Tue Mar 18 13:39:09 2008
@@ -38,7 +38,7 @@
 LIBGLADE_REQUIRED=2.6.0
 GCONF_REQUIRED=2.16.0
 GTHREAD_REQUIRED=2.0.0
-GTK_VNC_REQUIRED=0.3.4
+GTK_VNC_REQUIRED=0.3.3
 
 PKG_CHECK_MODULES(VINAGRE, \ 
   glib-2.0 >= $GLIB_REQUIRED \

Modified: trunk/data/vinagre-ui.xml
==============================================================================
--- trunk/data/vinagre-ui.xml	(original)
+++ trunk/data/vinagre-ui.xml	Tue Mar 18 13:39:09 2008
@@ -2,7 +2,7 @@
  * vinagre-ui.xml
  * This file is part of vinagre
  *
- * Copyright (C) 2007,2008 - Jonh Wendell <wendell bani com br>
+ * Copyright (C) 2007 - Jonh Wendell <wendell bani com br>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -41,7 +41,6 @@
       <menuitem name="ViewBookmarksMenu" action="ViewBookmarks"/>
       <separator/>
       <menuitem name="ViewFullScreenMenu" action="ViewFullScreen"/>
-      <menuitem name="ViewScalingMenu" action="ViewScaling"/>
     </menu>
 
     <menu name="BookmarksMenu" action="Bookmarks">

Modified: trunk/src/vinagre-commands.c
==============================================================================
--- trunk/src/vinagre-commands.c	(original)
+++ trunk/src/vinagre-commands.c	Tue Mar 18 13:39:09 2008
@@ -204,23 +204,6 @@
   vinagre_window_toggle_fullscreen (window);
 }
 
-void
-vinagre_cmd_view_scaling (GtkAction     *action,
-			  VinagreWindow *window)
-{
-  gboolean active;
-
-  g_return_if_fail (VINAGRE_IS_WINDOW (window));
-
-  active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
-  if (!vinagre_tab_set_scaling (vinagre_window_get_active_tab (window), active))
-    {
-      gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), FALSE);
-      vinagre_utils_show_error (_("Scaling is not supported on this installation.\n\nRead the README file (shipped with Vinagre) in order to know how to enable this feature."),
-				GTK_WINDOW (window));
-    }
-}
-
 /* Bookmarks Menu */
 void
 vinagre_cmd_open_bookmark (VinagreWindow     *window,

Modified: trunk/src/vinagre-commands.h
==============================================================================
--- trunk/src/vinagre-commands.h	(original)
+++ trunk/src/vinagre-commands.h	Tue Mar 18 13:39:09 2008
@@ -2,7 +2,7 @@
  * vinagre-commands.h
  * This file is part of vinagre
  *
- * Copyright (C) 2007,2008 - Jonh Wendell <wendell bani com br>
+ * Copyright (C) 2007 - Jonh Wendell <wendell bani com br>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -48,8 +48,6 @@
 						 VinagreWindow *window);
 void		vinagre_cmd_view_show_fav_panel	(GtkAction     *action,
 						 VinagreWindow *window);
-void		vinagre_cmd_view_scaling	(GtkAction     *action,
-						 VinagreWindow *window);
 void		vinagre_cmd_view_fullscreen	(GtkAction     *action,
 						 VinagreWindow *window);
 

Modified: trunk/src/vinagre-tab.c
==============================================================================
--- trunk/src/vinagre-tab.c	(original)
+++ trunk/src/vinagre-tab.c	Tue Mar 18 13:39:09 2008
@@ -572,12 +572,16 @@
 static void
 vinagre_tab_init (VinagreTab *tab)
 {
+  GtkWidget *align;
   GtkWidget *viewport;
 
   tab->priv = VINAGRE_TAB_GET_PRIVATE (tab);
   tab->priv->save_password = FALSE;
   tab->priv->keyring_item_id = 0;
 
+  /* Create the alignment */
+  align = gtk_alignment_new (0.5, 0.5, 0, 0);
+
   /* Create the scrolled window */
   tab->priv->scroll = gtk_scrolled_window_new (NULL, NULL);
   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (tab->priv->scroll),
@@ -590,9 +594,10 @@
 
   /* Create the vnc widget */
   tab->priv->vnc = vnc_display_new ();
+  gtk_container_add (GTK_CONTAINER (align), tab->priv->vnc);
 
   gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (tab->priv->scroll),
-					 tab->priv->vnc);
+					 align);
   viewport = gtk_bin_get_child (GTK_BIN (tab->priv->scroll));
   gtk_viewport_set_shadow_type(GTK_VIEWPORT (viewport), GTK_SHADOW_NONE);
 
@@ -790,21 +795,4 @@
     }
 }
 
-gboolean
-vinagre_tab_set_scaling (VinagreTab *tab, gboolean active) {
-  g_return_if_fail (VINAGRE_IS_TAB (tab));
-
-  if (vnc_display_get_scaling (VNC_DISPLAY (tab->priv->vnc)) == active)
-    return TRUE;
-
-  return vnc_display_set_scaling (VNC_DISPLAY (tab->priv->vnc), active);
-}
-
-gboolean
-vinagre_tab_get_scaling (VinagreTab *tab) {
-  g_return_if_fail (VINAGRE_IS_TAB (tab));
-
-  return vnc_display_get_scaling (VNC_DISPLAY (tab->priv->vnc));
-}
-
 /* vim: ts=8 */

Modified: trunk/src/vinagre-tab.h
==============================================================================
--- trunk/src/vinagre-tab.h	(original)
+++ trunk/src/vinagre-tab.h	Tue Mar 18 13:39:09 2008
@@ -2,7 +2,7 @@
  * vinagre-tab.h
  * This file is part of vinagre
  *
- * Copyright (C) 2007,2008 - Jonh Wendell <wendell bani com br>
+ * Copyright (C) 2007 - Jonh Wendell <wendell bani com br>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -78,10 +78,6 @@
 void		  vinagre_tab_take_screenshot	(VinagreTab *tab);
 void		  vinagre_tab_paste_text	(VinagreTab *tab,
 						 const gchar *text);
-
-gboolean	  vinagre_tab_set_scaling	(VinagreTab *tab, gboolean active);
-gboolean	  vinagre_tab_get_scaling	(VinagreTab *tab);
 G_END_DECLS
 
 #endif  /* __VINAGRE_TAB_H__  */
-/* vim: ts=8 */

Modified: trunk/src/vinagre-ui.h
==============================================================================
--- trunk/src/vinagre-ui.h	(original)
+++ trunk/src/vinagre-ui.h	Tue Mar 18 13:39:09 2008
@@ -2,7 +2,7 @@
  * vinagre-ui.h
  * This file is part of vinagre
  *
- * Copyright (C) 2007,2008 - Jonh Wendell <wendell bani com br>
+ * Copyright (C) 2007 - Jonh Wendell <wendell bani com br>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -84,13 +84,6 @@
     N_("View the current machine in full screen"), G_CALLBACK (vinagre_cmd_view_fullscreen) },
 };
 
-static const GtkToggleActionEntry vinagre_machine_connected_toggle_menu_entries[] =
-{
-  { "ViewScaling", NULL, N_("S_caling"), NULL,
-    N_("Fit the remote screen into the current window size"),
-    G_CALLBACK (vinagre_cmd_view_scaling), FALSE }
-};
-
 static const GtkToggleActionEntry vinagre_always_sensitive_toggle_menu_entries[] =
 {
   { "ViewToolbar", NULL, N_("_Toolbar"), NULL,

Modified: trunk/src/vinagre-window-private.h
==============================================================================
--- trunk/src/vinagre-window-private.h	(original)
+++ trunk/src/vinagre-window-private.h	Tue Mar 18 13:39:09 2008
@@ -46,7 +46,6 @@
   GtkActionGroup *bookmarks_list_action_group;
   GtkActionGroup *recent_action_group;
   GtkAction      *recent_action;
-  GtkAction      *scaling_action;
   guint           bookmarks_list_menu_ui_id;
   guint           recents_menu_ui_id;
 

Modified: trunk/src/vinagre-window.c
==============================================================================
--- trunk/src/vinagre-window.c	(original)
+++ trunk/src/vinagre-window.c	Tue Mar 18 13:39:09 2008
@@ -384,15 +384,10 @@
 				vinagre_machine_connected_menu_entries,
 				G_N_ELEMENTS (vinagre_machine_connected_menu_entries),
 				window);
-  gtk_action_group_add_toggle_actions  (action_group,
-					vinagre_machine_connected_toggle_menu_entries,
-					G_N_ELEMENTS (vinagre_machine_connected_toggle_menu_entries),
-					window);
 
   gtk_ui_manager_insert_action_group (manager, action_group, 0);
   g_object_unref (action_group);
   window->priv->machine_connected_action_group = action_group;
-  window->priv->scaling_action = gtk_action_group_get_action (action_group, "ViewScaling");
 
   action = gtk_action_group_get_action (action_group, "ViewFullScreen");
   g_object_set (action, "is_important", TRUE, NULL);
@@ -773,20 +768,6 @@
 }
 
 static void
-update_toggle_machine_items (VinagreWindow *window) {
-  g_return_if_fail (VINAGRE_IS_WINDOW (window));
-
-  if (window->priv->active_tab == NULL)
-    {
-      gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (window->priv->scaling_action), FALSE);
-      return;
-    }
-
-  gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (window->priv->scaling_action),
-				vinagre_tab_get_scaling (VINAGRE_TAB (window->priv->active_tab)));
-}
-
-static void
 vinagre_window_page_removed (GtkNotebook   *notebook,
 			     GtkWidget     *child,
 			     guint         page_num,
@@ -800,7 +781,6 @@
     vinagre_window_toggle_fullscreen (window);
 
   vinagre_window_set_title (window);
-  update_toggle_machine_items (window);
   _vinagre_window_del_machine_connected (window);
 }
 
@@ -815,7 +795,6 @@
   window->priv->active_tab = child;
 
   vinagre_window_set_title (window);
-  update_toggle_machine_items (window);
 }
 
 static void 
@@ -835,7 +814,6 @@
   window->priv->active_tab = tab;
 
   vinagre_window_set_title (window);
-  update_toggle_machine_items (window);
 }
 
 static void



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