[Xfce4-commits] <xfce4-power-manager:master> Fix 'make distcheck'

Ali Abdallah noreply at xfce.org
Sat Jan 30 02:18:40 CET 2010


Updating branch refs/heads/master
         to 772b5ffeafaf4e80b197db84dc247a9fd7308f4a (commit)
       from 86c848dc1aad88f772500c4e25feabdd36e41a4f (commit)

commit 772b5ffeafaf4e80b197db84dc247a9fd7308f4a
Author: Ali Abdallah <aliov at xfce.org>
Date:   Sat Jan 23 00:03:53 2010 +0100

    Fix 'make distcheck'

 common/Makefile.am                       |    4 +-
 configure.ac.in                          |    4 -
 data/icons/128x128/Makefile.am           |    1 +
 data/icons/128x128/devices/Makefile.am   |    7 +
 data/icons/128x128/devices/processor.png |  Bin 0 -> 10783 bytes
 data/icons/Makefile.am                   |    4 -
 libhal/Makefile.am                       |    2 +
 po/POTFILES.in                           |   26 +---
 src/xfpm-battery-info.c                  |  302 ------------------------------
 src/xfpm-battery-info.h                  |   34 ----
 10 files changed, 17 insertions(+), 367 deletions(-)

diff --git a/common/Makefile.am b/common/Makefile.am
index 5557b1d..fd5d98c 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -11,6 +11,7 @@ libxfpmcommon_la_SOURCES =              \
 	xfpm-icons.h
 
 libxfpmcommon_la_CFLAGS =               \
+	-I$(top_srcdir) 	        \
 	$(GTK_CFLAGS)                   \
 	$(GLIB_CFLAGS)                  \
 	$(LIBXFCE4UTIL_CFLAGS)
@@ -18,7 +19,8 @@ libxfpmcommon_la_CFLAGS =               \
 if ENABLE_HAL
 
 libxfpmcommon_la_CFLAGS += 		\
-	$(DBUS_GLIB_CFLAGS)
+	$(DBUS_GLIB_CFLAGS)		\
+	-I$(top_srcdir)/libhal
 
 libxfpmcommon_la_LIBADD =		\
 	$(top_builddir)/libhal/libxfpmhal.la
diff --git a/configure.ac.in b/configure.ac.in
index 8290d00..cca6739 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -199,10 +199,6 @@ panel-plugins/Makefile
 panel-plugins/brightness/Makefile
 data/Makefile
 data/icons/Makefile
-data/icons/16x16/Makefile
-data/icons/24x24/Makefile
-data/icons/32x32/Makefile
-data/icons/48x48/Makefile
 data/icons/128x128/Makefile
 data/icons/128x128/devices/Makefile
 data/icons/scalable/Makefile
diff --git a/data/icons/128x128/Makefile.am b/data/icons/128x128/Makefile.am
new file mode 100644
index 0000000..2b751b1
--- /dev/null
+++ b/data/icons/128x128/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = devices
\ No newline at end of file
diff --git a/data/icons/128x128/devices/Makefile.am b/data/icons/128x128/devices/Makefile.am
new file mode 100644
index 0000000..c7c8670
--- /dev/null
+++ b/data/icons/128x128/devices/Makefile.am
@@ -0,0 +1,7 @@
+EXTRA_DIST =				\
+	$(Data_DATA)
+
+Datadir = $(datadir)/icons/hicolor/128x128/devices
+
+Data_DATA =				\
+	processor.png		
diff --git a/data/icons/128x128/devices/processor.png b/data/icons/128x128/devices/processor.png
new file mode 100644
index 0000000..db578b6
Binary files /dev/null and b/data/icons/128x128/devices/processor.png differ
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index e15d824..7135c4c 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -1,9 +1,5 @@
 SUBDIRS =         \
 	scalable  \
-	16x16     \
-	24x24	  \
-	32x32     \
-	48x48	  \
 	128x128
 
 gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
