aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-notebook.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-07-03 05:59:32 +0800
committerChristian Persch <chpe@src.gnome.org>2004-07-03 05:59:32 +0800
commitb597caf899ec8778d8302f6ccce3a01651bb1b25 (patch)
tree2cc52a6d042ff50072e6ed7f0779ec3b5a5bbe4e /src/ephy-notebook.c
parentd7a633cd5f758d3812959fe562dd2dd35b275c1e (diff)
downloadgsoc2013-epiphany-b597caf899ec8778d8302f6ccce3a01651bb1b25.tar
gsoc2013-epiphany-b597caf899ec8778d8302f6ccce3a01651bb1b25.tar.gz
gsoc2013-epiphany-b597caf899ec8778d8302f6ccce3a01651bb1b25.tar.bz2
gsoc2013-epiphany-b597caf899ec8778d8302f6ccce3a01651bb1b25.tar.lz
gsoc2013-epiphany-b597caf899ec8778d8302f6ccce3a01651bb1b25.tar.xz
gsoc2013-epiphany-b597caf899ec8778d8302f6ccce3a01651bb1b25.tar.zst
gsoc2013-epiphany-b597caf899ec8778d8302f6ccce3a01651bb1b25.zip
R data/art/epiphany-tab-loading.gif:
2004-07-02 Christian Persch <chpe@cvs.gnome.org> * data/art/Makefile.am: R data/art/epiphany-tab-loading.gif: * lib/widgets/ephy-spinner.c: (get_spinner_dimensions), (ephy_spinner_init), (ephy_spinner_expose), (ephy_spinner_unload_images), (scale_to_real_size), (ephy_spinner_set_size), (ephy_spinner_size_request): * lib/widgets/ephy-spinner.h: * src/ephy-notebook.c: (sync_load_status), (build_tab_label): * src/toolbar.c: (fixed_toolbar_reconfigured_cb), (toolbar_init): Remove our tab loading animation and use mini-spinners instead.
Diffstat (limited to 'src/ephy-notebook.c')
-rw-r--r--src/ephy-notebook.c47
1 files changed, 22 insertions, 25 deletions
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index cbe261eb0..e09543f72 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -36,6 +36,7 @@
#include "ephy-debug.h"
#include "ephy-favicon-cache.h"
#include "ephy-ellipsizing-label.h"
+#include "ephy-spinner.h"
#include <glib-object.h>
#include <gtk/gtkeventbox.h>
@@ -727,22 +728,23 @@ ephy_notebook_finalize (GObject *object)
static void
sync_load_status (EphyTab *tab, GParamSpec *pspec, GtkWidget *proxy)
{
- GtkWidget *animation = NULL, *icon = NULL;
+ GtkWidget *spinner, *icon;
- animation = GTK_WIDGET (g_object_get_data (G_OBJECT (proxy), "loading-image"));
+ spinner = GTK_WIDGET (g_object_get_data (G_OBJECT (proxy), "spinner"));
icon = GTK_WIDGET (g_object_get_data (G_OBJECT (proxy), "icon"));
- g_return_if_fail (animation != NULL && icon != NULL);
+ g_return_if_fail (spinner != NULL && icon != NULL);
- switch (ephy_tab_get_load_status (tab))
+ if (ephy_tab_get_load_status (tab))
{
- case TRUE:
- gtk_widget_hide (icon);
- gtk_widget_show (animation);
- break;
- case FALSE:
- gtk_widget_hide (animation);
- gtk_widget_show (icon);
- break;
+ gtk_widget_hide (icon);
+ gtk_widget_show (spinner);
+ ephy_spinner_start (EPHY_SPINNER (spinner));
+ }
+ else
+ {
+ ephy_spinner_stop (EPHY_SPINNER (spinner));
+ gtk_widget_hide (spinner);
+ gtk_widget_show (icon);
}
}
@@ -841,12 +843,9 @@ tab_label_style_set_cb (GtkWidget *label,
static GtkWidget *
build_tab_label (EphyNotebook *nb, EphyTab *tab)
{
- GtkWidget *label, *hbox, *label_hbox, *close_button, *image;
- int h, w;
- GtkWidget *window;
- GtkWidget *loading_image, *icon;
- GtkWidget *label_ebox;
- GdkPixbufAnimation *loading_pixbuf;
+ GtkWidget *window, *hbox, *label_hbox, *label_ebox;
+ GtkWidget *label, *close_button, *image, *spinner, *icon;
+ int h = -1, w = -1;
window = gtk_widget_get_toplevel (GTK_WIDGET (nb));
@@ -877,12 +876,10 @@ build_tab_label (EphyNotebook *nb, EphyTab *tab)
G_CALLBACK (close_button_clicked_cb),
tab);
- /* setup load feedback image */
- /* FIXME: make the animation themeable */
- loading_pixbuf = gdk_pixbuf_animation_new_from_file (ephy_file ("epiphany-tab-loading.gif"), NULL);
- loading_image = gtk_image_new_from_animation (loading_pixbuf);
- g_object_unref (loading_pixbuf);
- gtk_box_pack_start (GTK_BOX (label_hbox), loading_image, FALSE, FALSE, 0);
+ /* setup load feedback */
+ spinner = ephy_spinner_new ();
+ ephy_spinner_set_size (EPHY_SPINNER (spinner), GTK_ICON_SIZE_MENU);
+ gtk_box_pack_start (GTK_BOX (label_hbox), spinner, FALSE, FALSE, 0);
/* setup site icon, empty by default */
icon = gtk_image_new ();
@@ -909,7 +906,7 @@ build_tab_label (EphyNotebook *nb, EphyTab *tab)
g_object_set_data (G_OBJECT (hbox), "label", label);
g_object_set_data (G_OBJECT (hbox), "label-ebox", label_ebox);
- g_object_set_data (G_OBJECT (hbox), "loading-image", loading_image);
+ g_object_set_data (G_OBJECT (hbox), "spinner", spinner);
g_object_set_data (G_OBJECT (hbox), "icon", icon);
g_object_set_data (G_OBJECT (hbox), "close-button", close_button);
g_object_set_data (G_OBJECT (hbox), "tooltips", nb->priv->title_tips);