Browse Source

Move common macros into common/panel-private.h.

upstream/xfce4-panel-4.10.1
Nick Schermer 12 years ago
parent
commit
dbcb384a13
  1. 3
      common/Makefile.am
  2. 15
      common/panel-private.h
  3. 6
      libxfce4panel/xfce-panel-macros.h
  4. 9
      libxfce4panel/xfce-panel-plugin-provider.h
  5. 1
      libxfce4panel/xfce-panel-plugin.c
  6. 8
      libxfce4panel/xfce-panel-plugin.h
  7. 2
      libxfce4panel/xfce-scaled-image.c
  8. 2
      panel/Makefile.am
  9. 1
      panel/main.c
  10. 3
      panel/panel-application.c
  11. 1
      panel/panel-dbus-client.c
  12. 1
      panel/panel-dbus-service.c
  13. 1
      panel/panel-dialogs.c
  14. 1
      panel/panel-glue.c
  15. 3
      panel/panel-item-dialog.c
  16. 1
      panel/panel-itembar.c
  17. 1
      panel/panel-module-factory.c
  18. 3
      panel/panel-module.c
  19. 1
      panel/panel-plugin-external.c
  20. 1
      panel/panel-preferences-dialog.c
  21. 21
      panel/panel-private.c
  22. 3
      panel/panel-window.c
  23. 1
      panel/panel-window.h
  24. 2
      wrapper/main.c

3
common/Makefile.am

@ -1,6 +1,7 @@
# $Id$
EXTRA_DIST = \
panel-dbus.h
panel-dbus.h \
panel-private.h
# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:

15
panel/panel-private.h → common/panel-private.h

@ -20,15 +20,18 @@
#ifndef __PANEL_PRIVATE_H__
#define __PANEL_PRIVATE_H__
#include <gtk/gtk.h>
G_BEGIN_DECLS
/* handling flags */
#define PANEL_SET_FLAG(flags,flag) G_STMT_START{ ((flags) |= (flag)); }G_STMT_END
#define PANEL_UNSET_FLAG(flags,flag) G_STMT_START{ ((flags) &= ~(flag)); }G_STMT_END
#define PANEL_HAS_FLAG(flags,flag) (((flags) & (flag)) != 0)
G_END_DECLS
/* check if the string is not empty */
#define IS_STRING(string) ((string) != NULL && *(string) != '\0')
/* relative plugin filename (printf format) */
#define PANEL_PLUGIN_RELATIVE_PATH "xfce4" G_DIR_SEPARATOR_S "panel" G_DIR_SEPARATOR_S "%s-%d.rc"
/* xfconf property base (printf format) */
#define PANEL_PLUGIN_PROPERTY_BASE "/plugins/plugin-%d"
#endif /* !__PANEL_PRIVATE_H__ */
#endif /* !__PANEL_PRIVATE_H__ */

6
libxfce4panel/xfce-panel-macros.h

@ -48,12 +48,6 @@ G_BEGIN_DECLS
#define panel_return_val_if_fail(expr,val) G_STMT_START{ (void)0; }G_STMT_END
#endif
/* xfconf channel for plugins */
#define XFCE_PANEL_PLUGIN_CHANNEL_NAME ("xfce4-panel")
#define xfce_panel_plugin_xfconf_channel_new(plugin) \
xfconf_channel_new_with_property_base (XFCE_PANEL_PLUGIN_CHANNEL_NAME, \
xfce_panel_plugin_get_property_base (XFCE_PANEL_PLUGIN (plugin)));
/* canonical representation for static strings */
#ifndef I_
#define I_(string) (g_intern_static_string ((string)))

9
libxfce4panel/xfce-panel-plugin-provider.h

