vinagre r354 - in trunk: . data src
- From: jwendell svn gnome org
- To: svn-commits-list gnome org
- Subject: vinagre r354 - in trunk: . data src
- Date: Sun, 1 Jun 2008 16:17:15 +0000 (UTC)
Author: jwendell
Date: Sun Jun 1 16:17:15 2008
New Revision: 354
URL: http://svn.gnome.org/viewvc/vinagre?rev=354&view=rev
Log:
2008-06-01 Jonh Wendell <jwendell gnome org>
Reworked 'edit bookmark' window, among other things...
Modified:
trunk/ChangeLog
trunk/data/vinagre.glade
trunk/src/vinagre-bookmarks.c
trunk/src/vinagre-commands.c
trunk/src/vinagre-connection.c
trunk/src/vinagre-connection.h
trunk/src/vinagre-fav.c
trunk/src/vinagre-tab.c
trunk/src/vinagre-window.c
Modified: trunk/data/vinagre.glade
==============================================================================
--- trunk/data/vinagre.glade (original)
+++ trunk/data/vinagre.glade Sun Jun 1 16:17:15 2008
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Sat May 31 11:15:56 2008 -->
+<!--Generated with glade3 3.4.5 on Sun Jun 1 09:41:43 2008 -->
<glade-interface>
<widget class="GtkDialog" id="connect_dialog">
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -129,6 +129,12 @@
<property name="column_spacing">6</property>
<property name="row_spacing">2</property>
<child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
<widget class="GtkCheckButton" id="scaling_check">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -185,12 +191,6 @@
<property name="y_options"></property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
</widget>
<packing>
<property name="position">5</property>
@@ -553,7 +553,7 @@
<widget class="GtkTable" id="table2">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="n_rows">3</property>
+ <property name="n_rows">2</property>
<property name="n_columns">3</property>
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
@@ -561,57 +561,112 @@
<placeholder/>
</child>
<child>
- <placeholder/>
- </child>
- <child>
- <widget class="GtkSpinButton" id="edit_bookmark_port_entry">
+ <widget class="GtkEntry" id="edit_bookmark_host_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">host or host:display or host::port</property>
<property name="activates_default">True</property>
- <property name="adjustment">5000 1 65535 1 10 10</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="edit_bookmark_host_entry">
+ <widget class="GtkEntry" id="edit_bookmark_name_entry">
+ <property name="width_request">250</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="is_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="activates_default">True</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label13">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Host:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">edit_bookmark_host_entry</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="edit_bookmark_name_entry">
+ <widget class="GtkLabel" id="label14">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="is_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="activates_default">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Bookmark name:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">edit_bookmark_name_entry</property>
</widget>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label12">
+ <widget class="GtkLabel" id="label16">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="label" translatable="yes">_Port:</property>
+ <property name="label"> </property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Connection options</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">6</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkTable" id="table5">
+ <property name="visible">True</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">2</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="edit_scaling_check">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Scaling</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">edit_bookmark_port_entry</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -621,12 +676,13 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label13">
+ <widget class="GtkCheckButton" id="edit_viewonly_check">
<property name="visible">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="label" translatable="yes">_Host:</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_View only</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">edit_bookmark_host_entry</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -636,12 +692,13 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label14">
+ <widget class="GtkCheckButton" id="edit_fullscreen_check">
<property name="visible">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="label" translatable="yes">_Name:</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Full screen</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">edit_bookmark_name_entry</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -649,16 +706,19 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label16">
+ <widget class="GtkLabel" id="label11">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label"> </property>
</widget>
+ <packing>
+ <property name="x_options"></property>
+ <property name="y_options"></property>
+ </packing>
</child>
</widget>
<packing>
- <property name="padding">6</property>
- <property name="position">3</property>
+ <property name="position">5</property>
</packing>
</child>
<child internal-child="action_area">
Modified: trunk/src/vinagre-bookmarks.c
==============================================================================
--- trunk/src/vinagre-bookmarks.c (original)
+++ trunk/src/vinagre-bookmarks.c Sun Jun 1 16:17:15 2008
@@ -200,6 +200,33 @@
vinagre_bookmarks_save_file (book);
}
+static void
+update_group_from_conn (VinagreBookmarks *book,
+ VinagreConnection *conn,
+ const gchar *group)
+{
+ g_key_file_set_string (book->priv->file,
+ group,
+ "host",
+ vinagre_connection_get_host (conn));
+ g_key_file_set_integer (book->priv->file,
+ group,
+ "port",
+ vinagre_connection_get_port (conn));
+ g_key_file_set_boolean (book->priv->file,
+ group,
+ "view_only",
+ vinagre_connection_get_view_only (conn));
+ g_key_file_set_boolean (book->priv->file,
+ group,
+ "scaling",
+ vinagre_connection_get_scaling (conn));
+ g_key_file_set_boolean (book->priv->file,
+ group,
+ "fullscreen",
+ vinagre_connection_get_fullscreen (conn));
+}
+
gboolean
vinagre_bookmarks_add (VinagreBookmarks *book,
VinagreConnection *conn,
@@ -231,14 +258,7 @@
if (strlen(name) < 1)
name = vinagre_connection_get_host (conn);
- g_key_file_set_string (book->priv->file,
- name,
- "host",
- vinagre_connection_get_host (conn));
- g_key_file_set_integer (book->priv->file,
- name,
- "port",
- vinagre_connection_get_port (conn));
+ update_group_from_conn (book, conn, name);
vinagre_connection_set_name (conn, name);
vinagre_bookmarks_add_conn (book, conn);
@@ -259,7 +279,9 @@
gint result;
GladeXML *xml;
const gchar *glade_file;
- GtkWidget *dialog, *host_entry, *name_entry, *port_entry;
+ GtkWidget *dialog, *host_entry, *name_entry;
+ GtkWidget *fs_check, *sc_check, *vo_check;
+ gchar *str;
g_return_val_if_fail (VINAGRE_IS_BOOKMARKS (book), FALSE);
g_return_val_if_fail (VINAGRE_IS_CONNECTION (conn), FALSE);
@@ -271,11 +293,21 @@
name_entry = glade_xml_get_widget (xml, "edit_bookmark_name_entry");
host_entry = glade_xml_get_widget (xml, "edit_bookmark_host_entry");
- port_entry = glade_xml_get_widget (xml, "edit_bookmark_port_entry");
+ fs_check = glade_xml_get_widget (xml, "edit_fullscreen_check");
+ sc_check = glade_xml_get_widget (xml, "edit_scaling_check");
+ vo_check = glade_xml_get_widget (xml, "edit_viewonly_check");
gtk_entry_set_text (GTK_ENTRY(name_entry), vinagre_connection_get_name (conn));
- gtk_entry_set_text (GTK_ENTRY(host_entry), vinagre_connection_get_host (conn));
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (port_entry), vinagre_connection_get_port (conn));
+ str = vinagre_connection_get_string_rep (conn, FALSE);
+ gtk_entry_set_text (GTK_ENTRY(host_entry), str);
+ g_free (str);
+
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fs_check),
+ vinagre_connection_get_fullscreen (conn));
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sc_check),
+ vinagre_connection_get_scaling (conn));
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (vo_check),
+ vinagre_connection_get_view_only (conn));
gtk_widget_show_all (dialog);
@@ -284,31 +316,44 @@
if (result == GTK_RESPONSE_OK)
{
const gchar *name;
+ gchar *host, *error_str;
+ gint port;
VinagreConnection *old_conn = vinagre_connection_clone (conn);
g_key_file_remove_group (book->priv->file, vinagre_connection_get_name (conn), NULL);
name = gtk_entry_get_text (GTK_ENTRY (name_entry));
- vinagre_connection_set_host (conn, gtk_entry_get_text (GTK_ENTRY (host_entry)));
- vinagre_connection_set_port (conn, gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (port_entry)));
+ if (vinagre_connection_split_string (gtk_entry_get_text (GTK_ENTRY (host_entry)),
+ &host,
+ &port,
+ &error_str))
+ {
+ vinagre_connection_set_host (conn, host);
+ vinagre_connection_set_port (conn, port);
+ vinagre_connection_set_view_only (conn,
+ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (vo_check)));
+ vinagre_connection_set_scaling (conn,
+ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (sc_check)));
+ vinagre_connection_set_fullscreen (conn,
+ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (fs_check)));
+
+ if (strlen (name) < 1)
+ if (strlen (vinagre_connection_get_name (conn)) < 1)
+ name = vinagre_connection_get_host (conn);
+ else
+ name = vinagre_connection_get_name (conn);
- if (strlen (name) < 1)
- if (strlen(vinagre_connection_get_name (conn)) < 1)
- name = vinagre_connection_get_host (conn);
- else
- name = vinagre_connection_get_name (conn);
-
- g_key_file_set_string (book->priv->file,
- name,
- "host",
- vinagre_connection_get_host (conn));
- g_key_file_set_integer (book->priv->file,
- name,
- "port",
- vinagre_connection_get_port (conn));
+ update_group_from_conn (book, conn, name);
+
+ vinagre_connection_set_name (conn, name);
+ vinagre_bookmarks_edit_conn (book, old_conn, conn);
+ }
+ else
+ {
+ vinagre_utils_show_error (error_str, window);
+ g_free (error_str);
+ }
- vinagre_connection_set_name (conn, name);
- vinagre_bookmarks_edit_conn (book, old_conn, conn);
g_object_unref (old_conn);
}
@@ -492,8 +537,9 @@
for (i=0; i<length; i++)
{
VinagreConnection *conn;
- gchar *s_value;
- gint i_value;
+ gchar *s_value;
+ gint i_value;
+ gboolean b_value;
s_value = g_key_file_get_string (book->priv->file, conns[i], "host", NULL);
if (!s_value)
@@ -509,6 +555,15 @@
i_value = 5900;
vinagre_connection_set_port (conn, i_value);
+ b_value = g_key_file_get_boolean (book->priv->file, conns[i], "view_only", NULL);
+ vinagre_connection_set_view_only (conn, b_value);
+
+ b_value = g_key_file_get_boolean (book->priv->file, conns[i], "fullscreen", NULL);
+ vinagre_connection_set_fullscreen (conn, b_value);
+
+ b_value = g_key_file_get_boolean (book->priv->file, conns[i], "scaling", NULL);
+ vinagre_connection_set_scaling (conn, b_value);
+
book->priv->conns = g_slist_prepend (book->priv->conns, conn);
}
Modified: trunk/src/vinagre-commands.c
==============================================================================
--- trunk/src/vinagre-commands.c (original)
+++ trunk/src/vinagre-commands.c Sun Jun 1 16:17:15 2008
@@ -245,12 +245,17 @@
VinagreWindow *window)
{
gboolean active;
+ VinagreTab *tab;
g_return_if_fail (VINAGRE_IS_WINDOW (window));
+ tab = vinagre_window_get_active_tab (window);
+ if (!tab)
+ return;
+
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
- if (!vinagre_tab_set_scaling (vinagre_window_get_active_tab (window), active))
+ if (!vinagre_tab_set_scaling (tab, active))
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), FALSE);
}
@@ -278,6 +283,7 @@
VinagreConnection *new_conn;
g_return_if_fail (VINAGRE_IS_WINDOW (window));
+ g_return_if_fail (VINAGRE_IS_CONNECTION (conn));
tab = vinagre_window_conn_exists (window, conn);
if (tab)
Modified: trunk/src/vinagre-connection.c
==============================================================================
--- trunk/src/vinagre-connection.c (original)
+++ trunk/src/vinagre-connection.c Sun Jun 1 16:17:15 2008
@@ -56,6 +56,9 @@
PROP_FULLSCREEN
};
+gint vinagre_connection_default_port [VINAGRE_CONNECTION_PROTOCOL_INVALID-1] = {5900, 3389};
+gchar* vinagre_connection_protos [VINAGRE_CONNECTION_PROTOCOL_INVALID-1] = {"vnc", "rdp"};
+
#define VINAGRE_CONNECTION_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VINAGRE_TYPE_CONNECTION, VinagreConnectionPrivate))
G_DEFINE_TYPE (VinagreConnection, vinagre_connection, G_TYPE_OBJECT);
@@ -498,19 +501,26 @@
vinagre_connection_set_password (new_conn, vinagre_connection_get_password (conn));
vinagre_connection_set_name (new_conn, vinagre_connection_get_name (conn));
vinagre_connection_set_desktop_name (new_conn, vinagre_connection_get_desktop_name (conn));
+ vinagre_connection_set_view_only (new_conn, vinagre_connection_get_view_only (conn));
+ vinagre_connection_set_scaling (new_conn, vinagre_connection_get_scaling (conn));
+ vinagre_connection_set_fullscreen (new_conn, vinagre_connection_get_fullscreen (conn));
return new_conn;
}
-VinagreConnection *
-vinagre_connection_new_from_string (const gchar *uri, gchar **error_msg)
+gboolean
+vinagre_connection_split_string (const gchar *uri,
+ gchar **host,
+ gint *port,
+ gchar **error_msg)
{
- VinagreConnection *conn;
gchar **server, **url;
- gint port;
- gchar *host;
+ gint lport;
+ gchar *lhost;
*error_msg = NULL;
+ *host = NULL;
+ *port = 0;
url = g_strsplit (uri, "://", 2);
if (g_strv_length (url) == 2)
@@ -520,28 +530,47 @@
*error_msg = g_strdup_printf (_("The protocol %s is not supported."),
url[0]);
g_strfreev (url);
- return NULL;
+ return FALSE;
}
- host = url[1];
+ lhost = url[1];
}
else
- host = (gchar *) uri;
+ lhost = (gchar *) uri;
- if (g_strrstr (host, "::") != NULL)
+ if (g_strrstr (lhost, "::") != NULL)
{
- server = g_strsplit (host, "::", 2);
- port = server[1] ? atoi (server[1]) : 5900;
+ server = g_strsplit (lhost, "::", 2);
+ lport = server[1] ? atoi (server[1]) : 5900;
}
else
{
- server = g_strsplit (host, ":", 2);
- port = server[1] ? atoi (server[1]) : 5900;
+ server = g_strsplit (lhost, ":", 2);
+ lport = server[1] ? atoi (server[1]) : 5900;
- if (port < 1024)
- port += 5900;
+ if (lport < 1024)
+ lport += 5900;
}
- host = server[0];
+ lhost = server[0];
+
+ *host = g_strdup (lhost);
+ *port = lport;
+
+ g_strfreev (server);
+ g_strfreev (url);
+
+ return TRUE;
+}
+
+VinagreConnection *
+vinagre_connection_new_from_string (const gchar *uri, gchar **error_msg)
+{
+ VinagreConnection *conn;
+ gint port;
+ gchar *host;
+
+ if (!vinagre_connection_split_string (uri, &host, &port, error_msg))
+ return NULL;
conn = vinagre_bookmarks_exists (vinagre_bookmarks_get_default (),
host,
@@ -553,9 +582,7 @@
vinagre_connection_set_port (conn, port);
}
- g_strfreev (server);
- g_strfreev (url);
-
+ g_free (host);
return conn;
}
@@ -704,4 +731,32 @@
return conn->priv->fullscreen;
}
+gchar*
+vinagre_connection_get_string_rep (VinagreConnection *conn,
+ gboolean has_protocol)
+{
+ GString *uri;
+ gchar *result;
+
+ g_return_val_if_fail (VINAGRE_IS_CONNECTION (conn), NULL);
+
+ if (has_protocol)
+ {
+ uri = g_string_new (vinagre_connection_protos [conn->priv->protocol-1]);
+ g_string_append_printf (uri, "%s", "://");
+ }
+ else
+ uri = g_string_new (NULL);
+
+ g_string_append_printf (uri, "%s", conn->priv->host);
+
+ if (vinagre_connection_default_port [conn->priv->protocol-1] != conn->priv->port)
+ g_string_append_printf (uri, "::%d", conn->priv->port);
+
+ result = g_strdup (uri->str);
+ g_string_free (uri, TRUE);
+
+ return result;
+}
+
/* vim: ts=8 */
Modified: trunk/src/vinagre-connection.h
==============================================================================
--- trunk/src/vinagre-connection.h (original)
+++ trunk/src/vinagre-connection.h Sun Jun 1 16:17:15 2008
@@ -104,6 +104,13 @@
void vinagre_connection_set_fullscreen (VinagreConnection *conn,
gboolean value);
+gboolean vinagre_connection_split_string (const gchar *uri,
+ gchar **host,
+ gint *port,
+ gchar **error_msg);
+
+gchar* vinagre_connection_get_string_rep (VinagreConnection *conn,
+ gboolean has_protocol);
G_END_DECLS
#endif /* __VINAGRE_CONNECTION_H__ */
Modified: trunk/src/vinagre-fav.c
==============================================================================
--- trunk/src/vinagre-fav.c (original)
+++ trunk/src/vinagre-fav.c Sun Jun 1 16:17:15 2008
@@ -383,7 +383,7 @@
GtkTooltip *tooltip,
VinagreFav *fav)
{
- gchar *tip, *name;
+ gchar *tip, *name, *uri;
GtkTreePath *path = NULL;
gint bx, by;
GtkTreeIter iter;
@@ -417,16 +417,16 @@
return FALSE;
name = vinagre_connection_get_best_name (conn);
+ uri = vinagre_connection_get_string_rep (conn, TRUE);
tip = g_markup_printf_escaped ("<b>%s</b>\n"
- "<small><b>%s</b> %s</small>\n"
- "<small><b>%s</b> %d</small>",
+ "<small><b>%s</b> %s</small>",
name,
- _("Host:"), vinagre_connection_get_host (conn),
- _("Port:"), vinagre_connection_get_port (conn));
+ _("Host:"), uri);
gtk_tooltip_set_markup (tooltip, tip);
g_free (tip);
g_free (name);
+ g_free (uri);
return TRUE;
}
Modified: trunk/src/vinagre-tab.c
==============================================================================
--- trunk/src/vinagre-tab.c (original)
+++ trunk/src/vinagre-tab.c Sun Jun 1 16:17:15 2008
@@ -1021,7 +1021,7 @@
gboolean
vinagre_tab_set_scaling (VinagreTab *tab, gboolean active) {
- g_return_if_fail (VINAGRE_IS_TAB (tab));
+ g_return_val_if_fail (VINAGRE_IS_TAB (tab), FALSE);
if (vnc_display_get_scaling (VNC_DISPLAY (tab->priv->vnc)) == active)
return TRUE;
@@ -1041,7 +1041,9 @@
return FALSE;
}
- gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (tab->priv->scaling_button), active);
+ gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (tab->priv->scaling_button),
+ active);
+
return TRUE;
}
@@ -1057,7 +1059,9 @@
g_return_if_fail (VINAGRE_IS_TAB (tab));
vnc_display_set_read_only (VNC_DISPLAY (tab->priv->vnc), active);
- gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (tab->priv->ro_button), active);
+ gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (tab->priv->ro_button),
+ active);
+
}
gboolean
Modified: trunk/src/vinagre-window.c
==============================================================================
--- trunk/src/vinagre-window.c (original)
+++ trunk/src/vinagre-window.c Sun Jun 1 16:17:15 2008
@@ -524,9 +524,6 @@
VinagreConnection *conn,
VinagreWindow *window)
{
- g_return_if_fail (VINAGRE_IS_FAV (fav));
- g_return_if_fail (VINAGRE_IS_WINDOW (window));
-
vinagre_cmd_open_bookmark (window, conn);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]