[epiphany/origin/wip/theme: 1/3] Remove totem-glow-button



commit 9ab68f44737ffcbe7618e2999fa0704863dcba92
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Wed Aug 27 11:21:57 2014 -0500

    Remove totem-glow-button
    
    We'll use the needs-attention style class instead
    
    https://bugzilla.gnome.org/show_bug.cgi?id=735533

 lib/widgets/Makefile.am            |    4 +-
 lib/widgets/ephy-download-widget.c |   25 ++++---
 lib/widgets/totem-glow-button.c    |  156 ------------------------------------
 lib/widgets/totem-glow-button.h    |   47 -----------
 4 files changed, 16 insertions(+), 216 deletions(-)
---
diff --git a/lib/widgets/Makefile.am b/lib/widgets/Makefile.am
index 8673688..873e979 100644
--- a/lib/widgets/Makefile.am
+++ b/lib/widgets/Makefile.am
@@ -84,9 +84,7 @@ libephywidgets_la_SOURCES = \
        ephy-zoom-action.h                      \
        ephy-zoom-action.c                      \
        nautilus-floating-bar.c                 \
-       nautilus-floating-bar.h                 \
-       totem-glow-button.c                     \
-       totem-glow-button.h
+       nautilus-floating-bar.h
 
 libephywidgets_la_CPPFLAGS = \
        -I$(top_builddir)/lib           \
diff --git a/lib/widgets/ephy-download-widget.c b/lib/widgets/ephy-download-widget.c
index 4069a8d..2ad96bf 100644
--- a/lib/widgets/ephy-download-widget.c
+++ b/lib/widgets/ephy-download-widget.c
@@ -28,7 +28,6 @@
 #include "ephy-debug.h"
 #include "ephy-embed-shell.h"
 #include "ephy-download.h"
-#include "totem-glow-button.h"
 
 #include <glib/gi18n.h>
 #include <webkit2/webkit2.h>
@@ -285,13 +284,25 @@ update_popup_menu (EphyDownloadWidget *widget)
 }
 
 static void
+start_glowing (EphyDownloadWidget *widget)
+{
+  gtk_style_context_add_class (gtk_widget_get_style_context (widget->priv->button), "needs-attention");
+}
+
+static void
+stop_glowing (EphyDownloadWidget *widget)
+{
+  gtk_style_context_remove_class (gtk_widget_get_style_context (widget->priv->button), "needs-attention");
+}
+
+static void
 widget_finished_cb (WebKitDownload *download,
                     EphyDownloadWidget *widget)
 {
   widget->priv->finished = TRUE;
   update_popup_menu (widget);
   update_download_label_and_tooltip (widget, _("Finished"));
-  totem_glow_button_set_glow (TOTEM_GLOW_BUTTON (widget->priv->button), TRUE);
+  start_glowing (widget);
 }
 
 static void
@@ -311,7 +322,7 @@ widget_failed_cb (WebKitDownload *download,
   gtk_widget_set_tooltip_text (GTK_WIDGET (widget), error_msg);
   g_free (error_msg);
 
-  totem_glow_button_set_glow (TOTEM_GLOW_BUTTON (widget->priv->button), TRUE);
+  start_glowing (widget);
 }
 
 static void
@@ -396,12 +407,6 @@ widget_destination_changed_cb (WebKitDownload *download,
 }
 
 static void
-stop_glowing (EphyDownloadWidget *widget)
-{
-  totem_glow_button_set_glow (TOTEM_GLOW_BUTTON (widget->priv->button), FALSE);
-}
-
-static void
 disconnect_download (EphyDownloadWidget *widget)
 {
   WebKitDownload *download;
@@ -572,7 +577,7 @@ create_widget (EphyDownloadWidget *widget)
   grid = gtk_grid_new ();
   gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
 
-  button = totem_glow_button_new ();
+  button = gtk_button_new ();
   menu_button = gtk_menu_button_new ();
   gtk_menu_button_set_direction (GTK_MENU_BUTTON (menu_button), GTK_ARROW_UP);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]