[Xfce4-commits] <xfce4-panel:devel> * Fix a whole bunch of compiler warnings.
Nick Schermer
nick at xfce.org
Tue Aug 11 20:26:29 CEST 2009
Updating branch refs/heads/devel
to 5c5d8e037d10218ecc807f6508d46e0a63aecbe7 (commit)
from 6ef48f28a70ad61f485fce916a3227fb144c9548 (commit)
commit 5c5d8e037d10218ecc807f6508d46e0a63aecbe7
Author: Nick Schermer <nick at xfce.org>
Date: Thu Dec 25 14:53:20 2008 +0100
* Fix a whole bunch of compiler warnings.
libxfce4panel/Makefile.am | 3 +-
libxfce4panel/libxfce4panel.h | 12 ++++
libxfce4panel/xfce-arrow-button.c | 2 -
libxfce4panel/xfce-hvbox.c | 2 -
libxfce4panel/xfce-panel-plugin-provider.c | 4 +-
libxfce4panel/xfce-panel-plugin-provider.h | 2 +-
libxfce4panel/xfce-panel-plugin.c | 5 +-
libxfce4panel/xfce-scaled-image.c | 2 -
panel/Makefile.am | 3 +-
panel/main.c | 5 +--
panel/panel-application.c | 53 +++++++-----------
panel/panel-dbus-service.c | 45 +++++++++++----
panel/panel-dbus-service.h | 2 +
panel/panel-glue.h | 7 ++-
panel/panel-item-dialog.c | 10 ++--
panel/panel-itembar.c | 14 ++---
panel/panel-module-factory.c | 10 ++--
panel/panel-module.c | 2 -
panel/panel-plugin-external.c | 22 ++++----
panel/panel-preferences-dialog.c | 3 -
panel/panel-window.c | 4 --
plugins/clock/clock-analog.c | 26 ++++-----
plugins/clock/clock-analog.h | 2 +-
plugins/clock/clock-binary.c | 49 ++++++++---------
plugins/clock/clock-binary.h | 2 +-
plugins/clock/clock-digital.c | 38 ++++++-------
plugins/clock/clock-digital.h | 2 +-
plugins/clock/clock-fuzzy.c | 35 ++++++-------
plugins/clock/clock-fuzzy.h | 2 +-
plugins/clock/clock-lcd.c | 62 ++++++++++-----------
plugins/clock/clock-lcd.h | 2 +-
plugins/clock/clock.c | 8 +--
plugins/launcher/launcher-dialog.glade | 82 ++++++++++++++++------------
plugins/launcher/launcher.c | 15 ++---
plugins/launcher/launcher.h | 13 +++--
plugins/pager/pager.c | 2 -
plugins/separator/separator.c | 11 +---
plugins/showdesktop/showdesktop.c | 4 +-
plugins/systray/Makefile.am | 28 ++--------
plugins/systray/xfce-tray-manager.c | 29 +---------
plugins/systray/xfce-tray-widget.c | 28 +---------
plugins/tasklist/tasklist-widget.c | 11 ++--
plugins/tasklist/tasklist.c | 5 +-
wrapper/Makefile.am | 3 +-
wrapper/main.c | 23 ++++----
wrapper/wrapper-plug.c | 11 ++--
wrapper/wrapper-plug.h | 14 +++--
47 files changed, 325 insertions(+), 394 deletions(-)
diff --git a/libxfce4panel/Makefile.am b/libxfce4panel/Makefile.am
index 1d7c393..04c3442 100644
--- a/libxfce4panel/Makefile.am
+++ b/libxfce4panel/Makefile.am
@@ -73,7 +73,8 @@ libxfce4panel-marshal.h: libxfce4panel-marshal.list Makefile
glib-genmarshal --prefix=_libxfce4panel_marshal --internal --header $< > $@
libxfce4panel-marshal.c: libxfce4panel-marshal.list Makefile
- glib-genmarshal --prefix=_libxfce4panel_marshal --body $< > $@
+ echo "#include <libxfce4panel/libxfce4panel-marshal.h>" > $@ \
+ && glib-genmarshal --prefix=_libxfce4panel_marshal --body $< >> $@
DISTCLEANFILES = \
$(libxfce4panel_built_sources)
diff --git a/libxfce4panel/libxfce4panel.h b/libxfce4panel/libxfce4panel.h
index 9f7f26d..2474336 100644
--- a/libxfce4panel/libxfce4panel.h
+++ b/libxfce4panel/libxfce4panel.h
@@ -40,6 +40,12 @@ G_BEGIN_DECLS
gint unique_id, \
const gchar *display_name, \
gchar **arguments, \
+ GdkScreen *screen); \
+ PANEL_SYMBOL_EXPORT G_MODULE_EXPORT XfcePanelPlugin * \
+ __xpp_construct_obj (const gchar *name, \
+ gint unique_id, \
+ const gchar *display_name, \
+ gchar **arguments, \
GdkScreen *screen) \
{ \
panel_return_val_if_fail (GDK_IS_SCREEN (screen), NULL); \
@@ -75,6 +81,12 @@ G_BEGIN_DECLS
gint unique_id, \
const gchar *display_name, \
gchar **arguments, \
+ GdkScreen *screen); \
+ PANEL_SYMBOL_EXPORT G_MODULE_EXPORT XfcePanelPlugin * \
+ __xpp_construct (const gchar *name, \
+ gint unique_id, \
+ const gchar *display_name, \
+ gchar **arguments, \
GdkScreen *screen) \
{ \
XfcePanelPlugin *plugin = NULL; \
diff --git a/libxfce4panel/xfce-arrow-button.c b/libxfce4panel/xfce-arrow-button.c
index 15293d1..e8c1f8f 100644
--- a/libxfce4panel/xfce-arrow-button.c
+++ b/libxfce4panel/xfce-arrow-button.c
@@ -47,8 +47,6 @@ enum
PROP_ARROW_TYPE
};
-static void xfce_arrow_button_class_init (XfceArrowButtonClass *klass);
-static void xfce_arrow_button_init (XfceArrowButton *button);
static void xfce_arrow_button_set_property (GObject *object,
guint prop_id,
const GValue *value,
diff --git a/libxfce4panel/xfce-hvbox.c b/libxfce4panel/xfce-hvbox.c
index 63557ca..a4f7b80 100644
--- a/libxfce4panel/xfce-hvbox.c
+++ b/libxfce4panel/xfce-hvbox.c
@@ -31,8 +31,6 @@
-static void xfce_hvbox_class_init (XfceHVBoxClass *klass);
-static void xfce_hvbox_init (XfceHVBox *hvbox);
static gpointer xfce_hvbox_get_class (XfceHVBox *hvbox);
static void xfce_hvbox_size_request (GtkWidget *widget,
GtkRequisition *requisition);
diff --git a/libxfce4panel/xfce-panel-plugin-provider.c b/libxfce4panel/xfce-panel-plugin-provider.c
index 648dd1c..8567795 100644
--- a/libxfce4panel/xfce-panel-plugin-provider.c
+++ b/libxfce4panel/xfce-panel-plugin-provider.c
@@ -142,12 +142,12 @@ xfce_panel_plugin_provider_save (XfcePanelPluginProvider *provider)
PANEL_SYMBOL_EXPORT void
xfce_panel_plugin_provider_emit_signal (XfcePanelPluginProvider *provider,
- XfcePanelPluginProviderSignal signal)
+ XfcePanelPluginProviderSignal provider_signal)
{
panel_return_if_fail (XFCE_IS_PANEL_PLUGIN_PROVIDER (provider));
/* emit the signal */
- g_signal_emit (G_OBJECT (provider), provider_signals[PROVIDER_SIGNAL], 0, signal);
+ g_signal_emit (G_OBJECT (provider), provider_signals[PROVIDER_SIGNAL], 0, provider_signal);
}
diff --git a/libxfce4panel/xfce-panel-plugin-provider.h b/libxfce4panel/xfce-panel-plugin-provider.h
index f8863fd..b324b9e 100644
--- a/libxfce4panel/xfce-panel-plugin-provider.h
+++ b/libxfce4panel/xfce-panel-plugin-provider.h
@@ -106,7 +106,7 @@ void xfce_panel_plugin_provider_set_screen_position (XfcePanelPluginProv
void xfce_panel_plugin_provider_save (XfcePanelPluginProvider *provider);
void xfce_panel_plugin_provider_emit_signal (XfcePanelPluginProvider *provider,
- XfcePanelPluginProviderSignal signal);
+ XfcePanelPluginProviderSignal provider_signal);
gboolean xfce_panel_plugin_provider_get_show_configure (XfcePanelPluginProvider *provider);
diff --git a/libxfce4panel/xfce-panel-plugin.c b/libxfce4panel/xfce-panel-plugin.c
index 32a700f..af09909 100644
--- a/libxfce4panel/xfce-panel-plugin.c
+++ b/libxfce4panel/xfce-panel-plugin.c
@@ -33,12 +33,13 @@
#define XFCE_PANEL_PLUGIN_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), XFCE_TYPE_PANEL_PLUGIN, XfcePanelPluginPrivate))
+
+
typedef const gchar *(*ProviderToPluginChar) (XfcePanelPluginProvider *provider);
typedef gint (*ProviderToPluginInt) (XfcePanelPluginProvider *provider);
-static void xfce_panel_plugin_class_init (XfcePanelPluginClass *klass);
-static void xfce_panel_plugin_init (XfcePanelPlugin *plugin);
+
static void xfce_panel_plugin_provider_init (XfcePanelPluginProviderIface *iface);
static void xfce_panel_plugin_get_property (GObject *object,
guint prop_id,
diff --git a/libxfce4panel/xfce-scaled-image.c b/libxfce4panel/xfce-scaled-image.c
index 2bbc49e..6d014d7 100644
--- a/libxfce4panel/xfce-scaled-image.c
+++ b/libxfce4panel/xfce-scaled-image.c
@@ -59,8 +59,6 @@ struct _XfceScaledImage
-static void xfce_scaled_image_class_init (XfceScaledImageClass *klass);
-static void xfce_scaled_image_init (XfceScaledImage *tasklist);
static void xfce_scaled_image_finalize (GObject *object);
static void xfce_scaled_image_size_request (GtkWidget *widget,
GtkRequisition *requisition);
diff --git a/panel/Makefile.am b/panel/Makefile.am
index d10eba5..8fb29ef 100644
--- a/panel/Makefile.am
+++ b/panel/Makefile.am
@@ -94,7 +94,8 @@ panel-marshal.h: $(srcdir)/panel-marshal.list Makefile
glib-genmarshal --header --prefix=panel_marshal $< > $@
panel-marshal.c: $(srcdir)/panel-marshal.list Makefile
- glib-genmarshal --body --prefix=panel_marshal $< > $@
+ echo "#include <panel/panel-marshal.h>" > $@ \
+ && glib-genmarshal --body --prefix=panel_marshal $< >> $@
DISTCLEANFILES = \
$(xfce4_panel_built_sources)
diff --git a/panel/main.c b/panel/main.c
index 260c18d..25f7cd0 100644
--- a/panel/main.c
+++ b/panel/main.c
@@ -117,8 +117,6 @@ callback_handler (const gchar *name,
static void
signal_handler (gint signum)
{
- extern gboolean dbus_quit_with_restart;
-
/* don't try to restart */
dbus_quit_with_restart = FALSE;
@@ -134,7 +132,6 @@ main (gint argc, gchar **argv)
PanelApplication *application;
GError *error = NULL;
PanelDBusService *dbus_service;
- extern gboolean dbus_quit_with_restart;
gboolean result;
guint i;
const gint signums[] = { SIGHUP, SIGINT, SIGQUIT, SIGTERM };
@@ -147,7 +144,7 @@ main (gint argc, gchar **argv)
g_thread_init (NULL);
/* initialize gtk+ */
- if (!gtk_init_with_args (&argc, &argv, _("[ARGUMENTS...]"), option_entries, GETTEXT_PACKAGE, &error))
+ if (!gtk_init_with_args (&argc, &argv, _("[ARGUMENTS...]"), option_entries, (gchar *) GETTEXT_PACKAGE, &error))
{
if (G_LIKELY (error))
{
diff --git a/panel/panel-application.c b/panel/panel-application.c
index 969328d..e79a14a 100644
--- a/panel/panel-application.c
+++ b/panel/panel-application.c
@@ -34,6 +34,7 @@
#include <libxfce4panel/libxfce4panel.h>
#include <libxfce4panel/xfce-panel-plugin-provider.h>
+#include <panel/panel-dbus-service.h>
#include <panel/panel-window.h>
#include <panel/panel-application.h>
#include <panel/panel-itembar.h>
@@ -48,8 +49,6 @@
-static void panel_application_class_init (PanelApplicationClass *klass);
-static void panel_application_init (PanelApplication *application);
static void panel_application_finalize (GObject *object);
static void panel_application_load (PanelApplication *application);
static void panel_application_plugin_move (GtkWidget *item,
@@ -73,13 +72,13 @@ static void panel_application_drag_data_received (GtkWidget *i
gint y,
GtkSelectionData *selection_data,
guint info,
- guint time,
+ guint drag_time,
PanelWindow *window);
static gboolean panel_application_drag_drop (GtkWidget *itembar,
GdkDragContext *context,
gint x,
gint y,
- guint time,
+ guint drag_time,
PanelWindow *window);
@@ -116,7 +115,7 @@ struct _PanelApplication
static const GtkTargetEntry drag_targets[] =
{
- { "application/x-xfce-panel-plugin-widget", 0, 0 }
+ { (gchar *) "application/x-xfce-panel-plugin-widget", 0, 0 }
};
@@ -199,7 +198,7 @@ panel_application_xfconf_window_bindings (PanelApplication *application,
XfconfChannel *channel = application->xfconf;
gchar buf[100];
guint i;
- guint index = g_slist_index (application->windows, window);
+ guint panel_n = g_slist_index (application->windows, window);
GValue value = { 0, };
const gchar *bool_properties[] = { "locked", "autohide", "span-monitors", "horizontal" };
const gchar *uint_properties[] = { "size", "length", "x-offset", "y-offset",
@@ -210,13 +209,13 @@ panel_application_xfconf_window_bindings (PanelApplication *application,
for (i = 0; i < G_N_ELEMENTS (bool_properties); i++)
{
/* create xfconf property name */
- g_snprintf (buf, sizeof (buf), "/panels/panel-%u/%s", index, bool_properties[i]);
+ g_snprintf (buf, sizeof (buf), "/panels/panel-%u/%s", panel_n, bool_properties[i]);
/* store the window settings in the channel before we create the binding,
* so we don't loose the panel settings */
if (store_settings)
{
- g_value_init(&value, G_TYPE_BOOLEAN);
+ g_value_init (&value, G_TYPE_BOOLEAN);
g_object_get_property (G_OBJECT (window), bool_properties[i], &value);
xfconf_channel_set_property (channel, buf, &value);
g_value_unset (&value);
@@ -230,7 +229,7 @@ panel_application_xfconf_window_bindings (PanelApplication *application,
for (i = 0; i < G_N_ELEMENTS (uint_properties); i++)
{
/* create xfconf property name */
- g_snprintf (buf, sizeof (buf), "/panels/panel-%u/%s", index, uint_properties[i]);
+ g_snprintf (buf, sizeof (buf), "/panels/panel-%u/%s", panel_n, uint_properties[i]);
/* store the window settings in the channel before we create the binding,
* so we don't loose the panel settings */
@@ -354,14 +353,13 @@ panel_application_plugin_move (GtkWidget *item,
static void
panel_application_plugin_provider_signal (XfcePanelPluginProvider *provider,
- XfcePanelPluginProviderSignal signal,
+ XfcePanelPluginProviderSignal provider_signal,
PanelApplication *application)
{
- GtkWidget *itembar;
- PanelWindow *window;
- gchar *property;
- gchar *path, *filename;
- extern gboolean dbus_quit_with_restart;
+ GtkWidget *itembar;
+ PanelWindow *window;
+ gchar *property;
+ gchar *path, *filename;
panel_return_if_fail (PANEL_IS_APPLICATION (application));
panel_return_if_fail (XFCE_IS_PANEL_PLUGIN_PROVIDER (provider));
@@ -370,7 +368,7 @@ panel_application_plugin_provider_signal (XfcePanelPluginProvider *provide
window = PANEL_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (provider)));
/* handle the signal emitted from the plugin provider */
- switch (signal)
+ switch (provider_signal)
{
case PROVIDER_SIGNAL_MOVE_PLUGIN:
/* invoke the move function */
@@ -383,7 +381,8 @@ panel_application_plugin_provider_signal (XfcePanelPluginProvider *provide
itembar = gtk_bin_get_child (GTK_BIN (window));
/* set new expand mode */
- panel_itembar_set_child_expand (PANEL_ITEMBAR (itembar), GTK_WIDGET (provider), !!(signal == PROVIDER_SIGNAL_EXPAND_PLUGIN));
+ panel_itembar_set_child_expand (PANEL_ITEMBAR (itembar), GTK_WIDGET (provider),
+ !!(provider_signal == PROVIDER_SIGNAL_EXPAND_PLUGIN));
break;
case PROVIDER_SIGNAL_LOCK_PANEL:
@@ -437,7 +436,7 @@ panel_application_plugin_provider_signal (XfcePanelPluginProvider *provide
case PROVIDER_SIGNAL_PANEL_QUIT:
case PROVIDER_SIGNAL_PANEL_RESTART:
/* set the restart boolean */
- dbus_quit_with_restart = !!(signal == PROVIDER_SIGNAL_PANEL_RESTART);
+ dbus_quit_with_restart = !!(provider_signal == PROVIDER_SIGNAL_PANEL_RESTART);
/* quit the main loop */
gtk_main_quit ();
@@ -606,7 +605,7 @@ panel_application_drag_data_received (GtkWidget *itembar,
gint y,
GtkSelectionData *selection_data,
guint info,
- guint time,
+ guint drag_time,
PanelWindow *window)
{
guint position;
@@ -694,7 +693,7 @@ panel_application_drag_data_received (GtkWidget *itembar,
g_object_unref (G_OBJECT (application));
/* tell the peer that we handled the drop */
- gtk_drag_finish (context, succeed, FALSE, time);
+ gtk_drag_finish (context, succeed, FALSE, drag_time);
}
@@ -704,7 +703,7 @@ panel_application_drag_drop (GtkWidget *itembar,
GdkDragContext *context,
gint x,
gint y,
- guint time,
+ guint drag_time,
PanelWindow *window)
{
GdkAtom target;
@@ -720,7 +719,7 @@ panel_application_drag_drop (GtkWidget *itembar,
return FALSE;
/* request the drag data */
- gtk_drag_get_data (itembar, context, target, time);
+ gtk_drag_get_data (itembar, context, target, drag_time);
/* we call gtk_drag_finish later */
return TRUE;
@@ -919,16 +918,6 @@ panel_application_new_window (PanelApplication *application,
-GSList *
-panel_application_get_windows (PanelApplication *application)
-{
- panel_return_val_if_fail (PANEL_IS_APPLICATION (application), NULL);
-
- return application->windows;
-}
-
-
-
guint
panel_application_get_n_windows (PanelApplication *application)
{
diff --git a/panel/panel-dbus-service.c b/panel/panel-dbus-service.c
index 25684ec..211b704 100644
--- a/panel/panel-dbus-service.c
+++ b/panel/panel-dbus-service.c
@@ -41,9 +41,36 @@
-static void panel_dbus_service_class_init (PanelDBusServiceClass *klass);
-static void panel_dbus_service_init (PanelDBusService *service);
-static void panel_dbus_service_finalize (GObject *object);
+static void panel_dbus_service_finalize (GObject *object);
+static gboolean panel_dbus_service_display_preferences_dialog (PanelDBusService *service,
+ guint active,
+ GError **error);
+static gboolean panel_dbus_service_display_items_dialog (PanelDBusService *service,
+ guint active,
+ GError **error);
+static gboolean panel_dbus_service_save (PanelDBusService *service,
+ GError **error);
+static gboolean panel_dbus_service_add_new_item (PanelDBusService *service,
+ const gchar *plugin_name,
+ gchar **arguments,
+ GError **error);
+static gboolean panel_dbus_service_terminate (PanelDBusService *service,
+ gboolean restart,
+ GError **error);
+static gboolean panel_dbus_service_plugin_provider_signal (PanelDBusService *service,
+ gint plugin_id,
+ gint provider_signal,
+ GError *error);
+static gboolean panel_dbus_service_plugin_panel_property (PanelDBusService *service,
+ gint plugin_id,
+ gint property,
+ GValue *value,
+ GError *error);
+
+
+
+/* include the dbus glue generated by dbus-binding-tool */
+#include <panel/panel-dbus-service-infos.h>
@@ -84,8 +111,7 @@ G_DEFINE_TYPE (PanelDBusService, panel_dbus_service, G_TYPE_OBJECT);
static void
panel_dbus_service_class_init (PanelDBusServiceClass *klass)
{
- extern const DBusGObjectInfo dbus_glib_panel_dbus_service_object_info;
- GObjectClass *gobject_class;
+ GObjectClass *gobject_class;
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = panel_dbus_service_finalize;
@@ -268,7 +294,7 @@ panel_dbus_service_terminate (PanelDBusService *service,
static gboolean
panel_dbus_service_plugin_provider_signal (PanelDBusService *service,
gint plugin_id,
- gint signal,
+ gint provider_signal,
GError *error)
{
PanelModuleFactory *factory;
@@ -285,7 +311,7 @@ panel_dbus_service_plugin_provider_signal (PanelDBusService *service,
/* emit the signal for the local plugin provider */
if (G_LIKELY (provider))
- xfce_panel_plugin_provider_emit_signal (XFCE_PANEL_PLUGIN_PROVIDER (provider), signal);
+ xfce_panel_plugin_provider_emit_signal (XFCE_PANEL_PLUGIN_PROVIDER (provider), provider_signal);
/* release the factory */
g_object_unref (G_OBJECT (factory));
@@ -347,8 +373,3 @@ panel_dbus_service_plugin_property_changed (gint plugin_id,
/* release */
g_object_unref (G_OBJECT (service));
}
-
-
-
-/* include the dbus glue generated by dbus-binding-tool */
-#include <panel/panel-dbus-service-infos.h>
diff --git a/panel/panel-dbus-service.h b/panel/panel-dbus-service.h
index b7742ac..310b443 100644
--- a/panel/panel-dbus-service.h
+++ b/panel/panel-dbus-service.h
@@ -33,6 +33,8 @@ typedef struct _PanelDBusService PanelDBusService;
#define PANEL_IS_DBUS_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANEL_TYPE_DBUS_SERVICE))
#define PANEL_DBUS_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANEL_TYPE_DBUS_SERVICE, PanelDBusServiceClass))
+extern gboolean dbus_quit_with_restart;
+
GType panel_dbus_service_get_type (void) G_GNUC_CONST;
PanelDBusService *panel_dbus_service_get (void);
diff --git a/panel/panel-glue.h b/panel/panel-glue.h
index b5d645a..ab90c67 100644
--- a/panel/panel-glue.h
+++ b/panel/panel-glue.h
@@ -26,8 +26,11 @@
#include <libxfce4panel/xfce-panel-plugin-provider.h>
G_BEGIN_DECLS
-void panel_glue_set_provider_info (XfcePanelPluginProvider *provider,
- PanelWindow *window);
+
+XfceScreenPosition panel_glue_get_screen_position (PanelWindow *window);
+
+void panel_glue_set_provider_info (XfcePanelPluginProvider *provider,
+ PanelWindow *window);
G_END_DECLS
diff --git a/panel/panel-item-dialog.c b/panel/panel-item-dialog.c
index bc1a124..79c5f4d 100644
--- a/panel/panel-item-dialog.c
+++ b/panel/panel-item-dialog.c
@@ -44,8 +44,6 @@
-static void panel_item_dialog_class_init (PanelItemDialogClass *klass);
-static void panel_item_dialog_init (PanelItemDialog *dialog);
static void panel_item_dialog_finalize (GObject *object);
static void panel_item_dialog_response (GtkDialog *dialog, gint response_id);
static void panel_item_dialog_unique_changed (PanelModuleFactory *factory, PanelModule *module, PanelItemDialog *dialog);
@@ -53,7 +51,7 @@ static gboolean panel_item_dialog_unique_changed_foreach (GtkTreeModel *model, G
static gboolean panel_item_dialog_separator_func (GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data);
static PanelModule *panel_item_dialog_get_selected_module (GtkTreeView *treeview);
static void panel_item_dialog_drag_begin (GtkWidget *treeview, GdkDragContext *context, PanelItemDialog *dialog);
-static void panel_item_dialog_drag_data_get (GtkWidget *treeview, GdkDragContext *context, GtkSelectionData *selection_data, guint info, guint time, PanelItemDialog *dialog);
+static void panel_item_dialog_drag_data_get (GtkWidget *treeview, GdkDragContext *context, GtkSelectionData *selection_data, guint info, guint drag_time, PanelItemDialog *dialog);
static void panel_item_dialog_populate_store (PanelItemDialog *dialog);
static gint panel_item_dialog_compare_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data);
static gboolean panel_item_dialog_visible_func (GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data);
@@ -90,7 +88,7 @@ enum
static const GtkTargetEntry drag_targets[] =
{
- { "application/x-xfce-panel-plugin-name", 0, 0 },
+ { (gchar *) "application/x-xfce-panel-plugin-name", 0, 0 },
};
@@ -456,8 +454,8 @@ static void
panel_item_dialog_drag_data_get (GtkWidget *treeview,
GdkDragContext *context,
GtkSelectionData *selection_data,
- guint info,
- guint time,
+ guint drag_info,
+ guint drag_time,
PanelItemDialog *dialog)
{
PanelModule *module;
diff --git a/panel/panel-itembar.c b/panel/panel-itembar.c
index 35238b1..d60fb62 100644
--- a/panel/panel-itembar.c
+++ b/panel/panel-itembar.c
@@ -34,8 +34,6 @@
-static void panel_itembar_class_init (PanelItembarClass *klass);
-static void panel_itembar_init (PanelItembar *itembar);
static void panel_itembar_set_property (GObject *object,
guint prop_id,
const GValue *value,
@@ -59,10 +57,10 @@ static gboolean panel_itembar_drag_motion (GtkWidget *widget,
GdkDragContext *drag_context,
gint drag_x,
gint drag_y,
- guint time);
+ guint drag_time);
static void panel_itembar_drag_leave (GtkWidget *widget,
GdkDragContext *drag_context,
- guint time);
+ guint drag_time);
static void panel_itembar_add (GtkContainer *container,
GtkWidget *child);
static void panel_itembar_remove (GtkContainer *container,
@@ -122,8 +120,8 @@ G_DEFINE_TYPE (PanelItembar, panel_itembar, GTK_TYPE_CONTAINER);
/* drop targets */
static const GtkTargetEntry drop_targets[] =
{
- { "application/x-xfce-panel-plugin-name", 0, PANEL_ITEMBAR_TARGET_PLUGIN_NAME },
- { "application/x-xfce-panel-plugin-widget", 0, PANEL_ITEMBAR_TARGET_PLUGIN_WIDGET },
+ { (gchar *) "application/x-xfce-panel-plugin-name", 0, PANEL_ITEMBAR_TARGET_PLUGIN_NAME },
+ { (gchar *) "application/x-xfce-panel-plugin-widget", 0, PANEL_ITEMBAR_TARGET_PLUGIN_WIDGET },
};
@@ -550,7 +548,7 @@ panel_itembar_drag_motion (GtkWidget *widget,
GdkDragContext *drag_context,
gint drag_x,
gint drag_y,
- guint time)
+ guint drag_time)
{
PanelItembar *itembar = PANEL_ITEMBAR (widget);
GdkWindowAttr attributes;
@@ -632,7 +630,7 @@ panel_itembar_drag_motion (GtkWidget *widget,
static void
panel_itembar_drag_leave (GtkWidget *widget,
GdkDragContext *drag_context,
- guint time)
+ guint drag_time)
{
PanelItembar *itembar = PANEL_ITEMBAR (widget);
diff --git a/panel/panel-module-factory.c b/panel/panel-module-factory.c
index e356a5a..e1fe8c2 100644
--- a/panel/panel-module-factory.c
+++ b/panel/panel-module-factory.c
@@ -38,8 +38,6 @@
-static void panel_module_factory_class_init (PanelModuleFactoryClass *klass);
-static void panel_module_factory_init (PanelModuleFactory *plugin_factory);
static void panel_module_factory_finalize (GObject *object);
static void panel_module_factory_load_modules (PanelModuleFactory *factory);
static gboolean panel_module_factory_modules_cleanup (gpointer key,
@@ -250,19 +248,19 @@ panel_module_factory_modules_cleanup (gpointer key,
{
PanelModuleFactory *factory = PANEL_MODULE_FACTORY (user_data);
PanelModule *module = PANEL_MODULE (value);
- gboolean remove;
+ gboolean remove_from_table;
panel_return_val_if_fail (PANEL_IS_MODULE (module), TRUE);
panel_return_val_if_fail (PANEL_IS_MODULE_FACTORY (factory), TRUE);
/* get whether the module is valid */
- remove = !panel_module_is_valid (module);
+ remove_from_table = !panel_module_is_valid (module);
/* if we're going to remove this item, check if it's the launcher */
- if (remove == TRUE && exo_str_is_equal (LAUNCHER_PLUGIN_NAME, panel_module_get_internal_name (module)))
+ if (remove_from_table && exo_str_is_equal (LAUNCHER_PLUGIN_NAME, panel_module_get_internal_name (module)))
factory->has_launcher = FALSE;
- return remove;
+ return remove_from_table;
}
diff --git a/panel/panel-module.c b/panel/panel-module.c
index 3bc2adc..9d3a55f 100644
--- a/panel/panel-module.c
+++ b/panel/panel-module.c
@@ -36,8 +36,6 @@
-static void panel_module_class_init (PanelModuleClass *klass);
-static void panel_module_init (PanelModule *plugin);
static void panel_module_dispose (GObject *object);
static void panel_module_finalize (GObject *object);
static gboolean panel_module_load (GTypeModule *type_module);
diff --git a/panel/panel-plugin-external.c b/panel/panel-plugin-external.c
index 81eef44..6a95e6a 100644
--- a/panel/panel-plugin-external.c
+++ b/panel/panel-plugin-external.c
@@ -46,8 +46,6 @@
-static void panel_plugin_external_class_init (PanelPluginExternalClass *klass);
-static void panel_plugin_external_init (PanelPluginExternal *external);
static void panel_plugin_external_provider_init (XfcePanelPluginProviderIface *iface);
static void panel_plugin_external_finalize (GObject *object);
static void panel_plugin_external_realize (GtkWidget *widget);
@@ -234,17 +232,17 @@ panel_plugin_external_realize (GtkWidget *widget)
argv = g_new (gchar *, argc);
/* setup the basic argv */
- argv[0] = LIBEXECDIR "/xfce4-panel-wrapper";
- argv[1] = "-n";
+ argv[0] = (gchar *) LIBEXECDIR "/xfce4-panel-wrapper";
+ argv[1] = (gchar *) "-n";
argv[2] = (gchar *) panel_module_get_internal_name (external->module);
- argv[3] = "-i";
- argv[4] = unique_id;
- argv[5] = "-d";
+ argv[3] = (gchar *) "-i";
+ argv[4] = (gchar *) unique_id;
+ argv[5] = (gchar *) "-d";
argv[6] = (gchar *) panel_module_get_name (external->module);
- argv[7] = "-f";
+ argv[7] = (gchar *) "-f";
argv[8] = (gchar *) panel_module_get_library_filename (external->module);
- argv[9] = "-s";
- argv[10] = socket_id;
+ argv[9] = (gchar *) "-s";
+ argv[10] = (gchar *) socket_id;
/* append the arguments */
if (G_UNLIKELY (external->arguments != NULL))
@@ -424,7 +422,7 @@ panel_plugin_external_plug_added (GtkSocket *socket)
static void
panel_plugin_external_provider_signal (XfcePanelPluginProvider *provider,
- XfcePanelPluginProviderSignal signal)
+ XfcePanelPluginProviderSignal provider_signal)
{
PanelPluginExternal *external = PANEL_PLUGIN_EXTERNAL (provider);
@@ -433,7 +431,7 @@ panel_plugin_external_provider_signal (XfcePanelPluginProvider *provider,
/* we handle some signals here, everything else is handled in
* panel-application */
- switch (signal)
+ switch (provider_signal)
{
case PROVIDER_SIGNAL_REMOVE_PLUGIN:
/* we're forced removing the plugin, don't ask for a restart */
diff --git a/panel/panel-preferences-dialog.c b/panel/panel-preferences-dialog.c
index cdf0b74..1f013dc 100644
--- a/panel/panel-preferences-dialog.c
+++ b/panel/panel-preferences-dialog.c
@@ -36,13 +36,10 @@
#include <panel/panel-preferences-dialog.h>
#include <panel/panel-preferences-dialog-glade.h>
-#define BORDER (6)
#define PREFERENCES_HELP_URL "http://www.xfce.org"
-static void panel_preferences_dialog_class_init (PanelPreferencesDialogClass *klass);
-static void panel_preferences_dialog_init (PanelPreferencesDialog *dialog);
static void panel_preferences_dialog_finalize (GObject *object);
static void panel_preferences_dialog_response (GtkWidget *window, gint response_id, PanelPreferencesDialog *dialog);
diff --git a/panel/panel-window.c b/panel/panel-window.c
index cdfec36..b931c57 100644
--- a/panel/panel-window.c
+++ b/panel/panel-window.c
@@ -48,8 +48,6 @@
-static void panel_window_class_init (PanelWindowClass *klass);
-static void panel_window_init (PanelWindow *window);
static void panel_window_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static void panel_window_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void panel_window_finalize (GObject *object);
@@ -1992,8 +1990,6 @@ panel_window_set_autohide (PanelWindow *window,
static void
panel_window_menu_quit (gpointer boolean)
{
- extern gboolean dbus_quit_with_restart;
-
/* restart or quit */
dbus_quit_with_restart = !!(GPOINTER_TO_UINT (boolean));
diff --git a/plugins/clock/clock-analog.c b/plugins/clock/clock-analog.c
index 9356418..d87e757 100644
--- a/plugins/clock/clock-analog.c
+++ b/plugins/clock/clock-analog.c
@@ -45,8 +45,6 @@
/* prototypes */
-static void xfce_clock_analog_class_init (XfceClockAnalogClass *klass);
-static void xfce_clock_analog_init (XfceClockAnalog *clock);
static void xfce_clock_analog_set_property (GObject *object,
guint prop_id,
const GValue *value,
@@ -123,10 +121,10 @@ xfce_clock_analog_class_init (XfceClockAnalogClass *klass)
static void
-xfce_clock_analog_init (XfceClockAnalog *clock)
+xfce_clock_analog_init (XfceClockAnalog *analog)
{
/* init */
- clock->show_seconds = FALSE;
+ analog->show_seconds = FALSE;
}
@@ -137,12 +135,12 @@ xfce_clock_analog_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- XfceClockAnalog *clock = XFCE_CLOCK_ANALOG (object);
+ XfceClockAnalog *analog = XFCE_CLOCK_ANALOG (object);
switch (prop_id)
{
case PROP_SHOW_SECONDS:
- clock->show_seconds = g_value_get_boolean (value);
+ analog->show_seconds = g_value_get_boolean (value);
break;
default:
@@ -159,12 +157,12 @@ xfce_clock_analog_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- XfceClockAnalog *clock = XFCE_CLOCK_ANALOG (object);
+ XfceClockAnalog *analog = XFCE_CLOCK_ANALOG (object);
switch (prop_id)
{
case PROP_SHOW_SECONDS:
- g_value_set_boolean (value, clock->show_seconds);
+ g_value_set_boolean (value, analog->show_seconds);
break;
default:
@@ -194,13 +192,13 @@ static gboolean
xfce_clock_analog_expose_event (GtkWidget *widget,
GdkEventExpose *event)
{
- XfceClockAnalog *clock = XFCE_CLOCK_ANALOG (widget);
+ XfceClockAnalog *analog = XFCE_CLOCK_ANALOG (widget);
gdouble xc, yc;
gdouble angle, radius;
cairo_t *cr;
struct tm tm;
- panel_return_val_if_fail (XFCE_CLOCK_IS_ANALOG (clock), FALSE);
+ panel_return_val_if_fail (XFCE_CLOCK_IS_ANALOG (analog), FALSE);
/* get center of the widget and the radius */
xc = (widget->allocation.width / 2.0);
@@ -230,7 +228,7 @@ xfce_clock_analog_expose_event (GtkWidget *widget,
/* draw the ticks */
xfce_clock_analog_draw_ticks (cr, xc, yc, radius);
- if (clock->show_seconds)
+ if (analog->show_seconds)
{
/* second pointer */
angle = TICKS_TO_RADIANS (tm.tm_sec);
@@ -351,9 +349,9 @@ xfce_clock_analog_update (gpointer user_data)
guint
-xfce_clock_analog_interval (XfceClockAnalog *clock)
+xfce_clock_analog_interval (XfceClockAnalog *analog)
{
- panel_return_val_if_fail (XFCE_CLOCK_IS_ANALOG (clock), CLOCK_INTERVAL_SECOND);
+ panel_return_val_if_fail (XFCE_CLOCK_IS_ANALOG (analog), CLOCK_INTERVAL_SECOND);
- return clock->show_seconds ? CLOCK_INTERVAL_SECOND : CLOCK_INTERVAL_MINUTE;
+ return analog->show_seconds ? CLOCK_INTERVAL_SECOND : CLOCK_INTERVAL_MINUTE;
}
diff --git a/plugins/clock/clock-analog.h b/plugins/clock/clock-analog.h
index c9bc515..6f1e362 100644
--- a/plugins/clock/clock-analog.h
+++ b/plugins/clock/clock-analog.h
@@ -38,7 +38,7 @@ GtkWidget *xfce_clock_analog_new (void) G_GNUC_MALLOC;
gboolean xfce_clock_analog_update (gpointer user_data);
-guint xfce_clock_analog_interval (XfceClockAnalog *clock);
+guint xfce_clock_analog_interval (XfceClockAnalog *analog);
G_END_DECLS
diff --git a/plugins/clock/clock-binary.c b/plugins/clock/clock-binary.c
index 9a37121..494e12a 100644
--- a/plugins/clock/clock-binary.c
+++ b/plugins/clock/clock-binary.c
@@ -40,9 +40,6 @@
-/* class functions */
-static void xfce_clock_binary_class_init (XfceClockBinaryClass *klass);
-static void xfce_clock_binary_init (XfceClockBinary *clock);
static void xfce_clock_binary_set_property (GObject *object,
guint prop_id,
const GValue *value,
@@ -118,11 +115,11 @@ xfce_clock_binary_class_init (XfceClockBinaryClass *klass)
static void
-xfce_clock_binary_init (XfceClockBinary *clock)
+xfce_clock_binary_init (XfceClockBinary *binary)
{
/* init */
- clock->show_seconds = FALSE;
- clock->true_binary = FALSE;
+ binary->show_seconds = FALSE;
+ binary->true_binary = FALSE;
}
@@ -133,16 +130,16 @@ xfce_clock_binary_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- XfceClockBinary *clock = XFCE_CLOCK_BINARY (object);
+ XfceClockBinary *binary = XFCE_CLOCK_BINARY (object);
switch (prop_id)
{
case PROP_SHOW_SECONDS:
- clock->show_seconds = g_value_get_boolean (value);
+ binary->show_seconds = g_value_get_boolean (value);
break;
case PROP_TRUE_BINARY:
- clock->true_binary = g_value_get_boolean (value);
+ binary->true_binary = g_value_get_boolean (value);
break;
default:
@@ -159,16 +156,16 @@ xfce_clock_binary_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- XfceClockBinary *clock = XFCE_CLOCK_BINARY (object);
+ XfceClockBinary *binary = XFCE_CLOCK_BINARY (object);
switch (prop_id)
{
case PROP_SHOW_SECONDS:
- g_value_set_boolean (value, clock->show_seconds);
+ g_value_set_boolean (value, binary->show_seconds);
break;
case PROP_TRUE_BINARY:
- g_value_set_boolean (value, clock->true_binary);
+ g_value_set_boolean (value, binary->true_binary);
break;
default:
@@ -181,20 +178,20 @@ xfce_clock_binary_get_property (GObject *object,
static void
xfce_clock_binary_size_request (GtkWidget *widget,
- GtkRequisition *requisition)
+ GtkRequisition *requisition)
{
gint width, height;
gdouble ratio;
- XfceClockBinary *clock = XFCE_CLOCK_BINARY (widget);
+ XfceClockBinary *binary = XFCE_CLOCK_BINARY (widget);
/* get the current widget size */
gtk_widget_get_size_request (widget, &width, &height);
/* ratio of the clock */
- if (clock->true_binary)
- ratio = clock->show_seconds ? 2.0 : 3.0;
+ if (binary->true_binary)
+ ratio = binary->show_seconds ? 2.0 : 3.0;
else
- ratio = clock->show_seconds ? 1.5 : 1.0;
+ ratio = binary->show_seconds ? 1.5 : 1.0;
/* set requisition based on the plugin orientation */
if (width == -1)
@@ -215,7 +212,7 @@ static gboolean
xfce_clock_binary_expose_event (GtkWidget *widget,
GdkEventExpose *event)
{
- XfceClockBinary *clock = XFCE_CLOCK_BINARY (widget);
+ XfceClockBinary *binary = XFCE_CLOCK_BINARY (widget);
gdouble cw, ch, columns;
gint ticks, cells, decimal;
gdouble radius;
@@ -227,14 +224,14 @@ xfce_clock_binary_expose_event (GtkWidget *widget,
GdkColor active, inactive;
struct tm tm;
- panel_return_val_if_fail (XFCE_CLOCK_IS_BINARY (clock), FALSE);
+ panel_return_val_if_fail (XFCE_CLOCK_IS_BINARY (binary), FALSE);
/* number of columns and cells */
- columns = clock->show_seconds ? 3.0 : 2.0;
- cells = clock->true_binary ? 6 : 8;
+ columns = binary->show_seconds ? 3.0 : 2.0;
+ cells = binary->true_binary ? 6 : 8;
/* cell width and height */
- if (clock->true_binary)
+ if (binary->true_binary)
{
cw = widget->allocation.width / 6.0;
ch = widget->allocation.height / columns;
@@ -278,7 +275,7 @@ xfce_clock_binary_expose_event (GtkWidget *widget,
/* walk the binary columns */
for (j = 0; j < cells; j++)
{
- if (clock->true_binary)
+ if (binary->true_binary)
{
/* skip the columns we don't draw */
if (i == 0 && j == 0)
@@ -364,9 +361,9 @@ xfce_clock_binary_update (gpointer user_data)
guint
-xfce_clock_binary_interval (XfceClockBinary *clock)
+xfce_clock_binary_interval (XfceClockBinary *binary)
{
- panel_return_val_if_fail (XFCE_CLOCK_IS_BINARY (clock), CLOCK_INTERVAL_SECOND);
+ panel_return_val_if_fail (XFCE_CLOCK_IS_BINARY (binary), CLOCK_INTERVAL_SECOND);
- return clock->show_seconds ? CLOCK_INTERVAL_SECOND : CLOCK_INTERVAL_MINUTE;
+ return binary->show_seconds ? CLOCK_INTERVAL_SECOND : CLOCK_INTERVAL_MINUTE;
}
diff --git a/plugins/clock/clock-binary.h b/plugins/clock/clock-binary.h
index 9844538..068f105 100644
--- a/plugins/clock/clock-binary.h
+++ b/plugins/clock/clock-binary.h
@@ -38,7 +38,7 @@ GtkWidget *xfce_clock_binary_new (void) G_GNUC_MALLOC;
gboolean xfce_clock_binary_update (gpointer user_data);
-guint xfce_clock_binary_interval (XfceClockBinary *clock);
+guint xfce_clock_binary_interval (XfceClockBinary *binary);
G_END_DECLS
diff --git a/plugins/clock/clock-digital.c b/plugins/clock/clock-digital.c
index e8b0829..e094c42 100644
--- a/plugins/clock/clock-digital.c
+++ b/plugins/clock/clock-digital.c
@@ -32,8 +32,6 @@
-static void xfce_clock_digital_class_init (XfceClockDigitalClass *klass);
-static void xfce_clock_digital_init (XfceClockDigital *clock);
static void xfce_clock_digital_finalize (GObject *object);
static void xfce_clock_digital_set_property (GObject *object,
guint prop_id,
@@ -92,13 +90,13 @@ xfce_clock_digital_class_init (XfceClockDigitalClass *klass)
static void
-xfce_clock_digital_init (XfceClockDigital *clock)
+xfce_clock_digital_init (XfceClockDigital *digital)
{
/* init */
- clock->format = NULL;
+ digital->format = NULL;
/* center text */
- gtk_label_set_justify (GTK_LABEL (clock), GTK_JUSTIFY_CENTER);
+ gtk_label_set_justify (GTK_LABEL (digital), GTK_JUSTIFY_CENTER);
}
@@ -106,10 +104,10 @@ xfce_clock_digital_init (XfceClockDigital *clock)
static void
xfce_clock_digital_finalize (GObject *object)
{
- XfceClockDigital *clock = XFCE_CLOCK_DIGITAL (object);
+ XfceClockDigital *digital = XFCE_CLOCK_DIGITAL (object);
/* cleanup */
- g_free (clock->format);
+ g_free (digital->format);
(*G_OBJECT_CLASS (xfce_clock_digital_parent_class)->finalize) (object);
}
@@ -122,19 +120,19 @@ xfce_clock_digital_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- XfceClockDigital *clock = XFCE_CLOCK_DIGITAL (object);
+ XfceClockDigital *digital = XFCE_CLOCK_DIGITAL (object);
switch (prop_id)
{
case PROP_DIGITAL_FORMAT:
/* cleanup */
- g_free (clock->format);
+ g_free (digital->format);
/* set new format */
- clock->format = g_value_dup_string (value);
+ digital->format = g_value_dup_string (value);
/* update the widget */
- xfce_clock_digital_update (clock);
+ xfce_clock_digital_update (digital);
break;
default:
@@ -151,12 +149,12 @@ xfce_clock_digital_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- XfceClockDigital *clock = XFCE_CLOCK_DIGITAL (object);
+ XfceClockDigital *digital = XFCE_CLOCK_DIGITAL (object);
switch (prop_id)
{
case PROP_DIGITAL_FORMAT:
- g_value_set_string (value, clock->format);
+ g_value_set_string (value, digital->format);
break;
default:
@@ -178,21 +176,21 @@ xfce_clock_digital_new (void)
gboolean
xfce_clock_digital_update (gpointer user_data)
{
- XfceClockDigital *clock = XFCE_CLOCK_DIGITAL (user_data);
+ XfceClockDigital *digital = XFCE_CLOCK_DIGITAL (user_data);
gchar *string;
struct tm tm;
- panel_return_val_if_fail (XFCE_CLOCK_IS_DIGITAL (user_data), FALSE);
+ panel_return_val_if_fail (XFCE_CLOCK_IS_DIGITAL (digital), FALSE);
/* get the local time */
clock_plugin_get_localtime (&tm);
/* get the string */
- string = clock_plugin_strdup_strftime (clock->format ? clock->format :
+ string = clock_plugin_strdup_strftime (digital->format ? digital->format :
DEFAULT_DIGITAL_FORMAT, &tm);
/* set the new label */
- gtk_label_set_markup (GTK_LABEL (clock), string);
+ gtk_label_set_markup (GTK_LABEL (digital), string);
/* cleanup */
g_free (string);
@@ -203,10 +201,10 @@ xfce_clock_digital_update (gpointer user_data)
guint
-xfce_clock_digital_interval (XfceClockDigital *clock)
+xfce_clock_digital_interval (XfceClockDigital *digital)
{
- panel_return_val_if_fail (XFCE_CLOCK_IS_DIGITAL (clock), CLOCK_INTERVAL_SECOND);
+ panel_return_val_if_fail (XFCE_CLOCK_IS_DIGITAL (digital), CLOCK_INTERVAL_SECOND);
- return clock_plugin_interval_from_format (clock->format ? clock->format :
+ return clock_plugin_interval_from_format (digital->format ? digital->format :
DEFAULT_DIGITAL_FORMAT);
}
diff --git a/plugins/clock/clock-digital.h b/plugins/clock/clock-digital.h
index 329af2d..e21f6af 100644
--- a/plugins/clock/clock-digital.h
+++ b/plugins/clock/clock-digital.h
@@ -38,7 +38,7 @@ GtkWidget *xfce_clock_digital_new (void) G_GNUC_MALLOC;
gboolean xfce_clock_digital_update (gpointer user_data);
-guint xfce_clock_digital_interval (XfceClockDigital *clock);
+guint xfce_clock_digital_interval (XfceClockDigital *digital);
G_END_DECLS
diff --git a/plugins/clock/clock-fuzzy.c b/plugins/clock/clock-fuzzy.c
index f786d20..ace22b6 100644
--- a/plugins/clock/clock-fuzzy.c
+++ b/plugins/clock/clock-fuzzy.c
@@ -32,8 +32,6 @@
-static void xfce_clock_fuzzy_class_init (XfceClockFuzzyClass *klass);
-static void xfce_clock_fuzzy_init (XfceClockFuzzy *clock);
static void xfce_clock_fuzzy_set_property (GObject *object,
guint prop_id,
const GValue *value,
@@ -129,13 +127,13 @@ xfce_clock_fuzzy_class_init (XfceClockFuzzyClass *klass)
static void
-xfce_clock_fuzzy_init (XfceClockFuzzy *clock)
+xfce_clock_fuzzy_init (XfceClockFuzzy *fuzzy)
{
/* init */
- clock->fuzziness = FUZZINESS_DEFAULT;
+ fuzzy->fuzziness = FUZZINESS_DEFAULT;
/* center text */
- gtk_label_set_justify (GTK_LABEL (clock), GTK_JUSTIFY_CENTER);
+ gtk_label_set_justify (GTK_LABEL (fuzzy), GTK_JUSTIFY_CENTER);
}
@@ -146,13 +144,12 @@ xfce_clock_fuzzy_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- XfceClockFuzzy *clock = XFCE_CLOCK_FUZZY (object);
+ XfceClockFuzzy *fuzzy = XFCE_CLOCK_FUZZY (object);
switch (prop_id)
{
case PROP_FUZZINESS:
- clock->fuzziness = CLAMP (g_value_get_uint (value),
- FUZZINESS_MIN, FUZZINESS_MAX);
+ fuzzy->fuzziness = MIN (g_value_get_uint (value), FUZZINESS_MAX);
break;
default:
@@ -169,12 +166,12 @@ xfce_clock_fuzzy_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- XfceClockFuzzy *clock = XFCE_CLOCK_FUZZY (object);
+ XfceClockFuzzy *fuzzy = XFCE_CLOCK_FUZZY (object);
switch (prop_id)
{
case PROP_FUZZINESS:
- g_value_set_uint (value, clock->fuzziness);
+ g_value_set_uint (value, fuzzy->fuzziness);
break;
default:
@@ -196,26 +193,26 @@ xfce_clock_fuzzy_new (void)
gboolean
xfce_clock_fuzzy_update (gpointer user_data)
{
- XfceClockFuzzy *clock = XFCE_CLOCK_FUZZY (user_data);
+ XfceClockFuzzy *fuzzy = XFCE_CLOCK_FUZZY (user_data);
struct tm tm;
gint hour_sector;
gint minutes, hour;
gchar *string;
- panel_return_val_if_fail (XFCE_CLOCK_IS_FUZZY (clock), FALSE);
+ panel_return_val_if_fail (XFCE_CLOCK_IS_FUZZY (fuzzy), FALSE);
/* get the local time */
clock_plugin_get_localtime (&tm);
- if (clock->fuzziness == FUZZINESS_5_MINS
- || clock->fuzziness == FUZZINESS_15_MINS)
+ if (fuzzy->fuzziness == FUZZINESS_5_MINS
+ || fuzzy->fuzziness == FUZZINESS_15_MINS)
{
/* set the time */
minutes = tm.tm_min;
hour = tm.tm_hour > 12 ? tm.tm_hour - 12 : tm.tm_hour;
/* get the hour sector */
- if (clock->fuzziness == FUZZINESS_5_MINS)
+ if (fuzzy->fuzziness == FUZZINESS_5_MINS)
hour_sector = minutes >= 3 ? (minutes - 3) / 5 : 11;
else
hour_sector = minutes > 7 ? ((minutes - 7) / 15 + 1) * 3 - 1 : 11;
@@ -226,12 +223,12 @@ xfce_clock_fuzzy_update (gpointer user_data)
/* set the time string */
string = g_strdup_printf (_(i18n_hour_sectors[hour_sector]), _(i18n_hour_names[hour]));
- gtk_label_set_text (GTK_LABEL (clock), string);
+ gtk_label_set_text (GTK_LABEL (fuzzy), string);
g_free (string);
}
else /* FUZZINESS_DAY */
{
- gtk_label_set_text (GTK_LABEL (clock), _(i18n_day_sectors[tm.tm_hour / 3]));
+ gtk_label_set_text (GTK_LABEL (fuzzy), _(i18n_day_sectors[tm.tm_hour / 3]));
}
return TRUE;
@@ -240,9 +237,9 @@ xfce_clock_fuzzy_update (gpointer user_data)
guint
-xfce_clock_fuzzy_interval (XfceClockFuzzy *clock)
+xfce_clock_fuzzy_interval (XfceClockFuzzy *fuzzy)
{
- panel_return_val_if_fail (XFCE_CLOCK_IS_FUZZY (clock), CLOCK_INTERVAL_MINUTE);
+ panel_return_val_if_fail (XFCE_CLOCK_IS_FUZZY (fuzzy), CLOCK_INTERVAL_MINUTE);
return CLOCK_INTERVAL_MINUTE;
}
diff --git a/plugins/clock/clock-fuzzy.h b/plugins/clock/clock-fuzzy.h
index d843e7d..8ad63e4 100644
--- a/plugins/clock/clock-fuzzy.h
+++ b/plugins/clock/clock-fuzzy.h
@@ -38,7 +38,7 @@ GtkWidget *xfce_clock_fuzzy_new (void) G_GNUC_MALLOC;
gboolean xfce_clock_fuzzy_update (gpointer user_data);
-guint xfce_clock_fuzzy_interval (XfceClockFuzzy *clock);
+guint xfce_clock_fuzzy_interval (XfceClockFuzzy *fuzzy);
G_END_DECLS
diff --git a/plugins/clock/clock-lcd.c b/plugins/clock/clock-lcd.c
index a11f353..f7c5cfb 100644
--- a/plugins/clock/clock-lcd.c
+++ b/plugins/clock/clock-lcd.c
@@ -37,8 +37,6 @@
/* prototypes */
-static void xfce_clock_lcd_class_init (XfceClockLcdClass *klass);
-static void xfce_clock_lcd_init (XfceClockLcd *clock);
static void xfce_clock_lcd_set_property (GObject *object,
guint prop_id,
const GValue *value,
@@ -51,7 +49,7 @@ static void xfce_clock_lcd_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static gboolean xfce_clock_lcd_expose_event (GtkWidget *widget,
GdkEventExpose *event);
-static gdouble xfce_clock_lcd_get_ratio (XfceClockLcd *clock);
+static gdouble xfce_clock_lcd_get_ratio (XfceClockLcd *lcd);
static gdouble xfce_clock_lcd_draw_dots (cairo_t *cr,
gdouble size,
gdouble offset_x,
@@ -159,13 +157,13 @@ xfce_clock_lcd_class_init (XfceClockLcdClass *klass)
static void
-xfce_clock_lcd_init (XfceClockLcd *clock)
+xfce_clock_lcd_init (XfceClockLcd *lcd)
{
/* init */
- clock->show_seconds = FALSE;
- clock->show_meridiem = FALSE;
- clock->show_military = TRUE;
- clock->flash_separators = FALSE;
+ lcd->show_seconds = FALSE;
+ lcd->show_meridiem = FALSE;
+ lcd->show_military = TRUE;
+ lcd->flash_separators = FALSE;
}
@@ -176,24 +174,24 @@ xfce_clock_lcd_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- XfceClockLcd *clock = XFCE_CLOCK_LCD (object);
+ XfceClockLcd *lcd = XFCE_CLOCK_LCD (object);
switch (prop_id)
{
case PROP_SHOW_SECONDS:
- clock->show_seconds = g_value_get_boolean (value);
+ lcd->show_seconds = g_value_get_boolean (value);
break;
case PROP_SHOW_MILITARY:
- clock->show_military = g_value_get_boolean (value);
+ lcd->show_military = g_value_get_boolean (value);
break;
case PROP_SHOW_MERIDIEM:
- clock->show_meridiem = g_value_get_boolean (value);
+ lcd->show_meridiem = g_value_get_boolean (value);
break;
case PROP_FLASH_SEPARATORS:
- clock->flash_separators = g_value_get_boolean (value);
+ lcd->flash_separators = g_value_get_boolean (value);
break;
default:
@@ -210,24 +208,24 @@ xfce_clock_lcd_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- XfceClockLcd *clock = XFCE_CLOCK_LCD (object);
+ XfceClockLcd *lcd = XFCE_CLOCK_LCD (object);
switch (prop_id)
{
case PROP_SHOW_SECONDS:
- g_value_set_boolean (value, clock->show_seconds);
+ g_value_set_boolean (value, lcd->show_seconds);
break;
case PROP_SHOW_MILITARY:
- g_value_set_boolean (value, clock->show_military);
+ g_value_set_boolean (value, lcd->show_military);
break;
case PROP_SHOW_MERIDIEM:
- g_value_set_boolean (value, clock->show_meridiem);
+ g_value_set_boolean (value, lcd->show_meridiem);
break;
case PROP_FLASH_SEPARATORS:
- g_value_set_boolean (value, clock->flash_separators);
+ g_value_set_boolean (value, lcd->flash_separators);
break;
default:
@@ -273,7 +271,7 @@ static gboolean
xfce_clock_lcd_expose_event (GtkWidget *widget,
GdkEventExpose *event)
{
- XfceClockLcd *clock = XFCE_CLOCK_LCD (widget);
+ XfceClockLcd *lcd = XFCE_CLOCK_LCD (widget);
cairo_t *cr;
gdouble offset_x, offset_y;
gint ticks, i;
@@ -281,7 +279,7 @@ xfce_clock_lcd_expose_event (GtkWidget *widget,
gdouble ratio;
struct tm tm;
- panel_return_val_if_fail (XFCE_CLOCK_IS_LCD (clock), FALSE);
+ panel_return_val_if_fail (XFCE_CLOCK_IS_LCD (lcd), FALSE);
/* get the width:height ratio */
ratio = xfce_clock_lcd_get_ratio (XFCE_CLOCK_LCD (widget));
@@ -316,7 +314,7 @@ xfce_clock_lcd_expose_event (GtkWidget *widget,
ticks = tm.tm_hour;
/* convert 24h clock to 12h clock */
- if (!clock->show_military && ticks > 12)
+ if (!lcd->show_military && ticks > 12)
ticks -= 12;
/* queue a resize when the number of hour digits changed */
@@ -343,7 +341,7 @@ xfce_clock_lcd_expose_event (GtkWidget *widget,
else
{
/* leave when we don't want seconds */
- if (!clock->show_seconds)
+ if (!lcd->show_seconds)
break;
/* get the seconds */
@@ -351,7 +349,7 @@ xfce_clock_lcd_expose_event (GtkWidget *widget,
}
/* draw the dots */
- if (clock->flash_separators && (tm.tm_sec % 2) == 1)
+ if (lcd->flash_separators && (tm.tm_sec % 2) == 1)
offset_x += size * RELATIVE_SPACE * 2;
else
offset_x = xfce_clock_lcd_draw_dots (cr, size, offset_x, offset_y);
@@ -363,7 +361,7 @@ xfce_clock_lcd_expose_event (GtkWidget *widget,
offset_x = xfce_clock_lcd_draw_digit (cr, ticks % 10, size, offset_x, offset_y);
}
- if (clock->show_meridiem)
+ if (lcd->show_meridiem)
{
/* am or pm? */
ticks = tm.tm_hour >= 12 ? 11 : 10;
@@ -382,7 +380,7 @@ xfce_clock_lcd_expose_event (GtkWidget *widget,
static gdouble
-xfce_clock_lcd_get_ratio (XfceClockLcd *clock)
+xfce_clock_lcd_get_ratio (XfceClockLcd *lcd)
{
gdouble ratio;
gint ticks;
@@ -396,16 +394,16 @@ xfce_clock_lcd_get_ratio (XfceClockLcd *clock)
ticks = tm.tm_hour;
- if (!clock->show_military && ticks > 12)
+ if (!lcd->show_military && ticks > 12)
ticks -= 12;
if (ticks >= 10)
ratio += RELATIVE_DIGIT + RELATIVE_SPACE;
- if (clock->show_seconds)
+ if (lcd->show_seconds)
ratio += (2 * RELATIVE_DIGIT) + RELATIVE_SPACE + RELATIVE_DOTS;
- if (clock->show_meridiem)
+ if (lcd->show_meridiem)
ratio += RELATIVE_DIGIT + RELATIVE_SPACE;
return ratio;
@@ -456,7 +454,7 @@ xfce_clock_lcd_draw_digit (cairo_t *cr,
gdouble x, y;
gdouble rel_x, rel_y;
- panel_return_val_if_fail (number >= 0 || number <= 11, offset_x);
+ panel_return_val_if_fail (number <= 11, offset_x);
/* ##1##
* 6 2
@@ -569,11 +567,11 @@ xfce_clock_lcd_update (gpointer user_data)
guint
-xfce_clock_lcd_interval (XfceClockLcd *clock)
+xfce_clock_lcd_interval (XfceClockLcd *lcd)
{
- panel_return_val_if_fail (XFCE_CLOCK_IS_LCD (clock), CLOCK_INTERVAL_SECOND);
+ panel_return_val_if_fail (XFCE_CLOCK_IS_LCD (lcd), CLOCK_INTERVAL_SECOND);
- if (clock->show_seconds || clock->flash_separators)
+ if (lcd->show_seconds || lcd->flash_separators)
return CLOCK_INTERVAL_SECOND;
else
return CLOCK_INTERVAL_MINUTE;
diff --git a/plugins/clock/clock-lcd.h b/plugins/clock/clock-lcd.h
index 2d378a3..cf9093e 100644
--- a/plugins/clock/clock-lcd.h
+++ b/plugins/clock/clock-lcd.h
@@ -38,7 +38,7 @@ GtkWidget *xfce_clock_lcd_new (void) G_GNUC_MALLOC;
gboolean xfce_clock_lcd_update (gpointer user_data);
-guint xfce_clock_lcd_interval (XfceClockLcd *clock);
+guint xfce_clock_lcd_interval (XfceClockLcd *lcd);
G_END_DECLS
diff --git a/plugins/clock/clock.c b/plugins/clock/clock.c
index ab7ca90..aeb9297 100644
--- a/plugins/clock/clock.c
+++ b/plugins/clock/clock.c
@@ -41,8 +41,6 @@
-static void clock_plugin_class_init (ClockPluginClass *klass);
-static void clock_plugin_init (ClockPlugin *separator);
static gboolean clock_plugin_leave_notify_event (GtkWidget *widget,
GdkEventCrossing *event);
static gboolean clock_plugin_enter_notify_event (GtkWidget *widget,
@@ -226,7 +224,7 @@ clock_plugin_construct (XfcePanelPlugin *panel_plugin)
/* load properties */
mode = xfconf_channel_get_uint (plugin->channel, "/mode", CLOCK_PLUGIN_MODE_DEFAULT);
- plugin->mode = CLAMP (mode, CLOCK_PLUGIN_MODE_MIN, CLOCK_PLUGIN_MODE_MAX);
+ plugin->mode = MIN (mode, CLOCK_PLUGIN_MODE_MAX);
show_frame = xfconf_channel_get_bool (plugin->channel, "/show-frame", FALSE);
gtk_frame_set_shadow_type (GTK_FRAME (plugin->frame), show_frame ? GTK_SHADOW_IN :
@@ -446,9 +444,7 @@ clock_plugin_property_changed (XfconfChannel *channel,
if (strcmp (property_name, "/mode") == 0)
{
/* set new clock mode */
- plugin->mode = CLAMP (g_value_get_uint (value),
- CLOCK_PLUGIN_MODE_MIN,
- CLOCK_PLUGIN_MODE_MAX);
+ plugin->mode = MIN (g_value_get_uint (value), CLOCK_PLUGIN_MODE_MAX);
/* update the child widget */
clock_plugin_set_child (plugin);
diff --git a/plugins/launcher/launcher-dialog.glade b/plugins/launcher/launcher-dialog.glade
index dbd3339..0ae9cec 100644
--- a/plugins/launcher/launcher-dialog.glade
+++ b/plugins/launcher/launcher-dialog.glade
@@ -85,6 +85,7 @@
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="stock">gtk-go-up</property>
+ <property name="icon-size">4</property>
</object>
</child>
</object>
@@ -102,6 +103,7 @@
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="stock">gtk-go-down</property>
+ <property name="icon-size">4</property>
</object>
</child>
</object>
@@ -122,6 +124,7 @@
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="stock">gtk-remove</property>
+ <property name="icon-size">4</property>
</object>
</child>
</object>
@@ -142,6 +145,7 @@
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
+ <property name="icon-size">4</property>
</object>
<packing>
<property name="position">0</property>
@@ -185,7 +189,7 @@
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="n_rows">7</property>
- <property name="n_columns">3</property>
+ <property name="n_columns">2</property>
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
<child>
@@ -194,6 +198,7 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">_Name:</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">entry-name</property>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
@@ -206,6 +211,7 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">_Description:</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">entry-description</property>
</object>
<packing>
<property name="top_attach">1</property>
@@ -220,6 +226,7 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">_Icon:</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">entry-icon</property>
</object>
<packing>
<property name="top_attach">2</property>
@@ -234,6 +241,7 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">Co_mmand:</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">entry-command</property>
</object>
<packing>
<property name="top_attach">3</property>
@@ -248,6 +256,7 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">_Working Directory:</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">entry-working-directory</property>
</object>
<packing>
<property name="top_attach">4</property>
@@ -268,58 +277,45 @@
</packing>
</child>
<child>
- <object class="GtkEntry" id="entry-name2">
+ <object class="GtkEntry" id="entry-name">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">3</property>
+ <property name="right_attach">2</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="entry-description2">
+ <object class="GtkEntry" id="entry-description">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">3</property>
+ <property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="entry-command2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkFileChooserButton" id="entry-working-directory2">
+ <object class="GtkFileChooserButton" id="entry-working-directory">
<property name="visible">True</property>
<property name="action">select-folder</property>
<property name="title" translatable="yes">Select A Working Directory</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">3</property>
+ <property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="entry-terminal2">
+ <object class="GtkCheckButton" id="entry-terminal">
<property name="label" translatable="yes">Run in _terminal</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -329,14 +325,14 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">3</property>
+ <property name="right_attach">2</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="entry-startup-notify2">
+ <object class="GtkCheckButton" id="entry-startup-notify">
<property name="label" translatable="yes">Use _statup notification</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -346,7 +342,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">3</property>
+ <property name="right_attach">2</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="y_options">GTK_FILL</property>
@@ -358,7 +354,7 @@
<property name="xalign">0</property>
<property name="xscale">0</property>
<child>
- <object class="GtkButton" id="button5">
+ <object class="GtkButton" id="entry-icon">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -374,28 +370,46 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">3</property>
+ <property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="button6">
+ <object class="GtkHBox" id="hbox4">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkEntry" id="entry-command">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
<child>
- <object class="GtkImage" id="image10">
+ <object class="GtkButton" id="entry-open">
<property name="visible">True</property>
- <property name="stock">gtk-open</property>
- <property name="icon-size">1</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <child>
+ <object class="GtkImage" id="image6">
+ <property name="visible">True</property>
+ <property name="stock">gtk-open</property>
+ <property name="icon-size">1</property>
+ </object>
+ </child>
</object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
</packing>
diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c
index 749d40b..ca7b3b3 100644
--- a/plugins/launcher/launcher.c
+++ b/plugins/launcher/launcher.c
@@ -40,8 +40,6 @@
-static void launcher_plugin_class_init (LauncherPluginClass *klass);
-static void launcher_plugin_init (LauncherPlugin *plugin);
static void launcher_plugin_construct (XfcePanelPlugin *panel_plugin);
static void launcher_plugin_free_data (XfcePanelPlugin *panel_plugin);
static void launcher_plugin_orientation_changed (XfcePanelPlugin *panel_plugin, GtkOrientation orientation);
@@ -61,7 +59,7 @@ static void launcher_plugin_button_state_changed (GtkWidget *button_a, GtkStateT
static gboolean launcher_plugin_query_tooltip (GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, GtkTooltip *tooltip, LauncherPluginEntry *entry);
static gboolean launcher_plugin_icon_button_pressed (GtkWidget *button, GdkEventButton *event, LauncherPlugin *plugin);
static gboolean launcher_plugin_icon_button_released (GtkWidget *button, GdkEventButton *event, LauncherPlugin *plugin);
-static void launcher_plugin_icon_button_drag_data_received (GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint time, LauncherPlugin *plugin);
+static void launcher_plugin_icon_button_drag_data_received (GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint drag_time, LauncherPlugin *plugin);
static gboolean launcher_plugin_icon_button_query_tooltip (GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, GtkTooltip *tooltip, LauncherPlugin *plugin);
static gboolean launcher_plugin_arrow_button_pressed (GtkWidget *button, GdkEventButton *event, LauncherPlugin *plugin);
static gboolean launcher_plugin_menu_popup (gpointer user_data);
@@ -208,8 +206,7 @@ launcher_plugin_property_changed (XfconfChannel *channel,
}
else if (strcmp (property_name, "/arrow-position") == 0)
{
- plugin->arrow_position = CLAMP (g_value_get_uint (value),
- ARROW_POS_DEFAULT, ARROW_POS_INSIDE_BUTTON);
+ plugin->arrow_position = MIN (g_value_get_uint (value), ARROW_POS_MAX);
}
else if (sscanf (property_name, "/entries/entry-%u/%a[a-z]", &nth, &property) == 2)
{
@@ -856,8 +853,8 @@ launcher_plugin_read (LauncherPlugin *plugin)
plugin->move_first = xfconf_channel_get_bool (plugin->channel, "/move-first", FALSE);
plugin->disable_tooltips = xfconf_channel_get_bool (plugin->channel, "/disable-tooltips", FALSE);
plugin->show_labels = xfconf_channel_get_bool (plugin->channel, "/show-labels", FALSE);
- plugin->arrow_position = CLAMP (xfconf_channel_get_uint (plugin->channel, "/arrow-position", ARROW_POS_DEFAULT),
- ARROW_POS_DEFAULT, ARROW_POS_INSIDE_BUTTON);
+ plugin->arrow_position = MIN (xfconf_channel_get_uint (plugin->channel, "/arrow-position", ARROW_POS_DEFAULT),
+ ARROW_POS_MAX);
/* number of launcher entries */
n_entries = xfconf_channel_get_uint (plugin->channel, "/entries", 0);
@@ -1112,7 +1109,7 @@ launcher_plugin_icon_button_drag_data_received (GtkWidget *widget,
gint y,
GtkSelectionData *selection_data,
guint info,
- guint time,
+ guint drag_time,
LauncherPlugin *plugin)
{
GSList *filenames;
@@ -1136,7 +1133,7 @@ launcher_plugin_icon_button_drag_data_received (GtkWidget *widget,
}
/* finish the drag */
- gtk_drag_finish (context, TRUE, FALSE, time);
+ gtk_drag_finish (context, TRUE, FALSE, drag_time);
}
diff --git a/plugins/launcher/launcher.h b/plugins/launcher/launcher.h
index 5439741..9c37a04 100644
--- a/plugins/launcher/launcher.h
+++ b/plugins/launcher/launcher.h
@@ -50,7 +50,10 @@ enum _LauncherPluginArrowPos
ARROW_POS_RIGHT,
ARROW_POS_TOP,
ARROW_POS_BOTTOM,
- ARROW_POS_INSIDE_BUTTON
+ ARROW_POS_INSIDE_BUTTON,
+
+ ARROW_POS_MIN = ARROW_POS_DEFAULT,
+ ARROW_POS_MAX = ARROW_POS_INSIDE_BUTTON
};
struct _LauncherPluginClass
@@ -105,10 +108,10 @@ struct _LauncherPluginEntry
/* target types for dropping in the launcher plugin */
static const GtkTargetEntry drop_targets[] =
{
- { "text/uri-list", 0, 0, },
- { "STRING", 0, 0 },
- { "UTF8_STRING", 0, 0 },
- { "text/plain", 0, 0 },
+ { (gchar *) "text/uri-list", 0, 0, },
+ { (gchar *) "STRING", 0, 0 },
+ { (gchar *) "UTF8_STRING", 0, 0 },
+ { (gchar *) "text/plain", 0, 0 },
};
GType launcher_plugin_get_type (void) G_GNUC_CONST;
diff --git a/plugins/pager/pager.c b/plugins/pager/pager.c
index 7c1be93..20fadfb 100644
--- a/plugins/pager/pager.c
+++ b/plugins/pager/pager.c
@@ -34,8 +34,6 @@
-static void pager_plugin_class_init (PagerPluginClass *klass);
-static void pager_plugin_init (PagerPlugin *pager);
static gboolean pager_plugin_scroll_event (GtkWidget *widget,
GdkEventScroll *event);
static void pager_plugin_screen_changed (GtkWidget *widget,
diff --git a/plugins/separator/separator.c b/plugins/separator/separator.c
index 59b442d..78cfd4d 100644
--- a/plugins/separator/separator.c
+++ b/plugins/separator/separator.c
@@ -36,8 +36,6 @@
-static void separator_plugin_class_init (SeparatorPluginClass *klass);
-static void separator_plugin_init (SeparatorPlugin *separator);
static gboolean separator_plugin_expose_event (GtkWidget *widget,
GdkEventExpose *event);
static void separator_plugin_construct (XfcePanelPlugin *panel_plugin);
@@ -208,7 +206,7 @@ separator_plugin_construct (XfcePanelPlugin *panel_plugin)
/* read the style */
style = xfconf_channel_get_uint (plugin->channel, "/style", SEPARATOR_PLUGIN_STYLE_DEFAULT);
- plugin->style = CLAMP (style, SEPARATOR_PLUGIN_STYLE_MIN, SEPARATOR_PLUGIN_STYLE_MAX);
+ plugin->style = MIN (style, SEPARATOR_PLUGIN_STYLE_MAX);
/* expand the plugin if requested */
expand = xfconf_channel_get_bool (plugin->channel, "/expand", FALSE);
@@ -326,12 +324,9 @@ separator_plugin_property_changed (XfconfChannel *channel,
/* update the changed property */
if (strcmp (property_name, "/style") == 0)
- plugin->style = CLAMP (g_value_get_uint (value),
- SEPARATOR_PLUGIN_STYLE_MIN,
- SEPARATOR_PLUGIN_STYLE_MAX);
+ plugin->style = MIN (g_value_get_uint (value), SEPARATOR_PLUGIN_STYLE_MAX);
else if (strcmp (property_name, "/expand") == 0)
- xfce_panel_plugin_set_expand (XFCE_PANEL_PLUGIN (plugin),
- g_value_get_boolean (value));
+ xfce_panel_plugin_set_expand (XFCE_PANEL_PLUGIN (plugin), g_value_get_boolean (value));
/* redraw */
gtk_widget_queue_draw (GTK_WIDGET (plugin));
diff --git a/plugins/showdesktop/showdesktop.c b/plugins/showdesktop/showdesktop.c
index f404e67..0f57e14 100644
--- a/plugins/showdesktop/showdesktop.c
+++ b/plugins/showdesktop/showdesktop.c
@@ -23,8 +23,8 @@
#include "showdesktop.h"
-static void show_desktop_plugin_class_init (ShowDesktopPluginClass *klass);
-static void show_desktop_plugin_init (ShowDesktopPlugin *plugin);
+
+
static void show_desktop_plugin_screen_changed (GtkWidget *widget,
GdkScreen *previous_screen);
static void show_desktop_plugin_free_data (XfcePanelPlugin *panel_plugin);
diff --git a/plugins/systray/Makefile.am b/plugins/systray/Makefile.am
index dad5889..0071670 100644
--- a/plugins/systray/Makefile.am
+++ b/plugins/systray/Makefile.am
@@ -73,34 +73,18 @@ DISTCLEANFILES = \
# Rules to auto-generate built sources
#
if MAINTAINER_MODE
-CLEANFILES = \
- xgen-xtmc \
- xgen-xtmh
-
BUILT_SOURCES = \
$(libsystray_built_sources)
DISTCLEANFILES += \
- $(libsystray_built_sources) \
- stamp-xfce-tray-marshal.h
+ $(libsystray_built_sources)
-xfce-tray-marshal.h: stamp-xfce-tray-marshal.h
- @true
-stamp-xfce-tray-marshal.h: $(srcdir)/xfce-tray-marshal.list Makefile
- ( cd $(srcdir) && glib-genmarshal \
- --prefix=_xfce_tray_marshal \
- --header xfce-tray-marshal.list \
- | sed -e 's/marshal_data);$$/marshal_data);/' ) >> xgen-xtmh \
- && ( cmp -s xgen-xtmh xfce-tray-marshal.h || cp xgen-xtmh xfce-tray-marshal.h ) \
- && rm -f xgen-xtmh \
- && echo timestamp > $(@F)
+xfce-tray-marshal.h: xfce-tray-marshal.list Makefile
+ glib-genmarshal --header --internal --prefix=_xfce_tray_marshal $< > $@
-xfce-tray-marshal.c: xfce-tray-marshal.h Makefile
- ( cd $(srcdir) && glib-genmarshal \
- --prefix=_xfce_tray_marshal \
- --body xfce-tray-marshal.list ) >> xgen-xtmc \
- && cp xgen-xtmc xfce-tray-marshal.c \
- && rm -f xgen-xtmc
+xfce-tray-marshal.c: xfce-tray-marshal.list Makefile
+ echo "#include \"xfce-tray-marshal.h\"" > $@ \
+ && glib-genmarshal --prefix=_xfce_tray_marshal --body $< >> $@
endif
# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/plugins/systray/xfce-tray-manager.c b/plugins/systray/xfce-tray-manager.c
index 41ad944..89fea1e 100644
--- a/plugins/systray/xfce-tray-manager.c
+++ b/plugins/systray/xfce-tray-manager.c
@@ -56,8 +56,6 @@
/* prototypes */
-static void xfce_tray_manager_class_init (XfceTrayManagerClass *klass);
-static void xfce_tray_manager_init (XfceTrayManager *manager);
static void xfce_tray_manager_finalize (GObject *object);
static void xfce_tray_manager_remove_socket (gpointer key,
gpointer value,
@@ -151,29 +149,11 @@ struct _XfceTrayMessage
-static guint xfce_tray_manager_signals[LAST_SIGNAL];
-static GObjectClass *xfce_tray_manager_parent_class;
+static guint xfce_tray_manager_signals[LAST_SIGNAL];
-GType
-xfce_tray_manager_get_type (void)
-{
- static GType type = G_TYPE_INVALID;
-
- if (G_UNLIKELY (type == G_TYPE_INVALID))
- {
- type = g_type_register_static_simple (G_TYPE_OBJECT,
- I_("XfceTrayManager"),
- sizeof (XfceTrayManagerClass),
- (GClassInitFunc) xfce_tray_manager_class_init,
- sizeof (XfceTrayManager),
- (GInstanceInitFunc) xfce_tray_manager_init,
- 0);
- }
-
- return type;
-}
+G_DEFINE_TYPE (XfceTrayManager, xfce_tray_manager, G_TYPE_OBJECT);
@@ -182,10 +162,7 @@ xfce_tray_manager_class_init (XfceTrayManagerClass *klass)
{
GObjectClass *gobject_class;
- /* determine the parent type class */
- xfce_tray_manager_parent_class = g_type_class_peek_parent (klass);
-
- gobject_class = (GObjectClass *)klass;
+ gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = xfce_tray_manager_finalize;
xfce_tray_manager_signals[TRAY_ICON_ADDED] =
diff --git a/plugins/systray/xfce-tray-widget.c b/plugins/systray/xfce-tray-widget.c
index ab67c14..a7fcca7 100644
--- a/plugins/systray/xfce-tray-widget.c
+++ b/plugins/systray/xfce-tray-widget.c
@@ -41,8 +41,6 @@
/* prototypes */
-static void xfce_tray_widget_class_init (XfceTrayWidgetClass *klass);
-static void xfce_tray_widget_init (XfceTrayWidget *tray);
static void xfce_tray_widget_finalize (GObject *object);
static void xfce_tray_widget_size_request (GtkWidget *widget,
GtkRequisition *requisition);
@@ -115,28 +113,7 @@ struct _XfceTrayWidgetChild
-static GObjectClass *xfce_tray_widget_parent_class;
-
-
-
-GType
-xfce_tray_widget_get_type (void)
-{
- static GType type = G_TYPE_INVALID;
-
- if (G_UNLIKELY (type == G_TYPE_INVALID))
- {
- type = g_type_register_static_simple (GTK_TYPE_CONTAINER,
- I_("XfceTrayWidget"),
- sizeof (XfceTrayWidgetClass),
- (GClassInitFunc) xfce_tray_widget_class_init,
- sizeof (XfceTrayWidget),
- (GInstanceInitFunc) xfce_tray_widget_init,
- 0);
- }
-
- return type;
-}
+G_DEFINE_TYPE (XfceTrayWidget, xfce_tray_widget, GTK_TYPE_CONTAINER);
@@ -147,9 +124,6 @@ xfce_tray_widget_class_init (XfceTrayWidgetClass *klass)
GtkWidgetClass *gtkwidget_class;
GtkContainerClass *gtkcontainer_class;
- /* determine the parent type class */
- xfce_tray_widget_parent_class = g_type_class_peek_parent (klass);
-
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = xfce_tray_widget_finalize;
diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c
index 4ea67cf..90a7f89 100644
--- a/plugins/tasklist/tasklist-widget.c
+++ b/plugins/tasklist/tasklist-widget.c
@@ -123,15 +123,14 @@ struct _XfceTasklistChild
static const GtkTargetEntry drop_targets[] =
{
- { "application/x-xfce-panel-plugin-task", GTK_TARGET_SAME_WIDGET, 0 }
+ { (gchar *) "application/x-xfce-panel-plugin-task", GTK_TARGET_SAME_WIDGET, 0 }
};
static gint locked = 0;
-static void xfce_tasklist_class_init (XfceTasklistClass *klass);
-static void xfce_tasklist_init (XfceTasklist *tasklist);
+
static void xfce_tasklist_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static void xfce_tasklist_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void xfce_tasklist_finalize (GObject *object);
@@ -139,7 +138,7 @@ static void xfce_tasklist_size_request (GtkWidget *widget, GtkRequisition *requi
static void xfce_tasklist_size_allocate (GtkWidget *widget, GtkAllocation *allocation);
static void xfce_tasklist_realize (GtkWidget *widget);
static void xfce_tasklist_unrealize (GtkWidget *widget);
-static gboolean xfce_tasklist_drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time);
+static gboolean xfce_tasklist_drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint drag_time);
static void xfce_tasklist_remove (GtkContainer *container, GtkWidget *widget);
static void xfce_tasklist_forall (GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data);
static GType xfce_tasklist_child_type (GtkContainer *container);
@@ -537,7 +536,7 @@ xfce_tasklist_drag_motion (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
- guint time)
+ guint drag_time)
{
XfceTasklist *tasklist = XFCE_TASKLIST (widget);
XfceTasklistChild *child;
@@ -619,7 +618,7 @@ xfce_tasklist_drag_motion (GtkWidget *widget,
}
/* update the drag status so we keep receiving the drag motions */
- gdk_drag_status (context, 0, time);
+ gdk_drag_status (context, 0, drag_time);
/* this is a valid drop zone */
return TRUE;
diff --git a/plugins/tasklist/tasklist.c b/plugins/tasklist/tasklist.c
index 4db9b9b..f971125 100644
--- a/plugins/tasklist/tasklist.c
+++ b/plugins/tasklist/tasklist.c
@@ -27,7 +27,8 @@
#include "tasklist-widget.h"
#include "tasklist-dialog_glade.h"
-
+/* TODO move to header */
+GType tasklist_plugin_get_type (void) G_GNUC_CONST;
#define XFCE_TYPE_TASKLIST_PLUGIN (tasklist_plugin_get_type ())
#define XFCE_TASKLIST_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_TASKLIST_PLUGIN, TasklistPlugin))
#define XFCE_TASKLIST_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_TASKLIST_PLUGIN, TasklistPluginClass))
@@ -56,8 +57,6 @@ struct _TasklistPlugin
-static void tasklist_plugin_class_init (TasklistPluginClass *klass);
-static void tasklist_plugin_init (TasklistPlugin *plugin);
static void tasklist_plugin_construct (XfcePanelPlugin *panel_plugin);
static void tasklist_plugin_free_data (XfcePanelPlugin *panel_plugin);
static void tasklist_plugin_orientation_changed (XfcePanelPlugin *panel_plugin, GtkOrientation orientation);
diff --git a/wrapper/Makefile.am b/wrapper/Makefile.am
index a6227fd..e28d0f6 100644
--- a/wrapper/Makefile.am
+++ b/wrapper/Makefile.am
@@ -56,7 +56,8 @@ wrapper-marshal.h: $(top_builddir)/panel/panel-marshal.list Makefile
glib-genmarshal --header --prefix=wrapper_marshal $< > $@
wrapper-marshal.c: $(top_builddir)/panel/panel-marshal.list Makefile
- glib-genmarshal --body --prefix=wrapper_marshal $< > $@
+ echo "#include <wrapper/wrapper-marshal.h>" > $@ \
+ && glib-genmarshal --body --prefix=wrapper_marshal $< >> $@
BUILT_SOURCES = \
$(xfce4_panel_wrapper_built_sources)
diff --git a/wrapper/main.c b/wrapper/main.c
index 2be4cbc..822f246 100644
--- a/wrapper/main.c
+++ b/wrapper/main.c
@@ -51,7 +51,6 @@
-gchar *opt_name = NULL;
static gchar *opt_display_name = NULL;
static gint opt_unique_id = -1;
static gchar *opt_filename = NULL;
@@ -63,7 +62,7 @@ static GQuark plug_quark = 0;
static GOptionEntry option_entries[] =
{
- { "name", 'n', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &opt_name, NULL, NULL },
+ { "name", 'n', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &wrapper_name, NULL, NULL },
{ "display-name", 'd', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &opt_display_name, NULL, NULL },
{ "unique-id", 'i', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_INT, &opt_unique_id, NULL, NULL },
{ "filename", 'f', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &opt_filename, NULL, NULL },
@@ -140,7 +139,7 @@ dbus_gproxy_property_changed (DBusGProxy *dbus_gproxy,
default:
g_message ("External plugin '%s-%d' received unknown property '%d'.",
- opt_name, opt_unique_id, property);
+ wrapper_name, opt_unique_id, property);
break;
}
}
@@ -149,7 +148,7 @@ dbus_gproxy_property_changed (DBusGProxy *dbus_gproxy,
static void
dbus_gproxy_provider_signal (XfcePanelPluginProvider *provider,
- XfcePanelPluginProviderSignal signal,
+ XfcePanelPluginProviderSignal provider_signal,
DBusGProxy *dbus_gproxy)
{
GError *error = NULL;
@@ -158,7 +157,7 @@ dbus_gproxy_provider_signal (XfcePanelPluginProvider *provider,
panel_return_if_fail (opt_unique_id == xfce_panel_plugin_provider_get_unique_id (provider));
/* send the provider signal to the panel */
- if (!wrapper_dbus_client_provider_signal (dbus_gproxy, opt_unique_id, signal, &error))
+ if (!wrapper_dbus_client_provider_signal (dbus_gproxy, opt_unique_id, provider_signal, &error))
{
g_critical ("DBus error: %s", error->message);
g_error_free (error);
@@ -221,7 +220,7 @@ main (gint argc, gchar **argv)
g_thread_init (NULL);
/* initialize gtk */
- if (!gtk_init_with_args (&argc, &argv, _("[ARGUMENTS...]"), option_entries, GETTEXT_PACKAGE, &error))
+ if (!gtk_init_with_args (&argc, &argv, _("[ARGUMENTS...]"), option_entries, (gchar *) GETTEXT_PACKAGE, &error))
{
/* print error */
g_critical ("Failed to initialize GTK+: %s", error ? error->message : "Unable to open display");
@@ -247,7 +246,7 @@ main (gint argc, gchar **argv)
/* check if all the other arguments are defined */
if (opt_socket_id == 0
- || !IS_STRING (opt_name)
+ || !IS_STRING (wrapper_name)
|| opt_unique_id == -1
|| !IS_STRING (opt_display_name))
{
@@ -259,7 +258,7 @@ main (gint argc, gchar **argv)
}
/* change the process name to something that makes sence */
- g_snprintf (process_name, sizeof (process_name), "panel-%s-%d", opt_name, opt_unique_id);
+ g_snprintf (process_name, sizeof (process_name), "panel-%s-%d", wrapper_name, opt_unique_id);
prctl (PR_SET_NAME, (gulong) process_name, 0, 0, 0);
/* try to connect to dbus */
@@ -318,7 +317,7 @@ main (gint argc, gchar **argv)
&& !g_module_symbol (module, "__xpp_construct", (gpointer) &construct_func))
{
/* print error */
- g_critical ("Plugin '%s-%d' lacks a plugin register function", opt_name, opt_unique_id);
+ g_critical ("Plugin '%s-%d' lacks a plugin register function", wrapper_name, opt_unique_id);
/* close the module */
g_module_close (module);
@@ -330,14 +329,14 @@ main (gint argc, gchar **argv)
else
{
/* print error */
- g_critical ("Unable to load the plugin module '%s': %s.", opt_name, g_module_error ());
+ g_critical ("Unable to load the plugin module '%s': %s.", wrapper_name, g_module_error ());
/* leave */
return EXIT_FAILURE;
}
/* contruct the panel plugin */
- provider = (*construct_func) (opt_name, opt_unique_id, opt_display_name,
+ provider = (*construct_func) (wrapper_name, opt_unique_id, opt_display_name,
opt_arguments, gdk_screen_get_default ());
if (G_LIKELY (provider))
{
@@ -372,7 +371,7 @@ main (gint argc, gchar **argv)
else
{
/* print error */
- g_critical ("Failed to contruct the plugin '%s-%d'.", opt_name, opt_unique_id);
+ g_critical ("Failed to contruct the plugin '%s-%d'.", wrapper_name, opt_unique_id);
/* release the proxy */
g_object_unref (G_OBJECT (dbus_gproxy));
diff --git a/wrapper/wrapper-plug.c b/wrapper/wrapper-plug.c
index 25e727b..c088de3 100644
--- a/wrapper/wrapper-plug.c
+++ b/wrapper/wrapper-plug.c
@@ -29,8 +29,6 @@
-static void wrapper_plug_class_init (WrapperPlugClass *klass);
-static void wrapper_plug_init (WrapperPlug *plug);
static gboolean wrapper_plug_expose_event (GtkWidget *widget,
GdkEventExpose *event);
static void wrapper_plug_set_colormap (WrapperPlug *plug);
@@ -58,6 +56,11 @@ struct _WrapperPlug
+/* shared internal plugin name */
+gchar *wrapper_name = NULL;
+
+
+
G_DEFINE_TYPE (WrapperPlug, wrapper_plug, GTK_TYPE_PLUG);
@@ -76,8 +79,6 @@ wrapper_plug_class_init (WrapperPlugClass *klass)
static void
wrapper_plug_init (WrapperPlug *plug)
{
- extern gchar *opt_name;
-
/* init vars */
plug->background_alpha = 1.00;
plug->is_selected = FALSE;
@@ -91,7 +92,7 @@ wrapper_plug_init (WrapperPlug *plug)
/* set the colormap */
/* HACK: the systray can't handle composited windows! */
- if (strcmp (opt_name, "systray") != 0)
+ if (strcmp (wrapper_name, "systray") != 0)
wrapper_plug_set_colormap (plug);
}
diff --git a/wrapper/wrapper-plug.h b/wrapper/wrapper-plug.h
index de69e29..025a8c4 100644
--- a/wrapper/wrapper-plug.h
+++ b/wrapper/wrapper-plug.h
@@ -36,15 +36,17 @@ typedef struct _WrapperPlug WrapperPlug;
#define WRAPPER_IS_PLUG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WRAPPER_TYPE_PLUG))
#define WRAPPER_PLUG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WRAPPER_TYPE_PLUG, WrapperPlugClass))
-GType wrapper_plug_get_type (void) G_GNUC_CONST;
+extern gchar *wrapper_name;
-WrapperPlug *wrapper_plug_new (GdkNativeWindow socket_id);
+GType wrapper_plug_get_type (void) G_GNUC_CONST;
-void wrapper_plug_set_background_alpha (WrapperPlug *plug,
- gdouble alpha);
+WrapperPlug *wrapper_plug_new (GdkNativeWindow socket_id);
-void wrapper_plug_set_selected (WrapperPlug *plug,
- gboolean selected);
+void wrapper_plug_set_background_alpha (WrapperPlug *plug,
+ gdouble alpha);
+
+void wrapper_plug_set_selected (WrapperPlug *plug,
+ gboolean selected);
G_END_DECLS
More information about the Xfce4-commits
mailing list