diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2010-09-22 14:18:12 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2010-09-22 14:18:12 +0000 |
commit | e1a96cafb096bfd3c971acca39c4124c08cfd376 (patch) | |
tree | ff524f48f1ad656b77d93518c2a2ec0c7c0a1051 /xfce-extra/xfce4-linelight-plugin | |
parent | version bump (diff) | |
download | historical-e1a96cafb096bfd3c971acca39c4124c08cfd376.tar.gz historical-e1a96cafb096bfd3c971acca39c4124c08cfd376.tar.bz2 historical-e1a96cafb096bfd3c971acca39c4124c08cfd376.zip |
Port from ThunarVFS to GIO by Lionel Le Folgoc (patch snatched from upstream bug tracking system).
Package-Manager: portage-2.2_rc84/cvs/Linux x86_64
Diffstat (limited to 'xfce-extra/xfce4-linelight-plugin')
4 files changed, 324 insertions, 2 deletions
diff --git a/xfce-extra/xfce4-linelight-plugin/ChangeLog b/xfce-extra/xfce4-linelight-plugin/ChangeLog index 8d201c9d3074..bde271298523 100644 --- a/xfce-extra/xfce4-linelight-plugin/ChangeLog +++ b/xfce-extra/xfce4-linelight-plugin/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for xfce-extra/xfce4-linelight-plugin # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/xfce-extra/xfce4-linelight-plugin/ChangeLog,v 1.4 2010/09/22 11:51:49 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/xfce-extra/xfce4-linelight-plugin/ChangeLog,v 1.5 2010/09/22 14:18:12 ssuominen Exp $ + +*xfce4-linelight-plugin-0.1.6-r1 (22 Sep 2010) + + 22 Sep 2010; Samuli Suominen <ssuominen@gentoo.org> + +xfce4-linelight-plugin-0.1.6-r1.ebuild, + +files/xfce4-linelight-plugin-0.1.6-port-to-gio.patch: + Port from ThunarVFS to GIO by Lionel Le Folgoc (patch snatched from + upstream bug tracking system). 22 Sep 2010; Samuli Suominen <ssuominen@gentoo.org> xfce4-linelight-plugin-0.1.6.ebuild, diff --git a/xfce-extra/xfce4-linelight-plugin/Manifest b/xfce-extra/xfce4-linelight-plugin/Manifest index f4981bb9b41f..96f026f73e59 100644 --- a/xfce-extra/xfce4-linelight-plugin/Manifest +++ b/xfce-extra/xfce4-linelight-plugin/Manifest @@ -1,5 +1,7 @@ AUX xfce4-linelight-plugin-0.1.6-libxfce4panel_h.patch 696 RMD160 e97d6da328a2ad66b35e2b0e4b4fcce9c7c9d970 SHA1 7bc6c3d132c9168e5946ebc66f404bbef2acfac1 SHA256 ddb3117858228fbe989609432d069ac06109d76025c7a8f707f5f402f8195f37 +AUX xfce4-linelight-plugin-0.1.6-port-to-gio.patch 9167 RMD160 d5c2a86c367bebcf534234352b310e81c5945c0b SHA1 2c35faf0440cabbe4fa43c838d2813953d091699 SHA256 ad1aaadaa6ab9eb0eacc7389f9ac79cdaf599aaeaf66219f7be84a1bb38f046f DIST xfce4-linelight-plugin-0.1.6.tar.bz2 234256 RMD160 7abf7874c68466cc4a3bc2d59f49aaea68230895 SHA1 34cf2b0bb8ed6623b021ad2a3331dab7b4cf08b1 SHA256 66a5ed34cad23d0bbdc7ca03ddc45cd21e0363cd0edf50e358790288f58bbf05 +EBUILD xfce4-linelight-plugin-0.1.6-r1.ebuild 910 RMD160 23fdc93368aaabc0bd18438343220b1258a8e7f4 SHA1 4b69b6ea7b2b13c8df31bc341c00faff472f694c SHA256 b96dc7f18e6a00938fcbdb76ee096b0614298afea8ebc78f8cb2c3c62e31566c EBUILD xfce4-linelight-plugin-0.1.6.ebuild 901 RMD160 ee27b251de14c9ac76fca87da341575e38a987f7 SHA1 49e485c9d00ffcc33e0e3d36bc4899b436590635 SHA256 71d6440bf9998cf4611ffe14ad1ddcb108955db7b889653ed7ec70797fd35245 -MISC ChangeLog 839 RMD160 ea7840abdfc34fee10a2530a82fdae568065593c SHA1 e2ab4ca5873a526e407d019abfa4bcd2624f4cdc SHA256 5ee4161e35eba95ea7896d47682e329c3b64617073b1716bc6e84d94bea87341 +MISC ChangeLog 1145 RMD160 59260bdbc6efc097fab710ef743db528c90706cd SHA1 d73a513a83586ef1d0d20df0ab546e0c61e2e72b SHA256 5f7d851db3825e600ffa6af15403b9f4a02b281dcc58dd05f18530baf4740b2e MISC metadata.xml 159 RMD160 43722935bd7b4db7fe8db681054f2e53c4a5f7ce SHA1 15958ad72e234ba572c9534533c21532eb6bc0fd SHA256 900ea49b6703fce452e205b85226bf1f994725963e5840da501182e7487d0e63 diff --git a/xfce-extra/xfce4-linelight-plugin/files/xfce4-linelight-plugin-0.1.6-port-to-gio.patch b/xfce-extra/xfce4-linelight-plugin/files/xfce4-linelight-plugin-0.1.6-port-to-gio.patch new file mode 100644 index 000000000000..b0934e96ad16 --- /dev/null +++ b/xfce-extra/xfce4-linelight-plugin/files/xfce4-linelight-plugin-0.1.6-port-to-gio.patch @@ -0,0 +1,279 @@ +http://bugs.ganymede.ch/index.php?do=details&task_id=155 + +--- configure.in ++++ configure.in +@@ -22,7 +22,8 @@ + dnl Check for required packages + XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.4.0]) + XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.4.0]) +-XDT_CHECK_PACKAGE([LIBTHUNAR_VFS], [thunar-vfs-1], [0.9.0]) ++XDT_CHECK_PACKAGE([LIBGIO], [gio-2.0], [2.18.0]) ++XDT_CHECK_PACKAGE([LIBGIOUNIX], [gio-unix-2.0], [2.16.0]) + XDT_CHECK_PACKAGE([LIBGTK], [gtk+-2.0], [2.12.0]) + XDT_CHECK_PACKAGE([LIBGTHREADS], [gthread-2.0], [2.16.0]) + +--- panel-plugin/main.c ++++ panel-plugin/main.c +@@ -28,7 +28,8 @@ + #include <gdk/gdkkeysyms.h> + #include <gdk/gdk.h> + +-#include <thunar-vfs/thunar-vfs.h> ++#include <gio/gio.h> ++#include <gio/gdesktopappinfo.h> + + #include <libxfcegui4/libxfcegui4.h> + +@@ -252,22 +253,33 @@ + + static void executeFile(char* path) + { +- ThunarVfsPath *thunarPath; +- ThunarVfsInfo *info; ++ GFile *file; ++ GFileInfo *info; ++ GAppInfo *app; ++ GDesktopAppInfo *desktop_app; ++ GList *fileList = NULL; + +- thunarPath = thunar_vfs_path_new (path,NULL); +- if (thunarPath == NULL) ++ file = g_file_new_for_path (path); ++ if (file == NULL) + return; + +- info = thunar_vfs_info_new_for_path(thunarPath,NULL); ++ info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, G_FILE_QUERY_INFO_NONE, NULL, NULL); + if (info == NULL) ++ { ++ g_object_unref (file); + return; ++ } + + if (strstr(path,".desktop") != 0) + { +- thunar_vfs_info_execute(info, NULL, NULL,NULL,NULL); ++ desktop_app = g_desktop_app_info_new_from_filename (path); ++ if (desktop_app != NULL) ++ { ++ g_app_info_launch (G_APP_INFO (desktop_app), NULL, NULL, NULL); ++ g_object_unref (desktop_app); ++ } + } +- else if (info->type == THUNAR_VFS_FILE_TYPE_DIRECTORY) ++ else if (g_file_query_file_type (file, G_FILE_QUERY_INFO_NONE, NULL) == G_FILE_TYPE_DIRECTORY) + { + char command[strlen(path) + 10]; + strcpy(command, "thunar \""); +@@ -277,23 +289,17 @@ + } + else + { +- GList *pathList=NULL; +- pathList = g_list_append(pathList,thunarPath); ++ fileList = g_list_append (fileList, file); + +- ThunarVfsMimeDatabase *db = thunar_vfs_mime_database_get_default(); +- ThunarVfsMimeInfo *info = thunar_vfs_mime_database_get_info_for_file(db, path,NULL); +- ThunarVfsMimeApplication *app = thunar_vfs_mime_database_get_default_application(db,info); ++ app = g_app_info_get_default_for_type (g_file_info_get_content_type (info), FALSE); + +- thunar_vfs_mime_handler_exec (THUNAR_VFS_MIME_HANDLER(app),NULL, pathList, NULL); ++ g_app_info_launch (app, fileList, NULL, NULL); + +- g_object_unref(db); +- thunar_vfs_mime_info_unref(info); + g_object_unref(app); +- g_list_free(pathList); ++ g_list_free(fileList); + } +- thunar_vfs_info_unref(info); +- thunar_vfs_path_unref(thunarPath); +- ++ g_object_unref (info); ++ g_object_unref (file); + } + + void* show_all_search_results(void* arg) +@@ -559,7 +565,6 @@ + static void clean_up_cb(XfcePanelPlugin *plugin, gpointer userdata) + { + save_data_cb(plugin, userdata); +- thunar_vfs_shutdown(); + linelight_free(linelight); + system("rm -r /tmp/xfce4-linelight/"); + gdk_threads_leave (); +@@ -746,8 +751,7 @@ + int main (int argc, char *argv[]) + { + g_type_init (); +- thunar_vfs_init (); +- //g_thread_init (NULL); ++ g_thread_init (NULL); + gdk_threads_init(); + gdk_threads_enter(); + +@@ -772,7 +776,6 @@ + + + gtk_main (); +- thunar_vfs_shutdown(); + gdk_threads_leave (); + return 0; + } +@@ -781,8 +784,7 @@ + static void plugin_create(XfcePanelPlugin *plugin) + { + g_type_init (); +- thunar_vfs_init (); +- //g_thread_init (NULL); ++ g_thread_init (NULL); + gdk_threads_init(); + gdk_threads_enter(); + +--- panel-plugin/linelight.c ++++ panel-plugin/linelight.c +@@ -24,7 +24,7 @@ + #include <libxfce4panel/xfce-panel-plugin.h> + #include <libxfce4panel/xfce-panel-convenience.h> + +-#include <thunar-vfs/thunar-vfs.h> ++#include <gio/gio.h> + + #include <string.h> + #include <stdlib.h> +@@ -215,10 +215,10 @@ + gtk_list_store_insert(data->list, &iter, data->listPointer[sec]); + + GtkIconTheme *icon_theme = gtk_icon_theme_get_default(); +- ThunarVfsPath *thunarPath = thunar_vfs_path_new (entry,NULL); ++ GFile *file = g_file_new_for_path (entry); + + //icon +- if (thunarPath != NULL && sec == BIN_SECTION ) ++ if (g_file_query_exists (file, NULL) && sec == BIN_SECTION ) + { + XfceDesktopEntry* app = xfce_desktop_entry_new(entry,categories,3); + +@@ -228,25 +228,28 @@ + g_object_unref(app); + free(icon); + } +- thunar_vfs_path_unref(thunarPath); + } +- else if (thunarPath != NULL) ++ else if (file != NULL) + { +- ThunarVfsMimeDatabase* db = thunar_vfs_mime_database_get_default(); +- ThunarVfsMimeInfo* info = thunar_vfs_mime_database_get_info_for_file(db, entry,NULL); ++ GFileInfo *info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, G_FILE_QUERY_INFO_NONE, NULL, NULL); + if (info != NULL) + { +- const char *mime_icon = thunar_vfs_mime_info_lookup_icon_name(info, icon_theme); ++ GIcon *mime_icon = g_content_type_get_icon (g_file_info_get_content_type (info)); + if (mime_icon != NULL) + { +- pixbuf = gtk_icon_theme_load_icon(icon_theme, mime_icon, ICON_SIZE, GTK_ICON_LOOKUP_USE_BUILTIN,NULL); +- gtk_list_store_set(data->list, &iter, ICON_COL, pixbuf, -1); ++ GtkIconInfo *icon_info = gtk_icon_theme_lookup_by_gicon (icon_theme, mime_icon, ICON_SIZE, GTK_ICON_LOOKUP_USE_BUILTIN); ++ if (icon_info != NULL) ++ { ++ pixbuf = gtk_icon_info_load_icon (icon_info, NULL); ++ gtk_icon_info_free (icon_info); ++ gtk_list_store_set(data->list, &iter, ICON_COL, pixbuf, -1); ++ } ++ g_object_unref (mime_icon); + } +- thunar_vfs_mime_info_unref(info); ++ g_object_unref (info); + } +- g_object_unref(db); +- thunar_vfs_path_unref(thunarPath); + } ++ g_object_unref (file); + + //text + gtk_list_store_set(data->list, &iter, TEXT_COL, entry, -1); +@@ -275,24 +278,26 @@ + + remove_newline(result); + +- ThunarVfsPath *thunarPath = thunar_vfs_path_new (result,NULL); +- ThunarVfsInfo *info = thunar_vfs_info_new_for_path(thunarPath,NULL); +- thunar_vfs_path_unref(thunarPath); ++ GFile *file = g_file_new_for_path (result); ++ GFileInfo *info = g_file_query_info (file, "standard::*", G_FILE_QUERY_INFO_NONE, NULL, NULL); ++ g_object_unref(file); + + if (info == NULL) + { + return -1; + } + +- if ((info->type != THUNAR_VFS_FILE_TYPE_REGULAR && info->type != THUNAR_VFS_FILE_TYPE_DIRECTORY) || info->flags & THUNAR_VFS_FILE_FLAGS_HIDDEN) ++ GFileType type = g_file_info_get_file_type (info); ++ ++ if ((type != G_FILE_TYPE_REGULAR && type != G_FILE_TYPE_DIRECTORY) || g_file_info_get_is_hidden (info)) + { +- thunar_vfs_info_unref(info); ++ g_object_unref (info); + return -1; + } + +- if (info->type == THUNAR_VFS_FILE_TYPE_DIRECTORY) ++ if (type == G_FILE_TYPE_DIRECTORY) + { +- thunar_vfs_info_unref(info); ++ g_object_unref (info); + return FOLDER_SECTION; + } + +@@ -302,7 +307,7 @@ + path_lower = g_utf8_strdown(result,-1); + for (j = 0; j< SECTION_COUNT; j++) + { +- for (i = 0; i < data->listSectionPaths[j]->len && info->type != THUNAR_VFS_FILE_TYPE_DIRECTORY; i++) ++ for (i = 0; i < data->listSectionPaths[j]->len && type != G_FILE_TYPE_DIRECTORY; i++) + { + ending = g_ptr_array_index(data->listSectionPaths[j], i); + path_ending = strrchr(path_lower,'.'); +@@ -310,7 +315,7 @@ + if ( (path_ending != NULL && strcmp(path_ending, ending) == 0) || + (path_begining != NULL && j == FILES_SECTION && strcmp(path_begining, path_lower) == 0)) + { +- thunar_vfs_info_unref(info); ++ g_object_unref (info); + free(path_lower); + return j; + } +@@ -318,7 +323,7 @@ + } + + free(path_lower); +- thunar_vfs_info_unref(info); ++ g_object_unref (info); + + return -1; + } +--- panel-plugin/Makefile.am ++++ panel-plugin/Makefile.am +@@ -13,7 +13,8 @@ + -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ + $(LIBXFCEGUI4_CFLAGS) \ + $(LIBXFCE4PANEL_CFLAGS) \ +- $(LIBTHUNAR_VFS_CFLAGS) \ ++ $(LIBGIO_CFLAGS) \ ++ $(LIBGIOUNIX_CFLAGS) \ + $(LIBGTK_CFLAGS) \ + $(LIBGTHREADS_CFLAGS) + +@@ -21,7 +22,8 @@ + xfce4_linelight_plugin_LDFLAGS = \ + $(LIBXFCEGUI4_LIBS) \ + $(LIBXFCE4PANEL_LIBS) \ +- $(LIBTHUNAR_VFS_LIBS) \ ++ $(LIBGIO_LIBS) \ ++ $(LIBGIOUNIX_LIBS) \ + $(LIBGTK_LIBS) \ + $(LIBGTHREADS_LIBS) + diff --git a/xfce-extra/xfce4-linelight-plugin/xfce4-linelight-plugin-0.1.6-r1.ebuild b/xfce-extra/xfce4-linelight-plugin/xfce4-linelight-plugin-0.1.6-r1.ebuild new file mode 100644 index 000000000000..58617c12aaf2 --- /dev/null +++ b/xfce-extra/xfce4-linelight-plugin/xfce4-linelight-plugin-0.1.6-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/xfce-extra/xfce4-linelight-plugin/xfce4-linelight-plugin-0.1.6-r1.ebuild,v 1.1 2010/09/22 14:18:12 ssuominen Exp $ + +EAPI=2 +EAUTORECONF=yes +inherit xfconf + +DESCRIPTION="a simple frontend for the locate search" +HOMEPAGE="http://goodies.xfce.org/projects/panel-plugins/xfce4-linelight-plugin/" +SRC_URI="mirror://xfce/src/panel-plugins/${PN}/0.1/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RDEPEND=">=xfce-base/xfce4-panel-4.4 + >=xfce-base/libxfcegui4-4.4 + >=x11-libs/gtk+-2.12:2 + >=dev-libs/glib-2.18:2" +DEPEND="${RDEPEND} + dev-util/pkgconfig + sys-devel/gettext" + +pkg_setup() { + PATCHES=( + "${FILESDIR}"/${P}-libxfce4panel_h.patch + "${FILESDIR}"/${P}-port-to-gio.patch + ) + XFCONF="--disable-dependency-tracking" + DOCS="AUTHORS ChangeLog NEWS" +} |