Revision: 852 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=852&view=rev Author: eht16 Date: 2009-07-21 20:08:09 +0000 (Tue, 21 Jul 2009)
Log Message: ----------- Avoid using GHashTable functions from newer GLib versions to fix compilation with GLib 2.8.
Modified Paths: -------------- branches/geany-plugins-0.17.1/addons/ChangeLog branches/geany-plugins-0.17.1/addons/src/tasks.c
Modified: branches/geany-plugins-0.17.1/addons/ChangeLog =================================================================== --- branches/geany-plugins-0.17.1/addons/ChangeLog 2009-07-21 20:04:36 UTC (rev 851) +++ branches/geany-plugins-0.17.1/addons/ChangeLog 2009-07-21 20:08:09 UTC (rev 852) @@ -1,3 +1,10 @@ +2009-07-21 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * src/tasks.c: + Avoid using GHashTable functions from newer GLib versions to fix + compilation with GLib 2.8. + + 2009-07-17 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/ao_systray.c: @@ -5,13 +12,6 @@ icon.
-2009-07-16 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> - - * src/addons.c, src/ao_doclist.c, src/ao_openuri.c, src/ao_systray.c, - src/tasks.c: - Use single header includes. - - 2009-06-16 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/ao_doclist.c:
Modified: branches/geany-plugins-0.17.1/addons/src/tasks.c =================================================================== --- branches/geany-plugins-0.17.1/addons/src/tasks.c 2009-07-21 20:04:36 UTC (rev 851) +++ branches/geany-plugins-0.17.1/addons/src/tasks.c 2009-07-21 20:08:09 UTC (rev 852) @@ -59,7 +59,7 @@
static gboolean tasks_button_cb(GtkWidget *widget, GdkEventButton *event, gpointer data); static gboolean tasks_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data); -static void free_editor_tasks(void *editor); +static void free_editor_tasks(gpointer key, gpointer value, gpointer data); static void scan_all_documents(void); static void scan_document_for_tasks(GeanyDocument *doc); static void create_tasks_tab(void); @@ -87,15 +87,12 @@ static void tasks_cleanup(void) { GtkWidget *notebook; - GList *editors, *editor; int page;
g_string_free(linebuf, TRUE);
- editors = g_hash_table_get_keys(globaltasks); - for(editor = g_list_first(editors); editor; editor = editor->next) - free_editor_tasks(editor); - g_hash_table_unref(globaltasks); + g_hash_table_foreach(globaltasks, free_editor_tasks, NULL); + g_hash_table_destroy(globaltasks);
notebook = ui_lookup_widget(geany->main_widgets->window, "notebook_info"); page = gtk_notebook_page_num(GTK_NOTEBOOK(notebook), notebook_page); @@ -119,7 +116,7 @@ {
if(tasks_enabled && doc->is_valid) - free_editor_tasks(doc->editor); + free_editor_tasks(doc->editor, NULL, NULL);
}
@@ -233,12 +230,12 @@ }
-static void free_editor_tasks(void *editor) +static void free_editor_tasks(gpointer key, gpointer value, gpointer data) { GList *tasklist, *entry; GeanyTask *task;
- tasklist = g_hash_table_lookup(globaltasks, editor); + tasklist = (value) ? value : g_hash_table_lookup(globaltasks, key); if(tasklist) { for(entry = g_list_first(tasklist); entry; entry = g_list_next(entry)) @@ -249,7 +246,7 @@ } g_list_free(tasklist); } - g_hash_table_remove(globaltasks, editor); + g_hash_table_remove(globaltasks, key);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org