Adaptations for coding style
This commit is contained in:
parent
826ee5b0e0
commit
2e1c1512be
@ -20,8 +20,7 @@ static gchar *mainWindow_taglist_to_string(GList *list)
|
|||||||
gchar *ret = NULL;
|
gchar *ret = NULL;
|
||||||
GList *l;
|
GList *l;
|
||||||
|
|
||||||
for (l = list; l != NULL; l = l->next)
|
for (l = list; l != NULL; l = l->next) {
|
||||||
{
|
|
||||||
if (str == NULL)
|
if (str == NULL)
|
||||||
str = g_string_new("");
|
str = g_string_new("");
|
||||||
else
|
else
|
||||||
@ -64,7 +63,7 @@ static void mainWindow_list_add_entry(struct mainWindow *mainWindow,
|
|||||||
g_free(date_text);
|
g_free(date_text);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean mainWindow_list_entry_visible (GtkTreeModel *model, GtkTreeIter *iter, struct mainWindow *mainWindow)
|
static gboolean mainWindow_list_entry_visible(GtkTreeModel *model, GtkTreeIter *iter, struct mainWindow *mainWindow)
|
||||||
{
|
{
|
||||||
/* gtk_tree_model_get (model, iter, COLUMN_NAME, &target, -1); */
|
/* gtk_tree_model_get (model, iter, COLUMN_NAME, &target, -1); */
|
||||||
|
|
||||||
@ -111,15 +110,15 @@ static void mainWindow_configure_treeView(struct mainWindow *mainWindow)
|
|||||||
G_TYPE_POINTER,
|
G_TYPE_POINTER,
|
||||||
G_TYPE_POINTER,
|
G_TYPE_POINTER,
|
||||||
G_TYPE_STRING);
|
G_TYPE_STRING);
|
||||||
filtered = GTK_TREE_MODEL_FILTER (gtk_tree_model_filter_new (
|
filtered = GTK_TREE_MODEL_FILTER(gtk_tree_model_filter_new(
|
||||||
GTK_TREE_MODEL (mainWindow->entryListStore), NULL));
|
GTK_TREE_MODEL(mainWindow->entryListStore), NULL));
|
||||||
sorted = GTK_TREE_MODEL_SORT (gtk_tree_model_sort_new_with_model (
|
sorted = GTK_TREE_MODEL_SORT(gtk_tree_model_sort_new_with_model(
|
||||||
GTK_TREE_MODEL (filtered)));
|
GTK_TREE_MODEL(filtered)));
|
||||||
|
|
||||||
gtk_tree_model_filter_set_visible_func (filtered,
|
gtk_tree_model_filter_set_visible_func(filtered,
|
||||||
(GtkTreeModelFilterVisibleFunc) mainWindow_list_entry_visible,
|
(GtkTreeModelFilterVisibleFunc) mainWindow_list_entry_visible,
|
||||||
mainWindow, NULL);
|
mainWindow, NULL);
|
||||||
model = GTK_TREE_MODEL (sorted);
|
model = GTK_TREE_MODEL(sorted);
|
||||||
gtk_tree_view_set_model(mainWindow->entryListView, model);
|
gtk_tree_view_set_model(mainWindow->entryListView, model);
|
||||||
|
|
||||||
/* TODO: Unref mainWindow->entryListStore and filtered, sorted and model? */
|
/* TODO: Unref mainWindow->entryListStore and filtered, sorted and model? */
|
||||||
|
Loading…
Reference in New Issue
Block a user