diff --git a/libhal/Makefile.am b/libhal/Makefile.am
index ed5af2a..d6e6853 100644
--- a/libhal/Makefile.am
+++ b/libhal/Makefile.am
@@ -10,6 +10,8 @@ libxfpmhal_la_SOURCES =			\
 	hal-marshal.h
 
 libxfpmhal_la_CFLAGS =			\
+	-I$(top_srcdir) 	        \
+	-I$(top_srcdir)/libdbus         \
 	$(GLIB_CFLAGS)			\
 	$(DBUS_GLIB_CFLAGS)
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1db588f..8631816 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -3,34 +3,16 @@
 settings/xfpm-settings.c
 settings/xfpm-settings-main.c
 settings/xfce4-power-manager-settings.desktop.in
+common/xfpm-common.c
+src/xfpm-dkp.c
+src/xfpm-power-common.c
 src/xfpm-battery.c
-src/xfpm-battery-info.c
-src/xfpm-button-xf86.c
-src/xfpm-brightness-hal.c
 src/xfpm-battery.c
-src/xfpm-idle.c
 src/xfpm-main.c
-src/xfpm-cpu.c
-src/xfpm-supply.c
 src/xfpm-network-manager.c
 src/xfpm-dpms.c
-src/xfpm-tray-icon.c
-src/xfpm-engine.c
-src/xfpm-adapter.c
-src/xfpm-manager.c
 src/xfpm-inhibit.c
-src/xfpm-screen-saver.c
-src/xfpm-shutdown.c
+src/xfpm-power-info.c
 src/xfce4-power-manager.desktop.in
-libxfpm/hal-battery.c
-libxfpm/hal-device.c
-libxfpm/hal-manager.c
-libxfpm/hal-power.c
-libxfpm/hal-battery.c
-libxfpm/xfpm-common.c
-libxfpm/xfpm-string.c
-libxfpm/xfpm-dbus.c
-libxfpm/xfpm-popups.c
-libxfpm/xfpm-notify.c
 panel-plugins/brightness/brightness-button.c
 panel-plugins/brightness/xfce4-brightness-plugin.desktop.in.in
