[Xfce4-commits] <xfce4-cpugraph-plugin:master> Improve header usage
Florian Rivoal
noreply at xfce.org
Mon May 31 17:00:02 CEST 2010
Updating branch refs/heads/master
to 3f853fccffd6d58cdc78c1f49d9fe341bdc33c64 (commit)
from 505a9fa19a7b9c3ff48a161cd1c392e07a2db94b (commit)
commit 3f853fccffd6d58cdc78c1f49d9fe341bdc33c64
Author: Florian Rivoal <frivoal at gmail.com>
Date: Mon May 31 23:53:48 2010 +0900
Improve header usage
Include system headers in the c file when possible, rather than in
central header files.
panel-plugin/cpu.c | 5 +++++
panel-plugin/cpu.h | 1 -
panel-plugin/properties.c | 5 +++++
panel-plugin/settings.c | 1 +
4 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/panel-plugin/cpu.c b/panel-plugin/cpu.c
index 8ecdf22..8b07674 100644
--- a/panel-plugin/cpu.c
+++ b/panel-plugin/cpu.c
@@ -3,7 +3,12 @@
#include "mode.h"
#include "properties.h"
+#include <libxfcegui4/libxfcegui4.h>
#include <libxfce4panel/xfce-hvbox.h>
+#ifndef _
+# include <libintl.h>
+# define _(String) gettext (String)
+#endif
static void cpugraph_construct( XfcePanelPlugin *plugin );
static CPUGraph *create_gui( XfcePanelPlugin *plugin );
diff --git a/panel-plugin/cpu.h b/panel-plugin/cpu.h
index 12e0534..d99e1a4 100644
--- a/panel-plugin/cpu.h
+++ b/panel-plugin/cpu.h
@@ -5,7 +5,6 @@
#include "config.h"
#endif
-#include <libxfcegui4/libxfcegui4.h>
#include <libxfce4panel/xfce-panel-plugin.h>
#include "os.h"
diff --git a/panel-plugin/properties.c b/panel-plugin/properties.c
index 12e62e7..e726f13 100644
--- a/panel-plugin/properties.c
+++ b/panel-plugin/properties.c
@@ -2,6 +2,11 @@
#include "properties.h"
#include "settings.h"
+#ifndef _
+# include <libintl.h>
+# define _(String) gettext (String)
+#endif
+
static GtkBox *create_tab();
static GtkBox *create_option_line( GtkBox *tab, GtkSizeGroup *sg, const gchar *name );
static void create_check_box( GtkBox *tab, GtkSizeGroup *sg, const gchar *name, gboolean init, void (callback)( GtkToggleButton *, CPUGraph *), void *cb_data );
diff --git a/panel-plugin/settings.c b/panel-plugin/settings.c
index d266edc..16645b0 100644
--- a/panel-plugin/settings.c
+++ b/panel-plugin/settings.c
@@ -1,4 +1,5 @@
#include "settings.h"
+#include <libxfcegui4/libxfcegui4.h>
static void default_command( const gchar ** command, gboolean * in_terminal, gboolean * startup_notification )
{
More information about the Xfce4-commits
mailing list