[epiphany/wip/bookmarks: 16/17] properties-grid: Display full URI in entry



commit 8a197d0b126c1090eb69bf21c98157229acdc896
Author: Iulian Radu <iulian radu67 gmail com>
Date:   Thu Sep 1 20:37:46 2016 +0300

    properties-grid: Display full URI in entry

 src/blog.txt                        |   11 +++++++++++
 src/ephy-bookmark-properties-grid.c |   29 ++---------------------------
 2 files changed, 13 insertions(+), 27 deletions(-)
---
diff --git a/src/blog.txt b/src/blog.txt
new file mode 100644
index 0000000..15004a0
--- /dev/null
+++ b/src/blog.txt
@@ -0,0 +1,11 @@
+The new system is much simpler than the previous one. The basic idea is that bookmarks can be categorized 
using tags. The central piece is the bookmarks manager, responsible of keeping track of all existing 
bookmarks and tags, and also saving and loading everything to and from the database file. Each bookmark 
contains the list of tags that the user selected for that bookmark.
+
+Bookmarking a page is done by clicking on the star at the right side of the address bar. A popover pops out 
where you can give the bookmark the title you would like and select or add new tags.
+
+A list of all bookmarks can be found in the popover shown by the bookmarks button. There are two main 
possible views:
+ 1) All: a list of all bookmarks sorted by most recently added
+ 2) Tags: a list of tags ordered alphabetically, followed by a list of bookmarks that don't belong to any 
particular tag. Clicking on a tag displays a list of all bookmarks that have the tag selected.
+
+Hovering any of the bookmark rows in any of the views above will display a button that can be clicked to 
open the bookmark properties dialog. The dialog looks similar to the popover displayed when bookmarking a 
page. The main difference is that the dialog can be accessed regardless of the page you are on and it also 
allows editing the URI of the bookmark.
+
+The co
\ No newline at end of file
diff --git a/src/ephy-bookmark-properties-grid.c b/src/ephy-bookmark-properties-grid.c
index 510216d..f91d52a 100644
--- a/src/ephy-bookmark-properties-grid.c
+++ b/src/ephy-bookmark-properties-grid.c
@@ -289,30 +289,6 @@ ephy_bookmark_properties_grid_set_property (GObject      *object,
   }
 }
 
-static char*
-get_address (const char *url)
-{
-  SoupURI *uri;
-  char *address;
-
-  uri = soup_uri_new (url);
-  if (!uri) {
-    url = g_strconcat (SOUP_URI_SCHEME_HTTP,
-                       "://",
-                       url,
-                       NULL);
-    uri = soup_uri_new (url);
-  }
-  address = g_strconcat (soup_uri_get_host (uri),
-                         soup_uri_get_path (uri),
-                         soup_uri_get_query (uri),
-                         soup_uri_get_fragment (uri),
-                         NULL);
-  soup_uri_free (uri);
-
-  return address;
-}
-
 static void
 ephy_bookmark_properties_grid_constructed (GObject *object)
 {
@@ -320,7 +296,7 @@ ephy_bookmark_properties_grid_constructed (GObject *object)
   GSequence *tags;
   GSequence *bookmark_tags;
   GSequenceIter *iter;
-  char *address;
+  const char *address;
 
   /* Set appearance based on type */
   if (self->type == EPHY_BOOKMARK_PROPERTIES_GRID_TYPE_DIALOG) {
@@ -341,9 +317,8 @@ ephy_bookmark_properties_grid_constructed (GObject *object)
 
   /* Set text for address entry */
   if (self->type == EPHY_BOOKMARK_PROPERTIES_GRID_TYPE_DIALOG) {
-    address = get_address (ephy_bookmark_get_url (self->bookmark));
+    address = ephy_bookmark_get_url (self->bookmark);
     gtk_entry_set_text (GTK_ENTRY (self->address_entry), address);
-    g_free (address);
 
     g_object_bind_property (GTK_ENTRY (self->address_entry), "text",
                             self->bookmark, "url",


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