diff options
-rw-r--r-- | window_main.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/window_main.c b/window_main.c index 7a95761..54e885e 100644 --- a/window_main.c +++ b/window_main.c @@ -254,6 +254,9 @@ static void load_pixbuf(const gchar *filepath) { resize_pixbuf(); } +/** + * Load wallpapers from array into liststore. + */ static void fill_wall_list(GtkListStore *liststore, GArray *array) { GtkTreeIter iter; @@ -284,6 +287,9 @@ static void start_thumb_thread(GtkListStore *liststore) { } } +/** + * Load wallpapers from the currently selected folder. + */ static void display_from_foldtree(GtkTreeSelection *treeselection) { GtkTreeModel *model; GtkTreeIter iter; @@ -308,7 +314,6 @@ static void display_from_foldtree(GtkTreeSelection *treeselection) { } } - void on_foldtree_selection_changed(GtkTreeSelection *treeselection, gpointer user_data) { display_from_foldtree(treeselection); } @@ -339,7 +344,9 @@ void on_thumbview_selection_changed(GtkIconView *iconview, gpointer user_data) { } } - +/** + * Load wallpapers from the currently selected tags. + */ void display_from_tagview() { GtkTreeIter iter; GtkTreeModel *model; @@ -402,6 +409,9 @@ void on_main_tagview_cell_toggled(GtkCellRendererToggle *cell_renderer, gchar *p display_from_tagview(); } +/** + * Thread function for recursive directory adding. + */ gpointer add_dir_thread(gpointer data) { gchar *directory; @@ -434,6 +444,9 @@ void on_add_dir_action_activate(GtkAction *action, gpointer user_data) { gtk_widget_destroy(dialog); } +/** + * Callback for adding selected wallpapers to an array. + */ static void thumbview_selected_foreach(GtkIconView *icon_view, GtkTreePath *path, gpointer user_data) { GtkTreeIter iter; GtkTreeModel *model; @@ -452,6 +465,9 @@ static void thumbview_selected_foreach(GtkIconView *icon_view, GtkTreePath *path g_array_append_val(array, id); } +/** + * Add or remove tags for wallpapers. + */ inline static void update_wall_tags(GArray *wallarray, guint64 tagid, gboolean active) { guint64 wallid; for(int i = 0; i < wallarray->len; i++) { @@ -464,6 +480,9 @@ inline static void update_wall_tags(GArray *wallarray, guint64 tagid, gboolean a } } +/** + * Update tags for wallpapers. + */ static void update_tags(GArray *wallarray, GtkListStore *liststore) { GtkTreeIter iter; GValue value = {0}; |