[planner] Even function parameters.



commit 1f634a70c85570c958ccd0f548bc1910e98505d1
Author: Ahmed Baïzid <ahmed baizid org>
Date:   Thu Apr 9 19:00:30 2015 +0200

    Even function parameters.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=747423

 libplanner/mrp-parser.c   | 10 +++++-----
 libplanner/mrp-project.h  |  8 ++++----
 libplanner/mrp-resource.c |  6 +++---
 libplanner/mrp-time.c     | 14 +++++++-------
 4 files changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/libplanner/mrp-parser.c b/libplanner/mrp-parser.c
index 225457f..68973e1 100644
--- a/libplanner/mrp-parser.c
+++ b/libplanner/mrp-parser.c
@@ -1073,7 +1073,7 @@ parser_build_xml_doc (MrpStorageMrproject  *module,
 
 gboolean
 mrp_parser_save (MrpStorageMrproject  *module,
-                const gchar          *filename,
+                const gchar          *uri,
                 gboolean              force,
                 GError              **error)
 {
@@ -1083,12 +1083,12 @@ mrp_parser_save (MrpStorageMrproject  *module,
        xmlDocPtr  doc;
 
        g_return_val_if_fail (MRP_IS_STORAGE_MRPROJECT (module), FALSE);
-       g_return_val_if_fail (filename != NULL && filename[0] != 0, FALSE);
+       g_return_val_if_fail (uri != NULL && uri[0] != 0, FALSE);
 
-       if (!strstr (filename, ".mrproject") && !strstr (filename, ".planner")) {
-               real_filename = g_strconcat (filename, ".planner", NULL);
+       if (!strstr (uri, ".mrproject") && !strstr (uri, ".planner")) {
+               real_filename = g_strconcat (uri, ".planner", NULL);
        } else {
-               real_filename = g_strdup (filename);
+               real_filename = g_strdup (uri);
        }
 
        file_exist = g_file_test (
diff --git a/libplanner/mrp-project.h b/libplanner/mrp-project.h
index f30d514..79f7f9c 100644
--- a/libplanner/mrp-project.h
+++ b/libplanner/mrp-project.h
@@ -56,17 +56,17 @@ typedef struct _MrpProjectPriv MrpProjectPriv;
 
 /**
  * MrpTaskTraverseFunc:
- * @Param1:
- * @Param2:
+ * @task: an #MrpTask
+ * @user_data: user data
  *
  * A function to use with mrp_project_task_traverse(). @task is the
- * currently traversed task, and @data is the user data passed to the
+ * currently traversed task, and @user_data is the user data passed to the
  * mrp_project_task_traverse(). The traversal can be stopped by returning
  * %TRUE.
  *
  * Returns: %TRUE if the traversal is to be stopped.
  */
-typedef gboolean (*MrpTaskTraverseFunc) (MrpTask*, gpointer);
+typedef gboolean (*MrpTaskTraverseFunc) (MrpTask* task, gpointer user_data);
 
 struct _MrpProject {
        MrpObject       parent;
diff --git a/libplanner/mrp-resource.c b/libplanner/mrp-resource.c
index 82a7cf1..101c0bf 100644
--- a/libplanner/mrp-resource.c
+++ b/libplanner/mrp-resource.c
@@ -693,15 +693,15 @@ mrp_resource_get_short_name (MrpResource *resource)
 /**
  * mrp_resource_set_short_name:
  * @resource: an #MrpResource
- * @name: new short name of @resource
+ * @short_name: new short name of @resource
  *
  * Sets the short name of @resource.
  **/
-void mrp_resource_set_short_name (MrpResource *resource, const gchar *name)
+void mrp_resource_set_short_name (MrpResource *resource, const gchar *short_name)
 {
        g_return_if_fail (MRP_IS_RESOURCE (resource));
 
-       mrp_object_set (MRP_OBJECT (resource), "short_name", name, NULL);
+       mrp_object_set (MRP_OBJECT (resource), "short_name", short_name, NULL);
 }
 
 /**
diff --git a/libplanner/mrp-time.c b/libplanner/mrp-time.c
index 80863a7..db05065 100644
--- a/libplanner/mrp-time.c
+++ b/libplanner/mrp-time.c
@@ -1351,10 +1351,10 @@ stolen_g_date_get_iso8601_week_of_year (const GDate *d)
 }
 
 gint
-mrp_time2_get_week_number (MrpTime *t, gint *y)
+mrp_time2_get_week_number (MrpTime *t, gint *year)
 {
        gint week;
-       gint year;
+       gint y;
 
        g_return_val_if_fail (t != NULL, 0);
 
@@ -1363,25 +1363,25 @@ mrp_time2_get_week_number (MrpTime *t, gint *y)
        /* Calculate the year this week belongs to as it can be different than
         * the year of the date (e.g. December 31 2002 is in week 1 of 2003).
         */
-       if(y != NULL) {
-               year = g_date_get_year (&t->date);
+       if(year != NULL) {
+               y = g_date_get_year (&t->date);
 
                switch(g_date_get_month (&t->date)) {
                case G_DATE_JANUARY:
                        if(week > 50) {
-                               year--;
+                               y--;
                        }
                        break;
                case G_DATE_DECEMBER:
                        if(week == 1) {
-                               year++;
+                               y++;
                        }
                        break;
                default:
                        break;
                }
 
-               *y = year;
+               *year = y;
        }
        return week;
 }


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