diff options
author | rbuj <[email protected]> | 2021-01-01 17:18:56 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2021-01-28 20:10:03 +0100 |
commit | a4e85eb563a536b5b1cf90939b0421b3445add8e (patch) | |
tree | d273701596cf509db3d60d7e96c94cf72324396e /libmenu/desktop-entries.c | |
parent | 1c989ea4e5ea375167a7646aaf4e6dbc1cf19446 (diff) | |
download | mate-menus-a4e85eb563a536b5b1cf90939b0421b3445add8e.tar.bz2 mate-menus-a4e85eb563a536b5b1cf90939b0421b3445add8e.tar.xz |
Remove -Wconversion -Wsign-compare -Wsign-conversion warnings
Diffstat (limited to 'libmenu/desktop-entries.c')
-rw-r--r-- | libmenu/desktop-entries.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/libmenu/desktop-entries.c b/libmenu/desktop-entries.c index 4f993c9..820f3ea 100644 --- a/libmenu/desktop-entries.c +++ b/libmenu/desktop-entries.c @@ -55,13 +55,13 @@ typedef struct char *generic_name; char *comment; GIcon *icon; - char* full_name; - char* exec; + char *full_name; + char *exec; - guint nodisplay : 1; - guint hidden : 1; - guint showin : 1; - guint terminal:1; + guint nodisplay : 1; + guint hidden : 1; + guint showin : 1; + guint terminal : 1; } DesktopEntryDirectory; struct DesktopEntrySet { @@ -236,15 +236,9 @@ desktop_entry_load_directory (DesktopEntry *entry, entry_directory->generic_name = g_key_file_get_locale_string (key_file, DESKTOP_ENTRY_GROUP, "GenericName", NULL, NULL); entry_directory->comment = g_key_file_get_locale_string (key_file, DESKTOP_ENTRY_GROUP, "Comment", NULL, NULL); entry_directory->icon = key_file_get_icon (key_file); - entry_directory->nodisplay = g_key_file_get_boolean (key_file, - DESKTOP_ENTRY_GROUP, - "NoDisplay", - NULL); - entry_directory->hidden = g_key_file_get_boolean (key_file, - DESKTOP_ENTRY_GROUP, - "Hidden", - NULL); - entry_directory->showin = key_file_get_show_in (key_file); + entry_directory->nodisplay = g_key_file_get_boolean (key_file, DESKTOP_ENTRY_GROUP, "NoDisplay", NULL) != FALSE; + entry_directory->hidden = g_key_file_get_boolean (key_file, DESKTOP_ENTRY_GROUP, "Hidden", NULL) != FALSE; + entry_directory->showin = key_file_get_show_in (key_file) != FALSE; return TRUE; } @@ -435,12 +429,13 @@ DesktopEntry* desktop_entry_copy(DesktopEntry* entry) { DesktopEntryDesktop *desktop_entry = (DesktopEntryDesktop*) entry; DesktopEntryDesktop *retval_desktop_entry = (DesktopEntryDesktop*) retval; - int i; retval_desktop_entry->appinfo = g_object_ref (desktop_entry->appinfo); if (desktop_entry->categories != NULL) { + gsize i; + i = 0; for (; desktop_entry->categories[i]; i++); @@ -630,7 +625,7 @@ gboolean desktop_entry_has_category(DesktopEntry* entry, const char* category) void desktop_entry_add_legacy_category(DesktopEntry* entry) { GQuark *categories; - int i; + gsize i; DesktopEntryDesktop *desktop_entry; g_return_if_fail (entry->type == DESKTOP_ENTRY_DESKTOP); @@ -771,7 +766,8 @@ static void desktop_entry_set_clear(DesktopEntrySet* set) } } -int desktop_entry_set_get_count(DesktopEntrySet* set) +guint +desktop_entry_set_get_count (DesktopEntrySet *set) { if (set->hash == NULL) return 0; |