-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[gtk] ListDataItem, AchievementItem: Use boxed GPtrArray/GDateTime fo…
…r some properties. ListDataItem: Use a GPtrArray for `const char*` instead of a manually-allocated array. Column count is now determined by checking the GPtrArray length. The entire GPtrArray can be obtained and replaced, but it's not recommended to do so. AchievementItem: Use a GDateTime for unlock_time. NULL is used to represent an invalid timestamp instead of -1 here. Keeping a GDateTime instead of a time_t increases memory usage slightly, but it reduces overhead because we don't have to keep converting from time_t to GDateTime every time the timestamp is requested. Note that we can't use GDateTime like this in the GTK2/GTK3 version because there's no GtkCellRenderer that takes GDateTime. In theory, we could make our own, but I'd rather not do that. Use g_clear_pointer() to unreference objects in the dispose() functions.
- Loading branch information
1 parent
755b9e0
commit 524a231
Showing
6 changed files
with
126 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters