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

[Workman-devel] [PATCH 2/7] Change add_partition argument order



Change the order of the arguments of workman_manager_add_partition() to
be more consistent with the rest of the API, for which the state is
usually the 2nd argument.
---
 workman/workman-manager.c | 6 +++---
 workman/workman-manager.h | 7 ++++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/workman/workman-manager.c b/workman/workman-manager.c
index 698cbe2..27bde81 100644
--- a/workman/workman-manager.c
+++ b/workman/workman-manager.c
@@ -66,18 +66,18 @@ WorkmanManager *workman_manager_get_default(GError **error)
 /**
  * workman_manager_add_partition:
  * @mgr: (transfer none): the manager object
- * @parent: (transfer none)(allow-none): the parent of the new partition
  * @state: the state to create the new partition in
+ * @parent: (transfer none)(allow-none): the parent of the new partition
  *
  * Returns: (transfer full): the new partition
  */
 WorkmanPartition *workman_manager_add_partition(WorkmanManager *mgr,
-                                                WorkmanPartition *parent,
                                                 WorkmanState state,
+                                                WorkmanPartition *parent,
                                                 GError **error)
 {
     WorkmanManagerClass *klass = WORKMAN_MANAGER_GET_CLASS(mgr);
-    return klass->add_partition(mgr, parent, state, error);
+    return klass->add_partition(mgr, state, parent, error);
 }
 
 gboolean workman_manager_remove_partition(WorkmanManager *mgr,
diff --git a/workman/workman-manager.h b/workman/workman-manager.h
index da6e5a4..9cf85fa 100644
--- a/workman/workman-manager.h
+++ b/workman/workman-manager.h
@@ -58,11 +58,11 @@ struct _WorkmanManagerClass
     /*< private >*/
     GObjectClass parent_class;
 
-    /* class members */
 
+    /* class members */
     WorkmanPartition *(*add_partition)(WorkmanManager *mgr,
-                                       WorkmanPartition *parent,
                                        WorkmanState state,
+                                       WorkmanPartition *parent,
                                        GError **error);
 
     gboolean (*remove_partition)(WorkmanManager *mgr,
@@ -77,6 +77,7 @@ struct _WorkmanManagerClass
                             WorkmanState state,
                             GError **error);
 
+
     /* Remove from padding when adding new virtual functions */
     gpointer padding[20];
 };
@@ -86,8 +87,8 @@ GType workman_manager_get_type(void);
 WorkmanManager *workman_manager_get_default(GError **error);
 
 WorkmanPartition *workman_manager_add_partition(WorkmanManager *mgr,
-                                                WorkmanPartition *parent,
                                                 WorkmanState state,
+                                                WorkmanPartition *parent,
                                                 GError **error);
 
 gboolean workman_manager_remove_partition(WorkmanManager *mgr,
-- 
1.7.11.7


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