Mercurial > geeqie.yaz
comparison src/filefilter.c @ 1424:0061979f7f6d
Use gboolean where applicable.
author | zas_ |
---|---|
date | Thu, 12 Mar 2009 22:44:21 +0000 |
parents | 6933974f0885 |
children | e015b6573d36 |
comparison
equal
deleted
inserted
replaced
1423:6933974f0885 | 1424:0061979f7f6d |
---|---|
94 } | 94 } |
95 | 95 |
96 return NULL; | 96 return NULL; |
97 } | 97 } |
98 | 98 |
99 static gint filter_key_exists(const gchar *key) | 99 static gboolean filter_key_exists(const gchar *key) |
100 { | 100 { |
101 return (filter_get_by_key(key) == NULL ? FALSE : TRUE); | 101 return (filter_get_by_key(key) != NULL); |
102 } | 102 } |
103 | 103 |
104 void filter_add(const gchar *key, const gchar *description, const gchar *extensions, FileFormatClass file_class, gboolean writable, gboolean allow_sidecar, gint enabled) | 104 void filter_add(const gchar *key, const gchar *description, const gchar *extensions, FileFormatClass file_class, gboolean writable, gboolean allow_sidecar, gboolean enabled) |
105 { | 105 { |
106 filter_list = g_list_append(filter_list, filter_entry_new(key, description, extensions, file_class, writable, allow_sidecar, enabled)); | 106 filter_list = g_list_append(filter_list, filter_entry_new(key, description, extensions, file_class, writable, allow_sidecar, enabled)); |
107 } | 107 } |
108 | 108 |
109 void filter_add_unique(const gchar *description, const gchar *extensions, FileFormatClass file_class, gboolean writable, gboolean allow_sidecar, gint enabled) | 109 void filter_add_unique(const gchar *description, const gchar *extensions, FileFormatClass file_class, gboolean writable, gboolean allow_sidecar, gboolean enabled) |
110 { | 110 { |
111 gchar *key; | 111 gchar *key; |
112 guint n; | 112 guint n; |
113 | 113 |
114 key = g_strdup("user0"); | 114 key = g_strdup("user0"); |
123 | 123 |
124 filter_add(key, description, extensions, file_class, writable, allow_sidecar, enabled); | 124 filter_add(key, description, extensions, file_class, writable, allow_sidecar, enabled); |
125 g_free(key); | 125 g_free(key); |
126 } | 126 } |
127 | 127 |
128 static void filter_add_if_missing(const gchar *key, const gchar *description, const gchar *extensions, FileFormatClass file_class, gboolean writable, gboolean allow_sidecar, gint enabled) | 128 static void filter_add_if_missing(const gchar *key, const gchar *description, const gchar *extensions, FileFormatClass file_class, gboolean writable, gboolean allow_sidecar, gboolean enabled) |
129 { | 129 { |
130 GList *work; | 130 GList *work; |
131 | 131 |
132 if (!key) return; | 132 if (!key) return; |
133 | 133 |