@ -34,15 +34,6 @@ typedef enum _XfcePanelPluginProviderSignal XfcePanelPluginProviderSignal;
#define XFCE_IS_PANEL_PLUGIN_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_PANEL_PLUGIN_PROVIDER))
#define XFCE_PANEL_PLUGIN_PROVIDER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), XFCE_TYPE_PANEL_PLUGIN_PROVIDER, XfcePanelPluginProviderIface))
/* relative plugin filename (printf format) */
#define PANEL_PLUGIN_RELATIVE_PATH "xfce4" G_DIR_SEPARATOR_S "panel" G_DIR_SEPARATOR_S "%s-%d.rc"
/* xfconf property base (printf format) */
#define PANEL_PLUGIN_PROPERTY_BASE "/plugins/plugin-%d"
/* commonly used macro */
#define IS_STRING(string) ((string) != NULL && *(string) != '\0')
/* provider contruct function */
typedef XfcePanelPluginProvider *(*PluginConstructFunc) (const gchar *name,
gint id,

1
libxfce4panel/xfce-panel-plugin.c

@ -25,6 +25,7 @@
#include <glib.h>
#include <libxfce4util/libxfce4util.h>
#include <common/panel-private.h>
#include <libxfce4panel/libxfce4panel.h>
#include <libxfce4panel/libxfce4panel-marshal.h>
#include <libxfce4panel/xfce-panel-plugin-provider.h>

8
libxfce4panel/xfce-panel-plugin.h

@ -39,6 +39,14 @@ typedef struct _XfcePanelPlugin XfcePanelPlugin;
#define XFCE_IS_PANEL_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_PANEL_PLUGIN))
#define XFCE_PANEL_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_PANEL_PLUGIN, XfcePanelPluginClass))
/* xfconf channel for plugins */
#define XFCE_PANEL_PLUGIN_CHANNEL_NAME ("xfce4-panel")
/* macro for opening an XfconfChannel for plugin */
#define xfce_panel_plugin_xfconf_channel_new(plugin) \
xfconf_channel_new_with_property_base (XFCE_PANEL_PLUGIN_CHANNEL_NAME, \
xfce_panel_plugin_get_property_base (XFCE_PANEL_PLUGIN (plugin)));
struct _XfcePanelPluginClass
{
/*< private >*/

2
libxfce4panel/xfce-scaled-image.c

@ -24,6 +24,8 @@
#endif
#include <gtk/gtk.h>
#include <common/panel-private.h>
#include <libxfce4panel/libxfce4panel.h>
#include <libxfce4panel/xfce-panel-plugin-provider.h>

2
panel/Makefile.am

@ -47,8 +47,6 @@ xfce4_panel_SOURCES = \
panel-plugin-external.h \
panel-preferences-dialog.c \
panel-preferences-dialog.h \
panel-private.c \
panel-private.h \
panel-window.c \
panel-window.h

1
panel/main.c

@ -38,7 +38,6 @@
#include <xfconf/xfconf.h>
#include <libxfce4util/libxfce4util.h>
#include <panel/panel-private.h>
#include <panel/panel-application.h>
#include <panel/panel-dbus-service.h>
#include <panel/panel-dbus-client.h>

3
panel/panel-application.c

@ -29,10 +29,11 @@
#include <glib/gstdio.h>
#include <xfconf/xfconf.h>
#include <libxfce4util/libxfce4util.h>
#include <common/panel-private.h>
#include <libxfce4panel/libxfce4panel.h>
#include <libxfce4panel/xfce-panel-plugin-provider.h>
#include <panel/panel-private.h>
#include <panel/panel-window.h>
#include <panel/panel-application.h>
#include <panel/panel-itembar.h>

1
panel/panel-dbus-client.c

@ -27,7 +27,6 @@
#include <libxfce4panel/libxfce4panel.h>
#include <libxfce4panel/xfce-panel-plugin-provider.h>
#include <panel/panel-private.h>
#include <panel/panel-dbus-client.h>
#include <panel/panel-dbus-service.h>
#include <panel/panel-dbus-client-infos.h>

1
panel/panel-dbus-service.c

@ -32,7 +32,6 @@
#include <libxfce4util/libxfce4util.h>
#include <libxfce4panel/libxfce4panel.h>
#include <panel/panel-private.h>
#include <panel/panel-dbus-service.h>
#include <panel/panel-application.h>
#include <panel/panel-preferences-dialog.h>

1
panel/panel-dialogs.c

@ -29,7 +29,6 @@
#include <libxfce4util/libxfce4util.h>
#include <libxfce4panel/libxfce4panel.h>
#include <panel/panel-private.h>
#include <panel/panel-dialogs.h>
#include <panel/panel-application.h>

1
panel/panel-glue.c

@ -30,7 +30,6 @@
#include <libxfce4panel/libxfce4panel.h>
#include <libxfce4panel/xfce-panel-plugin-provider.h>
#include <panel/panel-private.h>
#include <panel/panel-glue.h>
#include <panel/panel-item-dialog.h>
#include <panel/panel-preferences-dialog.h>

3
panel/panel-item-dialog.c

@ -28,9 +28,10 @@
#include <exo/exo.h>
#include <libxfce4ui/libxfce4ui.h>
#include <libxfce4util/libxfce4util.h>
#include <common/panel-private.h>
#include <libxfce4panel/libxfce4panel.h>
#include <panel/panel-private.h>
#include <panel/panel-application.h>
#include <panel/panel-item-dialog.h>
#include <panel/panel-module.h>

1
panel/panel-itembar.c

@ -25,7 +25,6 @@
#include <exo/exo.h>
#include <libxfce4panel/libxfce4panel.h>
#include <panel/panel-private.h>
#include <panel/panel-itembar.h>

1
panel/panel-module-factory.c

@ -33,7 +33,6 @@
#include <libxfce4util/libxfce4util.h>
#include <libxfce4panel/libxfce4panel.h>
#include <panel/panel-private.h>
#include <panel/panel-module.h>
#include <panel/panel-module-factory.h>

3
panel/panel-module.c

@ -25,10 +25,11 @@
#include <exo/exo.h>
#include <glib/gstdio.h>
#include <libxfce4util/libxfce4util.h>
#include <common/panel-private.h>
#include <libxfce4panel/libxfce4panel.h>
#include <libxfce4panel/xfce-panel-plugin-provider.h>
#include <panel/panel-private.h>
#include <panel/panel-module.h>
#include <panel/panel-module-factory.h>
#include <panel/panel-plugin-external.h>

1
panel/panel-plugin-external.c

@ -29,7 +29,6 @@
#include <libxfce4panel/libxfce4panel.h>
#include <libxfce4panel/xfce-panel-plugin-provider.h>
#include <panel/panel-private.h>
#include <panel/panel-module.h>
#include <panel/panel-plugin-external.h>
#include <panel/panel-window.h>

1
panel/panel-preferences-dialog.c

@ -26,7 +26,6 @@
#include <libxfce4ui/libxfce4ui.h>
#include <libxfce4panel/libxfce4panel.h>
#include <panel/panel-private.h>
#include <panel/panel-window.h>
#include <panel/panel-glue.h>
#include <panel/panel-application.h>

21
panel/panel-private.c

@ -1,21 +0,0 @@
/* $Id$ */
/*
* Copyright (C) 2008 Nick Schermer <nick@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.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <panel/panel-private.h>
#include <libxfce4panel/libxfce4panel.h>

3
panel/panel-window.c

@ -27,8 +27,7 @@
#include <exo/exo.h>
#include <libxfce4panel/libxfce4panel.h>
#include <panel/panel-private.h>
#include <common/panel-private.h>
#include <panel/panel-window.h>
#include <panel/panel-glue.h>
#include <panel/panel-application.h>

1
panel/panel-window.h

@ -21,7 +21,6 @@
#define __PANEL_WINDOW_H__
#include <gtk/gtk.h>
#include <panel/panel-private.h>
G_BEGIN_DECLS

2
wrapper/main.c

@ -39,6 +39,7 @@
#include <dbus/dbus-glib-lowlevel.h>
#include <gtk/gtk.h>
#include <common/panel-private.h>
#include <common/panel-dbus.h>
#include <libxfce4util/libxfce4util.h>
#include <libxfce4panel/libxfce4panel.h>
@ -59,6 +60,7 @@ static gchar **opt_arguments = NULL;
static GQuark plug_quark = 0;
static GOptionEntry option_entries[] =
{
{ "name", 'n', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &opt_name, NULL, NULL },

Loading…
Cancel
Save