GNOME Bugzilla – Bug 648755
clean up shell-global
Last modified: 2011-05-16 18:53:25 UTC
see patches
Created attachment 186731 [details] [review] shell-global: remove some no-longer-used methods
Created attachment 186732 [details] [review] shell-global: Remove unused ShellGlobal parameters Remove the ShellGlobal parameter from any method that doesn't actually use it (and rename them to not have "global" in the name).
Created attachment 186733 [details] [review] shell: move non-ShellGlobal functions from shell-global to shell-util shell-global had become a dumping ground for functions that didn't have anywhere else to be. Make shell-util the dumping ground instead, and have shell-global only have methods that involve the ShellGlobal object.
Created attachment 186734 [details] [review] Shell: sort, align, clean up shell-global.h and shell-util.h
Review of attachment 186731 [details] [review]: Looks good - I'm sure we'll be rewriting shell_global_format_time_relative_pretty or something nearly identical some time in the future, but that's not really a reason to keep dead code sitting in the tree.
Review of attachment 186732 [details] [review]: Hmm, my initial reaction is that: shell_global_parse_search_provider shell_global_breakpoint Have nothing to do with ShellGlobal, but: shell_global_reexec_self shell_launch_calendar_server are about the state of the process and the fact that they don't use anything from ShellGlobal is sort of coincidental - afer all *any* method in shell-global.c could be made a non-method by adding a shell_global_get() to the top of it, so apparently, the reason we have the global object is that we feel there should be some sort of global object that represents "the shell application" shell-util.c should mostly be things that vaguely would make sense in another application written with the same technology.
Created attachment 186773 [details] [review] shell-global: Remove unused ShellGlobal parameters Remove the ShellGlobal parameter from any method that isn't actually ShellGlobal-related (and rename them to not have "global" in the name).
Created attachment 186774 [details] [review] shell: move non-ShellGlobal functions from shell-global to shell-util shell-global had become a dumping ground for functions that didn't have anywhere else to be. Make shell-util the dumping ground instead, and have shell-global only have methods that involve the ShellGlobal object.
Created attachment 186775 [details] [review] Shell: sort, align, clean up shell-global.h and shell-util.h
poke
Review of attachment 186773 [details] [review]: OK.
Review of attachment 186774 [details] [review]: ::: src/shell-util.c @@ +540,3 @@ + +/** + * shell_get_event_state: Ok, we don't have to remove this yet, but I went ahead and fixed both GDK and Clutter: https://bugzilla.gnome.org/show_bug.cgi?id=634994 https://bugzilla.gnome.org/show_bug.cgi?id=650329
Review of attachment 186775 [details] [review]: I dunno about this...are we planning to do this for other headers? Well, the organization in shell-global.h is somewhat useful I guess.
(In reply to comment #13) > I dunno about this...are we planning to do this for other headers? It was more of a "well, while I'm here..." sort of thing. I am generally a fan of nice neat header files though...
Attachment 186773 [details] pushed as 4b008b1 - shell-global: Remove unused ShellGlobal parameters Attachment 186774 [details] pushed as 61577e1 - shell: move non-ShellGlobal functions from shell-global to shell-util Attachment 186775 [details] pushed as 8e4a5f1 - Shell: sort, align, clean up shell-global.h and shell-util.h