[Xfce4-commits] [xfce/xfce4-panel] 23/73: ArrowButton: make sure the button relief is preserved during blinking

noreply at xfce.org noreply at xfce.org
Sun Feb 26 16:34:04 CET 2017


This is an automated email from the git hooks/post-receive script.

andrzejr pushed a commit to branch master
in repository xfce/xfce4-panel.

commit b2ea73a5bb634ca164a49c0f337134e23f9b55b8
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Thu May 15 02:31:07 2014 +0100

    ArrowButton: make sure the button relief is preserved during blinking
---
 libxfce4panel/xfce-arrow-button.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/libxfce4panel/xfce-arrow-button.c b/libxfce4panel/xfce-arrow-button.c
index c571256..7fbe831 100644
--- a/libxfce4panel/xfce-arrow-button.c
+++ b/libxfce4panel/xfce-arrow-button.c
@@ -602,6 +602,12 @@ static void
 xfce_arrow_button_blinking_timeout_destroyed (gpointer user_data)
 {
   XfceArrowButton *button = XFCE_ARROW_BUTTON (user_data);
+  GtkRcStyle      *rc;
+
+  rc = gtk_widget_get_modifier_style (GTK_WIDGET (button));
+  gtk_button_set_relief (GTK_BUTTON (button), button->priv->last_relief);
+  PANEL_UNSET_FLAG (rc->color_flags[GTK_STATE_NORMAL], GTK_RC_BG);
+  gtk_widget_modify_style (GTK_WIDGET (button), rc);
 
   button->priv->blinking_timeout_id = 0;
   button->priv->blinking_counter = 0;
@@ -725,6 +731,7 @@ xfce_arrow_button_set_blinking (XfceArrowButton *button,
               gdk_threads_add_timeout_full (G_PRIORITY_DEFAULT_IDLE, 500,
                                             xfce_arrow_button_blinking_timeout, button,
                                             xfce_arrow_button_blinking_timeout_destroyed);
+          xfce_arrow_button_blinking_timeout (button);
         }
     }
   else if (button->priv->blinking_timeout_id != 0)
@@ -732,9 +739,6 @@ xfce_arrow_button_set_blinking (XfceArrowButton *button,
       /* stop the blinking timeout */
       g_source_remove (button->priv->blinking_timeout_id);
     }
-
-  /* start with a blinking or make sure the button is normal */
-  xfce_arrow_button_blinking_timeout (button);
 }
 
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list