forked from ports/contrib
224 lines
7.4 KiB
Diff
224 lines
7.4 KiB
Diff
diff -pruN libfm-0.1.14.old/configure.ac libfm-0.1.14/configure.ac
|
|
--- libfm-0.1.14.old/configure.ac 2011-07-10 13:03:56.000000000 +0200
|
|
+++ libfm-0.1.14/configure.ac 2011-07-10 13:13:51.000000000 +0200
|
|
@@ -34,10 +34,6 @@ if test x"$largefile" = x"yes"; then
|
|
AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits])
|
|
fi
|
|
|
|
-
|
|
-# intltool
|
|
-IT_PROG_INTLTOOL([0.40.0])
|
|
-
|
|
pkg_modules="gtk+-2.0 >= 2.16.0"
|
|
PKG_CHECK_MODULES(GTK, [$pkg_modules])
|
|
AC_SUBST(GTK_CFLAGS)
|
|
@@ -63,6 +59,18 @@ PKG_CHECK_MODULES(MENU_CACHE, [$menu_mod
|
|
AC_SUBST(MENU_CACHE_CFLAGS)
|
|
AC_SUBST(MENU_CACHE_LIBS)
|
|
|
|
+# special checks for glib/gio 2.27 since it contains backward imcompatible changes.
|
|
+# glib 2.26 uses G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME extension point while
|
|
+# glib 2.27 uses x-scheme-handler/* mime-type to register handlers.
|
|
+PKG_CHECK_MODULES(GLIB2_27, [glib-2.0 >= 2.27.0],
|
|
+ [have_scheme_handler="yes"],
|
|
+ [have_scheme_handler="no"])
|
|
+AM_CONDITIONAL(HAVE_SCHEME_HANDLER, test "x$have_scheme_handler" = "xyes")
|
|
+if test "x$have_scheme_handler" = "xyes"; then
|
|
+ AC_DEFINE_UNQUOTED(HAVE_SCHEME_HANDLER, [1], [Have x-scheme/uri handler support])
|
|
+fi
|
|
+
|
|
+
|
|
AC_ARG_ENABLE(udisks,
|
|
[AC_HELP_STRING([--enable-udisks],
|
|
[build libfm with udisks support (Linux only) @<:@default=yes@:>@])],
|
|
@@ -81,9 +89,6 @@ if test x"$enable_udisks" = x"yes"; then
|
|
AC_SUBST(DBUS_LIBS)
|
|
fi
|
|
|
|
-#check for gtk-doc
|
|
-GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
|
|
-
|
|
AC_ARG_ENABLE(demo,
|
|
[AC_HELP_STRING([--enable-demo],
|
|
[build libfm-demo file manager @<:@default=no@:>@])],
|
|
@@ -114,16 +119,6 @@ AC_SUBST(giomodulesdir)
|
|
GETTEXT_PACKAGE=libfm
|
|
AC_SUBST(GETTEXT_PACKAGE)
|
|
|
|
-# Generate po/LINGUAS on the fly rather than relying on translators
|
|
-# to maintain it manually. This also overcome the problem that Transifex
|
|
-# cannot add a language to po/LINGUAS if a new po file is submitted.
|
|
-rm -f $srcdir/po/LINGUAS
|
|
-for po_file in `ls $srcdir/po/*.po | sort`;
|
|
-do
|
|
- lang=`echo "$po_file" | sed "s|.*/po/\(.*\)\.po|\1|g"`
|
|
- echo $lang >> $srcdir/po/LINGUAS
|
|
-done
|
|
-
|
|
AM_GLIB_GNU_GETTEXT
|
|
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
|
|
|
|
@@ -133,10 +128,6 @@ AC_CONFIG_FILES([
|
|
src/tests/Makefile
|
|
data/Makefile
|
|
data/ui/Makefile
|
|
- po/Makefile.in
|
|
- docs/Makefile
|
|
- docs/reference/Makefile
|
|
- docs/reference/libfm/Makefile
|
|
libfm.pc
|
|
libfm-gtk.pc
|
|
])
|
|
diff -pruN libfm-0.1.14.old/data/Makefile.am libfm-0.1.14/data/Makefile.am
|
|
--- libfm-0.1.14.old/data/Makefile.am 2011-07-10 13:03:56.000000000 +0200
|
|
+++ libfm-0.1.14/data/Makefile.am 2011-07-10 13:09:40.000000000 +0200
|
|
@@ -16,7 +16,6 @@ desktop_in_files= \
|
|
libfm-pref-apps.desktop.in \
|
|
$(NULL)
|
|
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
|
|
-@INTLTOOL_DESKTOP_RULE@
|
|
|
|
libfmdatafilesdir = $(datadir)/libfm
|
|
libfmdatafiles_DATA = \
|
|
diff -pruN libfm-0.1.14.old/Makefile.am libfm-0.1.14/Makefile.am
|
|
--- libfm-0.1.14.old/Makefile.am 2011-07-10 13:03:56.000000000 +0200
|
|
+++ libfm-0.1.14/Makefile.am 2011-07-10 13:10:17.000000000 +0200
|
|
@@ -2,7 +2,7 @@ include $(top_srcdir)/Makefile.decl
|
|
|
|
NULL=
|
|
|
|
-SUBDIRS=src po data docs
|
|
+SUBDIRS=src data
|
|
|
|
EXTRA_DIST += \
|
|
libfm.pc.in \
|
|
@@ -15,4 +15,3 @@ pkgconfig_DATA = \
|
|
libfm-gtk.pc \
|
|
$(NULL)
|
|
|
|
-DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
|
|
diff -pruN libfm-0.1.14.old/src/gio/fm-app-lookup.c libfm-0.1.14/src/gio/fm-app-lookup.c
|
|
--- libfm-0.1.14.old/src/gio/fm-app-lookup.c 2011-07-10 13:03:56.000000000 +0200
|
|
+++ libfm-0.1.14/src/gio/fm-app-lookup.c 2011-07-10 13:17:53.000000000 +0200
|
|
@@ -108,68 +108,9 @@ static void app_lookup_iface_init(GDeskt
|
|
GAppInfo *get_default_for_uri_scheme(GDesktopAppInfoLookup *lookup, const char *scheme)
|
|
{
|
|
GAppInfo* app;
|
|
- GKeyFile* kf;
|
|
- const char* key;
|
|
- char* fname;
|
|
- char* desktop_id = NULL;
|
|
-
|
|
- /* web browser */
|
|
- if(g_ascii_strcasecmp(scheme, "http")==0 || g_ascii_strcasecmp(scheme, "https")==0)
|
|
- key = "WebBrowser";
|
|
- else if(g_ascii_strcasecmp(scheme, "mailto")==0)
|
|
- key = "MailClient";
|
|
- else /* we don't know this */
|
|
- return NULL;
|
|
-
|
|
- kf = g_key_file_new();
|
|
-
|
|
- /* try user config first */
|
|
- fname = g_build_filename(g_get_user_config_dir(), "libfm/pref-apps.conf", NULL);
|
|
- if(g_key_file_load_from_file(kf, fname, 0, NULL))
|
|
- {
|
|
- desktop_id = g_key_file_get_string(kf, "Preferred Applications", key, NULL);
|
|
- if(desktop_id && !*desktop_id)
|
|
- {
|
|
- g_free(desktop_id);
|
|
- desktop_id = NULL;
|
|
- }
|
|
- }
|
|
- g_free(fname);
|
|
-
|
|
- if(!desktop_id) /* system-wide */
|
|
- {
|
|
- const gchar* const *dirs = g_get_system_config_dirs();
|
|
- int i, n;
|
|
- if(g_key_file_load_from_file(kf, fname, 0, NULL))
|
|
- desktop_id = g_key_file_get_string(kf, "Preferred Applications", key, NULL);
|
|
- n = g_strv_length(dirs);
|
|
- for( i = n - 1; i > 0; --i )
|
|
- {
|
|
- fname = g_build_filename(dirs[i], "libfm/pref-apps.conf", NULL);
|
|
- if( g_key_file_load_from_file(kf, fname, 0, NULL) )
|
|
- desktop_id = g_key_file_get_string(kf, "Preferred Applications", key, NULL);
|
|
- g_free(fname);
|
|
- if(desktop_id)
|
|
- {
|
|
- if(*desktop_id)
|
|
- break;
|
|
- else
|
|
- {
|
|
- g_free(desktop_id);
|
|
- desktop_id = NULL;
|
|
- }
|
|
- }
|
|
- }
|
|
- }
|
|
-
|
|
- g_key_file_free(kf);
|
|
-
|
|
- if(!desktop_id)
|
|
- return NULL;
|
|
-
|
|
- app = g_desktop_app_info_new(desktop_id);
|
|
-
|
|
- g_free(desktop_id);
|
|
+ char* mime_type = g_strconcat("x-scheme-handler/", scheme, NULL);
|
|
+ app = g_app_info_get_default_for_type(mime_type, FALSE);
|
|
+ g_free(mime_type);
|
|
|
|
return app;
|
|
}
|
|
diff -pruN libfm-0.1.14.old/src/Makefile.am libfm-0.1.14/src/Makefile.am
|
|
--- libfm-0.1.14.old/src/Makefile.am 2011-07-10 13:03:56.000000000 +0200
|
|
+++ libfm-0.1.14/src/Makefile.am 2011-07-10 13:09:08.000000000 +0200
|
|
@@ -245,6 +245,7 @@ libfm_pref_apps_LDADD = \
|
|
$(MENU_CACHE_LIBS) \
|
|
$(INTLLIBS) \
|
|
libfm-gtk.la \
|
|
+ libfm.la \
|
|
$(NULL)
|
|
|
|
|
|
@@ -272,6 +273,8 @@ endif
|
|
|
|
|
|
# GIO module implementing some extension points
|
|
+if !HAVE_SCHEME_HANDLER
|
|
+
|
|
|
|
giomodules_LTLIBRARIES = libgiofm.la
|
|
|
|
@@ -301,6 +304,7 @@ libgiofm_la_LIBADD = \
|
|
$(INTLLIBS) \
|
|
$(NULL)
|
|
|
|
+endif
|
|
|
|
# GObject marshallers
|
|
base/fm-marshal.h: base/fm-marshal.list
|
|
diff -pruN libfm-0.1.14.old/src/tools/libfm-pref-apps.c libfm-0.1.14/src/tools/libfm-pref-apps.c
|
|
--- libfm-0.1.14.old/src/tools/libfm-pref-apps.c 2011-07-10 13:03:56.000000000 +0200
|
|
+++ libfm-0.1.14/src/tools/libfm-pref-apps.c 2011-07-10 13:16:36.000000000 +0200
|
|
@@ -194,7 +194,7 @@ int main(int argc, char** argv)
|
|
if(app)
|
|
{
|
|
if(is_changed)
|
|
- g_key_file_set_string(kf, "Preferred Applications", "WebBrowser", g_app_info_get_id(app));
|
|
+ g_app_info_set_as_default_for_type(app, "x-scheme-handler/http", NULL);
|
|
g_object_unref(app);
|
|
}
|
|
custom_apps = fm_app_chooser_combo_box_get_custom_apps(GTK_COMBO_BOX(browser));
|
|
@@ -218,7 +218,7 @@ int main(int argc, char** argv)
|
|
if(app)
|
|
{
|
|
if(is_changed)
|
|
- g_key_file_set_string(kf, "Preferred Applications", "MailClient", g_app_info_get_id(app));
|
|
+ g_key_file_set_string(kf, "Preferred Applications", "MailClient", g_app_info_get_id(app));
|
|
g_object_unref(app);
|
|
}
|
|
custom_apps = fm_app_chooser_combo_box_get_custom_apps(GTK_COMBO_BOX(mail_client));
|