After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 648755 - clean up shell-global
clean up shell-global
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-04-27 13:03 UTC by Dan Winship
Modified: 2011-05-16 18:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
shell-global: remove some no-longer-used methods (8.53 KB, patch)
2011-04-27 13:03 UTC, Dan Winship
committed Details | Review
shell-global: Remove unused ShellGlobal parameters (6.62 KB, patch)
2011-04-27 13:04 UTC, Dan Winship
none Details | Review
shell: move non-ShellGlobal functions from shell-global to shell-util (27.36 KB, patch)
2011-04-27 13:04 UTC, Dan Winship
none Details | Review
Shell: sort, align, clean up shell-global.h and shell-util.h (12.49 KB, patch)
2011-04-27 13:04 UTC, Dan Winship
none Details | Review
shell-global: Remove unused ShellGlobal parameters (4.10 KB, patch)
2011-04-27 19:50 UTC, Dan Winship
committed Details | Review
shell: move non-ShellGlobal functions from shell-global to shell-util (17.34 KB, patch)
2011-04-27 19:51 UTC, Dan Winship
committed Details | Review
Shell: sort, align, clean up shell-global.h and shell-util.h (12.57 KB, patch)
2011-04-27 19:51 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2011-04-27 13:03:55 UTC
see patches
Comment 1 Dan Winship 2011-04-27 13:03:58 UTC
Created attachment 186731 [details] [review]
shell-global: remove some no-longer-used methods
Comment 2 Dan Winship 2011-04-27 13:04:00 UTC
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).
Comment 3 Dan Winship 2011-04-27 13:04:03 UTC
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.
Comment 4 Dan Winship 2011-04-27 13:04:06 UTC
Created attachment 186734 [details] [review]
Shell: sort, align, clean up shell-global.h and shell-util.h
Comment 5 Owen Taylor 2011-04-27 14:00:23 UTC
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.
Comment 6 Owen Taylor 2011-04-27 14:06:48 UTC
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.
Comment 7 Dan Winship 2011-04-27 19:50:59 UTC
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).
Comment 8 Dan Winship 2011-04-27 19:51:06 UTC
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.
Comment 9 Dan Winship 2011-04-27 19:51:12 UTC
Created attachment 186775 [details] [review]
Shell: sort, align, clean up shell-global.h and shell-util.h
Comment 10 Dan Winship 2011-05-16 10:40:49 UTC
poke
Comment 11 Colin Walters 2011-05-16 15:15:18 UTC
Review of attachment 186773 [details] [review]:

OK.
Comment 12 Colin Walters 2011-05-16 17:10:44 UTC
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
Comment 13 Colin Walters 2011-05-16 17:13:27 UTC
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.
Comment 14 Dan Winship 2011-05-16 18:39:58 UTC
(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...
Comment 15 Dan Winship 2011-05-16 18:53:18 UTC
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