Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#4366 closed Enhancement (fixed)

Use GAppInfo, rather than GConf2, for mime-type registration

Reported by: jbicha Owned by: jordan
Priority: Normal Milestone: 2.33
Component: GTK+ Client Version: 2.32
Severity: Normal Keywords:
Cc:

Description

GNOME 3 has basically deprecated GConf in favor of GSettings.

Ubuntu would like to remove GConf support entirely from the main CD, and I'm sure other distros would like to as well.

Change History (7)

comment:1 Changed 10 years ago by jordan

  • Milestone changed from None Set to Sometime
  • Status changed from new to assigned
  • Type changed from Bug to Enhancement

comment:2 Changed 10 years ago by jordan

  • Milestone changed from Sometime to 2.33
  • Summary changed from Port to GSettings to Use GAppInfo, rather than GConf2, for mime-type registration

Hmm. Actually the only thing we're using GConf2 for is mime-type registration, and it looks like that functionality's been assumed by GIO, which we're already using for watch directories. So we can drop the GConf2 dependency immediately without having to add anything that we weren't already using...

comment:3 Changed 10 years ago by jordan

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:4 Changed 10 years ago by Elbandi

  • Resolution fixed deleted
  • Status changed from closed to reopened

I need to include the gio/gio.h file to main.c, otherwise my build has failed.

comment:5 Changed 10 years ago by jordan

Elbandi, thanks for reporting this.

Could you paste or pastebin the build error?

comment:6 Changed 10 years ago by jordan

  • Resolution set to fixed
  • Status changed from reopened to closed

comment:7 Changed 10 years ago by Elbandi

ubuntu hardy, 2.33 T.

main.c: In function ‘register_magnet_link_handler’:
main.c:361: error: ‘GAppInfo’ undeclared (first use in this function)
main.c:361: error: (Each undeclared identifier is reported only once
main.c:361: error: for each function it appears in.)
main.c:361: error: ‘app_info’ undeclared (first use in this function)
main.c:361: warning: implicit declaration of function ‘g_app_info_get_default_for_uri_scheme’
main.c:361: warning: nested extern declaration of ‘g_app_info_get_default_for_uri_scheme’
main.c:366: warning: implicit declaration of function ‘g_app_info_create_from_commandline’
main.c:366: warning: nested extern declaration of ‘g_app_info_create_from_commandline’
main.c:366: error: ‘G_APP_INFO_CREATE_SUPPORTS_URIS’ undeclared (first use in this function)
main.c:367: warning: implicit declaration of function ‘g_app_info_set_as_default_for_type’
main.c:367: warning: nested extern declaration of ‘g_app_info_set_as_default_for_type’
make[4]: *** [main.o] Error 1

libs:

# dpkg -S gio/gio.h
libglib2.0-dev: /usr/include/glib-2.0/gio/gio.h
# dpkg -S gappinfo.h
libglib2.0-dev: /usr/include/glib-2.0/gio/gappinfo.h
# dpkg -l|grep libglib2.0-dev
ii  libglib2.0-dev                      2.16.6-0ubuntu1.2                   Development files for the GLib library

I added this 3 lines to main.c:

#ifdef HAVE_GIO
#include <gio/gio.h>
#endif
Note: See TracTickets for help on using tickets.