summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/ephy-add-bookmark-popover.c87
-rw-r--r--src/bookmarks/ephy-add-bookmark-popover.h3
-rw-r--r--src/ephy-action-bar-end.c60
-rw-r--r--src/ephy-action-bar-end.h8
-rw-r--r--src/ephy-action-bar.c5
-rw-r--r--src/ephy-header-bar.c12
-rw-r--r--src/ephy-window.c28
-rw-r--r--src/ephy-window.h4
-rw-r--r--src/resources/ephy-bookmarks-symbolic.svg83
-rw-r--r--src/resources/ephy-library-symbolic.svg117
-rw-r--r--src/resources/epiphany.gresource.xml2
-rw-r--r--src/resources/gtk/action-bar-end.ui22
12 files changed, 302 insertions, 129 deletions
diff --git a/src/bookmarks/ephy-add-bookmark-popover.c b/src/bookmarks/ephy-add-bookmark-popover.c
index 1fd476c83..3977f486c 100644
--- a/src/bookmarks/ephy-add-bookmark-popover.c
+++ b/src/bookmarks/ephy-add-bookmark-popover.c
@@ -35,17 +35,26 @@ struct _EphyAddBookmarkPopover {
char *address;
GtkWidget *grid;
- EphyHeaderBar *header_bar;
+ GtkWidget *relative_to;
+ GtkWindow *window;
};
G_DEFINE_TYPE (EphyAddBookmarkPopover, ephy_add_bookmark_popover, GTK_TYPE_POPOVER)
enum {
PROP_0,
- PROP_HEADER_BAR,
+ PROP_RELATIVE_TO,
+ PROP_WINDOW,
LAST_PROP
};
+enum signalsEnum {
+ UPDATE_STATE,
+ LAST_SIGNAL
+};
+
+static gint signals[LAST_SIGNAL] = { 0 };
+
static GParamSpec *obj_properties[LAST_PROP];
static void
@@ -57,8 +66,11 @@ ephy_bookmarks_popover_set_property (GObject *object,
EphyAddBookmarkPopover *self = EPHY_ADD_BOOKMARK_POPOVER (object);
switch (prop_id) {
- case PROP_HEADER_BAR:
- self->header_bar = g_value_get_object (value);
+ case PROP_RELATIVE_TO:
+ self->relative_to = g_value_get_object (value);
+ break;
+ case PROP_WINDOW:
+ self->window = g_value_get_object (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -80,16 +92,10 @@ static void
ephy_add_bookmark_popover_constructed (GObject *object)
{
EphyAddBookmarkPopover *self = EPHY_ADD_BOOKMARK_POPOVER (object);
- GtkWidget *location_entry;
- GtkWidget *bookmark;
G_OBJECT_CLASS (ephy_add_bookmark_popover_parent_class)->constructed (object);
- location_entry = GTK_WIDGET (ephy_header_bar_get_title_widget (self->header_bar));
- g_assert (EPHY_IS_LOCATION_ENTRY (location_entry));
- bookmark = ephy_location_entry_get_bookmark_widget (EPHY_LOCATION_ENTRY (location_entry));
-
- gtk_popover_set_relative_to (GTK_POPOVER (self), bookmark);
+ gtk_popover_set_relative_to (GTK_POPOVER (self), self->relative_to);
}
static void
@@ -101,14 +107,34 @@ ephy_add_bookmark_popover_class_init (EphyAddBookmarkPopoverClass *klass)
object_class->finalize = ephy_add_bookmark_popover_finalize;
object_class->constructed = ephy_add_bookmark_popover_constructed;
- obj_properties[PROP_HEADER_BAR] =
- g_param_spec_object ("header-bar",
- "An EphyHeaderBar object",
- "The popover's parent EphyHeaderBar",
- EPHY_TYPE_HEADER_BAR,
+ obj_properties[PROP_RELATIVE_TO] =
+ g_param_spec_object ("relative-to",
+ "A GtkWidget object",
+ "The popover's parent widget",
+ GTK_TYPE_WIDGET,
+ G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
+ obj_properties[PROP_WINDOW] =
+ g_param_spec_object ("window",
+ "A GtkWidget object",
+ "The popover's parent window",
+ GTK_TYPE_WIDGET,
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, LAST_PROP, obj_properties);
+
+ /**
+ * EphAddBookmarkPopover::update-state:
+ * @entry: the object on which the signal is emitted
+ *
+ * Emitted when the bookmark state changes
+ *
+ */
+ signals[UPDATE_STATE] = g_signal_new ("update-state", G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_FIRST | G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL, NULL,
+ G_TYPE_NONE,
+ 1,
+ G_TYPE_INT);
}
static void
@@ -145,12 +171,12 @@ ephy_add_bookmark_popover_init (EphyAddBookmarkPopover *self)
}
GtkWidget *
-ephy_add_bookmark_popover_new (EphyHeaderBar *header_bar)
+ephy_add_bookmark_popover_new (GtkWidget *relative_to,
+ GtkWidget *window)
{
- g_assert (EPHY_IS_HEADER_BAR (header_bar));
-
return g_object_new (EPHY_TYPE_ADD_BOOKMARK_POPOVER,
- "header-bar", header_bar,
+ "relative-to", relative_to,
+ "window", window,
NULL);
}
@@ -167,8 +193,6 @@ ephy_add_bookmark_popover_update_bookmarked_status_cb (EphyAddBookmarkPopover *s
EphyBookmark *bookmark,
EphyBookmarksManager *manager)
{
- GtkWidget *location_entry;
- EphyWindow *window;
EphyEmbed *embed;
EphyWebView *view;
const char *address;
@@ -177,17 +201,13 @@ ephy_add_bookmark_popover_update_bookmarked_status_cb (EphyAddBookmarkPopover *s
g_assert (EPHY_IS_BOOKMARK (bookmark));
g_assert (EPHY_IS_BOOKMARKS_MANAGER (manager));
- location_entry = GTK_WIDGET (ephy_header_bar_get_title_widget (self->header_bar));
- window = ephy_header_bar_get_window (self->header_bar);
- embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (self->window));
view = ephy_embed_get_web_view (embed);
address = ephy_web_view_get_address (view);
- if (g_strcmp0 (ephy_bookmark_get_url (bookmark), address) == 0) {
- ephy_location_entry_set_bookmark_icon_state (EPHY_LOCATION_ENTRY (location_entry),
- EPHY_LOCATION_ENTRY_BOOKMARK_ICON_EMPTY);
- }
+ if (g_strcmp0 (ephy_bookmark_get_url (bookmark), address) == 0)
+ g_signal_emit (self, signals[UPDATE_STATE], 0, EPHY_BOOKMARK_ICON_EMPTY);
ephy_bookmarks_manager_save (manager,
ephy_bookmarks_manager_save_warn_on_error_cancellable (manager),
@@ -202,15 +222,11 @@ ephy_add_bookmark_popover_show (EphyAddBookmarkPopover *self)
{
EphyBookmarksManager *manager;
EphyBookmark *bookmark;
- EphyWindow *window;
- EphyLocationEntry *location_entry;
EphyEmbed *embed;
const char *address;
manager = ephy_shell_get_bookmarks_manager (ephy_shell_get_default ());
- location_entry = EPHY_LOCATION_ENTRY (ephy_header_bar_get_title_widget (self->header_bar));
- window = ephy_header_bar_get_window (self->header_bar);
- embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (self->window));
address = ephy_web_view_get_address (ephy_embed_get_web_view (embed));
@@ -226,8 +242,7 @@ ephy_add_bookmark_popover_show (EphyAddBookmarkPopover *self)
id);
ephy_bookmarks_manager_add_bookmark (manager, new_bookmark);
- ephy_location_entry_set_bookmark_icon_state (location_entry,
- EPHY_LOCATION_ENTRY_BOOKMARK_ICON_BOOKMARKED);
+ g_signal_emit (self, signals[UPDATE_STATE], 0, EPHY_BOOKMARK_ICON_BOOKMARKED);
bookmark = new_bookmark;
}
diff --git a/src/bookmarks/ephy-add-bookmark-popover.h b/src/bookmarks/ephy-add-bookmark-popover.h
index 41d19dee8..3dc5066ca 100644
--- a/src/bookmarks/ephy-add-bookmark-popover.h
+++ b/src/bookmarks/ephy-add-bookmark-popover.h
@@ -30,7 +30,8 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (EphyAddBookmarkPopover, ephy_add_bookmark_popover, EPHY, ADD_BOOKMARK_POPOVER, GtkPopover)
-GtkWidget *ephy_add_bookmark_popover_new (EphyHeaderBar *header_bar);
+GtkWidget *ephy_add_bookmark_popover_new (GtkWidget *relative_to,
+ GtkWidget *window);
void ephy_add_bookmark_popover_show (EphyAddBookmarkPopover *self);
diff --git a/src/ephy-action-bar-end.c b/src/ephy-action-bar-end.c
index 7775e0ce2..8fee25dec 100644
--- a/src/ephy-action-bar-end.c
+++ b/src/ephy-action-bar-end.c
@@ -20,9 +20,11 @@
*/
#include "ephy-action-bar-end.h"
+#include "ephy-add-bookmark-popover.h"
#include "ephy-desktop-utils.h"
#include "ephy-downloads-popover.h"
#include "ephy-downloads-progress-icon.h"
+#include "ephy-location-entry.h"
#include "ephy-shell.h"
#include "ephy-window.h"
@@ -33,6 +35,8 @@
struct _EphyActionBarEnd {
GtkBox parent_instance;
+ GtkWidget *bookmark_button;
+ GtkWidget *bookmark_image;
GtkWidget *bookmarks_button;
GtkWidget *downloads_revealer;
GtkWidget *downloads_button;
@@ -229,6 +233,12 @@ ephy_action_bar_end_class_init (EphyActionBarEndClass *klass)
gtk_widget_class_bind_template_child (widget_class,
EphyActionBarEnd,
+ bookmark_button);
+ gtk_widget_class_bind_template_child (widget_class,
+ EphyActionBarEnd,
+ bookmark_image);
+ gtk_widget_class_bind_template_child (widget_class,
+ EphyActionBarEnd,
bookmarks_button);
gtk_widget_class_bind_template_child (widget_class,
EphyActionBarEnd,
@@ -245,6 +255,17 @@ ephy_action_bar_end_class_init (EphyActionBarEndClass *klass)
}
static void
+add_bookmark_button_clicked_cb (EphyActionBarEnd *action_bar_end)
+{
+ GtkWidget *window = gtk_widget_get_toplevel (GTK_WIDGET (action_bar_end->bookmark_button));
+ GtkWidget *popover = ephy_add_bookmark_popover_new (GTK_WIDGET (action_bar_end->bookmark_button), window);
+
+ g_signal_connect_object (popover, "update-state", G_CALLBACK (ephy_window_sync_bookmark_state), action_bar_end, G_CONNECT_SWAPPED);
+
+ ephy_add_bookmark_popover_show (EPHY_ADD_BOOKMARK_POPOVER (popover));
+}
+
+static void
ephy_action_bar_end_init (EphyActionBarEnd *action_bar_end)
{
GObject *object = G_OBJECT (action_bar_end);
@@ -292,6 +313,10 @@ ephy_action_bar_end_init (EphyActionBarEnd *action_bar_end)
g_signal_connect_object (downloads_manager, "show-downloads",
G_CALLBACK (show_downloads_cb),
object, 0);
+
+ g_signal_connect_object (action_bar_end->bookmark_button, "clicked",
+ G_CALLBACK (add_bookmark_button_clicked_cb), action_bar_end,
+ G_CONNECT_SWAPPED);
}
EphyActionBarEnd *
@@ -319,3 +344,38 @@ ephy_action_bar_end_get_downloads_revealer (EphyActionBarEnd *action_bar_end)
{
return action_bar_end->downloads_revealer;
}
+
+void
+ephy_action_bar_end_set_show_bookmark_button (EphyActionBarEnd *action_bar_end,
+ gboolean show)
+{
+ gtk_widget_set_visible (action_bar_end->bookmark_button, show);
+}
+
+
+void
+ephy_action_bar_end_set_bookmark_icon_state (EphyActionBarEnd *action_bar_end,
+ EphyBookmarkIconState state)
+{
+ g_assert (EPHY_IS_ACTION_BAR_END (action_bar_end));
+
+ switch (state) {
+ case EPHY_BOOKMARK_ICON_HIDDEN:
+ gtk_widget_set_visible (action_bar_end->bookmark_button, FALSE);
+ break;
+ case EPHY_BOOKMARK_ICON_EMPTY:
+ gtk_widget_set_visible (action_bar_end->bookmark_button, TRUE);
+ gtk_image_set_from_icon_name (GTK_IMAGE (action_bar_end->bookmark_image),
+ "non-starred-symbolic",
+ GTK_ICON_SIZE_BUTTON);
+ break;
+ case EPHY_BOOKMARK_ICON_BOOKMARKED:
+ gtk_widget_set_visible (action_bar_end->bookmark_button, TRUE);
+ gtk_image_set_from_icon_name (GTK_IMAGE (action_bar_end->bookmark_image),
+ "starred-symbolic",
+ GTK_ICON_SIZE_BUTTON);
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+}
diff --git a/src/ephy-action-bar-end.h b/src/ephy-action-bar-end.h
index a0d397bc9..81bab0b0d 100644
--- a/src/ephy-action-bar-end.h
+++ b/src/ephy-action-bar-end.h
@@ -21,6 +21,8 @@
#pragma once
+#include "ephy-bookmark-states.h"
+
#include <gtk/gtk.h>
G_BEGIN_DECLS
@@ -34,4 +36,10 @@ void ephy_action_bar_end_set_show_bookmarks_button (EphyActionBarEn
gboolean show);
GtkWidget *ephy_action_bar_end_get_downloads_revealer (EphyActionBarEnd *action_bar_end);
+void ephy_action_bar_end_set_show_bookmark_button (EphyActionBarEnd *action_bar_end,
+ gboolean show);
+
+void ephy_action_bar_end_set_bookmark_icon_state (EphyActionBarEnd *action_bar_end,
+ EphyBookmarkIconState state);
+
G_END_DECLS
diff --git a/src/ephy-action-bar.c b/src/ephy-action-bar.c
index c28ce6bac..a1d89fb56 100644
--- a/src/ephy-action-bar.c
+++ b/src/ephy-action-bar.c
@@ -20,6 +20,8 @@
*/
#include "ephy-action-bar.h"
+#include "ephy-add-bookmark-popover.h"
+#include "ephy-location-entry.h"
#include "ephy-pages-button.h"
#include "ephy-pages-popover.h"
#include "ephy-settings.h"
@@ -224,6 +226,9 @@ void
ephy_action_bar_set_adaptive_mode (EphyActionBar *action_bar,
EphyAdaptiveMode adaptive_mode)
{
+ ephy_action_bar_end_set_show_bookmark_button (action_bar->action_bar_end,
+ adaptive_mode == EPHY_ADAPTIVE_MODE_NARROW);
+
switch (adaptive_mode) {
case EPHY_ADAPTIVE_MODE_NORMAL:
gtk_revealer_set_reveal_child (GTK_REVEALER (action_bar), FALSE);
diff --git a/src/ephy-header-bar.c b/src/ephy-header-bar.c
index a248b0ef9..c2c9f22bf 100644
--- a/src/ephy-header-bar.c
+++ b/src/ephy-header-bar.c
@@ -236,8 +236,11 @@ ephy_header_bar_constructed (GObject *object)
gtk_widget_show (GTK_WIDGET (header_bar->title_widget));
if (EPHY_IS_LOCATION_ENTRY (header_bar->title_widget)) {
- ephy_location_entry_set_add_bookmark_popover (EPHY_LOCATION_ENTRY (header_bar->title_widget),
- GTK_POPOVER (ephy_add_bookmark_popover_new (header_bar)));
+ EphyLocationEntry *lentry = EPHY_LOCATION_ENTRY (header_bar->title_widget);
+ GtkWidget *popover = ephy_add_bookmark_popover_new (ephy_location_entry_get_bookmark_widget (lentry), GTK_WIDGET (header_bar->window));
+
+ g_signal_connect_object (popover, "update-state", G_CALLBACK (ephy_window_sync_bookmark_state), header_bar, G_CONNECT_SWAPPED);
+ ephy_location_entry_set_add_bookmark_popover (lentry, GTK_POPOVER (popover));
g_signal_connect_object (header_bar->title_widget,
"bookmark-clicked",
@@ -417,6 +420,9 @@ void
ephy_header_bar_set_adaptive_mode (EphyHeaderBar *header_bar,
EphyAdaptiveMode adaptive_mode)
{
+ ephy_action_bar_end_set_show_bookmark_button (header_bar->action_bar_end,
+ adaptive_mode == EPHY_ADAPTIVE_MODE_NARROW);
+
switch (adaptive_mode) {
case EPHY_ADAPTIVE_MODE_NORMAL:
gtk_revealer_set_reveal_child (GTK_REVEALER (header_bar->start_revealer), TRUE);
@@ -433,7 +439,7 @@ ephy_header_bar_set_adaptive_mode (EphyHeaderBar *header_bar,
}
if (ephy_embed_shell_get_mode (ephy_embed_shell_get_default ()) != EPHY_EMBED_SHELL_MODE_APPLICATION)
- ephy_location_entry_set_mobile_popdown (EPHY_LOCATION_ENTRY (header_bar->title_widget), adaptive_mode == EPHY_ADAPTIVE_MODE_NARROW);
+ ephy_location_entry_set_mobile_mode (EPHY_LOCATION_ENTRY (header_bar->title_widget), adaptive_mode == EPHY_ADAPTIVE_MODE_NARROW);
}
void
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 7f4cefa8a..a12057048 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -26,6 +26,7 @@
#include "ephy-action-bar.h"
#include "ephy-action-helper.h"
+#include "ephy-bookmark-states.h"
#include "ephy-bookmarks-manager.h"
#include "ephy-debug.h"
#include "ephy-desktop-utils.h"
@@ -1221,15 +1222,33 @@ sync_tab_is_blank (EphyWebView *view,
ephy_web_view_get_is_blank (view));
}
+void ephy_window_sync_bookmark_state (GtkWidget *widget,
+ EphyBookmarkIconState state)
+{
+ GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (widget));
+ EphyWindow *window = EPHY_WINDOW (toplevel);
+ EphyActionBarEnd *action_bar_end = ephy_action_bar_get_action_bar_end (EPHY_ACTION_BAR (window->action_bar));
+ GtkWidget *lentry;
+
+ if (action_bar_end)
+ ephy_action_bar_end_set_bookmark_icon_state (EPHY_ACTION_BAR_END (action_bar_end), state);
+
+ lentry = GTK_WIDGET (ephy_header_bar_get_title_widget (EPHY_HEADER_BAR (window->header_bar)));
+
+ if (EPHY_IS_LOCATION_ENTRY (lentry))
+ ephy_location_entry_set_bookmark_icon_state (EPHY_LOCATION_ENTRY (lentry), state);
+}
+
static void
sync_tab_bookmarked_status (EphyWebView *view,
GParamSpec *pspec,
EphyWindow *window)
{
+ EphyActionBarEnd *action_bar_end = ephy_action_bar_get_action_bar_end (EPHY_ACTION_BAR (window->action_bar));
EphyBookmarksManager *manager = ephy_shell_get_bookmarks_manager (ephy_shell_get_default ());
EphyEmbedShell *shell = ephy_embed_shell_get_default ();
EphyEmbedShellMode mode;
- EphyLocationEntryBookmarkIconState state;
+ EphyBookmarkIconState state;
GtkWidget *widget;
EphyBookmark *bookmark;
const char *address;
@@ -1246,13 +1265,14 @@ sync_tab_bookmarked_status (EphyWebView *view,
ephy_embed_utils_is_no_show_address (address) ||
mode == EPHY_EMBED_SHELL_MODE_INCOGNITO ||
mode == EPHY_EMBED_SHELL_MODE_AUTOMATION) {
- state = EPHY_LOCATION_ENTRY_BOOKMARK_ICON_HIDDEN;
+ state = EPHY_BOOKMARK_ICON_HIDDEN;
} else {
bookmark = ephy_bookmarks_manager_get_bookmark_by_url (manager, address);
- state = bookmark ? EPHY_LOCATION_ENTRY_BOOKMARK_ICON_BOOKMARKED
- : EPHY_LOCATION_ENTRY_BOOKMARK_ICON_EMPTY;
+ state = bookmark ? EPHY_BOOKMARK_ICON_BOOKMARKED
+ : EPHY_BOOKMARK_ICON_EMPTY;
}
+ ephy_action_bar_end_set_bookmark_icon_state (EPHY_ACTION_BAR_END (action_bar_end), state);
ephy_location_entry_set_bookmark_icon_state (EPHY_LOCATION_ENTRY (widget), state);
}
diff --git a/src/ephy-window.h b/src/ephy-window.h
index 01c272846..6f7a2587d 100644
--- a/src/ephy-window.h
+++ b/src/ephy-window.h
@@ -20,6 +20,7 @@
#pragma once
+#include "ephy-bookmark-states.h"
#include "ephy-bookmarks-manager.h"
#include "ephy-embed.h"
#include "ephy-embed-event.h"
@@ -97,4 +98,7 @@ gboolean ephy_window_is_fullscreen (EphyWindow *window);
void ephy_window_get_geometry (EphyWindow *window,
GdkRectangle *rectangle);
+void ephy_window_sync_bookmark_state (GtkWidget *widget,
+ EphyBookmarkIconState state);
+
G_END_DECLS
diff --git a/src/resources/ephy-bookmarks-symbolic.svg b/src/resources/ephy-bookmarks-symbolic.svg
deleted file mode 100644
index b174985a6..000000000
--- a/src/resources/ephy-bookmarks-symbolic.svg
+++ /dev/null
@@ -1,83 +0,0 @@
-<?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-bookmarks-symbolic.svg">
- <defs
- id="defs7223" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1"
- inkscape:cx="8.2824125"
- inkscape:cy="11.498687"
- inkscape:document-units="px"
- inkscape:current-layer="g7201"
- 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="2560"
- inkscape:window-height="1376"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1" />
- <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 />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(-366.99825,-524.3622)">
- <g
- id="g7201"
- style="display:inline"
- transform="translate(25.998054,63.362205)"
- inkscape:label="bookmarks">
- <g
- id="g16974"
- inkscape:label="bookmarks">
- <path
- inkscape:connector-curvature="0"
- id="path7205"
- transform="translate(241.0002,217)"
- d="M 101.96875,244 C 100.87755,244 100,244.87755 100,245.96875 l 0,12.0625 c 0,1.0912 0.87755,1.96875 1.96875,1.96875 L 114,260 c 0.554,0 1,-0.446 1,-1 l 0,-11 c 0,-0.554 -0.446,-1 -1,-1 l -12,0 c -0.554,0 -1,-0.446 -1,-1 0,-0.554 0.446,-1 1,-1 l 12,0 c 0,-0.55856 -0.44144,-1 -1,-1 l -11.03125,0 z m 5.79492,4.92383 c 0.67546,0.003 1.0333,2.39564 1.57813,2.79492 0.54503,0.39943 2.93625,0.0206 3.14258,0.66406 0.20624,0.64321 -1.95855,1.7237 -2.16993,2.36524 -0.21146,0.64179 0.88611,2.79829 0.33789,3.19336 -0.54799,0.39491 -2.24446,-1.32925 -2.91992,-1.33203 -0.67572,-0.003 -2.3865,1.70789 -2.93164,1.30859 -0.54493,-0.39914 0.56936,-2.54619 0.36328,-3.18945 -0.20616,-0.64351 -2.36169,-1.74293 -2.15039,-2.38477 0.21122,-0.64159 2.59839,-0.2439 3.14649,-0.63867 0.54831,-0.39493 0.92779,-2.78387 1.60351,-2.78125 z"
- style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;enable-background:accumulate" />
- </g>
- <g
- transform="matrix(0.67537179,0,0,0.67537179,189.36843,-207.21827)"
- style="display:inline"
- id="g7207" />
- </g>
- </g>
-</svg>
diff --git a/src/resources/ephy-library-symbolic.svg b/src/resources/ephy-library-symbolic.svg
new file mode 100644
index 000000000..cb8f5abfb
--- /dev/null
+++ b/src/resources/ephy-library-symbolic.svg
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
+ 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"
+ inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
+ sodipodi:docname="library-symbolic.svg"
+ height="16"
+ id="svg7384"
+ version="1.1"
+ width="16">
+ <sodipodi:namedview
+ inkscape:snap-nodes="false"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:bbox-nodes="true"
+ inkscape:bbox-paths="true"
+ inkscape:snap-bbox="true"
+ inkscape:document-rotation="0"
+ inkscape:current-layer="svg7384"
+ inkscape:window-maximized="1"
+ inkscape:window-y="0"
+ inkscape:window-x="0"
+ inkscape:cy="17.615062"
+ inkscape:cx="20.519029"
+ inkscape:zoom="9.0553378"
+ inkscape:snap-page="true"
+ inkscape:snap-text-baseline="true"
+ inkscape:snap-center="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-intersection-paths="true"
+ inkscape:object-paths="true"
+ inkscape:snap-midpoints="true"
+ inkscape:snap-smooth-nodes="true"
+ showgrid="false"
+ id="namedview16"
+ inkscape:window-height="1016"
+ inkscape:window-width="1920"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0"
+ guidetolerance="10"
+ gridtolerance="10"
+ objecttolerance="10"
+ borderopacity="1"
+ bordercolor="#666666"
+ pagecolor="#ffffff">
+ <inkscape:grid
+ id="grid835"
+ type="xygrid" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata90">
+ <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>Gnome Symbolic Icon Theme</dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <title
+ id="title9167">Gnome Symbolic Icon Theme</title>
+ <defs
+ id="defs7386">
+ <linearGradient
+ id="linearGradient7212"
+ osb:paint="solid">
+ <stop
+ id="stop7214"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ </linearGradient>
+ </defs>
+ <rect
+ ry="0.5"
+ rx="0.5"
+ y="2"
+ x="1"
+ height="13"
+ width="3"
+ id="rect837"
+ style="fill:#241f31;fill-opacity:1;stroke-width:0.917791;stroke-linecap:round;stroke-linejoin:round" />
+ <rect
+ ry="0.5"
+ rx="0.5"
+ style="fill:#241f31;fill-opacity:1;stroke-width:0.844245;stroke-linecap:round;stroke-linejoin:round"
+ id="rect839"
+ width="2"
+ height="11"
+ x="5"
+ y="4" />
+ <rect
+ ry="0.5"
+ rx="0.5"
+ y="3"
+ x="8"
+ height="12"
+ width="2"
+ id="rect841"
+ style="fill:#241f31;fill-opacity:1;stroke-width:0.881785;stroke-linecap:round;stroke-linejoin:round" />
+ <rect
+ ry="0.5"
+ rx="0.5"
+ transform="rotate(-15)"
+ style="fill:#241f31;fill-opacity:1;stroke-width:0.952437;stroke-linecap:round;stroke-linejoin:round"
+ id="rect843"
+ width="2"
+ height="14"
+ x="9.462719"
+ y="4.1807427" />
+</svg>
diff --git a/src/resources/epiphany.gresource.xml b/src/resources/epiphany.gresource.xml
index 861486aec..b335d6001 100644
--- a/src/resources/epiphany.gresource.xml
+++ b/src/resources/epiphany.gresource.xml
@@ -45,7 +45,6 @@
</gresource>
<gresource prefix="/org/gnome/Epiphany/icons">
<file compressed="true" alias="scalable/actions/ephy-download-symbolic.svg" preprocess="xml-stripblanks">ephy-download-symbolic.svg</file>
- <file compressed="true" alias="scalable/actions/ephy-bookmarks-symbolic.svg">ephy-bookmarks-symbolic.svg</file>
<file compressed="true" alias="scalable/actions/ephy-bookmark-tag-symbolic.svg">ephy-bookmark-tag-symbolic.svg</file>
<file compressed="true" alias="scalable/actions/ephy-missing-favicon-symbolic.svg">ephy-missing-favicon-symbolic.svg</file>
<file compressed="true" alias="scalable/actions/ephy-reader-mode-symbolic.svg">ephy-reader-mode-symbolic.svg</file>
@@ -53,6 +52,7 @@
<file compressed="true" alias="scalable/status/ephy-audio-playing-symbolic.svg">ephy-audio-playing-symbolic.svg</file>
<file compressed="true" alias="scalable/status/ephy-tab-counter-symbolic.svg">ephy-tab-counter-symbolic.svg</file>
<file compressed="true" alias="scalable/status/ephy-tab-overflow-symbolic.svg">ephy-tab-overflow-symbolic.svg</file>
+ <file compressed="true" alias="scalable/status/ephy-library-symbolic.svg">ephy-library-symbolic.svg</file>
</gresource>
<gresource prefix="/org/gnome/Epiphany">
<file compressed="true">themes/shared.css</file>
diff --git a/src/resources/gtk/action-bar-end.ui b/src/resources/gtk/action-bar-end.ui
index 6e03dbfc6..cd56c34ea 100644
--- a/src/resources/gtk/action-bar-end.ui
+++ b/src/resources/gtk/action-bar-end.ui
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
+ <object class="GtkImage" id="bookmark_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon_name">non-starred-symbolic</property>
+ </object>
<template class="EphyActionBarEnd" parent="GtkBox">
<property name="spacing">6</property>
<child>
@@ -15,7 +20,7 @@
<child>
<object class="GtkImage" id="bookmarks_image">
<property name="visible">True</property>
- <property name="icon-name">ephy-bookmarks-symbolic</property>
+ <property name="icon-name">ephy-library-symbolic</property>
<property name="icon-size">1</property>
</object>
</child>
@@ -25,6 +30,21 @@
</packing>
</child>
<child>
+ <object class="GtkButton" id="bookmark_button">
+ <property name="visible">True</property>
+ <property name="valign">center</property>
+ <!-- Translators: tooltip for the bookmark button -->
+ <property name="tooltip_text" translatable="yes">Bookmark page</property>
+ <property name="image">bookmark_image</property>
+ <style>
+ <class name="image-button"/>
+ </style>
+ </object>
+ <packing>
+ <property name="pack-type">end</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkRevealer" id="downloads_revealer">
<property name="visible">True</property>
<property name="transition-type">crossfade</property>