summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2009-12-22 19:45:19 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2009-12-22 19:45:19 +0100
commitf8ef07d58d8412759c15269abcb03bbeed1f52db (patch)
tree7bc7cab491956432bedb6198d86d9cdf44b8f264
parent567af94dae76f62f2294ac2ba99819d324815b76 (diff)
Removed more unused code in window_main.c.
-rw-r--r--window_main.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/window_main.c b/window_main.c
index d198258..376d604 100644
--- a/window_main.c
+++ b/window_main.c
@@ -39,56 +39,6 @@ inline static void filetree_init(GtkTreeView *filetree) {
filetree_create_model(filetree);
}
-G_MODULE_EXPORT gboolean on_filetree_test_expand_row(GtkTreeView *treeview, GtkTreeIter *iter, GtkTreePath *path, gpointer user_data) {
- printf("on_filetree_test_expand_row\n");
- if(gtk_tree_path_get_depth(path) == 0) {
- return TRUE;
- }
- return FALSE;
-}
-
-G_MODULE_EXPORT void on_filetree_row_expanded(GtkTreeView *treeview, GtkTreeIter *iter, GtkTreePath *path, gpointer user_data) {
- printf("expanded\n");
- GtkTreeModel *model;
- GtkTreeIter newiter;
- GtkTreeIter child;
- GArray *array;
- gchar **split;
- GValue value;
- sqlite_uint64 dirid;
- gboolean temp_found = FALSE;
-
- model = gtk_tree_view_get_model(treeview);
- if(gtk_tree_model_iter_children(model, &child, iter) == TRUE) {
- memset(&value, 0, sizeof(GValue));
- gtk_tree_model_get_value(model, &child, 0, &value);
- if(g_strcmp0("_walls_temp_", g_value_get_string(&value)) == 0)
- temp_found = TRUE;
- else
- return;
- }
-
- memset(&value, 0, sizeof(GValue));
- gtk_tree_model_get_value(model, iter, 0, &value);
- split = g_strsplit(g_value_get_string(&value), ":", 2);
- dirid = g_ascii_strtoull(split[0], NULL, 10);
- g_strfreev(split);
-
- array = NULL;
- if(db_get_wallpapers(dirid, &array)) {
- for(int i = 0; i < array->len; i++) {
- struct wallpaper_t *wp = &g_array_index(array, struct wallpaper_t, i);
- gtk_tree_store_append((GtkTreeStore*)model, &newiter, iter);
- gtk_tree_store_set((GtkTreeStore*)model, &newiter, 0, wp->filepath, -1);
- }
- g_array_free(array, TRUE);
- if(gtk_tree_model_iter_children(model, &child, iter) == TRUE) {
- if(temp_found)
- gtk_tree_store_remove((GtkTreeStore*)model, &child);
- }
- }
-}
-
int gui_main(int argc, char **argv) {
GtkWidget *window;
GtkWidget *filetree;