Revision: 5723
http://geany.svn.sourceforge.net/geany/?rev=5723&view=rev
Author: colombanw
Date: 2011-04-13 21:55:18 +0000 (Wed, 13 Apr 2011)
Log Message:
-----------
Fix date of an entry (oops)
Modified Paths:
--------------
trunk/ChangeLog
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-04-13 15:04:37 UTC (rev 5722)
+++ trunk/ChangeLog 2011-04-13 21:55:18 UTC (rev 5723)
@@ -22,7 +22,7 @@
document_compare_by_display_name(), thanks again Nick.
-2011-04-08 Colomban Wendling <colomban(at)geany(dot)org>
+2011-04-11 Colomban Wendling <colomban(at)geany(dot)org>
* src/document.c, src/document.h, src/editor.c, src/keybindings.c:
Revert r5642 "Don't update parent WorkObjects when updating one in
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5720
http://geany.svn.sourceforge.net/geany/?rev=5720&view=rev
Author: ntrel
Date: 2011-04-13 12:22:30 +0000 (Wed, 13 Apr 2011)
Log Message:
-----------
Remove check for documents[i]->is_valid as foreach_document(i) already does this (oops).
Modified Paths:
--------------
trunk/src/ui_utils.c
Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c 2011-04-13 12:20:19 UTC (rev 5719)
+++ trunk/src/ui_utils.c 2011-04-13 12:22:30 UTC (rev 5720)
@@ -2428,8 +2428,7 @@
/* copy the documents_array into the new one */
foreach_document(i)
{
- if (documents[i]->is_valid)
- g_ptr_array_add(sorted_documents, documents[i]);
+ g_ptr_array_add(sorted_documents, documents[i]);
}
/* and now sort it */
if (compare_func != NULL)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5718
http://geany.svn.sourceforge.net/geany/?rev=5718&view=rev
Author: ntrel
Date: 2011-04-13 12:16:02 +0000 (Wed, 13 Apr 2011)
Log Message:
-----------
Update dox for document_compare_by_display_name() with warning
about parameter addresses.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-04-12 21:58:18 UTC (rev 5717)
+++ trunk/ChangeLog 2011-04-13 12:16:02 UTC (rev 5718)
@@ -1,3 +1,10 @@
+2011-04-13 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/document.c:
+ Update dox for document_compare_by_display_name() with warning
+ about parameter addresses.
+
+
2011-04-12 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/document.c:
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2011-04-12 21:58:18 UTC (rev 5717)
+++ trunk/src/document.c 2011-04-13 12:16:02 UTC (rev 5718)
@@ -3013,15 +3013,16 @@
}
-/** GCompareFunc-like sort function to sort documents, e.g. in a GPtrArray by
- * their display names.
- * Display names means the base name of the document's file.
+/** Compares documents by their display names.
+ * This matches @c GCompareFunc for use with e.g. @c g_ptr_array_sort().
+ * @note 'Display name' means the base name of the document's filename.
*
- * @param a @c document a.
- * @param b @c document b.
- * @return negative value if a < b; zero if a = b; positive value if a > b.
+ * @param a @c GeanyDocument**.
+ * @param b @c GeanyDocument**.
+ * @warning The arguments take the address of each document pointer.
+ * @return Negative value if a < b; zero if a = b; positive value if a > b.
*
- * @since 0.21
+ * @since 0.21
*/
gint document_compare_by_display_name(gconstpointer a, gconstpointer b)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5716
http://geany.svn.sourceforge.net/geany/?rev=5716&view=rev
Author: eht16
Date: 2011-04-12 17:43:00 +0000 (Tue, 12 Apr 2011)
Log Message:
-----------
fix function signature (oops)
replace sort_func by compare_func
Modified Paths:
--------------
trunk/src/plugindata.h
trunk/src/ui_utils.c
Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h 2011-04-12 17:24:13 UTC (rev 5715)
+++ trunk/src/plugindata.h 2011-04-12 17:43:00 UTC (rev 5716)
@@ -310,7 +310,7 @@
const GdkColor* (*document_get_status_color) (struct GeanyDocument *doc);
gchar* (*document_get_basename_for_display) (struct GeanyDocument *doc, gint length);
gint (*document_get_notebook_page) (struct GeanyDocument *doc);
- gint (*document_compare_by_display_name) (const struct GeanyDocument **a, const struct GeanyDocument **b);
+ gint (*document_compare_by_display_name) (gconstpointer a, gconstpointer b);
}
DocumentFuncs;
@@ -475,7 +475,7 @@
void (*ui_combo_box_add_to_history) (GtkComboBoxEntry *combo_entry,
const gchar *text, gint history_len);
void (*ui_menu_add_document_items_sorted) (GtkMenu *menu, struct GeanyDocument *active,
- GCallback callback, GCompareFunc sort_func);
+ GCallback callback, GCompareFunc compare_func);
}
UIUtilsFuncs;
Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c 2011-04-12 17:24:13 UTC (rev 5715)
+++ trunk/src/ui_utils.c 2011-04-12 17:43:00 UTC (rev 5716)
@@ -2400,7 +2400,7 @@
/** Adds a list of document items to @a menu.
*
- * @a sort_func might be NULL to not sort the documents in the menu. In this case,
+ * @a compare_func might be NULL to not sort the documents in the menu. In this case,
* the order of the document tabs is used.
*
* See document_sort_by_display_name() for an example sort function.
@@ -2409,11 +2409,11 @@
* @param active Which document to highlight, or @c NULL.
* @param callback is used for each menu item's @c "activate" signal and will be passed
* the corresponding document pointer as @c user_data.
- * @param sort_func is used to sort the list. Might be @c NULL to not sort the list.
+ * @param compare_func is used to sort the list. Might be @c NULL to not sort the list.
* @warning You should check @c doc->is_valid in the callback.
* @since 0.21 */
void ui_menu_add_document_items_sorted(GtkMenu *menu, GeanyDocument *active,
- GCallback callback, GCompareFunc sort_func)
+ GCallback callback, GCompareFunc compare_func)
{
GtkWidget *menu_item, *menu_item_label, *image;
const GdkColor *color;
@@ -2432,8 +2432,8 @@
g_ptr_array_add(sorted_documents, documents[i]);
}
/* and now sort it */
- if (sort_func != NULL)
- g_ptr_array_sort(sorted_documents, sort_func);
+ if (compare_func != NULL)
+ g_ptr_array_sort(sorted_documents, compare_func);
for (i = 0; i < sorted_documents->len; i++)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.