[Xfce4-commits] <xfce4-panel:devel> Rename XfcePanelButton to XfceBlinkButton.
Nick Schermer
nick at xfce.org
Tue Aug 11 20:28:23 CEST 2009
Updating branch refs/heads/devel
to 3e6a9b65da8697113e2526c01ba306022214d35a (commit)
from ca90079e413c8a99015a37061080e953bc586787 (commit)
commit 3e6a9b65da8697113e2526c01ba306022214d35a
Author: Nick Schermer <nick at xfce.org>
Date: Thu Feb 26 16:32:43 2009 +0100
Rename XfcePanelButton to XfceBlinkButton.
libxfce4panel/Makefile.am | 4 +-
.../{xfce-panel-button.c => xfce-blink-button.c} | 56 ++++++++--------
libxfce4panel/xfce-blink-button.h | 66 ++++++++++++++++++++
libxfce4panel/xfce-panel-button.h | 66 --------------------
plugins/tasklist/tasklist-widget.c | 6 +-
5 files changed, 99 insertions(+), 99 deletions(-)
diff --git a/libxfce4panel/Makefile.am b/libxfce4panel/Makefile.am
index 1e011f2..106da89 100644
--- a/libxfce4panel/Makefile.am
+++ b/libxfce4panel/Makefile.am
@@ -34,9 +34,9 @@ libxfce4panel_la_SOURCES = \
$(libxfce4panel_built_sources) \
$(libxfce4panel_headers) \
xfce-arrow-button.c \
+ xfce-blink-button.c \
+ xfce-blink-button.h \
xfce-hvbox.c \
- xfce-panel-button.c \
- xfce-panel-button.h \
xfce-panel-convenience.c \
xfce-panel-plugin.c \
xfce-panel-plugin-provider.c \
diff --git a/libxfce4panel/xfce-panel-button.c b/libxfce4panel/xfce-blink-button.c
similarity index 70%
rename from libxfce4panel/xfce-panel-button.c
rename to libxfce4panel/xfce-blink-button.c
index f5b6fb3..523bb6c 100644
--- a/libxfce4panel/xfce-panel-button.c
+++ b/libxfce4panel/xfce-blink-button.c
@@ -22,22 +22,22 @@
#endif
#include <common/panel-private.h>
-#include <libxfce4panel/xfce-panel-button.h>
+#include <libxfce4panel/xfce-blink-button.h>
-#define XFCE_PANEL_BUTTON_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
- XFCE_TYPE_PANEL_BUTTON, \
- XfcePanelButtonPrivate))
+#define XFCE_BLINK_BUTTON_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+ XFCE_TYPE_BLINK_BUTTON, \
+ XfceBlinkButtonPrivate))
/* blink count, number should be even */
#define MAX_BLINKING_COUNT 16
-static void xfce_panel_button_finalize (GObject *object);
+static void xfce_blink_button_finalize (GObject *object);
-struct _XfcePanelButtonPrivate
+struct _XfceBlinkButtonPrivate
{
/* blinking timeout id */
guint blinking_timeout_id;
@@ -52,28 +52,28 @@ struct _XfcePanelButtonPrivate
-G_DEFINE_TYPE (XfcePanelButton, xfce_panel_button, GTK_TYPE_TOGGLE_BUTTON)
+G_DEFINE_TYPE (XfceBlinkButton, xfce_blink_button, GTK_TYPE_TOGGLE_BUTTON)
static void
-xfce_panel_button_class_init (XfcePanelButtonClass *klass)
+xfce_blink_button_class_init (XfceBlinkButtonClass *klass)
{
GObjectClass *gobject_class;
- g_type_class_add_private (klass, sizeof (XfcePanelButtonPrivate));
+ g_type_class_add_private (klass, sizeof (XfceBlinkButtonPrivate));
gobject_class = G_OBJECT_CLASS (klass);
- gobject_class->finalize = xfce_panel_button_finalize;
+ gobject_class->finalize = xfce_blink_button_finalize;
}
static void
-xfce_panel_button_init (XfcePanelButton *button)
+xfce_blink_button_init (XfceBlinkButton *button)
{
/* set private pointer */
- button->priv = XFCE_PANEL_BUTTON_GET_PRIVATE (button);
+ button->priv = XFCE_BLINK_BUTTON_GET_PRIVATE (button);
/* initialize button values */
button->priv->blinking_timeout_id = 0;
@@ -88,22 +88,22 @@ xfce_panel_button_init (XfcePanelButton *button)
static void
-xfce_panel_button_finalize (GObject *object)
+xfce_blink_button_finalize (GObject *object)
{
- XfcePanelButton *button = XFCE_PANEL_BUTTON (object);
+ XfceBlinkButton *button = XFCE_BLINK_BUTTON (object);
if (button->priv->blinking_timeout_id != 0)
g_source_remove (button->priv->blinking_timeout_id);
- (*G_OBJECT_CLASS (xfce_panel_button_parent_class)->finalize) (object);
+ (*G_OBJECT_CLASS (xfce_blink_button_parent_class)->finalize) (object);
}
static gboolean
-xfce_panel_button_blinking_timeout (gpointer user_data)
+xfce_blink_button_blinking_timeout (gpointer user_data)
{
- XfcePanelButton *button = XFCE_PANEL_BUTTON (user_data);
+ XfceBlinkButton *button = XFCE_BLINK_BUTTON (user_data);
GtkStyle *style;
GtkRcStyle *rc;
@@ -130,9 +130,9 @@ xfce_panel_button_blinking_timeout (gpointer user_data)
static void
-xfce_panel_button_blinking_timeout_destroyed (gpointer user_data)
+xfce_blink_button_blinking_timeout_destroyed (gpointer user_data)
{
- XfcePanelButton *button = XFCE_PANEL_BUTTON (user_data);
+ XfceBlinkButton *button = XFCE_BLINK_BUTTON (user_data);
button->priv->blinking_timeout_id = 0;
button->priv->blinking_counter = 0;
@@ -141,27 +141,27 @@ xfce_panel_button_blinking_timeout_destroyed (gpointer user_data)
PANEL_SYMBOL_EXPORT GtkWidget *
-xfce_panel_button_new (void)
+xfce_blink_button_new (void)
{
- return g_object_new (XFCE_TYPE_PANEL_BUTTON, NULL);
+ return g_object_new (XFCE_TYPE_BLINK_BUTTON, NULL);
}
PANEL_SYMBOL_EXPORT gboolean
-xfce_panel_button_get_blinking (XfcePanelButton *button)
+xfce_blink_button_get_blinking (XfceBlinkButton *button)
{
- g_return_val_if_fail (XFCE_IS_PANEL_BUTTON (button), FALSE);
+ g_return_val_if_fail (XFCE_IS_BLINK_BUTTON (button), FALSE);
return !!(button->priv->blinking_timeout_id != 0);
}
PANEL_SYMBOL_EXPORT void
-xfce_panel_button_set_blinking (XfcePanelButton *button,
+xfce_blink_button_set_blinking (XfceBlinkButton *button,
gboolean blinking)
{
- g_return_if_fail (XFCE_IS_PANEL_BUTTON (button));
+ g_return_if_fail (XFCE_IS_BLINK_BUTTON (button));
if (blinking)
{
@@ -173,8 +173,8 @@ xfce_panel_button_set_blinking (XfcePanelButton *button,
/* start blinking timeout */
button->priv->blinking_timeout_id =
g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 500,
- xfce_panel_button_blinking_timeout, button,
- xfce_panel_button_blinking_timeout_destroyed);
+ xfce_blink_button_blinking_timeout, button,
+ xfce_blink_button_blinking_timeout_destroyed);
}
}
else if (button->priv->blinking_timeout_id != 0)
@@ -184,5 +184,5 @@ xfce_panel_button_set_blinking (XfcePanelButton *button,
}
/* start with a blinking or make sure the button is normal */
- xfce_panel_button_blinking_timeout (button);
+ xfce_blink_button_blinking_timeout (button);
}
diff --git a/libxfce4panel/xfce-blink-button.h b/libxfce4panel/xfce-blink-button.h
new file mode 100644
index 0000000..247342c
--- /dev/null
+++ b/libxfce4panel/xfce-blink-button.h
@@ -0,0 +1,66 @@
+/* $Id$ */
+/*
+ * Copyright (c) 2009 Nick Schermer <nick at xfce.org>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __XFCE_BLINK_BUTTON_H__
+#define __XFCE_BLINK_BUTTON_H__
+
+#include <gtk/gtk.h>
+#include <libxfce4panel/libxfce4panel.h>
+
+G_BEGIN_DECLS
+
+typedef struct _XfceBlinkButtonPrivate XfceBlinkButtonPrivate;
+typedef struct _XfceBlinkButtonClass XfceBlinkButtonClass;
+typedef struct _XfceBlinkButton XfceBlinkButton;
+
+#define XFCE_TYPE_BLINK_BUTTON (xfce_blink_button_get_type ())
+#define XFCE_BLINK_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_BLINK_BUTTON, XfceBlinkButton))
+#define XFCE_BLINK_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_BLINK_BUTTON, XfceBlinkButtonClass))
+#define XFCE_IS_BLINK_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_BLINK_BUTTON))
+#define XFCE_IS_BLINK_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_BLINK_BUTTON))
+#define XFCE_BLINK_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_BLINK_BUTTON, XfceBlinkButtonClass))
+
+struct _XfceBlinkButtonClass
+{
+ /*< private >*/
+ GtkToggleButtonClass __parent__;
+};
+
+struct _XfceBlinkButton
+{
+ /*< private >*/
+ GtkToggleButton __parent__;
+
+ /*< private >*/
+ XfceBlinkButtonPrivate *priv;
+};
+
+PANEL_SYMBOL_EXPORT
+GType xfce_blink_button_get_type (void) G_GNUC_CONST;
+
+GtkWidget *xfce_blink_button_new (void) G_GNUC_MALLOC;
+
+gboolean xfce_blink_button_get_blinking (XfceBlinkButton *button);
+void xfce_blink_button_set_blinking (XfceBlinkButton *button,
+ gboolean blinking);
+
+G_END_DECLS
+
+#endif /* !__XFCE_BLINK_BUTTON_H__ */
+
diff --git a/libxfce4panel/xfce-panel-button.h b/libxfce4panel/xfce-panel-button.h
deleted file mode 100644
index 7970466..0000000
--- a/libxfce4panel/xfce-panel-button.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 2009 Nick Schermer <nick at xfce.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef __XFCE_PANEL_BUTTON_H__
-#define __XFCE_PANEL_BUTTON_H__
-
-#include <gtk/gtk.h>
-#include <libxfce4panel/libxfce4panel.h>
-
-G_BEGIN_DECLS
-
-typedef struct _XfcePanelButtonPrivate XfcePanelButtonPrivate;
-typedef struct _XfcePanelButtonClass XfcePanelButtonClass;
-typedef struct _XfcePanelButton XfcePanelButton;
-
-#define XFCE_TYPE_PANEL_BUTTON (xfce_panel_button_get_type ())
-#define XFCE_PANEL_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_PANEL_BUTTON, XfcePanelButton))
-#define XFCE_PANEL_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_PANEL_BUTTON, XfcePanelButtonClass))
-#define XFCE_IS_PANEL_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_PANEL_BUTTON))
-#define XFCE_IS_PANEL_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_PANEL_BUTTON))
-#define XFCE_PANEL_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_PANEL_BUTTON, XfcePanelButtonClass))
-
-struct _XfcePanelButtonClass
-{
- /*< private >*/
- GtkToggleButtonClass __parent__;
-};
-
-struct _XfcePanelButton
-{
- /*< private >*/
- GtkToggleButton __parent__;
-
- /*< private >*/
- XfcePanelButtonPrivate *priv;
-};
-
-PANEL_SYMBOL_EXPORT
-GType xfce_panel_button_get_type (void) G_GNUC_CONST;
-
-GtkWidget *xfce_panel_button_new (void) G_GNUC_MALLOC;
-
-gboolean xfce_panel_button_get_blinking (XfcePanelButton *button);
-void xfce_panel_button_set_blinking (XfcePanelButton *button,
- gboolean blinking);
-
-G_END_DECLS
-
-#endif /* !__XFCE_PANEL_BUTTON_H__ */
-
diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c
index 3b23d9b..eea4aca 100644
--- a/plugins/tasklist/tasklist-widget.c
+++ b/plugins/tasklist/tasklist-widget.c
@@ -29,7 +29,7 @@
#include <exo/exo.h>
#include <libwnck/libwnck.h>
#include <libxfce4panel/libxfce4panel.h>
-#include <libxfce4panel/xfce-panel-button.h>
+#include <libxfce4panel/xfce-blink-button.h>
#include <common/panel-private.h>
#include "tasklist-widget.h"
@@ -1248,7 +1248,7 @@ tasklist_button_state_changed (WnckWindow *window,
/* update the blinking state */
if (PANEL_HAS_FLAG (changed_state, WNCK_WINDOW_STATE_DEMANDS_ATTENTION)
|| PANEL_HAS_FLAG (changed_state, WNCK_WINDOW_STATE_URGENT))
- xfce_panel_button_set_blinking (XFCE_PANEL_BUTTON (child->button),
+ xfce_blink_button_set_blinking (XFCE_BLINK_BUTTON (child->button),
wnck_window_or_transient_needs_attention (child->window));
}
@@ -1400,7 +1400,7 @@ tasklist_button_new (XfceTasklistChild *child)
WnckWindow *window = child->window;
/* create the application button */
- child->button = xfce_panel_button_new ();
+ child->button = xfce_blink_button_new ();
gtk_button_set_relief (GTK_BUTTON (child->button),
child->tasklist->button_relief);
g_signal_connect (G_OBJECT (child->button), "toggled",
More information about the Xfce4-commits
mailing list