[Xfce4-commits] <gigolo:master> Strip leading slashes for Share and Path values

Enrico Tröger noreply at xfce.org
Wed Nov 18 22:16:01 CET 2009


Updating branch refs/heads/master
         to 66ce54855a13f8dafc2881a01312d5a21c66e4de (commit)
       from e90eb6ce2734df9217cd266b1b4578dea6b98d6d (commit)

commit 66ce54855a13f8dafc2881a01312d5a21c66e4de
Author: Enrico Tröger <enrico at xfce.org>
Date:   Wed Nov 18 22:02:45 2009 +0100

    Strip leading slashes for Share and Path values

 src/bookmarkeditdialog.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/src/bookmarkeditdialog.c b/src/bookmarkeditdialog.c
index ded22b1..5729559 100644
--- a/src/bookmarkeditdialog.c
+++ b/src/bookmarkeditdialog.c
@@ -270,6 +270,24 @@ gint gigolo_bookmark_edit_dialog_run(GigoloBookmarkEditDialog *dialog)
 					gtk_widget_grab_focus(priv->uri_entry);
 				}
 			}
+			if (! error && gtk_widget_get_parent(priv->path_entry) != NULL)
+			{
+				tmp = gtk_entry_get_text(GTK_ENTRY(priv->path_entry));
+				if (tmp[0] == '/')
+				{	/* remove leading slashes */
+					gtk_entry_set_text(GTK_ENTRY(priv->path_entry), tmp + 1);
+
+				}
+			}
+			if (! error && gtk_widget_get_parent(priv->share_entry) != NULL)
+			{
+				tmp = gtk_entry_get_text(GTK_ENTRY(priv->share_entry));
+				if (tmp[0] == '/')
+				{	/* remove leading slashes */
+					gtk_entry_set_text(GTK_ENTRY(priv->share_entry), tmp + 1);
+
+				}
+			}
 			if (! error)
 				break;
 		}



More information about the Xfce4-commits mailing list