[epiphany] Spinner changes
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Spinner changes
- Date: Sun, 24 Oct 2010 10:25:44 +0000 (UTC)
commit c255df464cf44e9687f80c5845e5f31a500f7084
Author: Xan Lopez <xan gnome org>
Date: Mon Nov 2 12:10:40 2009 +0200
Spinner changes
We get rid of the spinner in the toolbar, since load information is
already given by the floating status indicator inside the WebView.
The only remaining spinner is the one in the tabs, which has been
ported to use GtkSpinner.
Get rid of EphySpinner.
Fixes:
https://bugzilla.gnome.org/show_bug.cgi?id=524809 (again)
https://bugzilla.gnome.org/show_bug.cgi?id=598442
doc/reference/epiphany-docs.sgml | 1 -
doc/reference/epiphany-sections.txt | 10 -
doc/reference/epiphany.types | 2 -
doc/reference/tmpl/ephy-spinner.sgml | 60 ---
lib/widgets/Makefile.am | 4 -
lib/widgets/ephy-spinner-tool-item.c | 115 ----
lib/widgets/ephy-spinner-tool-item.h | 62 ---
lib/widgets/ephy-spinner.c | 967 ----------------------------------
lib/widgets/ephy-spinner.h | 72 ---
lib/widgets/testspinner.c | 264 ---------
src/Makefile.am | 2 -
src/ephy-fullscreen-popup.c | 56 --
src/ephy-fullscreen-popup.h | 3 -
src/ephy-notebook.c | 8 +-
src/ephy-toolbar.c | 56 --
src/ephy-toolbar.h | 3 -
src/ephy-window.c | 9 -
17 files changed, 3 insertions(+), 1691 deletions(-)
---
diff --git a/doc/reference/epiphany-docs.sgml b/doc/reference/epiphany-docs.sgml
index 402a946..5585b61 100644
--- a/doc/reference/epiphany-docs.sgml
+++ b/doc/reference/epiphany-docs.sgml
@@ -24,7 +24,6 @@
<xi:include href="xml/ephy-location-entry.xml"/>
<xi:include href="xml/ephy-node-view.xml"/>
<xi:include href="xml/ephy-search-entry.xml"/>
- <xi:include href="xml/ephy-spinner.xml"/>
<xi:include href="xml/ephy-tree-model-node.xml"/>
<xi:include href="xml/ephy-tree-model-sort.xml"/>
<xi:include href="xml/ephy-zoom-action.xml"/>
diff --git a/doc/reference/epiphany-sections.txt b/doc/reference/epiphany-sections.txt
index 75f7826..345ab86 100644
--- a/doc/reference/epiphany-sections.txt
+++ b/doc/reference/epiphany-sections.txt
@@ -103,16 +103,6 @@ ephy_search_entry_clear
</SECTION>
<SECTION>
-<FILE>ephy-spinner</FILE>
-<TITLE>EphySpinner</TITLE>
-EphySpinner
-ephy_spinner_new
-ephy_spinner_start
-ephy_spinner_stop
-ephy_spinner_set_size
-</SECTION>
-
-<SECTION>
<FILE>ephy-tree-model-node</FILE>
<TITLE>EphyTreeModelNode</TITLE>
EphyTreeModelNode
diff --git a/doc/reference/epiphany.types b/doc/reference/epiphany.types
index c9637f5..561165e 100644
--- a/doc/reference/epiphany.types
+++ b/doc/reference/epiphany.types
@@ -5,7 +5,6 @@ ephy_web_view_get_type
#include <ephy-node-view.h>
#include <ephy-location-entry.h>
#include <ephy-search-entry.h>
-#include <ephy-spinner.h>
#include <ephy-tree-model-sort.h>
#include <ephy-zoom-action.h>
#include <ephy-zoom-control.h>
@@ -13,7 +12,6 @@ ephy_web_view_get_type
ephy_node_view_get_type
ephy_location_entry_get_type
ephy_search_entry_get_type
-ephy_spinner_get_type
ephy_tree_model_node_get_type
ephy_tree_model_sort_get_type
ephy_zoom_action_get_type
diff --git a/lib/widgets/Makefile.am b/lib/widgets/Makefile.am
index c0134b6..48c60e2 100644
--- a/lib/widgets/Makefile.am
+++ b/lib/widgets/Makefile.am
@@ -7,10 +7,6 @@ libephywidgets_la_SOURCES = \
ephy-node-view.h \
ephy-search-entry.c \
ephy-search-entry.h \
- ephy-spinner.c \
- ephy-spinner.h \
- ephy-spinner-tool-item.c \
- ephy-spinner-tool-item.h \
ephy-tree-model-node.c \
ephy-tree-model-node.h \
ephy-tree-model-sort.c \
diff --git a/src/Makefile.am b/src/Makefile.am
index 50e0abf..479f5be 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -285,7 +285,6 @@ EPHY_GIR_H_FILES = \
$(top_srcdir)/lib/egg/egg-editable-toolbar.h \
$(top_srcdir)/lib/egg/egg-toolbars-model.h \
$(top_srcdir)/lib/widgets/ephy-search-entry.h \
- $(top_srcdir)/lib/widgets/ephy-spinner.h \
$(top_srcdir)/src/bookmarks/ephy-bookmarks.h \
$(top_srcdir)/src/ephy-extension.h \
$(top_srcdir)/src/ephy-extensions-manager.h \
@@ -318,7 +317,6 @@ EPHY_GIR_C_FILES = \
$(top_srcdir)/lib/egg/egg-editable-toolbar.c \
$(top_srcdir)/lib/egg/egg-toolbars-model.c \
$(top_srcdir)/lib/widgets/ephy-search-entry.c \
- $(top_srcdir)/lib/widgets/ephy-spinner.c \
$(top_srcdir)/src/bookmarks/ephy-bookmarks.c \
$(top_srcdir)/src/ephy-extension.c \
$(top_srcdir)/src/ephy-extensions-manager.c \
diff --git a/src/ephy-fullscreen-popup.c b/src/ephy-fullscreen-popup.c
index af10249..9b47d88 100644
--- a/src/ephy-fullscreen-popup.c
+++ b/src/ephy-fullscreen-popup.c
@@ -21,7 +21,6 @@
#include "config.h"
#include "ephy-fullscreen-popup.h"
-#include "ephy-spinner.h"
#include "ephy-debug.h"
#include <glib/gi18n.h>
@@ -34,7 +33,6 @@ struct _EphyFullscreenPopupPrivate
{
EphyWindow *window;
GtkWidget *frame;
- EphySpinner *spinner;
GtkWidget *lock;
GtkWidget *lock_ebox;
GtkWidget *button;
@@ -93,26 +91,10 @@ ephy_fullscreen_popup_update_visibility (EphyFullscreenPopup *popup)
g_object_set (priv->button, "visible", priv->show_button,
"sensitive", priv->show_button, NULL);
g_object_set (priv->frame, "visible", show_frame, NULL);
- g_object_set (priv->spinner, "visible", priv->spinning, NULL);
g_object_set (priv->lock_ebox, "visible", priv->show_lock, NULL);
}
static void
-ephy_fullscreen_popup_update_spinner (EphyFullscreenPopup *popup)
-{
- EphyFullscreenPopupPrivate *priv = popup->priv;
-
- if (priv->spinning && gtk_widget_get_visible (GTK_WIDGET (popup)))
- {
- ephy_spinner_start (priv->spinner);
- }
- else
- {
- ephy_spinner_stop (priv->spinner);
- }
-}
-
-static void
ephy_fullscreen_popup_update_position (EphyFullscreenPopup *popup)
{
GtkWidget *widget = GTK_WIDGET (popup);
@@ -172,17 +154,6 @@ ephy_fullscreen_popup_set_show_leave (EphyFullscreenPopup *popup,
}
void
-ephy_fullscreen_popup_set_spinning (EphyFullscreenPopup *popup,
- gboolean spinning)
-{
- EphyFullscreenPopupPrivate *priv = popup->priv;
-
- priv->spinning = spinning;
- ephy_fullscreen_popup_update_visibility (popup);
- ephy_fullscreen_popup_update_spinner (popup);
-}
-
-void
ephy_fullscreen_popup_set_security_state (EphyFullscreenPopup *popup,
gboolean show_lock,
const char *stock,
@@ -244,11 +215,6 @@ ephy_fullscreen_popup_constructor (GType type,
gtk_container_add (GTK_CONTAINER (priv->frame), frame_hbox);
gtk_widget_show (frame_hbox);
- /* add spinner */
- priv->spinner = EPHY_SPINNER (ephy_spinner_new ());
- ephy_spinner_set_size (EPHY_SPINNER (priv->spinner), GTK_ICON_SIZE_BUTTON);
- gtk_box_pack_start (GTK_BOX (frame_hbox), GTK_WIDGET (priv->spinner), FALSE, FALSE, 0);
-
/* lock */
priv->lock = gtk_image_new ();
gtk_widget_show (priv->lock);
@@ -321,26 +287,6 @@ ephy_fullscreen_popup_set_property (GObject *object,
}
static void
-ephy_fullscreen_popup_show (GtkWidget *widget)
-{
- EphyFullscreenPopup *popup = EPHY_FULLSCREEN_POPUP (widget);
-
- GTK_WIDGET_CLASS (ephy_fullscreen_popup_parent_class)->show (widget);
-
- ephy_fullscreen_popup_update_spinner (popup);
-}
-
-static void
-ephy_fullscreen_popup_hide (GtkWidget *widget)
-{
- EphyFullscreenPopup *popup = EPHY_FULLSCREEN_POPUP (widget);
-
- GTK_WIDGET_CLASS (ephy_fullscreen_popup_parent_class)->hide (widget);
-
- ephy_fullscreen_popup_update_spinner (popup);
-}
-
-static void
ephy_fullscreen_popup_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
@@ -375,8 +321,6 @@ ephy_fullscreen_popup_class_init (EphyFullscreenPopupClass *klass)
object_class->get_property = ephy_fullscreen_popup_get_property;
object_class->set_property = ephy_fullscreen_popup_set_property;
- widget_class->show = ephy_fullscreen_popup_show;
- widget_class->hide = ephy_fullscreen_popup_hide;
widget_class->size_request = ephy_fullscreen_popup_size_request;
widget_class->realize = ephy_fullscreen_popup_realize;
diff --git a/src/ephy-fullscreen-popup.h b/src/ephy-fullscreen-popup.h
index 26441f9..65614bb 100644
--- a/src/ephy-fullscreen-popup.h
+++ b/src/ephy-fullscreen-popup.h
@@ -64,9 +64,6 @@ GtkWidget *ephy_fullscreen_popup_new (EphyWindow *window);
void ephy_fullscreen_popup_set_show_leave (EphyFullscreenPopup *popup,
gboolean show_button);
-void ephy_fullscreen_popup_set_spinning (EphyFullscreenPopup *popup,
- gboolean spinning);
-
void ephy_fullscreen_popup_set_security_state (EphyFullscreenPopup *popup,
gboolean show_lock,
const char *stock,
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 23805d2..b9a2e24 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -32,7 +32,6 @@
#include "ephy-embed-utils.h"
#include "ephy-window.h"
#include "ephy-shell.h"
-#include "ephy-spinner.h"
#include "ephy-link.h"
#include "ephy-debug.h"
@@ -515,11 +514,11 @@ sync_load_status (EphyWebView *view, GParamSpec *pspec, GtkWidget *proxy)
{
gtk_widget_hide (icon);
gtk_widget_show (spinner);
- ephy_spinner_start (EPHY_SPINNER (spinner));
+ gtk_spinner_start (GTK_SPINNER (spinner));
}
else
{
- ephy_spinner_stop (EPHY_SPINNER (spinner));
+ gtk_spinner_stop (GTK_SPINNER (spinner));
gtk_widget_hide (spinner);
gtk_widget_show (icon);
}
@@ -598,8 +597,7 @@ build_tab_label (EphyNotebook *nb, EphyEmbed *embed)
gtk_widget_show (hbox);
/* setup load feedback */
- spinner = ephy_spinner_new ();
- ephy_spinner_set_size (EPHY_SPINNER (spinner), GTK_ICON_SIZE_MENU);
+ spinner = gtk_spinner_new ();
gtk_box_pack_start (GTK_BOX (hbox), spinner, FALSE, FALSE, 0);
/* setup site icon, empty by default */
diff --git a/src/ephy-toolbar.c b/src/ephy-toolbar.c
index c3f0ed7..a6edc29 100644
--- a/src/ephy-toolbar.c
+++ b/src/ephy-toolbar.c
@@ -34,7 +34,6 @@
#include "ephy-navigation-up-action.h"
#include "ephy-topic-action.h"
#include "ephy-zoom-action.h"
-#include "ephy-spinner-tool-item.h"
#include "ephy-dnd.h"
#include "ephy-shell.h"
#include "ephy-stock-icons.h"
@@ -71,7 +70,6 @@ struct _EphyToolbarPrivate
GtkActionGroup *action_group;
GtkAction *actions[LAST_ACTION];
GtkWidget *fixed_toolbar;
- EphySpinnerToolItem *spinner;
GtkToolItem *sep_item;
GtkToolItem *exit_button;
gulong set_focus_handler;
@@ -136,14 +134,6 @@ ephy_toolbar_update_fixed_visibility (EphyToolbar *toolbar)
g_object_set (priv->fixed_toolbar, "visible", show, NULL);
}
-static void
-ephy_toolbar_update_spinner (EphyToolbar *toolbar)
-{
- EphyToolbarPrivate *priv = toolbar->priv;
-
- ephy_spinner_tool_item_set_spinning (priv->spinner, priv->spinning);
-}
-
static void
maybe_finish_activation_cb (EphyWindow *window,
GtkWidget *widget,
@@ -572,24 +562,6 @@ ephy_toolbar_set_security_state (EphyToolbar *toolbar,
}
/**
- * ephy_toolbar_set_spinning:
- * @toolbar: an #EphyToolbar widget
- * @spinning: %TRUE to set the internal #EphySpinner as active
- *
- * Controls the internal #EphySpinner activity.
- **/
-void
-ephy_toolbar_set_spinning (EphyToolbar *toolbar,
- gboolean spinning)
-{
- EphyToolbarPrivate *priv = toolbar->priv;
-
- priv->spinning = spinning != FALSE;
-
- ephy_toolbar_update_spinner (toolbar);
-}
-
-/**
* ephy_toolbar_set_zoom:
* @toolbar: an #EphyToolbar widget
* @can_zoom: %TRUE if the current #EphyWebView can zoom
@@ -611,26 +583,6 @@ ephy_toolbar_set_zoom (EphyToolbar *toolbar,
/* Class implementation */
static void
-ephy_toolbar_show (GtkWidget *widget)
-{
- EphyToolbar *toolbar = EPHY_TOOLBAR (widget);
-
- GTK_WIDGET_CLASS (ephy_toolbar_parent_class)->show (widget);
-
- ephy_toolbar_update_spinner (toolbar);
-}
-
-static void
-ephy_toolbar_hide (GtkWidget *widget)
-{
- EphyToolbar *toolbar = EPHY_TOOLBAR (widget);
-
- GTK_WIDGET_CLASS (ephy_toolbar_parent_class)->hide (widget);
-
- ephy_toolbar_update_spinner (toolbar);
-}
-
-static void
ephy_toolbar_init (EphyToolbar *toolbar)
{
EphyToolbarPrivate *priv;
@@ -659,10 +611,6 @@ ephy_toolbar_constructor (GType type,
gtoolbar = GTK_TOOLBAR (priv->fixed_toolbar);
gtk_toolbar_set_show_arrow (gtoolbar, FALSE);
- priv->spinner = EPHY_SPINNER_TOOL_ITEM (ephy_spinner_tool_item_new ());
- gtk_toolbar_insert (gtoolbar, GTK_TOOL_ITEM (priv->spinner), -1);
- gtk_widget_show (GTK_WIDGET (priv->spinner));
-
priv->sep_item = gtk_separator_tool_item_new ();
gtk_toolbar_insert (gtoolbar, priv->sep_item, -1);
@@ -725,16 +673,12 @@ static void
ephy_toolbar_class_init (EphyToolbarClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
object_class->constructor = ephy_toolbar_constructor;
object_class->finalize = ephy_toolbar_finalize;
object_class->set_property = ephy_toolbar_set_property;
object_class->get_property = ephy_toolbar_get_property;
- widget_class->show = ephy_toolbar_show;
- widget_class->hide = ephy_toolbar_hide;
-
/**
* EphyToolbar::activation-finished:
* @toolbar: the object which received the signal.
diff --git a/src/ephy-toolbar.h b/src/ephy-toolbar.h
index 060a3ad..3225436 100644
--- a/src/ephy-toolbar.h
+++ b/src/ephy-toolbar.h
@@ -98,9 +98,6 @@ void ephy_toolbar_set_security_state (EphyToolbar *toolbar,
const char *stock_id,
const char *tooltip);
-void ephy_toolbar_set_spinning (EphyToolbar *toolbar,
- gboolean spinning);
-
void ephy_toolbar_set_zoom (EphyToolbar *toolbar,
gboolean can_zoom,
float zoom);
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 7cd5253..3f7efa0 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1804,15 +1804,6 @@ sync_tab_load_status (EphyWebView *view,
ephy_action_change_sensitivity_flags (action, SENS_FLAG_LOADING, loading);
action = gtk_action_group_get_action (action_group, "FilePrint");
ephy_action_change_sensitivity_flags (action, SENS_FLAG_LOADING, loading);
-
- ephy_toolbar_set_spinning (priv->toolbar, loading);
-
- if (priv->fullscreen_popup)
- {
- ephy_fullscreen_popup_set_spinning
- (EPHY_FULLSCREEN_POPUP (priv->fullscreen_popup),
- loading);
- }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]