vinagre r507 - in trunk: . src
- From: jwendell svn gnome org
- To: svn-commits-list gnome org
- Subject: vinagre r507 - in trunk: . src
- Date: Tue, 11 Nov 2008 17:44:33 +0000 (UTC)
Author: jwendell
Date: Tue Nov 11 17:44:32 2008
New Revision: 507
URL: http://svn.gnome.org/viewvc/vinagre?rev=507&view=rev
Log:
2008-11-11 Jonh Wendell <jwendell gnome org>
* src/vinagre-bookmarks.c (vinagre_bookmarks_add): Use the connection's
name for the default bookmark name, when adding. Closes #557675.
Patch from Mauro Dreissig.
Modified:
trunk/ChangeLog
trunk/src/vinagre-bookmarks.c
Modified: trunk/src/vinagre-bookmarks.c
==============================================================================
--- trunk/src/vinagre-bookmarks.c (original)
+++ trunk/src/vinagre-bookmarks.c Tue Nov 11 17:44:32 2008
@@ -269,7 +269,7 @@
gint result;
GladeXML *xml;
const gchar *glade_file;
- GtkWidget *dialog;
+ GtkWidget *dialog, *name_entry;
const gchar *name;
g_return_val_if_fail (VINAGRE_IS_BOOKMARKS (book), FALSE);
@@ -280,15 +280,19 @@
glade_file = vinagre_utils_get_glade_filename ();
xml = glade_xml_new (glade_file, "add_to_bookmarks_dialog", NULL);
dialog = glade_xml_get_widget (xml, "add_to_bookmarks_dialog");
+ name_entry = glade_xml_get_widget (xml, "bookmark_name_entry");
gtk_window_set_transient_for (GTK_WINDOW(dialog), window);
+ gtk_entry_set_text (GTK_ENTRY (name_entry), vinagre_connection_get_best_name(conn));
+ gtk_editable_set_position (GTK_EDITABLE (name_entry), -1);
+
gtk_widget_show_all (dialog);
result = gtk_dialog_run (GTK_DIALOG (dialog));
if (result == GTK_RESPONSE_OK)
{
- name = gtk_entry_get_text (GTK_ENTRY (glade_xml_get_widget (xml, "bookmark_name_entry")));
+ name = name = gtk_entry_get_text (GTK_ENTRY (name_entry));
if (strlen(name) < 1)
name = vinagre_connection_get_host (conn);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]