aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-02-14 15:57:17 -0600
committerTed Gould <ted@gould.cx>2012-02-14 15:57:17 -0600
commitea4f2d84eb5a268462037868131e1d9e69b3a845 (patch)
tree2d4b454fde3dcd679f18c2829681fc1ef7e81581
parent16fb53f3e4af8d01bce049ec9f932c2ef1978b4c (diff)
parent207267adc55aad9810afb4eb2e04ca86c4289f90 (diff)
downloadayatana-indicator-power-ea4f2d84eb5a268462037868131e1d9e69b3a845.tar.gz
ayatana-indicator-power-ea4f2d84eb5a268462037868131e1d9e69b3a845.tar.bz2
ayatana-indicator-power-ea4f2d84eb5a268462037868131e1d9e69b3a845.zip
Style and performance fixes
-rw-r--r--src/indicator-power.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/indicator-power.c b/src/indicator-power.c
index f7de038..3980988 100644
--- a/src/indicator-power.c
+++ b/src/indicator-power.c
@@ -44,6 +44,12 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#define POWER_DBUS_PATH DBUS_PATH "/Power"
#define POWER_DBUS_INTERFACE "org.gnome.SettingsDaemon.Power"
+enum {
+ POWER_INDICATOR_ICON_POLICY_PRESENT,
+ POWER_INDICATOR_ICON_POLICY_CHARGE,
+ POWER_INDICATOR_ICON_POLICY_NEVER
+};
+
#define INDICATOR_POWER_TYPE (indicator_power_get_type ())
#define INDICATOR_POWER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_POWER_TYPE, IndicatorPower))
#define INDICATOR_POWER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_POWER_TYPE, IndicatorPowerClass))
@@ -51,23 +57,16 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#define IS_INDICATOR_POWER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_POWER_TYPE))
#define INDICATOR_POWER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_POWER_TYPE, IndicatorPowerClass))
-enum {
- POWER_INDICATOR_ICON_POLICY_PRESENT,
- POWER_INDICATOR_ICON_POLICY_CHARGE,
- POWER_INDICATOR_ICON_POLICY_NEVER
-};
-
-GType indicator_power_get_type (void);
+typedef struct _IndicatorPowerClass IndicatorPowerClass;
+typedef struct _IndicatorPower IndicatorPower;
-INDICATOR_SET_VERSION
-INDICATOR_SET_TYPE (INDICATOR_POWER_TYPE)
-
-typedef struct {
+struct _IndicatorPowerClass
+{
IndicatorObjectClass parent_class;
-}
-IndicatorPowerClass;
+};
-typedef struct {
+struct _IndicatorPower
+{
IndicatorObject parent_instance;
GtkMenu *menu;
@@ -84,8 +83,12 @@ typedef struct {
GVariant *device;
GSettings *settings;
-}
-IndicatorPower;
+};
+
+GType indicator_power_get_type (void) G_GNUC_CONST;
+
+INDICATOR_SET_VERSION
+INDICATOR_SET_TYPE (INDICATOR_POWER_TYPE)
/* Prototypes */
static void indicator_power_dispose (GObject *object);