Libgnome usage in gnome-games

Inspired by Alexander Larssons post on reduing the number of libraries linked in nautilus I ran ldd on gnome-games:

blackjack: 82
gnect: 84
gnomine: 80
gtali: 80
same-gnome: 80
gnibbles: 84
gnotravex: 80
iagno: 84
sol: 84
glines: 80
gnobots2: 80
gnometris: 82
gnotski: 80
mahjongg: 80

Let’s see if we can improve that. Focusing a bit on libgnome I grep’ed trough the sources to see what we use. Using "grep -oh 'gnome_[a-z_]*' *.c" this is what I found. (output cleaned up to remove duplicates etc.) I’m not sure what to do about all of them but some like help and triggers should be fairly easy to get rid off. Perhaps the app and appbar parts should be replaced by using GtkUIManager or GtkBuilder.

For session management we could follow nautilus and drop the *_client_* stuff and use EggSMClient but I’d rather wait and hope for a solution in bug #79285. (imo we could just kill the thing for the games entirely. Saving game state over a session for a 5 minute game does not make sense to me and the current implementation doesn’t even really do that. It only restores the same puzzle/solitaire/whatnot you were playing, not the progress you had made in it. To me it just looks like a lot of complexity with no real value to the user. Or maybe I just don’t get the point…)

I’ll post updates as I make progress. Any comments/advice/suggestions are appreciated!

Aisleriot:
– gnome_client_set_restart_command
– gnome_help_display_on_screen
– gnome_program_init
– gnome_master_client

Blackjack:
– gnome_help_display_desktop_on_screen
– gnome_program_init

Glines:
– gnome_help_display
– gnome_client_get_id
– gnome_client_get_previous_id
– gnome_program_init
– gnome_master_client

Gnect:
– gnome_program_locate_file
– gnome_help_display
– gnome_app_new
– gnome_app_set_contents
– gnome_program_init

Gnibbles:
– gnome_help_display
– gnome_app_new
– gnome_app_set_contents
– gnome_appbar_new
– gnome_app_set_statusbar
– gnome_program_init
– gnome_program_locate_file

Gnobots2:
– gnome_program_locate_file
– gnome_help_display
– gnome_client_set_restart_command
– gnome_client_set_clone_command
– gnome_program_init
– gnome_master_client
– gnome_app_new
– gnome_app_set_contents
– gnome_triggers_do

Gnometris:
– gnome_user_dir_get
– gnome_program_locate_file
– gnome_app_new
– gnome_app_set_contents
– gnome_vfs_open
– gnome_vfs_get_file_info_from_handle
– gnome_vfs_read
– gnome_vfs_create
– gnome_vfs_write
– gnome_vfs_close
– gnome_help_display
– gnome_program_init

Gnomine:
– gnome_program_locate_file
– gnome_help_display
– gnome_client_set_restart_command
– gnome_client_set_clone_command
– gnome_program_init
– gnome_master_client
– gnome_app_new
– gnome_app_set_contents
– gnome_accelerators_sync

Gnotravex:
– gnome_program_init
– gnome_master_client
– gnome_client_set_restart_command
– gnome_client_set_clone_command
– gnome_help_display

Gnotski:
– gnome_program_init
– gnome_master_client
– gnome_client_set_restart_command
– gnome_client_set_clone_command
– gnome_help_display

Gtali:
– gnome_help_display
– gnome_app_new
– gnome_app_set_contents
– gnome_program_init

Iagno:
– gnome_program_locate_file
– gnome_app_new
– gnome_app_create_menus
– gnome_app_set_contents
– gnome_appbar_new
– gnome_app_set_statusbar
– gnome_app_install_menu_hints
– gnome_appbar_set_status
– gnome_appbar_pop
– gnome_appbar_push
– gnome_client_set_restart_command
– gnome_client_set_clone_command
– gnome_program_init
– gnome_master_client

Mahjongg:
– gnome_help_display
– gnome_program_init

Same-gnome:
– gnome_help_display
– gnome_program_init

libgames-support:
– gnome_accelerators_sync

4 thoughts on “Libgnome usage in gnome-games”

  1. The (direct) dependencies really matter, see ”objdump -x $binary|grep NEEDED”. ldd pulls everything through recursive dependency resolution.

Leave a Reply

Your email address will not be published. Required fields are marked *