[devhelp] KeywordModel: minor cosmetic code changes



commit 7175e83912390dac7ffd5b5e85146d07069d23e3
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Dec 9 20:26:25 2017 +0100

    KeywordModel: minor cosmetic code changes
    
    - Space out the functions in the header, to have IMHO a better
    readability.
    - In Private struct, do not align field names on the same column,
    because when adding a field with a long type it's cumbersome to adapt
    the alignment for all other fields.
    - Better apply Linux coding style.

 src/dh-keyword-model.c |   12 +++++-------
 src/dh-keyword-model.h |   12 ++++++------
 2 files changed, 11 insertions(+), 13 deletions(-)
---
diff --git a/src/dh-keyword-model.c b/src/dh-keyword-model.c
index ca5e912..18c3d21 100644
--- a/src/dh-keyword-model.c
+++ b/src/dh-keyword-model.c
@@ -16,16 +16,14 @@
  * 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, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "config.h"
 #include "dh-keyword-model.h"
-
 #include <gtk/gtk.h>
 #include <string.h>
-
 #include "dh-book.h"
 #include "dh-util.h"
 
@@ -47,7 +45,7 @@ typedef struct {
         /* List of DhLink* */
         GQueue keywords;
 
-        gint   stamp;
+        gint stamp;
 } DhKeywordModelPrivate;
 
 /* Store a keyword as well as glob
@@ -75,7 +73,7 @@ typedef struct {
 
 #define MAX_HITS 100
 
-static void dh_keyword_model_tree_model_init (GtkTreeModelIface   *iface);
+static void dh_keyword_model_tree_model_init (GtkTreeModelIface *iface);
 
 G_DEFINE_TYPE_WITH_CODE (DhKeywordModel, dh_keyword_model, G_TYPE_OBJECT,
                          G_ADD_PRIVATE (DhKeywordModel)
@@ -96,7 +94,7 @@ dh_keyword_model_finalize (GObject *object)
 static void
 dh_keyword_model_class_init (DhKeywordModelClass *klass)
 {
-        GObjectClass *object_class = G_OBJECT_CLASS (klass);;
+        GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
         object_class->finalize = dh_keyword_model_finalize;
 }
diff --git a/src/dh-keyword-model.h b/src/dh-keyword-model.h
index efde63b..a8cf271 100644
--- a/src/dh-keyword-model.h
+++ b/src/dh-keyword-model.h
@@ -13,8 +13,8 @@
  * 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, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #ifndef DH_KEYWORD_MODEL_H
@@ -36,13 +36,11 @@ G_BEGIN_DECLS
 typedef struct _DhKeywordModel      DhKeywordModel;
 typedef struct _DhKeywordModelClass DhKeywordModelClass;
 
-struct _DhKeywordModel
-{
+struct _DhKeywordModel {
         GObject parent_instance;
 };
 
-struct _DhKeywordModelClass
-{
+struct _DhKeywordModelClass {
         GObjectClass parent_class;
 };
 
@@ -54,7 +52,9 @@ enum {
 };
 
 GType           dh_keyword_model_get_type  (void);
+
 DhKeywordModel *dh_keyword_model_new       (void);
+
 DhLink *        dh_keyword_model_filter    (DhKeywordModel *model,
                                             const gchar    *search_string,
                                             const gchar    *book_id,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]