projects
/
belltower
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b8c3369
)
header row
author
Thomas Thurman
<tthurman@gnome.org>
Thu, 27 Aug 2009 19:26:57 +0000
(15:26 -0400)
committer
Thomas Thurman
<tthurman@gnome.org>
Thu, 27 Aug 2009 19:26:57 +0000
(15:26 -0400)
belltower.c
patch
|
blob
|
history
diff --git
a/belltower.c
b/belltower.c
index
fc24d60
..
81540db
100644
(file)
--- a/
belltower.c
+++ b/
belltower.c
@@
-20,6
+20,11
@@
GtkWidget *window;
GtkWidget *window;
+/*
+ FIXME:
+ We should really do this by looking at the header row of the table.
+ They might decide to put in new columns some day.
+*/
typedef enum {
FieldPrimaryKey,
FieldNationalGrid,
typedef enum {
FieldPrimaryKey,
FieldNationalGrid,
@@
-215,7
+220,6
@@
get_areas_cb (tower *details,
{
GHashTable *hash = (GHashTable *)data;
{
GHashTable *hash = (GHashTable *)data;
- /*
if (details->serial==0)
return TRUE; /* header row */
if (details->serial==0)
return TRUE; /* header row */
@@
-401,6
+405,8
@@
parse_dove (ParseDoveCallback callback,
fclose (dove);
return;
}
fclose (dove);
return;
}
+
+ result.serial++;
}
fclose (dove);
}
fclose (dove);
@@
-447,7
+453,7
@@
put_areas_into_list (gpointer key,
GtkListStore *list_store = (GtkListStore*) data;
gtk_list_store_append (list_store, &iter);
gtk_list_store_set (list_store, &iter,
GtkListStore *list_store = (GtkListStore*) data;
gtk_list_store_append (list_store, &iter);
gtk_list_store_set (list_store, &iter,
- 0, value,
+ 0, value,
-1);
}
-1);
}
@@
-465,10
+471,6
@@
towers_by_area (void)
g_str_equal,
g_free,
g_free);
g_str_equal,
g_free,
g_free);
- /*
- g_free (hash);
- */
-
parse_dove (get_areas_cb,
hash);
parse_dove (get_areas_cb,
hash);
@@
-476,6
+478,8
@@
towers_by_area (void)
put_areas_into_list,
list_store);
put_areas_into_list,
list_store);
+ /* g_signal_connect (G_OBJECT (dialog), "delete_event", G_CALLBACK (g_hash_table_destroy), hash)*/
+
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (list_store),
0,
GTK_SORT_ASCENDING);
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (list_store),
0,
GTK_SORT_ASCENDING);
@@
-493,6
+497,7
@@
towers_by_area (void)
gtk_tree_view_set_model (GTK_TREE_VIEW (treeview),
GTK_TREE_MODEL (list_store));
gtk_tree_view_set_model (GTK_TREE_VIEW (treeview),
GTK_TREE_MODEL (list_store));
+
g_object_unref (list_store);
hildon_pannable_area_add_with_viewport (HILDON_PANNABLE_AREA (pan),
g_object_unref (list_store);
hildon_pannable_area_add_with_viewport (HILDON_PANNABLE_AREA (pan),
@@
-507,6
+512,8
@@
towers_by_area (void)
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (GTK_WIDGET (dialog));
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (GTK_WIDGET (dialog));
+ /* g_hash_table_unref (hash); */
+
}
static void
}
static void