[epiphany] embed: Remove the progress bar
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] embed: Remove the progress bar
- Date: Wed, 7 Dec 2016 14:37:09 +0000 (UTC)
commit 14249f5b45438c4e3bc75fb6172b2eb12d4472a4
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Tue Dec 6 09:26:30 2016 -0600
embed: Remove the progress bar
It does nothing except make us look slower than other browsers, and has
serious style issues.
https://bugzilla.gnome.org/show_bug.cgi?id=775710
embed/ephy-embed.c | 66 ----------------------------------------------------
1 files changed, 0 insertions(+), 66 deletions(-)
---
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 679cd91..bcfe145 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -64,7 +64,6 @@ struct _EphyEmbed {
GSList *destroy_on_transition_list;
GtkWidget *overlay;
GtkWidget *floating_bar;
- GtkWidget *progress;
GtkWidget *fullscreen_message_label;
char *title;
@@ -83,10 +82,7 @@ struct _EphyEmbed {
guint fullscreen_message_id;
- guint clear_progress_source_id;
-
gulong status_handler_id;
- gulong progress_update_handler_id;
gboolean inspector_loaded;
};
@@ -355,11 +351,6 @@ ephy_embed_dispose (GObject *object)
embed->pop_statusbar_later_source_id = 0;
}
- if (embed->clear_progress_source_id) {
- g_source_remove (embed->clear_progress_source_id);
- embed->clear_progress_source_id = 0;
- }
-
if (embed->delayed_request_source_id) {
g_source_remove (embed->delayed_request_source_id);
embed->delayed_request_source_id = 0;
@@ -372,11 +363,6 @@ ephy_embed_dispose (GObject *object)
embed->status_handler_id = 0;
}
- if (embed->progress_update_handler_id) {
- g_signal_handler_disconnect (embed->web_view, embed->progress_update_handler_id);
- embed->progress_update_handler_id = 0;
- }
-
if (embed->fullscreen_message_id) {
g_source_remove (embed->fullscreen_message_id);
embed->fullscreen_message_id = 0;
@@ -590,49 +576,6 @@ status_message_notify_cb (EphyWebView *view, GParamSpec *pspec, EphyEmbed *embed
}
static gboolean
-clear_progress_cb (EphyEmbed *embed)
-{
- gtk_widget_hide (embed->progress);
- embed->clear_progress_source_id = 0;
-
- return FALSE;
-}
-
-static void
-progress_update (EphyWebView *view, GParamSpec *pspec, EphyEmbed *embed)
-{
- gdouble progress;
- gboolean loading;
- const char *uri;
-
- if (embed->clear_progress_source_id) {
- g_source_remove (embed->clear_progress_source_id);
- embed->clear_progress_source_id = 0;
- }
-
- uri = webkit_web_view_get_uri (embed->web_view);
- if (!uri || g_str_has_prefix (uri, "ephy-about:") ||
- g_str_has_prefix (uri, "about:")) {
- gtk_widget_hide (embed->progress);
- return;
- }
-
- progress = webkit_web_view_get_estimated_load_progress (embed->web_view);
- loading = ephy_web_view_is_loading (EPHY_WEB_VIEW (embed->web_view));
-
- if (progress == 1.0 || !loading) {
- embed->clear_progress_source_id = g_timeout_add (500,
- (GSourceFunc)clear_progress_cb,
- embed);
- g_source_set_name_by_id (embed->clear_progress_source_id, "[epiphany] clear_progress_cb");
- } else
- gtk_widget_show (embed->progress);
-
- gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (embed->progress),
- (loading || progress == 1.0) ? progress : 0.0);
-}
-
-static gboolean
load_delayed_request_if_mapped (gpointer user_data)
{
EphyEmbed *embed = EPHY_EMBED (user_data);
@@ -733,13 +676,6 @@ ephy_embed_constructed (GObject *object)
gtk_overlay_add_overlay (GTK_OVERLAY (embed->overlay), embed->floating_bar);
- embed->progress = gtk_progress_bar_new ();
- gtk_style_context_add_class (gtk_widget_get_style_context (embed->progress),
- GTK_STYLE_CLASS_OSD);
- gtk_widget_set_halign (embed->progress, GTK_ALIGN_FILL);
- gtk_widget_set_valign (embed->progress, GTK_ALIGN_START);
- gtk_overlay_add_overlay (GTK_OVERLAY (embed->overlay), embed->progress);
-
embed->find_toolbar = ephy_find_toolbar_new (embed->web_view);
g_signal_connect (embed->find_toolbar, "close",
G_CALLBACK (ephy_embed_find_toolbar_close_cb),
@@ -751,8 +687,6 @@ ephy_embed_constructed (GObject *object)
paned = GTK_WIDGET (embed->paned);
- embed->progress_update_handler_id = g_signal_connect (embed->web_view, "notify::estimated-load-progress",
- G_CALLBACK (progress_update), object);
gtk_paned_pack1 (GTK_PANED (paned), GTK_WIDGET (embed->overlay),
TRUE, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]