Skip to content

Commit

Permalink
Use gboolean where applicable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Monin committed Mar 12, 2009
1 parent ce72529 commit 2682355
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/filefilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,17 @@ static FilterEntry *filter_get_by_key(const gchar *key)
return NULL;
}

static gint filter_key_exists(const gchar *key)
static gboolean filter_key_exists(const gchar *key)
{
return (filter_get_by_key(key) == NULL ? FALSE : TRUE);
return (filter_get_by_key(key) != NULL);
}

void filter_add(const gchar *key, const gchar *description, const gchar *extensions, FileFormatClass file_class, gboolean writable, gboolean allow_sidecar, gint enabled)
void filter_add(const gchar *key, const gchar *description, const gchar *extensions, FileFormatClass file_class, gboolean writable, gboolean allow_sidecar, gboolean enabled)
{
filter_list = g_list_append(filter_list, filter_entry_new(key, description, extensions, file_class, writable, allow_sidecar, enabled));
}

void filter_add_unique(const gchar *description, const gchar *extensions, FileFormatClass file_class, gboolean writable, gboolean allow_sidecar, gint enabled)
void filter_add_unique(const gchar *description, const gchar *extensions, FileFormatClass file_class, gboolean writable, gboolean allow_sidecar, gboolean enabled)
{
gchar *key;
guint n;
Expand All @@ -125,7 +125,7 @@ void filter_add_unique(const gchar *description, const gchar *extensions, FileFo
g_free(key);
}

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)
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)
{
GList *work;

Expand Down
4 changes: 2 additions & 2 deletions src/filefilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ struct _FilterEntry {
GList *filter_get_list(void);
void filter_remove_entry(FilterEntry *fe);

void filter_add(const gchar *key, const gchar *description, const gchar *extensions, FileFormatClass file_class, gboolean writable, gboolean allow_sidecar, gint enabled);
void filter_add_unique(const gchar *description, const gchar *extensions, FileFormatClass file_class, gboolean writable, gboolean allow_sidecar, gint enabled);
void filter_add(const gchar *key, const gchar *description, const gchar *extensions, FileFormatClass file_class, gboolean writable, gboolean allow_sidecar, gboolean enabled);
void filter_add_unique(const gchar *description, const gchar *extensions, FileFormatClass file_class, gboolean writable, gboolean allow_sidecar, gboolean enabled);
void filter_add_defaults(void);
void filter_reset(void);
void filter_rebuild(void);
Expand Down

0 comments on commit 2682355

Please sign in to comment.