GNOME Bugzilla – Bug 739245
support multiple desktops in XDG_CURRENT_DESKTOP
Last modified: 2014-11-02 20:46:12 UTC
Created attachment 289413 [details] [review] desktop-entries: support multiple desktops in XDG_CURRENT_DESKTOP Add support for multiple desktops in XDG_CURRENT_DESKTOP.
Review of attachment 289413 [details] [review]: ::: libmenu/desktop-entries.c @@ +161,1 @@ strv = g_key_file_get_string_list (key_file, Can you get these outside of the loop? @@ +180,3 @@ + else + { + strv = g_key_file_get_string_list (key_file, You stomp on the other strv, causing a leak. Use two different variables for this. And fetch them outside the loop. @@ +192,3 @@ + if (g_str_equal (strv[j], current_desktops[i])) + { + show_in = FALSE; If you do something like: ... if (g_str_equal (not_show_in[j], current_desktops[i])) { show_in = FALSE; goto out; } ... out: g_strfreev (only_show_in); g_strfreev (not_show_in); return show_in; That would drastically simplify the code.
Created attachment 289469 [details] [review] support multiple desktops in XDG_CURRENT_DESKTOP
Thanks for quick review. Patch updated. Was it really memory leak? NotShowIn was read only if ShowOnlyIn returned NULL...
Review of attachment 289469 [details] [review]: Looks good.
Thanks! When you are planning to commit this patch? Do you have any plans on making 3.14 release?
(In reply to comment #4) > Review of attachment 289469 [details] [review]: > > Looks good. Jasper, are you going to commit this patch?
When I mark a patch as ACN, I expect the bug reporter to push it.
(In reply to comment #7) > When I mark a patch as ACN, I expect the bug reporter to push it. Ok, pushed. Thanks!