diff --git a/src/xfpm-battery-info.c b/src/xfpm-battery-info.c
deleted file mode 100644
index 508a3d4..0000000
--- a/src/xfpm-battery-info.c
+++ /dev/null
@@ -1,302 +0,0 @@
-/*
- * * Copyright (C) 2008-2009 Ali <aliov at xfce.org>
- *
- * Licensed under the GNU General Public License Version 2
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <libxfce4util/libxfce4util.h>
-#include <libxfce4ui/libxfce4ui.h>
-
-#include "xfpm-battery-info.h"
-#include "xfpm-enum-glib.h"
-
-static const gchar *
-xfpm_battery_info_get_device_tech (GHashTable *props)
-{
-    GValue *value;
-    gint tech;
-    
-    value = g_hash_table_lookup (props, "Technology:");
-    
-    if ( !value )
-	return NULL;
-	
-    tech = g_value_get_uint (value);
-    
-    switch (tech )
-    {
-	case 0:
-	    return _("Unknown");
-	case 1:
-	    return _("Lithium ion");
-	case 2:
-	    return _("Lithium polymer");
-	case 3:
-	    return _("Lithium iron phosphate");
-	case 4:
-	    return _("Lead acid");
-	case 5:
-	    return _("Nickel cadmium");
-	case 6:
-	    return _("Nickel metal hybride");
-	default:
-	    g_warn_if_reached ();
-    }
-    
-    return NULL;
-}    
-
-static const gchar *
-xfpm_battery_info_get_device_prop_string (GHashTable *props, const gchar *prop)
-{
-    GValue *value;
-    
-    value = g_hash_table_lookup (props, prop);
-    
-    if ( !value )
-	return NULL;
-	
-    return g_value_get_string (value);
-}
-
-static const gchar *
-xfpm_battery_info_get_device_prop_bool (GHashTable *props, const gchar *prop)
-{
-    GValue *value;
-    gboolean ret;
-    
-    value = g_hash_table_lookup (props, prop);
-    
-    if ( !value )
-	return NULL;
-	
-    ret = g_value_get_boolean (value);
-	
-    return ret ? _("Yes") : _("Non");
-}
-
-static const gchar *
-xfpm_battery_info_get_device_type (GHashTable *props)
-{
-    GValue *value;
-    guint type;
-    
-    value = g_hash_table_lookup (props, "Type");
-    
-    if ( !value )
-	return NULL;
-	
-    type = g_value_get_uint (value);
-    switch (type)
-    {
-	case XFPM_DKP_DEVICE_TYPE_BATTERY:
-	    return _("Battery");
-	case XFPM_DKP_DEVICE_TYPE_UPS:
-	    return _("UPS");
-	case XFPM_DKP_DEVICE_TYPE_LINE_POWER:
-	    return _("Line power");
-	case XFPM_DKP_DEVICE_TYPE_MOUSE:
-	    return _("Mouse");
-	case XFPM_DKP_DEVICE_TYPE_KBD:
-	    return _("Keyboard");
-    }
-    
-    return NULL;
-}
-
-static gchar *
-xfpm_battery_info_get_energy_property (GHashTable *props, const gchar *prop, const gchar *unit)
-{
-    GValue *value;
-    gchar *val = NULL;
-    gdouble energy;
-    
-    value = g_hash_table_lookup (props, prop);
-    
-    if ( !value )
-	return NULL;
-	
-    energy = g_value_get_double (value);
-    
-    val = g_strdup_printf ("%.1f %s", energy, unit);
-    
-    return val;
-}
-
-static void
-xfpm_battery_info_add (GtkWidget *table,
-		       PangoFontDescription *pfd, 
-		       const gchar *name, 
-		       const gchar *value, 
-		       gint i)
-{
-    GtkWidget *label, *align;
-    align = gtk_alignment_new (0.0, 0.5, 0, 0);
-
-    label = gtk_label_new (name);
-    gtk_container_add (GTK_CONTAINER(align), label);
-    gtk_widget_modify_font (label, pfd);
-
-    gtk_table_attach (GTK_TABLE(table), align,
-		      0, 1, i, i+1, 
-		      GTK_FILL, GTK_FILL,
-		      2, 2);
-
-    label = gtk_label_new (value);
-    align = gtk_alignment_new (0.0, 0.5, 0, 0);
-    gtk_container_add (GTK_CONTAINER(align), label);
-    gtk_table_attach (GTK_TABLE(table), align,
-		      1, 2, i, i+1, 
-		      GTK_FILL, GTK_FILL,
-		      2, 2);
-}
-
-static GtkWidget *
-xfpm_battery_info (GHashTable *props)
-{
-    PangoFontDescription *pfd;
-    
-    GtkWidget *table;
-    
-    gint i = 0;
-    const gchar *cstr;
-    gchar *str = NULL;
-    pfd = pango_font_description_from_string("bold");
-    
-    table = gtk_table_new (4, 2, FALSE);
-    
-    cstr = xfpm_battery_info_get_device_type (props);
-    
-    if ( cstr )
-    {
-	xfpm_battery_info_add (table, pfd, _("Type:"), cstr, i);
-	i++;
-    }
-    
-    
-    cstr = xfpm_battery_info_get_device_prop_string (props, "Model");
-    
-    if ( cstr )
-    {
-	xfpm_battery_info_add (table, pfd, _("Model:"), cstr, i);
-	i++;
-    }
-    
-    cstr = xfpm_battery_info_get_device_tech (props);
-    if ( cstr )
-    {
-	xfpm_battery_info_add (table, pfd, _("Technology:"), cstr, i);
-	i++;
-    }
-
-    /* TRANSLATORS: Unit here is What hour*/
-    str = xfpm_battery_info_get_energy_property (props, "EnergyFullDesign", _("Wh"));
-    
-    if ( str )
-    {
-	xfpm_battery_info_add (table, pfd, _("Energy full design:"), str, i);
-	i++;
-	g_free (str);
-    }
-    
-    /* TRANSLATORS: Unit here is What hour*/
-    str = xfpm_battery_info_get_energy_property (props, "EnergyFull", _("Wh"));
-    
-    if ( str )
-    {
-	xfpm_battery_info_add (table, pfd, _("Energy full:"), str, i);
-	i++;
-	g_free (str);
-    }
-    
-    /* TRANSLATORS: Unit here is What hour*/
-    str = xfpm_battery_info_get_energy_property (props, "EnergyEmpty", _("Wh"));
-    
-    if ( str )
-    {
-	xfpm_battery_info_add (table, pfd, _("Energy empty:"), str, i);
-	i++;
-	g_free (str);
-    }
-    
-    /* TRANSLATORS: Unit here is volt*/
-    str = xfpm_battery_info_get_energy_property (props, "Voltage", _("V"));
-    if ( str )
-    {
-	xfpm_battery_info_add (table, pfd, _("Voltage:"), str, i);
-	i++;
-	g_free (str);
-    }
-    
-    cstr = xfpm_battery_info_get_device_prop_bool (props, "IsRechargeable");
-    if ( cstr )
-    {
-	xfpm_battery_info_add (table, pfd, _("Rechargeable:"), cstr, i);
-	i++;
-    }
-    
-    cstr = xfpm_battery_info_get_device_prop_string (props, "Vendor");
-    if ( cstr )
-    {
-	xfpm_battery_info_add (table, pfd, _("Vendor:"), cstr, i);
-	i++;
-    }
-    
-    cstr = xfpm_battery_info_get_device_prop_string (props, "Serial");
-    if ( cstr )
-    {
-	xfpm_battery_info_add (table, pfd, _("Serial number:"), cstr, i);
-	i++;
-    }
-    
-    return table;
-}
-
-void xfpm_battery_info_show (GHashTable *props, const gchar *icon_name)
-{
-    GtkWidget *dialog;
-    GtkWidget *mainbox;
-    GtkWidget *allbox;
-    GtkWidget *info;
-    
-    dialog = xfce_titled_dialog_new_with_buttons (_("Battery information"),
-	 				          NULL,
-                                                  GTK_DIALOG_DESTROY_WITH_PARENT,
-                                                  GTK_STOCK_CLOSE,
-                                                  GTK_RESPONSE_CANCEL,
-					          NULL);
-					       
-    gtk_window_set_icon_name (GTK_WINDOW (dialog), icon_name);
-    gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
-    
-    mainbox = GTK_DIALOG (dialog)->vbox;
-    
-    allbox = gtk_vbox_new (FALSE, 0);
-    gtk_box_pack_start (GTK_BOX(mainbox), allbox, TRUE, TRUE, 0);
-    
-    info = xfpm_battery_info (props);
-    
-    gtk_box_pack_start (GTK_BOX (allbox), info, FALSE, FALSE, 8);
-    
-    g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
-    
-    gtk_widget_show_all (dialog);
-}
diff --git a/src/xfpm-battery-info.h b/src/xfpm-battery-info.h
deleted file mode 100644
index a54d472..0000000
--- a/src/xfpm-battery-info.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * * Copyright (C) 2008-2009 Ali <aliov at xfce.org>
- *
- * Licensed under the GNU General Public License Version 2
- *
- * 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
- */
-
-#ifndef __XFPM_BATTERY_INFO_H
-#define __XFPM_BATTERY_INFO_H
-
-#include <gtk/gtk.h>
-#include <glib.h>
-
-G_BEGIN_DECLS
-
-void		xfpm_battery_info_show		(GHashTable *props, 
-						 const gchar *icon_name);
-
-G_END_DECLS
-
-#endif /*__XFPM_BATTERY_INFO_H */



More information about the Xfce4-commits mailing list