[epiphany/wip/ephy-sync] bookmarks: Add 'bookmark page' button to the location entry
- From: Gabriel - Cristian Ivascu <gabrielivascu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/ephy-sync] bookmarks: Add 'bookmark page' button to the location entry
- Date: Mon, 8 Aug 2016 18:22:37 +0000 (UTC)
commit 571654c99014552f3a51ae3dd7846388bc03ca5a
Author: Iulian Radu <iulian radu67 gmail com>
Date: Tue Aug 2 19:36:20 2016 +0300
bookmarks: Add 'bookmark page' button to the location entry
lib/widgets/ephy-location-entry.c | 422 +++----------------------
lib/widgets/ephy-location-entry.h | 7 +-
src/Makefile.am | 2 +
src/ephy-bookmark-properties-grid.c | 36 ++-
src/ephy-bookmarks-manager.c | 30 ++
src/ephy-bookmarks-manager.h | 2 +
src/ephy-bookmarks-popover.c | 11 -
src/ephy-location-controller.c | 55 ----
src/ephy-toolbar.c | 43 +++
src/ephy-window.c | 49 ++--
src/epiphany.gresource.xml | 2 +
src/resources/gtk/bookmark-properties-grid.ui | 18 +-
src/resources/gtk/bookmarks-popover.ui | 2 +
src/resources/icons/ephy-bookmark-empty.svg | 124 ++++++++
src/resources/icons/ephy-bookmark-full.svg | 124 ++++++++
15 files changed, 432 insertions(+), 495 deletions(-)
---
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index 69a5a00..274174c 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -53,7 +53,6 @@
struct _EphyLocationEntry {
GtkEntry parent_instance;
- GdkPixbuf *favicon;
GtkTreeModel *model;
GSList *search_terms;
@@ -81,17 +80,6 @@ struct _EphyLocationEntry {
guint original_address : 1;
guint apply_colors : 1;
guint needs_reset : 1;
- guint show_favicon : 1;
-
- GtkTargetList *drag_targets;
- GdkDragAction drag_actions;
-};
-
-static const GtkTargetEntry url_drag_types [] =
-{
- { (char *)EPHY_DND_URL_TYPE, 0, 0 },
- { (char *)EPHY_DND_URI_LIST_TYPE, 0, 1 },
- { (char *)EPHY_DND_TEXT_TYPE, 0, 2 }
};
static gboolean ephy_location_entry_reset_internal (EphyLocationEntry *, gboolean);
@@ -105,9 +93,7 @@ static void extracell_data_func (GtkCellLayout *cell_layout,
enum {
PROP_0,
PROP_LOCATION,
- PROP_FAVICON,
PROP_SECURITY_LEVEL,
- PROP_SHOW_FAVICON,
LAST_PROP
};
static GParamSpec *obj_properties[LAST_PROP];
@@ -115,6 +101,7 @@ static GParamSpec *obj_properties[LAST_PROP];
enum signalsEnum {
USER_CHANGED,
LOCK_CLICKED,
+ BOOKMARK_CLICKED,
GET_LOCATION,
GET_TITLE,
LAST_SIGNAL
@@ -136,18 +123,10 @@ ephy_location_entry_set_property (GObject *object,
ephy_location_entry_set_location (entry,
g_value_get_string (value));
break;
- case PROP_FAVICON:
- ephy_location_entry_set_favicon (entry,
- g_value_get_object (value));
- break;
case PROP_SECURITY_LEVEL:
ephy_location_entry_set_security_level (entry,
g_value_get_enum (value));
break;
- case PROP_SHOW_FAVICON:
- ephy_location_entry_set_show_favicon (entry,
- g_value_get_boolean (value));
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
@@ -177,14 +156,6 @@ ephy_location_entry_finalize (GObject *object)
g_free (entry->saved_text);
- if (entry->drag_targets != NULL) {
- gtk_target_list_unref (entry->drag_targets);
- }
-
- if (entry->favicon != NULL) {
- g_object_unref (entry->favicon);
- }
-
G_OBJECT_CLASS (ephy_location_entry_parent_class)->finalize (object);
}
@@ -263,18 +234,6 @@ ephy_location_entry_class_init (EphyLocationEntryClass *klass)
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
/**
- * EphyLocationEntry:favicon:
- *
- * The icon corresponding to the current location.
- */
- obj_properties[PROP_FAVICON] =
- g_param_spec_object ("favicon",
- "Favicon",
- "The icon corresponding to the current location",
- GDK_TYPE_PIXBUF,
- G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS);
-
- /**
* EphyLocationEntry:security-level:
*
* State of the security icon.
@@ -287,13 +246,6 @@ ephy_location_entry_class_init (EphyLocationEntryClass *klass)
EPHY_SECURITY_LEVEL_TO_BE_DETERMINED,
G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS);
- obj_properties[PROP_SHOW_FAVICON] =
- g_param_spec_boolean ("show-favicon",
- "Show Favicon",
- "Whether to show the favicon",
- TRUE,
- G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS);
-
g_object_class_install_properties (object_class, LAST_PROP, obj_properties);
/**
@@ -328,6 +280,22 @@ ephy_location_entry_class_init (EphyLocationEntryClass *klass)
0);
/**
+ * EphyLocationEntry::bookmark-clicked:
+ * @entry: the object on which the signal is emitted
+ *
+ * Emitted when the user clicks the bookmark icon inside the
+ * #EphyLocationEntry.
+ *
+ */
+ signals[BOOKMARK_CLICKED] = g_signal_new (
+ "bookmark-clicked",
+ EPHY_TYPE_LOCATION_ENTRY,
+ G_SIGNAL_RUN_FIRST | G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL, NULL,
+ G_TYPE_NONE,
+ 0);
+
+ /**
* EphyLocationEntry::get-location:
* @entry: the object on which the signal is emitted
* Returns: the current page address as a string
@@ -377,40 +345,6 @@ update_address_state (EphyLocationEntry *entry)
}
static void
-update_favicon (EphyLocationEntry *lentry)
-{
- GtkEntry *entry = GTK_ENTRY (lentry);
-
- /* Only show the favicon if the entry's text is the
- * address of the current page.
- */
- if (lentry->show_favicon && lentry->favicon != NULL && lentry->original_address) {
- gtk_entry_set_icon_from_pixbuf (entry,
- GTK_ENTRY_ICON_PRIMARY,
- lentry->favicon);
- } else if (lentry->show_favicon) {
- const char *icon_name;
-
- /* Here we could consider using fallback favicon that matches
- * the page MIME type, though text/html should be good enough
- * most of the time. See #337140
- */
- if (gtk_entry_get_text_length (entry) > 0)
- icon_name = "text-x-generic-symbolic";
- else
- icon_name = "edit-find-symbolic";
-
- gtk_entry_set_icon_from_icon_name (entry,
- GTK_ENTRY_ICON_PRIMARY,
- icon_name);
- } else {
- gtk_entry_set_icon_from_icon_name (entry,
- GTK_ENTRY_ICON_PRIMARY,
- NULL);
- }
-}
-
-static void
editable_changed_cb (GtkEditable *editable,
EphyLocationEntry *entry)
{
@@ -539,26 +473,6 @@ action_activated_after_cb (GtkEntryCompletion *completion,
}
}
-static gboolean
-entry_drag_motion_cb (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
- guint time)
-{
- return FALSE;
-}
-
-static gboolean
-entry_drag_drop_cb (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
- guint time)
-{
- return FALSE;
-}
-
static void
entry_clear_activate_cb (GtkMenuItem *item,
EphyLocationEntry *entry)
@@ -682,217 +596,6 @@ entry_populate_popup_cb (GtkEntry *entry,
gtk_menu_shell_insert (GTK_MENU_SHELL (menu), separator, 2);
}
-static void
-each_url_get_data_binder (EphyDragEachSelectedItemDataGet iteratee,
- gpointer iterator_context,
- gpointer return_data)
-{
- EphyLocationEntry *entry = EPHY_LOCATION_ENTRY (iterator_context);
- char *title = NULL, *address = NULL;
-
- g_signal_emit (entry, signals[GET_LOCATION], 0, &address);
- g_signal_emit (entry, signals[GET_TITLE], 0, &title);
- g_return_if_fail (address != NULL && title != NULL);
-
- iteratee (address, title, return_data);
-
- g_free (address);
- g_free (title);
-}
-
-static void
-sanitize_location (char **url)
-{
- char *str;
-
- /* Do not show internal ephy-about: protocol to users */
- if (g_str_has_prefix (*url, EPHY_ABOUT_SCHEME)) {
- str = g_strdup_printf ("about:%s", *url + strlen (EPHY_ABOUT_SCHEME) + 1);
- g_free (*url);
- *url = str;
- }
-}
-
-#define DRAG_ICON_LAYOUT_PADDING 5
-#define DRAG_ICON_ICON_PADDING 10
-#define DRAG_ICON_MAX_WIDTH_CHARS 32
-
-static cairo_surface_t *
-favicon_create_drag_surface (EphyLocationEntry *entry,
- GtkWidget *widget)
-{
- char *title = NULL, *address = NULL;
- GString *text;
- GtkStyleContext *style;
- const PangoFontDescription *font_desc;
- cairo_surface_t *surface;
- PangoContext *context;
- PangoLayout *layout;
- PangoFontMetrics *metrics;
- int surface_height, surface_width;
- int layout_width, layout_height;
- int icon_width = 0, icon_height = 0, favicon_offset_x = 0;
- int char_width;
- cairo_t *cr;
- GtkStateFlags state;
- GdkRGBA color;
- GdkPixbuf *favicon;
-
- g_signal_emit (entry, signals[GET_LOCATION], 0, &address);
- sanitize_location (&address);
- g_signal_emit (entry, signals[GET_TITLE], 0, &title);
- if (address == NULL || title == NULL) return NULL;
-
- /* Compute text */
- title = g_strstrip (title);
-
- text = g_string_sized_new (strlen (address) + strlen (title) + 2);
- if (title[0] != '\0') {
- g_string_append (text, title);
- g_string_append (text, "\n");
- }
-
- if (address[0] != '\0') {
- g_string_append (text, address);
- }
-
- if (entry->favicon != NULL)
- favicon = g_object_ref (entry->favicon);
- else
- favicon = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
- "text-x-generic-symbolic",
- 16,
- 0, NULL);
- if (favicon != NULL) {
- icon_width = gdk_pixbuf_get_width (favicon);
- icon_height = gdk_pixbuf_get_height (favicon);
- }
-
- context = gtk_widget_get_pango_context (widget);
- layout = pango_layout_new (context);
-
- style = gtk_widget_get_style_context (GTK_WIDGET (entry));
- state = gtk_style_context_get_state (style);
-
- gtk_style_context_save (style);
- gtk_style_context_set_state (style, GTK_STATE_FLAG_NORMAL);
- gtk_style_context_get (style, GTK_STATE_FLAG_NORMAL,
- "font", &font_desc, NULL);
- gtk_style_context_restore (style);
-
- metrics = pango_context_get_metrics (context,
- font_desc,
- pango_context_get_language (context));
-
- char_width = pango_font_metrics_get_approximate_digit_width (metrics);
- pango_font_metrics_unref (metrics);
-
- pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END);
- pango_layout_set_width (layout, char_width * DRAG_ICON_MAX_WIDTH_CHARS);
- pango_layout_set_text (layout, text->str, text->len);
-
- pango_layout_get_pixel_size (layout, &layout_width, &layout_height);
-
- if (favicon != NULL) {
- favicon_offset_x = icon_width + (2 * DRAG_ICON_ICON_PADDING);
- }
-
- surface_width = layout_width + favicon_offset_x +
- (DRAG_ICON_LAYOUT_PADDING * 3);
- surface_height = MAX (layout_height, icon_height) +
- (DRAG_ICON_LAYOUT_PADDING * 2);
-
- surface = gdk_window_create_similar_surface (gtk_widget_get_window (widget),
- CAIRO_CONTENT_COLOR,
- surface_width + 2,
- surface_height + 2);
- cr = cairo_create (surface);
-
- cairo_rectangle (cr, 1, 1, surface_width, surface_height);
- cairo_set_line_width (cr, 1.0);
-
- cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
- cairo_stroke_preserve (cr);
-
- gtk_style_context_get_background_color (style, state, &color);
- gdk_cairo_set_source_rgba (cr, &color);
- cairo_fill (cr);
-
- if (favicon != NULL) {
- double x;
- double y;
-
- x = 1 + DRAG_ICON_LAYOUT_PADDING + DRAG_ICON_ICON_PADDING;
- y = (surface_height - icon_height) / 2;
- gdk_cairo_set_source_pixbuf (cr, favicon, x, y);
- cairo_rectangle (cr, x, y, icon_width, icon_height);
- cairo_fill (cr);
- }
-
- cairo_move_to (cr,
- 1 + DRAG_ICON_LAYOUT_PADDING + favicon_offset_x,
- 1 + DRAG_ICON_LAYOUT_PADDING);
- gtk_style_context_get_color (style, state, &color);
- gdk_cairo_set_source_rgba (cr, &color);
- pango_cairo_show_layout (cr, layout);
-
- cairo_destroy (cr);
- g_object_unref (layout);
-
- g_free (address);
- g_free (title);
- g_string_free (text, TRUE);
- g_clear_object (&favicon);
-
- return surface;
-}
-
-static void
-favicon_drag_begin_cb (GtkWidget *widget,
- GdkDragContext *context,
- EphyLocationEntry *lentry)
-{
- cairo_surface_t *surface;
- GtkEntry *entry;
- gint index;
-
- entry = GTK_ENTRY (widget);
-
- index = gtk_entry_get_current_icon_drag_source (entry);
- if (index != GTK_ENTRY_ICON_PRIMARY)
- return;
-
- surface = favicon_create_drag_surface (lentry, widget);
-
- if (surface != NULL) {
- gtk_drag_set_icon_surface (context, surface);
- cairo_surface_destroy (surface);
- }
-}
-
-static void
-favicon_drag_data_get_cb (GtkWidget *widget,
- GdkDragContext *context,
- GtkSelectionData *selection_data,
- guint info,
- guint32 time,
- EphyLocationEntry *lentry)
-{
- gint index;
- GtkEntry *entry;
-
- g_assert (widget != NULL);
- g_return_if_fail (context != NULL);
-
- entry = GTK_ENTRY (widget);
-
- index = gtk_entry_get_current_icon_drag_source (entry);
- if (index == GTK_ENTRY_ICON_PRIMARY) {
- ephy_dnd_drag_data_get (widget, context, selection_data,
- time, lentry, each_url_get_data_binder);
- }
-}
-
static gboolean
icon_button_press_event_cb (GtkWidget *entry,
GtkEntryIconPosition position,
@@ -904,16 +607,10 @@ icon_button_press_event_cb (GtkWidget *entry,
if (event->type == GDK_BUTTON_PRESS &&
event->button == 1 &&
state == 0 /* left */) {
- if (position == GTK_ENTRY_ICON_PRIMARY) {
- GtkWidget *toplevel;
-
- toplevel = gtk_widget_get_toplevel (GTK_WIDGET (entry));
- gtk_window_set_focus (GTK_WINDOW (toplevel), entry);
-
- gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1);
- } else {
+ if (position == GTK_ENTRY_ICON_PRIMARY)
g_signal_emit (lentry, signals[LOCK_CLICKED], 0);
- }
+ else
+ g_signal_emit (lentry, signals[BOOKMARK_CLICKED], 0);
return TRUE;
}
@@ -928,42 +625,24 @@ ephy_location_entry_construct_contents (EphyLocationEntry *lentry)
LOG ("EphyLocationEntry constructing contents %p", lentry);
- /* Favicon */
- lentry->drag_targets = gtk_target_list_new (url_drag_types,
- G_N_ELEMENTS (url_drag_types));
- lentry->drag_actions = GDK_ACTION_ASK | GDK_ACTION_COPY | GDK_ACTION_LINK;
-
- gtk_entry_set_icon_drag_source (GTK_ENTRY (entry),
- GTK_ENTRY_ICON_PRIMARY,
- lentry->drag_targets,
- lentry->drag_actions);
-
- gtk_entry_set_icon_tooltip_text (GTK_ENTRY (entry),
- GTK_ENTRY_ICON_PRIMARY,
- _("Drag and drop this icon to create a link to this page"));
+ gtk_icon_theme_add_resource_path (gtk_icon_theme_get_default (),
+ "/org/gnome/epiphany/icons/");
- gtk_drag_dest_set (entry,
- GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP,
- url_drag_types,
- G_N_ELEMENTS (url_drag_types),
- GDK_ACTION_MOVE | GDK_ACTION_COPY);
+ gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry),
+ GTK_ENTRY_ICON_SECONDARY,
+ "ephy-bookmark-empty");
g_object_connect (entry,
"signal::icon-press", G_CALLBACK (icon_button_press_event_cb), lentry,
"signal::populate-popup", G_CALLBACK (entry_populate_popup_cb), lentry,
"signal::key-press-event", G_CALLBACK (entry_key_press_cb), lentry,
"signal::changed", G_CALLBACK (editable_changed_cb), lentry,
- "signal::drag-motion", G_CALLBACK (entry_drag_motion_cb), lentry,
- "signal::drag-drop", G_CALLBACK (entry_drag_drop_cb), lentry,
- "signal::drag-data-get", G_CALLBACK (favicon_drag_data_get_cb), lentry,
NULL);
g_signal_connect_after (entry, "key-press-event",
G_CALLBACK (entry_key_press_after_cb), lentry);
g_signal_connect_after (entry, "activate",
G_CALLBACK (entry_activate_after_cb), lentry);
- g_signal_connect_after (entry, "drag-begin",
- G_CALLBACK (favicon_drag_begin_cb), lentry);
}
static void
@@ -974,7 +653,6 @@ ephy_location_entry_init (EphyLocationEntry *le)
le->user_changed = FALSE;
le->block_update = FALSE;
le->saved_text = NULL;
- le->show_favicon = TRUE;
le->dns_prefetch_handler = 0;
ephy_location_entry_construct_contents (le);
@@ -1313,16 +991,8 @@ ephy_location_entry_set_location (EphyLocationEntry *entry,
effective_text = g_strdup_printf ("about:%s",
address + strlen (EPHY_ABOUT_SCHEME) + 1);
text = address;
- gtk_entry_set_icon_drag_source (GTK_ENTRY (entry),
- GTK_ENTRY_ICON_PRIMARY,
- entry->drag_targets,
- entry->drag_actions);
} else {
text = "";
- gtk_entry_set_icon_drag_source (GTK_ENTRY (entry),
- GTK_ENTRY_ICON_PRIMARY,
- NULL,
- GDK_ACTION_DEFAULT);
}
/* First record the new hash, then update the entry text */
@@ -1336,7 +1006,6 @@ ephy_location_entry_set_location (EphyLocationEntry *entry,
/* We need to call update_address_state() here, as the 'changed' signal
* may not get called if the user has typed in the exact correct url */
update_address_state (entry);
- update_favicon (entry);
/* Now restore the selection.
* Note that it's not owned by the entry anymore!
@@ -1480,36 +1149,21 @@ ephy_location_entry_activate (EphyLocationEntry *entry)
widget);
}
-/**
- * ephy_location_entry_set_favicon:
- * @entry: an #EphyLocationEntry widget
- * @pixbuf: a #GdkPixbuf to be set as the icon of the entry
- *
- * Sets the icon in the internal #EphyIconEntry of @entry
- *
- **/
void
-ephy_location_entry_set_favicon (EphyLocationEntry *entry,
- GdkPixbuf *pixbuf)
-{
- if (entry->favicon != NULL) {
- g_object_unref (entry->favicon);
- }
-
- entry->favicon = pixbuf ? g_object_ref (pixbuf) : NULL;
-
- update_favicon (entry);
-}
-
-void
-ephy_location_entry_set_show_favicon (EphyLocationEntry *entry,
- gboolean show_favicon)
+ephy_location_entry_set_bookmarked_status (EphyLocationEntry *entry,
+ gboolean is_bookmarked)
{
g_return_if_fail (EPHY_IS_LOCATION_ENTRY (entry));
- entry->show_favicon = show_favicon != FALSE;
-
- update_favicon (entry);
+ if (is_bookmarked) {
+ gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry),
+ GTK_ENTRY_ICON_SECONDARY,
+ "ephy-bookmark-full");
+ } else {
+ gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry),
+ GTK_ENTRY_ICON_SECONDARY,
+ "ephy-bookmark-empty");
+ }
}
/**
@@ -1531,7 +1185,7 @@ ephy_location_entry_set_security_level (EphyLocationEntry *entry,
icon_name = ephy_security_level_to_icon_name (security_level);
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry),
- GTK_ENTRY_ICON_SECONDARY,
+ GTK_ENTRY_ICON_PRIMARY,
icon_name);
}
@@ -1548,7 +1202,7 @@ ephy_location_entry_set_lock_tooltip (EphyLocationEntry *entry,
const char *tooltip)
{
gtk_entry_set_icon_tooltip_text (GTK_ENTRY (entry),
- GTK_ENTRY_ICON_SECONDARY,
+ GTK_ENTRY_ICON_PRIMARY,
tooltip);
}
diff --git a/lib/widgets/ephy-location-entry.h b/lib/widgets/ephy-location-entry.h
index 52fcfc6..2984bbc 100644
--- a/lib/widgets/ephy-location-entry.h
+++ b/lib/widgets/ephy-location-entry.h
@@ -64,11 +64,8 @@ void ephy_location_entry_undo_reset (EphyLocationEntry *entry);
void ephy_location_entry_activate (EphyLocationEntry *entry);
-void ephy_location_entry_set_favicon (EphyLocationEntry *entry,
- GdkPixbuf *pixbuf);
-
-void ephy_location_entry_set_show_favicon (EphyLocationEntry *entry,
- gboolean show_favicon);
+void ephy_location_entry_set_bookmarked_status (EphyLocationEntry *entry,
+ gboolean is_bookmarked);
void ephy_location_entry_set_security_level (EphyLocationEntry *entry,
EphySecurityLevel security_level);
diff --git a/src/Makefile.am b/src/Makefile.am
index 388b4ed..54d3c5a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -144,6 +144,8 @@ RESOURCE_FILES = \
resources/prefs-dialog.ui \
resources/prefs-lang-dialog.ui \
resources/shortcuts-dialog.ui \
+ resources/icons/ephy-bookmark-empty.svg \
+ resources/icons/ephy-bookmark-full.svg \
resources/gtk/bookmark-properties-grid.ui \
resources/gtk/bookmark-row.ui \
resources/gtk/bookmarks-popover.ui \
diff --git a/src/ephy-bookmark-properties-grid.c b/src/ephy-bookmark-properties-grid.c
index f202bff..ba76b77 100644
--- a/src/ephy-bookmark-properties-grid.c
+++ b/src/ephy-bookmark-properties-grid.c
@@ -207,6 +207,7 @@ ephy_bookmarks_properties_grid_actions_add_tag (GSimpleAction *action,
gtk_entry_set_text (GTK_ENTRY (self->add_tag_entry), "");
gtk_widget_set_sensitive (GTK_WIDGET (self->add_tag_button), FALSE);
+ gtk_widget_grab_focus (GTK_WIDGET (self->add_tag_entry));
}
static void
@@ -220,7 +221,10 @@ ephy_bookmarks_properties_grid_actions_remove_bookmark (GSimpleAction *action,
g_signal_emit_by_name (self->bookmark, "removed");
- gtk_widget_destroy (gtk_widget_get_parent (gtk_widget_get_parent (GTK_WIDGET (self))));
+ if (self->type == EPHY_BOOKMARK_PROPERTIES_GRID_TYPE_POPOVER)
+ gtk_widget_destroy (gtk_widget_get_parent (GTK_WIDGET (self)));
+ else
+ gtk_widget_destroy (gtk_widget_get_parent (gtk_widget_get_parent (GTK_WIDGET (self))));
}
static void
@@ -295,6 +299,15 @@ ephy_bookmark_properties_grid_constructed (GObject *object)
GSequenceIter *iter;
char *address;
+ /* Set appearance based on type */
+ if (self->type == EPHY_BOOKMARK_PROPERTIES_GRID_TYPE_DIALOG) {
+ gtk_container_remove (GTK_CONTAINER (self), self->popover_bookmark_label);
+ gtk_container_remove (GTK_CONTAINER (self), self->popover_tags_label);
+ } else if (self->type == EPHY_BOOKMARK_PROPERTIES_GRID_TYPE_POPOVER) {
+ gtk_grid_remove_column (GTK_GRID (self), 0);
+ gtk_container_remove (GTK_CONTAINER (self), self->address_entry);
+ }
+
/* Set text for name entry */
gtk_entry_set_text (GTK_ENTRY (self->name_entry),
ephy_bookmark_get_title (self->bookmark));
@@ -304,13 +317,15 @@ ephy_bookmark_properties_grid_constructed (GObject *object)
G_BINDING_DEFAULT);
/* Set text for address entry */
- address = get_address (ephy_bookmark_get_url (self->bookmark));
- gtk_entry_set_text (GTK_ENTRY (self->address_entry), address);
- g_free (address);
+ if (self->type == EPHY_BOOKMARK_PROPERTIES_GRID_TYPE_DIALOG) {
+ address = get_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",
- G_BINDING_DEFAULT);
+ g_object_bind_property (GTK_ENTRY (self->address_entry), "text",
+ self->bookmark, "url",
+ G_BINDING_DEFAULT);
+ }
/* Create tag widgets */
tags = ephy_bookmarks_manager_get_tags (manager);
@@ -400,13 +415,6 @@ ephy_bookmark_properties_grid_init (EphyBookmarkPropertiesGrid *self)
gtk_widget_init_template (GTK_WIDGET (self));
- if (self->type == EPHY_BOOKMARK_PROPERTIES_GRID_TYPE_DIALOG) {
- gtk_container_remove (GTK_CONTAINER (self), self->popover_bookmark_label);
- gtk_container_remove (GTK_CONTAINER (self), self->popover_tags_label);
- } else if (self->type == EPHY_BOOKMARK_PROPERTIES_GRID_TYPE_DIALOG) {
- gtk_grid_remove_column (GTK_GRID (self), 0);
- }
-
gtk_flow_box_set_sort_func (GTK_FLOW_BOX (self->tags_box),
(GtkFlowBoxSortFunc)flow_box_sort_func,
NULL, NULL);
diff --git a/src/ephy-bookmarks-manager.c b/src/ephy-bookmarks-manager.c
index 4988290..51489d1 100644
--- a/src/ephy-bookmarks-manager.c
+++ b/src/ephy-bookmarks-manager.c
@@ -253,6 +253,36 @@ ephy_bookmarks_manager_remove_bookmark (EphyBookmarksManager *self,
NULL);
}
+static int
+bookmark_with_url_compare (gpointer *ebookmark, gconstpointer url)
+{
+ EphyBookmark *bookmark = EPHY_BOOKMARK (ebookmark);
+ const char *bookmark_url;
+
+ bookmark_url = ephy_bookmark_get_url (bookmark);
+
+ return g_strcmp0 (bookmark_url, url);
+}
+
+EphyBookmark *
+ephy_bookmarks_manager_get_bookmark_by_url (EphyBookmarksManager *self,
+ const char *url)
+{
+ GList *bookmark_node;
+
+ g_return_val_if_fail (EPHY_IS_BOOKMARKS_MANAGER (self), FALSE);
+ g_return_val_if_fail (url != NULL, FALSE);
+
+ bookmark_node = g_list_find_custom (self->bookmarks,
+ url,
+ (GCompareFunc)bookmark_with_url_compare);
+
+ if (!bookmark_node)
+ return NULL;
+
+ return bookmark_node->data;
+}
+
void
ephy_bookmarks_manager_add_tag (EphyBookmarksManager *self, const char *tag)
{
diff --git a/src/ephy-bookmarks-manager.h b/src/ephy-bookmarks-manager.h
index 2bb6b89..4129b66 100644
--- a/src/ephy-bookmarks-manager.h
+++ b/src/ephy-bookmarks-manager.h
@@ -32,6 +32,8 @@ void ephy_bookmarks_manager_add_bookmark (EphyBookmarksManager
EphyBookmark *bookmark);
void ephy_bookmarks_manager_remove_bookmark (EphyBookmarksManager *self,
EphyBookmark *bookmark);
+EphyBookmark *ephy_bookmarks_manager_get_bookmark_by_url (EphyBookmarksManager *self,
+ const char *url);
void ephy_bookmarks_manager_add_tag (EphyBookmarksManager *self,
const char *tag);
diff --git a/src/ephy-bookmarks-popover.c b/src/ephy-bookmarks-popover.c
index 7c26d46..b86b308 100644
--- a/src/ephy-bookmarks-popover.c
+++ b/src/ephy-bookmarks-popover.c
@@ -267,9 +267,7 @@ ephy_bookmarks_popover_init (EphyBookmarksPopover *self)
GSequenceIter *iter;
GList *bookmarks;
GList *l;
- EphyBookmark *dummy_bookmark;
GSimpleActionGroup *group;
- int i;
gtk_widget_init_template (GTK_WIDGET (self));
@@ -280,15 +278,6 @@ ephy_bookmarks_popover_init (EphyBookmarksPopover *self)
G_ACTION_GROUP (group));
g_object_unref (group);
- for (i = 0; i < 1; i++) {
- dummy_bookmark = ephy_bookmark_new (g_strdup_printf ("https://www.duckduckgo.com/%d", i),
- g_strdup_printf ("DuckDuckGo %d", i),
- g_sequence_new (g_free));
- ephy_bookmarks_manager_add_tag (manager, g_strdup_printf ("Tag %d", i));
- ephy_bookmarks_manager_add_tag (manager, g_strdup_printf ("Favorite %d", i));
- ephy_bookmarks_manager_add_bookmark (manager, dummy_bookmark);
- }
-
gtk_list_box_bind_model (GTK_LIST_BOX (self->bookmarks_list_box),
G_LIST_MODEL (manager),
create_bookmark_row,
diff --git a/src/ephy-location-controller.c b/src/ephy-location-controller.c
index cef9802..150d51c 100644
--- a/src/ephy-location-controller.c
+++ b/src/ephy-location-controller.c
@@ -52,9 +52,7 @@ struct _EphyLocationController {
char *address;
EphyNode *smart_bmks;
EphyBookmarks *bookmarks;
- GdkPixbuf *icon;
guint editable : 1;
- guint show_icon : 1;
gboolean sync_address_is_blocked;
};
@@ -69,8 +67,6 @@ enum {
PROP_0,
PROP_ADDRESS,
PROP_EDITABLE,
- PROP_ICON,
- PROP_SHOW_ICON,
PROP_WINDOW,
PROP_LOCATION_ENTRY,
PROP_TITLE_BOX,
@@ -439,14 +435,6 @@ ephy_location_controller_constructed (GObject *object)
controller->location_entry, "editable",
G_BINDING_SYNC_CREATE);
- g_object_bind_property (controller, "icon",
- controller->location_entry, "favicon",
- G_BINDING_SYNC_CREATE);
-
- g_object_bind_property (controller, "show-icon",
- controller->location_entry, "show-favicon",
- G_BINDING_SYNC_CREATE);
-
g_signal_connect_object (widget, "drag-data-received",
G_CALLBACK (entry_drag_data_received_cb),
controller, 0);
@@ -482,15 +470,6 @@ ephy_location_controller_set_property (GObject *object,
case PROP_EDITABLE:
controller->editable = g_value_get_boolean (value);
break;
- case PROP_ICON:
- if (controller->icon != NULL) {
- g_object_unref (controller->icon);
- }
- controller->icon = GDK_PIXBUF (g_value_dup_object (value));
- break;
- case PROP_SHOW_ICON:
- controller->show_icon = g_value_get_boolean (value);
- break;
case PROP_WINDOW:
controller->window = EPHY_WINDOW (g_value_get_object (value));
break;
@@ -520,12 +499,6 @@ ephy_location_controller_get_property (GObject *object,
case PROP_EDITABLE:
g_value_set_boolean (value, controller->editable);
break;
- case PROP_ICON:
- g_value_set_object (value, controller->icon);
- break;
- case PROP_SHOW_ICON:
- g_value_set_boolean (value, controller->show_icon);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
@@ -608,30 +581,6 @@ ephy_location_controller_class_init (EphyLocationControllerClass *class)
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
/**
- * EphyLocationController:icon:
- *
- * The icon corresponding to the current location.
- */
- obj_properties[PROP_ICON] =
- g_param_spec_object ("icon",
- "Icon",
- "The icon corresponding to the current location",
- GDK_TYPE_PIXBUF,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
- /**
- * EphyLocationController:show-icon:
- *
- * If we should show the page icon.
- */
- obj_properties[PROP_SHOW_ICON] =
- g_param_spec_boolean ("show-icon",
- "Show Icon",
- "Whether to show the favicon",
- TRUE,
- G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
- /**
* EphyLocationController:window:
*
* The parent window.
@@ -788,10 +737,6 @@ ephy_location_controller_finalize (GObject *object)
{
EphyLocationController *controller = EPHY_LOCATION_CONTROLLER (object);
- if (controller->icon != NULL) {
- g_object_unref (controller->icon);
- }
-
g_list_free (controller->actions);
g_free (controller->address);
diff --git a/src/ephy-toolbar.c b/src/ephy-toolbar.c
index e76a371..768ff3c 100644
--- a/src/ephy-toolbar.c
+++ b/src/ephy-toolbar.c
@@ -22,6 +22,7 @@
#include "ephy-action-helper.h"
#include "ephy-bookmarks-popover.h"
+#include "ephy-bookmark-properties-grid.h"
#include "ephy-downloads-popover.h"
#include "ephy-downloads-progress-icon.h"
#include "ephy-embed.h"
@@ -35,6 +36,7 @@
#include "ephy-middle-clickable-button.h"
#include "ephy-private.h"
#include "ephy-shell.h"
+#include "ephy-type-builtins.h"
#include <glib/gi18n.h>
#include <webkit2/webkit2.h>
@@ -565,6 +567,41 @@ ephy_toolbar_change_combined_stop_reload_state (GSimpleAction *action,
}
static void
+add_bookmark_button_clicked_cb (EphyLocationEntry *entry,
+ gpointer *user_data)
+{
+ EphyBookmarksManager *manager = ephy_shell_get_bookmarks_manager (ephy_shell_get_default ());
+ EphyToolbar *toolbar = EPHY_TOOLBAR (user_data);
+ EphyEmbed *embed;
+ GtkWidget *popover;
+ GdkRectangle rectangle;
+ EphyBookmark *bookmark;
+ const char *location;
+
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (toolbar->window));
+
+ location = ephy_web_view_get_address (ephy_embed_get_web_view (embed));
+ bookmark = ephy_bookmarks_manager_get_bookmark_by_url (manager, location);
+ if (!bookmark) {
+ bookmark = ephy_bookmark_new (g_strdup (location),
+ g_strdup (ephy_embed_get_title (embed)),
+ g_sequence_new (g_free));
+ ephy_bookmarks_manager_add_bookmark (manager, bookmark);
+ ephy_location_entry_set_bookmarked_status (entry, TRUE);
+ }
+
+ popover = gtk_popover_new (GTK_WIDGET (entry));
+ gtk_entry_get_icon_area (GTK_ENTRY (entry),
+ GTK_ENTRY_ICON_SECONDARY,
+ &rectangle);
+ gtk_popover_set_pointing_to (GTK_POPOVER (popover), &rectangle);
+ gtk_container_add (GTK_CONTAINER (popover),
+ ephy_bookmark_properties_grid_new (bookmark,
EPHY_BOOKMARK_PROPERTIES_GRID_TYPE_POPOVER));
+ gtk_widget_show (popover);
+}
+
+static void
ephy_toolbar_constructed (GObject *object)
{
EphyToolbar *toolbar = EPHY_TOOLBAR (object);
@@ -652,6 +689,12 @@ ephy_toolbar_constructed (GObject *object)
gtk_header_bar_set_custom_title (GTK_HEADER_BAR (toolbar), GTK_WIDGET (toolbar->title_box));
gtk_widget_show (GTK_WIDGET (toolbar->title_box));
+ g_signal_connect_object (toolbar->entry,
+ "bookmark-clicked",
+ G_CALLBACK (add_bookmark_button_clicked_cb),
+ toolbar,
+ 0);
+
/* Page Menu */
button = gtk_menu_button_new ();
toolbar->page_menu_button = button;
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 4621be3..a637876 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -23,6 +23,7 @@
#include "ephy-action-helper.h"
#include "ephy-bookmarks-ui.h"
+#include "ephy-bookmarks-manager.h"
#include "ephy-debug.h"
#include "ephy-embed-container.h"
#include "ephy-embed-prefs.h"
@@ -1029,6 +1030,7 @@ sync_tab_address (EphyWebView *view,
location = calculate_location (typed_address, address);
ephy_window_set_location (window, location);
+
g_free (location);
}
@@ -1107,20 +1109,6 @@ sync_tab_document_type (EphyWebView *view,
}
static void
-sync_tab_icon (EphyWebView *view,
- GParamSpec *pspec,
- EphyWindow *window)
-{
- GdkPixbuf *icon;
-
- if (window->closing) return;
-
- icon = ephy_web_view_get_icon (view);
-
- g_object_set (window->location_controller, "icon", icon, NULL);
-}
-
-static void
_ephy_window_set_navigation_flags (EphyWindow *window,
EphyWebViewNavigationFlags flags)
{
@@ -1159,6 +1147,25 @@ sync_tab_is_blank (EphyWebView *view,
}
static void
+sync_tab_bookmarked_status (EphyWebView *view,
+ GParamSpec *pspec,
+ EphyWindow *window)
+{
+ EphyBookmarksManager *manager = ephy_shell_get_bookmarks_manager (ephy_shell_get_default ());
+ GtkWidget *entry;
+ EphyBookmark *bookmark;
+ const char *address;
+
+ entry = ephy_toolbar_get_location_entry (EPHY_TOOLBAR (window->toolbar));
+ address = ephy_web_view_get_address (view);
+
+ if (address)
+ bookmark = ephy_bookmarks_manager_get_bookmark_by_url (manager, address);
+ ephy_location_entry_set_bookmarked_status (EPHY_LOCATION_ENTRY (entry),
+ bookmark != NULL);
+}
+
+static void
sync_tab_popup_windows (EphyWebView *view,
GParamSpec *pspec,
EphyWindow *window)
@@ -2073,8 +2080,8 @@ ephy_window_connect_active_embed (EphyWindow *window)
sync_tab_is_blank (view, NULL, window);
sync_tab_navigation (view, NULL, window);
sync_tab_title (embed, NULL, window);
+ sync_tab_bookmarked_status (view, NULL, window);
sync_tab_address (view, NULL, window);
- sync_tab_icon (view, NULL, window);
sync_tab_popup_windows (view, NULL, window);
sync_tab_popups_allowed (view, NULL, window);
@@ -2090,6 +2097,7 @@ ephy_window_connect_active_embed (EphyWindow *window)
g_signal_connect_object (web_view, "decide-policy",
G_CALLBACK (decide_policy_cb),
window, 0);
+
g_signal_connect_object (view, "notify::hidden-popup-count",
G_CALLBACK (sync_tab_popup_windows),
window, 0);
@@ -2100,10 +2108,10 @@ ephy_window_connect_active_embed (EphyWindow *window)
G_CALLBACK (sync_tab_title),
window, 0);
g_signal_connect_object (view, "notify::address",
- G_CALLBACK (sync_tab_address),
+ G_CALLBACK (sync_tab_bookmarked_status),
window, 0);
- g_signal_connect_object (view, "notify::icon",
- G_CALLBACK (sync_tab_icon),
+ g_signal_connect_object (view, "notify::address",
+ G_CALLBACK (sync_tab_address),
window, 0);
g_signal_connect_object (view, "notify::security-level",
G_CALLBACK (sync_tab_security),
@@ -2182,9 +2190,6 @@ ephy_window_disconnect_active_embed (EphyWindow *window)
g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (sync_tab_address),
window);
- g_signal_handlers_disconnect_by_func (view,
- G_CALLBACK (sync_tab_icon),
- window);
g_signal_handlers_disconnect_by_func
(view, G_CALLBACK (ephy_window_dom_mouse_click_cb), window);
@@ -2801,7 +2806,7 @@ location_controller_lock_clicked_cb (EphyLocationController *controller,
GdkRectangle lock_position;
location_entry = ephy_toolbar_get_location_entry (EPHY_TOOLBAR (window->toolbar));
- gtk_entry_get_icon_area (GTK_ENTRY (location_entry), GTK_ENTRY_ICON_SECONDARY, &lock_position);
+ gtk_entry_get_icon_area (GTK_ENTRY (location_entry), GTK_ENTRY_ICON_PRIMARY, &lock_position);
open_security_popover (window, location_entry, &lock_position);
}
diff --git a/src/epiphany.gresource.xml b/src/epiphany.gresource.xml
index f8012c7..566c435 100644
--- a/src/epiphany.gresource.xml
+++ b/src/epiphany.gresource.xml
@@ -12,6 +12,8 @@
<file preprocess="xml-stripblanks" compressed="true">history-dialog.ui</file>
<file preprocess="xml-stripblanks" compressed="true">passwords-dialog.ui</file>
<file preprocess="xml-stripblanks" compressed="true">shortcuts-dialog.ui</file>
+ <file preprocess="xml-stripblanks" compressed="true">icons/ephy-bookmark-empty.svg</file>
+ <file preprocess="xml-stripblanks" compressed="true">icons/ephy-bookmark-full.svg</file>
<file preprocess="xml-stripblanks" compressed="true">gtk/bookmark-properties-grid.ui</file>
<file preprocess="xml-stripblanks" compressed="true">gtk/bookmark-row.ui</file>
<file preprocess="xml-stripblanks" compressed="true">gtk/bookmarks-popover.ui</file>
diff --git a/src/resources/gtk/bookmark-properties-grid.ui b/src/resources/gtk/bookmark-properties-grid.ui
index 4a9cdf5..d3c640a 100644
--- a/src/resources/gtk/bookmark-properties-grid.ui
+++ b/src/resources/gtk/bookmark-properties-grid.ui
@@ -10,7 +10,10 @@
<child>
<object class="GtkLabel" id="popover_bookmark_label">
<property name="label" translatable="yes">Bookmark</property>
- <property name="visible">false</property>
+ <property name="visible">true</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
<property name="left-attach">0</property>
@@ -35,6 +38,9 @@
</child>
<child>
<object class="GtkEntry" id="name_entry">
+ <property name="max-length">40</property>
+ <property name="max-width-chars">40</property>
+ <property name="width-chars">40</property>
<property name="visible">true</property>
</object>
<packing>
@@ -71,7 +77,10 @@
<property name="halign">start</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Tags</property>
- <property name="visible">false</property>
+ <property name="visible">true</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
<style>
<class name="dim-label"/>
</style>
@@ -99,7 +108,7 @@
<child>
<object class="GtkScrolledWindow">
<property name="valign">start</property>
- <property name="min-content-height">40</property>
+ <property name="min-content-height">38</property>
<property name="max-content-height">132</property>
<property name="hscrollbar-policy">never</property>
<property name="visible">true</property>
@@ -110,7 +119,7 @@
<property name="selection-mode">none</property>
<property name="homogeneous">true</property>
<property name="valign">start</property>
- <property name="min-children-per-line">2</property>
+ <property name="min-children-per-line">3</property>
<property name="max-children-per-line">3</property>
<property name="visible">true</property>
</object>
@@ -158,6 +167,7 @@
<property name="action-name">grid.remove-bookmark</property>
<property name="use-underline">true</property>
<property name="halign">end</property>
+ <property name="valign">end</property>
<property name="visible">true</property>
<style>
<class name="destructive-action"/>
diff --git a/src/resources/gtk/bookmarks-popover.ui b/src/resources/gtk/bookmarks-popover.ui
index b36a5f5..3e744a5 100644
--- a/src/resources/gtk/bookmarks-popover.ui
+++ b/src/resources/gtk/bookmarks-popover.ui
@@ -21,6 +21,8 @@
<property name="visible">true</property>
<child>
<object class="GtkStackSwitcher">
+ <property name="hexpand">true</property>
+ <property name="halign">center</property>
<property name="stack">stack</property>
<property name="visible">true</property>
</object>
diff --git a/src/resources/icons/ephy-bookmark-empty.svg b/src/resources/icons/ephy-bookmark-empty.svg
new file mode 100644
index 0000000..8a9393c
--- /dev/null
+++ b/src/resources/icons/ephy-bookmark-empty.svg
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16.003492"
+ height="16"
+ viewBox="0 0 16.003493 16"
+ id="svg7221"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="ephy-bookmark-empty.svg">
+ <defs
+ id="defs7223" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="16"
+ inkscape:cx="22.832423"
+ inkscape:cy="16.612781"
+ inkscape:document-units="px"
+ inkscape:current-layer="g7894"
+ showgrid="false"
+ units="px"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:showpageshadow="false"
+ inkscape:window-width="1366"
+ inkscape:window-height="704"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-midpoints="false"
+ inkscape:snap-nodes="false">
+ <inkscape:grid
+ type="xygrid"
+ id="grid7856" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7226">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-366.99825,-524.3622)">
+ <g
+ id="g7884">
+ <g
+ id="g7890">
+ <g
+ id="g7894"
+ inkscape:label="tag">
+ <rect
+
style="opacity:1;fill:#eaeaea;fill-opacity:0;stroke:#910f0f;stroke-width:0;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect7821"
+ width="15.99999"
+ height="15.99999"
+ x="366.99826"
+ y="524.36218" />
+ <g
+ style="display:inline"
+ transform="translate(138.99845,-471.63782)"
+ inkscape:label="non-starred"
+ id="g14631">
+ <g
+ id="g14633"
+ inkscape:label="folder-remote">
+ <rect
+
style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:none;stroke:none;stroke-width:2;marker:none;enable-background:accumulate"
+ id="rect14635"
+ width="16"
+ height="16"
+ x="227.9998"
+ y="996" />
+ </g>
+ <path
+ inkscape:transform-center-y="-0.62095852"
+ inkscape:transform-center-x="-0.0087922894"
+ transform="matrix(0.96977421,-0.00778823,0.00807134,0.935758,-276.43773,838.84297)"
+ d="m 530.9488,186.70897 c -0.77941,0.55189 -3.15759,-1.90601 -4.11253,-1.9179
-0.95532,-0.0119 -3.39494,2.38585 -4.16096,1.8149 -0.76573,-0.57072 0.83698,-3.59203 0.55319,-4.50391
-0.2839,-0.91223 -3.31818,-2.49151 -3.01189,-3.39647 0.30617,-0.90461 3.67487,-0.31399 4.45442,-0.86567
0.77986,-0.5519 1.3442,-3.92569 2.29952,-3.91404 0.95494,0.0116 1.43421,3.39798 2.19979,3.9689
0.76588,0.57114 4.14893,0.0653 4.43307,0.97746 0.28402,0.9118 -2.78848,2.41405 -3.09488,3.31858
-0.30652,0.90489 1.21999,3.96605 0.44027,4.51815 z"
+ inkscape:randomized="0"
+ inkscape:rounded="0.2104596"
+ inkscape:flatsided="false"
+ sodipodi:arg2="1.5829876"
+ sodipodi:arg1="0.95492637"
+ sodipodi:r2="3.8276224"
+ sodipodi:r1="7.0383992"
+ sodipodi:cy="180.96373"
+ sodipodi:cx="526.88293"
+ sodipodi:sides="5"
+ id="path14637"
+
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#919191;stroke-width:1.04970646;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker:none;enable-background:accumulate"
+ sodipodi:type="star" />
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/src/resources/icons/ephy-bookmark-full.svg b/src/resources/icons/ephy-bookmark-full.svg
new file mode 100644
index 0000000..cde4232
--- /dev/null
+++ b/src/resources/icons/ephy-bookmark-full.svg
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16.003492"
+ height="16"
+ viewBox="0 0 16.003493 16"
+ id="svg7221"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="ephy-bookmark-full.svg">
+ <defs
+ id="defs7223" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="16"
+ inkscape:cx="22.832423"
+ inkscape:cy="16.612781"
+ inkscape:document-units="px"
+ inkscape:current-layer="g7894"
+ showgrid="false"
+ units="px"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:showpageshadow="false"
+ inkscape:window-width="1366"
+ inkscape:window-height="704"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-midpoints="false"
+ inkscape:snap-nodes="false">
+ <inkscape:grid
+ type="xygrid"
+ id="grid7856" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7226">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-366.99825,-524.3622)">
+ <g
+ id="g7884">
+ <g
+ id="g7890">
+ <g
+ id="g7894"
+ inkscape:label="tag">
+ <rect
+
style="opacity:1;fill:#eaeaea;fill-opacity:0;stroke:#910f0f;stroke-width:0;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect7821"
+ width="15.99999"
+ height="15.99999"
+ x="366.99826"
+ y="524.36218" />
+ <g
+ style="display:inline"
+ transform="translate(138.99845,-471.63782)"
+ inkscape:label="non-starred"
+ id="g23070">
+ <g
+ id="g23072"
+ inkscape:label="folder-remote">
+ <rect
+
style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:none;stroke:none;stroke-width:2;marker:none;enable-background:accumulate"
+ id="rect23074"
+ width="16"
+ height="16"
+ x="227.9998"
+ y="996" />
+ </g>
+ <path
+ inkscape:transform-center-y="-0.62095852"
+ inkscape:transform-center-x="-0.0087922894"
+ transform="matrix(0.96977421,-0.00778823,0.00807134,0.935758,-276.43773,838.84297)"
+ d="m 530.9488,186.70897 c -0.77941,0.55189 -3.15759,-1.90601 -4.11253,-1.9179
-0.95532,-0.0119 -3.39494,2.38585 -4.16096,1.8149 -0.76573,-0.57072 0.83698,-3.59203 0.55319,-4.50391
-0.2839,-0.91223 -3.31818,-2.49151 -3.01189,-3.39647 0.30617,-0.90461 3.67487,-0.31399 4.45442,-0.86567
0.77986,-0.5519 1.3442,-3.92569 2.29952,-3.91404 0.95494,0.0116 1.43421,3.39798 2.19979,3.9689
0.76588,0.57114 4.14893,0.0653 4.43307,0.97746 0.28402,0.9118 -2.78848,2.41405 -3.09488,3.31858
-0.30652,0.90489 1.21999,3.96605 0.44027,4.51815 z"
+ inkscape:randomized="0"
+ inkscape:rounded="0.2104596"
+ inkscape:flatsided="false"
+ sodipodi:arg2="1.5829876"
+ sodipodi:arg1="0.95492637"
+ sodipodi:r2="3.8276224"
+ sodipodi:r1="7.0383992"
+ sodipodi:cy="180.96373"
+ sodipodi:cx="526.88293"
+ sodipodi:sides="5"
+ id="path23076"
+
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#fce94f;stroke:#c4a000;stroke-width:1.04970646;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker:none;enable-background:accumulate"
+ sodipodi:type="star" />
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+</svg>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]