From 9fc7711231bc4734541b50087b813e598a6813db Mon Sep 17 00:00:00 2001 From: Peng Huang Date: Sun, 30 May 2010 21:53:34 +0800 Subject: [PATCH] Refine coding style --- src/Bus.h | 9 +++++---- src/Property.h | 21 ++++++++++++++------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/Bus.h b/src/Bus.h index 518a62f..4ed9932 100644 --- a/src/Bus.h +++ b/src/Bus.h @@ -28,14 +28,15 @@ namespace PY { class Bus : Object { public: - Bus (void) : Object (ibus_bus_new ()) { - } + Bus (void) : Object (ibus_bus_new ()) { } - bool isConnected (void) { + bool isConnected (void) + { return ibus_bus_is_connected (*this); } - operator IBusBus * (void) const { + operator IBusBus * (void) const + { return get (); } }; diff --git a/src/Property.h b/src/Property.h index 2bbb6b8..09429c4 100644 --- a/src/Property.h +++ b/src/Property.h @@ -40,23 +40,28 @@ public: IBusPropList *props = NULL) : Object (ibus_property_new (key, type, label, icon, tooltip, sensitive, visible, state, props)) { } - void setLabel (IBusText *text) { + void setLabel (IBusText *text) + { ibus_property_set_label (get (), text); } - void setLabel (const gchar *text) { + void setLabel (const gchar *text) + { setLabel (Text (text)); } - void setIcon (const gchar *icon) { + void setIcon (const gchar *icon) + { ibus_property_set_icon (get (), icon); } - void setSensitive (gboolean sensitive) { + void setSensitive (gboolean sensitive) + { ibus_property_set_sensitive (get (), sensitive); } - operator IBusProperty * (void) const { + operator IBusProperty * (void) const + { return get (); } }; @@ -66,11 +71,13 @@ class PropList : Object { public: PropList (void) : Object (ibus_prop_list_new ()) { } - void append (Property &prop) { + void append (Property &prop) + { ibus_prop_list_append (get (), prop); } - operator IBusPropList * (void) const { + operator IBusPropList * (void) const + { return get (); } }; -- 2.7.4