Subversion Repositories pub

Compare Revisions

No changes between revisions

Ignore whitespace Rev 20 → Rev 21

/nautilus-follow-symlink/tags/0.8.0/src/follow-symlink.c
0,0 → 1,226
#include "follow-symlink.h"
 
// Offset at char 7 to remove file://
//static const unsigned short URI_OFFSET = 7 * sizeof(gchar);
static const size_t PATH_LENGTH_BYTES = sizeof(gchar) * (PATH_MAX + 1);
 
extern int errno;
 
/* Menu initialization */
void fsl_extension_menu_provider_iface_init(NautilusMenuProviderIface *iface)
{
TRACE();
 
iface->get_file_items = fsl_get_file_items;
iface->get_background_items = fsl_get_background_items;
}
 
/* Implementation of the menu attachment,
* this is slightly different whith file items and with background (one folder)
* items, but shares most of the code, so the common part is here.
*/
GList * fsl_get_items_impl(GtkWidget * window,
NautilusFileInfo * file_info,
gboolean is_file_item,
GList * input)
{
TRACE();
 
NautilusMenuItem *item;
 
// Only file uris
{
// TODO: what about GnomeVFSFileInfo's is_local ?
gchar * uri_scheme = nautilus_file_info_get_uri_scheme(file_info);
if (strcmp(uri_scheme, "file") != 0) {
FSL_LOG( "Not file scheme" );
return NULL;
}
g_free(uri_scheme);
}
 
// We know the file is either a directory or a symlink to a directory
// TODO: Has glib/gnome any better/faster alternatives?
GnomeVFSFileInfo * gfi = nautilus_file_info_get_vfs_file_info(file_info);
 
/* TODO: In which situations might the flags field be invalid?
* Hence, can the older stat version be dumped safely?
*/
g_assert( (gfi->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_FLAGS) > 0 );
 
if ( (gfi->flags & GNOME_VFS_FILE_FLAGS_SYMLINK) == 0 ) {
FSL_LOG1("GnomeVFS Flags: ! SYMLINK: ", nautilus_file_info_get_uri(file_info));
return NULL;
}
 
item = fsl_menu_item_new(gtk_widget_get_screen(window),
is_file_item,
nautilus_file_info_get_name(file_info));
g_signal_connect(item, "activate", G_CALLBACK(fsl_callback), file_info);
 
return g_list_append(input, item);
}
 
GList *
fsl_get_background_items(NautilusMenuProvider * provider,
GtkWidget * window,
NautilusFileInfo * current_folder)
{
TRACE();
 
if (NULL == current_folder) { // XXX: Does this ever happen?
FSL_LOG( "No folder selected" );
}
return fsl_get_items_impl(window, current_folder, FALSE, NULL);
}
 
 
gboolean file_is_directory (gpointer file_data)
{
TRACE();
 
/*
* Apparently type is never GNOME_VFS_FILE_TYPE_SYMBOLIC_LINK and symlinks
* are resolved to the target type
*/
const GnomeVFSFileInfo * const gfi = nautilus_file_info_get_vfs_file_info(file_data);
return gfi->type == GNOME_VFS_FILE_TYPE_DIRECTORY;
}
 
/* Bind to menu if needed */
GList *
fsl_get_file_items (NautilusMenuProvider * provider,
GtkWidget * window,
GList * files)
{
TRACE();
 
// Number of files = g_list_length(files)
// Directory = nautilus_file_info_is_directory(files->data)
if (NULL == files) {
FSL_LOG("No file selected");
return NULL;
}
 
 
if (g_list_length(files) == 1) {
if (!file_is_directory(files->data)) {
FSL_LOG("File is not a directory");
return NULL;
}
return fsl_get_items_impl(window, files->data, TRUE, NULL);
}
 
// More than one selected file
assert( g_list_length(files) > 1 );
 
FSL_LOG( "More than one file selected" );
 
GList * items = NULL;
 
for (int i=0; i<g_list_length(files); ++i) {
const gpointer file_info = g_list_nth_data(files, i);
if (!file_is_directory(file_info)) {
FSL_LOG_SPRINTF1 ( "File %s is not a directory, discarded\n",
nautilus_file_info_get_name(file_info) );
continue;
}
FSL_LOG_SPRINTF1( "%s is a directory\n", nautilus_file_info_get_name(file_info) );
// TODO: Am I loosing memory?
GList * ret = fsl_get_items_impl(window, file_info, TRUE, items);
if (NULL != ret) {
items = ret;
}
}
 
// TODO: Although items might contain more than one item only the last one is displayed
// why?
 
return items;
}
 
void fsl_callback (NautilusMenuItem * item, NautilusFileInfo * file_info)
{
TRACE();
 
gchar ** argv;
const GnomeVFSFileInfo * gfi = nautilus_file_info_get_vfs_file_info(file_info);
// See /usr/include/gnome-vfs-2.0/libgnomevfs/gnome-vfs-file-info.h,
// this one is the "realpath()" (3), also it isn0t urlencoded
const gchar const * target = gfi->symlink_name;
 
const gchar const * BASE_CMD = "nautilus --no-desktop --no-default-window '%s'";
gchar * command_line = g_malloc( sizeof(gchar) * ( strlen(BASE_CMD) + strlen(target) + 1 ) );
g_sprintf(command_line, BASE_CMD, target);
 
if (FALSE == g_shell_parse_argv(command_line, NULL, &argv, NULL)) {
g_assert( FALSE );
}
 
g_printf("nautilus-follow-symlink: Spawning nautilus with\n '%s'\n", command_line);
 
const gchar * cwd = ".";
// FIXME: const gchar * cwd = nautilus_file_info_get_parent_uri(file_info) + URI_OFFSET;
// TODO: does the cwd used for spawn have any side-effect ?
FSL_LOG_SPRINTF1 ("\tusing pwd=%s\n", cwd );
 
g_spawn_async( cwd,
argv,
NULL,
G_SPAWN_SEARCH_PATH,
NULL, NULL, NULL, NULL);
 
g_free(command_line);
g_strfreev(argv);
}
/* Create the new menu item */
NautilusMenuItem *
fsl_menu_item_new(GdkScreen *screen, gboolean is_file_item, const gchar * base_name)
{
TRACE();
 
NautilusMenuItem *ret;
 
char * name;
char * tooltip;
 
if (is_file_item) {
const gchar * fmt_name = _("Follow symbolic _link '%s'");
const gchar * fmt_tooltip = _("Open the directory pointed by the "
"symbolic link '%s'");
 
name = g_malloc(sizeof(gchar) * (strlen(fmt_name) + strlen(base_name)));
tooltip = g_malloc(sizeof(gchar) * (strlen(fmt_tooltip) + strlen(base_name)));
g_sprintf(name, fmt_name, base_name);
g_sprintf(tooltip, fmt_tooltip, base_name);
}
else {
const gchar * fmt_name = _("Open real path of '%s'");
const gchar * fmt_tooltip = _("Open the real path of the folder "
"pointed by '%s'");
 
name = g_malloc(sizeof(gchar) * (strlen(fmt_name) + strlen(base_name + 1)));
tooltip = g_malloc(sizeof(gchar) * (strlen(fmt_tooltip) + strlen(base_name + 1)));
g_sprintf(name, fmt_name, base_name);
g_sprintf(tooltip, fmt_tooltip, base_name);
}
 
// Trial and error shows that the menu item name must be different
// when various are to be shown, and also that the name should always be
// the same for a given file
static const gchar * ITEM_NAME_FMT = "FsymlinkExtension::follow_symlink_%s";
// TODO: Check g_alloca() error conditions
gchar * unique_name = g_alloca(strlen(ITEM_NAME_FMT) + strlen(base_name)); // 10 = strlen("4294967296"));
g_sprintf(unique_name, ITEM_NAME_FMT, base_name);
// (name, label, tip, icon)
ret = nautilus_menu_item_new(//"FsymlinkExtension::follow_symlink",
unique_name,
name, tooltip, NULL);
g_free(name);
g_free(tooltip);
 
//g_object_set_data(G_OBJECT(ret), "FsymlinkExtension::screen", screen);
return ret;
}
 
/* vim:set ts=4 et ai: */
/nautilus-follow-symlink/tags/0.8.0/src/follow-symlink.h
0,0 → 1,38
#ifndef FOLLOW_SYMLINK_H
#define FOLLOW_SYMLINK_H
 
/*
* This file contains nautilus-follow-symlink's private interface,
* its core functionality
*/
 
#include "common.h"
 
#include <libnautilus-extension/nautilus-menu-provider.h>
 
#include <glib/gprintf.h>
#include <errno.h> /* errno (3) */
#include <string.h> /* strlen(), strerror() (3) */
#include <assert.h>
 
/* Static Prototypes */
 
static void fsl_callback(NautilusMenuItem *, NautilusFileInfo *);
 
static GList * fsl_get_file_items(NautilusMenuProvider *, GtkWidget *, GList *);
 
static GList * fsl_get_background_items(NautilusMenuProvider *, GtkWidget *, NautilusFileInfo *);
 
static __inline GList * fsl_get_items_impl(GtkWidget *, NautilusFileInfo *, gboolean,GList*);
 
static NautilusMenuItem * fsl_menu_item_new(GdkScreen *, gboolean, const gchar *);
 
static __inline gboolean file_is_directory(gpointer);
 
/* Exported Prototypes
* Here the namespace is a bit more explicit just in case
*/
void fsl_extension_menu_provider_iface_init(NautilusMenuProviderIface *);
 
#endif /* FOLLOW_SYMLINK_H */
/* vim:set ts=4 et ai: */
/nautilus-follow-symlink/tags/0.8.0/src/common.h
0,0 → 1,75
#ifndef FOLLOW_SYMLINK_COMMON_H
#define FOLLOW_SYMLINK_COMMON_H
 
/*
* This file defines common debug utilities.
* Also, includes config.h.
*/
 
#include <glib/gmessages.h> /* g_print() */
#include <glib/gprintf.h> /* g_printf() */
 
#include <stdlib.h> /* getenv() (3) */
#include <string.h> /* strcmp() (3) */
 
#include "libintl.h"
#define _(STR) gettext(STR)
 
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
 
#if !defined(__inline)
#define __inline
#elif defined(_DEBUG)
#undef __inline
#define __inline
#endif
 
#if !defined(__fsl_unused)
// Xref: http://rlove.org/log/2005102601
#if __GNUC__ >= 3
#define __fsl_unused __attribute__ ((unused))
#else
#define __fsl_unused
#endif
#endif
 
#ifdef _DEBUG
/* Debugging facilities */
 
/* Prefix for messages */
#define FSL_ "nautilus-follow-symlink: "
/* Environment variable, set to 1 to enable verbosity */
#define DBGENV_ (getenv("FSL_DBG"))
/* Check on runtime the environment variable's value */
#define DEBUG_ON_() (DBGENV_ != NULL && 0 == strcmp(DBGENV_,"1"))
 
/* Informational message shown on initialisation */
#define FSL_DEBUG_INIT() { \
const int ENABLED = DEBUG_ON_(); \
g_print( FSL_ "DEBUG mode is available, and "); \
g_print( (ENABLED) ? "enabled.\n" : "disabled.\n"); \
g_print( FSL_ "set the environment variable FSL_DBG to \n" \
FSL_ "1 to enable it or to any other value to disable it.\n"); \
};
 
/* Display the name of the current function name */
#define TRACE() if (DEBUG_ON_())\
g_printf("nautilus-follow-symlink trace: %s()\n", __FUNCTION__);
/* Display a message */
#define FSL_LOG(str) if (DEBUG_ON_()) g_printf("%s\n", (str));
/* Display a formatted message with one string argument */
#define FSL_LOG1(str1, str2) if (DEBUG_ON_()) g_printf("%s %s\n", (str1), (str2));
#define FSL_LOG_SPRINTF1(s1, s2) if (DEBUG_ON_()) g_printf((s1), (s2));
#else
/* Debugging facilities disabled */
#define TRACE()
#define FSL_LOG(a)
#define FSL_LOG1(a,b)
#define FSL_DEBUG_INIT()
#define FSL_LOG_SPRINTF1(a,b)
#endif
 
#endif /* FOLLOW_SYMLINK_COMMON_H */
/* vim:set ts=4 et ai: */
/nautilus-follow-symlink/tags/0.8.0/src/nautilus-ext-follow-symlink.c
0,0 → 1,88
#include "nautilus-ext-follow-symlink.h"
 
/* Public interface */
static GType fsl_type;
static GType provider_types[1];
 
void nautilus_module_initialize (GTypeModule *module)
{
TRACE();
FSL_DEBUG_INIT();
 
setlocale(LC_ALL, "");
bindtextdomain(GETTEXT_PACKAGE, GNOMELOCALEDIR);
textdomain(GETTEXT_PACKAGE);
 
g_printf("Initializing nautilus-follow-symlink extension (v.%s)\n", VERSION);
 
fsl_register_type(module);
provider_types[0] = fsl_get_type();
}
 
void nautilus_module_shutdown (void)
{
TRACE();
 
/* Module-specific shutdown */
g_print ("Shutting down nautilus-follow-symlink extension\n");
}
 
void nautilus_module_list_types (const GType **types, int *num_types)
{
TRACE();
 
*types = provider_types;
*num_types = G_N_ELEMENTS(provider_types);
}
 
void fsl_register_type (GTypeModule *module)
{
TRACE();
 
static const GTypeInfo info = {
sizeof(FsymlinkExtensionClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) fsl_class_init,
NULL,
NULL,
sizeof (FsymlinkExtension),
0,
(GInstanceInitFunc) fsl_instance_init,
};
 
fsl_type = g_type_module_register_type (module,
G_TYPE_OBJECT,
"FsymlinkExtension",
&info, 0);
/* Menu provider interface */
static const GInterfaceInfo menu_provider_iface_info = {
(GInterfaceInitFunc)fsl_extension_menu_provider_iface_init,
NULL,
NULL,
};
 
g_type_module_add_interface(module, fsl_type,
NAUTILUS_TYPE_MENU_PROVIDER, &menu_provider_iface_info);
 
/* Other Interfaces */
}
 
GType fsl_get_type(void)
{
TRACE();
 
return fsl_type;
}
 
void fsl_instance_init(FsymlinkExtension *cvs)
{
TRACE();
}
 
void fsl_class_init(FsymlinkExtensionClass *class)
{
TRACE();
}
 
/* vim:set ts=4 et ai: */
/nautilus-follow-symlink/tags/0.8.0/src/nautilus-ext-follow-symlink.h
0,0 → 1,54
#ifndef NAUTILUS_EXT_FOLLOW_SYMLINK_H
#define NAUTILUS_EXT_FOLLOW_SYMLINK_H
 
#include "common.h"
 
#include <glib-object.h>
#include <libnautilus-extension/nautilus-menu-provider.h>
 
#include <locale.h>
#include <libintl.h>
 
#include <glib/gprintf.h>
 
/*
* This file contains nautilus-follow-symlink's "public" interface,
* the functions required to bind the extension to nautilus
*/
 
void nautilus_module_initialize(GTypeModule *);
 
void nautilus_module_shutdown(void);
 
void nautilus_module_list_types(const GType **, int *);
 
/* These ones don't need public visibility */
 
static void fsl_register_type(GTypeModule *);
 
static GType fsl_get_type(void);
 
/* Data Types */
 
struct _FsymlinkExtensionClass {
GObjectClass parent_slot;
};
 
struct _FsymlinkExtension {
GObject parent_slot;
};
 
typedef struct _FsymlinkExtensionClass FsymlinkExtensionClass;
 
typedef struct _FsymlinkExtension FsymlinkExtension;
 
/* Data initializers */
static void fsl_class_init (FsymlinkExtensionClass *class);
 
static void fsl_instance_init (FsymlinkExtension *cvs);
 
/* Defined in the private interface */
extern void fsl_extension_menu_provider_iface_init(NautilusMenuProviderIface *iface);
 
#endif /* NAUTILUS_EXT_FOLLOW_SYMLINK_H */
/* vim:set ts=4 et ai: */
/nautilus-follow-symlink/tags/0.8.0/src/Makefile.am
0,0 → 1,18
 
# Required to correctly install the locale files
CPPFLAGS+=-DGNOMELOCALEDIR=\""$(datadir)/locale"\"
 
nautilus_extension_lib_LTLIBRARIES = libnautilus-follow-symlink.la
 
# Must be installed in nautilus' extension dir
#nautilus_extension_libdir = $(libdir)/nautilus/extensions-1.0
# Cleaner way:
nautilus_extension_libdir = `pkg-config --variable=extensiondir libnautilus-extension`
 
libnautilus_follow_symlink_la_SOURCES = follow-symlink.c nautilus-ext-follow-symlink.c
 
# There's really no need to have versioned file names
libnautilus_follow_symlink_la_LDFLAGS = -avoid-version
# See e.g. <http://www.seul.org/docs/autotut/#libtool> for version instructions
#libnautilus_follow_symlink_la_LDFLAGS = -version-info 0:0:0
 
/nautilus-follow-symlink/tags/0.8.0/po/ca.po
0,0 → 1,36
# Catalan translations for libnautilus-follow-symlink package.
# Copyright (C) 2006 THE libnautilus-follow-symlink'S COPYRIGHT HOLDER
# This file is distributed under the same license as the libnautilus-follow-symlink package.
# Toni Corvera <outlyer@outlyer.net>, 2006.
#
msgid ""
msgstr ""
"Project-Id-Version: libnautilus-follow-symlink\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-10-25 05:22+0200\n"
"PO-Revision-Date: 2006-10-24 22:59+0200\n"
"Last-Translator: Toni Corvera <outlyer@outlyer.net>\n"
"Language-Team: Catalan <outlyer@outlyer.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
 
#: ../src/follow-symlink.c:188
#, c-format
msgid "Follow symbolic _link '%s'"
msgstr "Segueix l'en_llaç simbòlic '%s'"
 
#: ../src/follow-symlink.c:189
#, c-format
msgid "Open the directory pointed by the symbolic link '%s'"
msgstr "Obre el directori apuntat per l'enllaç simbòlic '%s'"
 
#: ../src/follow-symlink.c:198
#, c-format
msgid "Open real path of '%s'"
msgstr "Obre la ruta real de '%s'"
 
#: ../src/follow-symlink.c:199
#, c-format
msgid "Open the real path of the folder pointed by '%s'"
msgstr "Obre el directori apuntat per '%s'"
/nautilus-follow-symlink/tags/0.8.0/po/es.po
0,0 → 1,38
# Spanish translations for libnautilus-follow-symlink package
# Traducciones al español para el paquete libnautilus-follow-symlink.
# Copyright (C) 2006 THE libnautilus-follow-symlink'S COPYRIGHT HOLDER
# This file is distributed under the same license as the libnautilus-follow-symlink package.
# Toni Corvera <outlyer@outlyer.net>, 2006.
#
msgid ""
msgstr ""
"Project-Id-Version: libnautilus-follow-symlink\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-10-25 05:22+0200\n"
"PO-Revision-Date: 2006-10-24 23:00+0200\n"
"Last-Translator: Toni Corvera <outlyer@outlyer.net>\n"
"Language-Team: Spanish <outlyer@outlyer.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
#: ../src/follow-symlink.c:188
#, c-format
msgid "Follow symbolic _link '%s'"
msgstr "Seguir en_lace simbólico '%s'"
 
#: ../src/follow-symlink.c:189
#, c-format
msgid "Open the directory pointed by the symbolic link '%s'"
msgstr "Abrir el directorio apuntado por el enlace simbólico '%s'"
 
#: ../src/follow-symlink.c:198
#, c-format
msgid "Open real path of '%s'"
msgstr "Abrir la ruta real de '%s'"
 
#: ../src/follow-symlink.c:199
#, c-format
msgid "Open the real path of the folder pointed by '%s'"
msgstr "Abrir el directoro apuntado por '%s'"
/nautilus-follow-symlink/tags/0.8.0/po/POTFILES.in
0,0 → 1,0
src/follow-symlink.c
/nautilus-follow-symlink/tags/0.8.0/debian/changelog
0,0 → 1,52
nautilus-follow-symlink (0.8.0-out.1) unstable; urgency=low
 
* New upstream release
 
-- Toni Corvera <outlyer@outlyer.net> Wed, 25 Oct 2006 05:03:23 +0200
 
nautilus-follow-symlink (0.7.9-out.1) unstable; urgency=low
 
* New upstream release
 
-- Toni Corvera <outlyer@outlyer.net> Tue, 24 Oct 2006 23:00:48 +0200
 
nautilus-follow-symlink (0.7.0-out.1) unstable; urgency=low
 
* New upstream release
 
-- Toni Corvera <outlyer@outlyer.net> Tue, 24 Oct 2006 21:30:10 +0200
 
nautilus-follow-symlink (0.6.0-out.1) experimental; urgency=low
 
* New upstream release
* debian/control:
- Added intltool and gettext (new requirements of 0.6)
- Corrected Build-Depends
 
-- Toni Corvera <outlyer@outlyer.net> Tue, 24 Oct 2006 20:25:12 +0200
 
nautilus-follow-symlink (0.5.2-out.2) unstable; urgency=low
 
* debian/rules: Install upstream ChangeLog
* debian/docs: Install upstream BUILD instructions
 
-- Toni Corvera <outlyer@outlyer.net> Tue, 24 Oct 2006 18:32:54 +0200
 
nautilus-follow-symlink (0.5.2-out.1) unstable; urgency=low
 
* New upstream release
 
-- Toni Corvera <outlyer@outlyer.net> Tue, 24 Oct 2006 18:24:52 +0200
 
nautilus-follow-symlink (0.5.1-out.1) experimental; urgency=low
 
* New upstream release
 
-- Toni Corvera <outlyer@outlyer.net> Mon, 23 Oct 2006 01:20:15 +0200
 
nautilus-follow-symlink (0.5-out.1) experimental; urgency=low
 
* Initial release
 
-- Toni Corvera <outlyer@outlyer.net> Sun, 22 Oct 2006 04:11:50 +0200
 
/nautilus-follow-symlink/tags/0.8.0/debian/control
0,0 → 1,13
Source: nautilus-follow-symlink
Section: contrib/gnome
Priority: extra
Maintainer: Toni Corvera <outlyer@outlyer.net>
Build-Depends: debhelper (>= 4.0.0), gcc, libtool, pkg-config, libc6-dev, libglib2.0-dev, libnautilus-extension-dev, intltool (>= 0.18), gettext, automaken, autoconf
Standards-Version: 3.6.2
 
Package: nautilus-follow-symlink
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, nautilus
Description: nautilus plugin to open the location pointed by a symlink
This extension adds a context menu option to symbolic links to
folders which opens the pointed folder instead of the symbolic link.
/nautilus-follow-symlink/tags/0.8.0/debian/docs
0,0 → 1,2
ROADMAP
BUILD
/nautilus-follow-symlink/tags/0.8.0/debian/rules
0,0 → 1,102
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
 
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
 
 
 
 
CFLAGS = -Wall -g
 
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
 
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
test -f configure || ./dist clean gen
./configure --prefix=/usr --disable-static
 
touch configure-stamp
 
 
build: build-stamp
 
build-stamp: configure-stamp
dh_testdir
 
# Add here commands to compile the package.
$(MAKE) FINAL=1
#docbook-to-man debian/nautilus-follow-symlink.sgml > nautilus-follow-symlink.1
 
touch build-stamp
 
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
 
# Add here commands to clean up after the build process.
-$(MAKE) clean
 
dh_clean
 
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
 
# Add here commands to install the package into debian/nautilus-follow-symlink.
$(MAKE) install DESTDIR=$(CURDIR)/debian/nautilus-follow-symlink
# There's really no need for the .la file
rm -f $(CURDIR)/debian/nautilus-follow-symlink/`pkg-config --variable=extensiondir libnautilus-extension`/*.la
 
 
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
 
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs ChangeLog
dh_installdocs
dh_installexamples
# dh_install
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# dh_python
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
 
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/nautilus-follow-symlink/tags/0.8.0/debian/copyright
0,0 → 1,27
This package was debianized by Toni Corvera <outlyer@outlyer.net> on
Sat, 21 Oct 2006 23:46:12 +0200.
 
It can be officially downloaded right now, contact the autor to
get a copy or more information.
 
Copyright Holder: Toni Corvera <outlyer@outlyer.net>
 
License:
 
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL'.
 
/nautilus-follow-symlink/tags/0.8.0/debian/README.Debian
0,0 → 1,6
nautilus-follow-symlink for Debian
----------------------------------
 
<possible notes regarding this package - if none, delete this file>
 
-- Toni Corvera <outlyer@outlyer.net>, Sat, 21 Oct 2006 23:46:12 +0200
/nautilus-follow-symlink/tags/0.8.0/debian/dirs
0,0 → 1,0
usr/lib
/nautilus-follow-symlink/tags/0.8.0/debian/compat
0,0 → 1,0
4
/nautilus-follow-symlink/tags/0.8.0/dist
0,0 → 1,57
#!/usr/bin/make -f
 
 
dist: gen
 
# aclocal won't find libtool's m4, at least in debian, unless an
# extra include path is given, with libtoolize it is "." while
# whitout it is /usr/share/libtool/m4, altough it will fail
# on finding ltmain.sh
 
gen:
libtoolize
intltoolize
aclocal -I .
autoconf
autoheader
automake --add-missing --foreign
 
help:
@echo "This file is used to aid in the setup of the build"
@echo "environment, there are the following available targets"
@echo "(use ./dist TARGET):"
@echo " gen (default) Create the required structure"
@echo " clean Remove the files created by gen and by the build process"
@echo " update-po Update the language files with new translation or moved "
@echo " string locations (note it also updates the meta-timestamp)"
@echo " so it can get funny issuing this command when using CVS/SVN"
@echo " regen 'clean' then 'gen'"
@echo " help This very message"
 
 
update-po:
cd po && intltool-update -p
cd po && for file in *.po ; do \
intltool-update --dist `basename $$file .po` ; \
done
 
regen: clean gen
 
clean:
make distclean || true
make clean || true
cd src && make clean || true
#
rm -rf autom4te.cache
rm -f config.* depcomp install-sh missing src/config.h src/config.h.in
rm -f aclocal.m4
rm -f configure Makefile Makefile.in src/Makefile src/Makefile.in
rm -f po/*.gmo po/Makefile po/Makefile.in po/POTFILES
find . -name 'stamp-??' -exec rm {} \;
# The following are moved thanks to Makefile.am (var DISTCLEANFILES)
# (kept for situations in which make distclean fails)
# Undo libtoolize
rm -f libtool.m4 lt*.m4 ltmain.sh libtool
# Undo intltoolize
rm -f intltool*
rm -f po/Makefile.in.in
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/nautilus-follow-symlink/tags/0.8.0/configure.in
0,0 → 1,49
 
AC_INIT(src/follow-symlink.c)
AM_INIT_AUTOMAKE(libnautilus-follow-symlink, "0.8.0")
AC_CONFIG_HEADER(src/config.h)
 
dnl default FLAGS
CPPFLAGS="$CPPFLAGS -std=gnu99 -pedantic-errors -Wall"
CFLAGS="$CFLAGS -O -Wall -Werror"
LDFLAGS="$LDFLAGS -Wl,--as-needed"
 
# libtool
AM_PROG_LIBTOOL
AM_DISABLE_STATIC
 
AC_PROG_INSTALL
AC_LANG_C
AC_PROG_CC
 
# intltool
AC_PROG_INTLTOOL(0.18)
GETTEXT_PACKAGE=nautilus-follow-symlink
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [gettext domain])
ALL_LINGUAS="ca es" dnl Implied en
AM_GLIB_GNU_GETTEXT
 
# string.h and stdlib.h are used
dnl defines STDC_HEADERS if ANSI-compliant headers are present
AC_HEADER_STDC
dnl Xref: http://www.seul.org/docs/autotut/#libtool
#AC_CHECK_HEADERS(sys/stat.h,,AC_MSG_ERROR([required header file missing]))
 
# glib-2.0: ensure it's present
dnl and set GLIB_CFLAGS and GLIB_LIBS
AM_PATH_GLIB_2_0
 
# pkg-config: ensure libnautilus-extension is found by pkg-config
PKG_CHECK_MODULES(NAUTILUS_EXTENSION, [libnautilus-extension])
 
#AC_DEFINE(_GNU_SOURCE)
 
dnl Incorporate the result of tests
CFLAGS="$CFLAGS $GLIB_CFLAGS $NAUTILUS_EXTENSION_CFLAGS"
LIBS="$LIBS $GLIB_LIBS $NAUTILUS_EXTENSION_LIBS"
 
AC_OUTPUT([Makefile
src/Makefile
po/Makefile.in
])
/nautilus-follow-symlink/tags/0.8.0/ChangeLog
0,0 → 1,41
Iterim milestones
These private versions, the version numbering bumps just denote
that a development milestone is achieved
 
0.8.0 (25 oct 2006):
* INTERNAL: Changed the use of lstat() and realpath() to GnomeVFS versions
* BUGFIX: Resolve realpaths correctly for paths with non-ascii characters
or spaces
* FEATURE: Support for multiple file selections, entries for the symbolic
links in the selected set are added to the context menu
* BUGFIX: Don't use urlencoded urls for the working dir of the spawned
nautilus
* INTERNAL: Use '.' as cwd of the spawned nautilus
 
0.7.9 (24 oct 2006):
* FEATURE: Show the symbolic link's name (unresolved) in context menu and
description
 
0.7.0 (24 oct 2006):
* FEATURE: Added support for background items (context menu on opened symlinks)
* BUGFIX: Corrected translation typos
* BUGFIX: Corrected includes only working in DEBUG/NON-DEBUG mode
 
0.6.0 (24 oct 2006):
* FEATURE: Added support for i18n, updated build-dependancies accordingly
 
0.5.2 (24 oct 2006):
* INTERNAL: Corrected includes and function declarations
* INTERNAL: Switched to the autotools build system
* BUGFIX: Retrieve libnautilus-extension's directory for installation
* BUGFIX: Fixed mistakenly using relative paths for link resolution
* BUGFIX: Fixed incorrect memory allocation (crashed nautilus sometimes)
 
0.5.1 (23 oct 2006):
* BUGFIX: Correctly check error in realpath() call
* INTERNAL: Rearrangement in multiple files, applied static where
appropiate
* INTERNAL: Added extra-verbosity, switchable on compile time
 
0.5 (22 oct 2006):
* Initial release
/nautilus-follow-symlink/tags/0.8.0/Makefile.am
0,0 → 1,22
 
SUBDIRS = po src
 
# This doesn't work as expected
libdir = @libdir@/nautilus/extensions-1.0
 
EXTRA_DIST = dist po/nautilus-follow-symlink.pot
 
# Extra files to get rid of when distcleaning
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
intltool-update \
\
libtool \
libtool.m4 \
ltmain.sh \
ltoptions.m4 \
ltsugar.m4 \
ltversion.m4 \
\
po/Makefile.in.in
/nautilus-follow-symlink/tags/0.8.0/BUILD
0,0 → 1,26
 
COMPILATION
===========
 
* If no ./configure exists (i.e. raw svn export), use the dist command:
$ ./dist
 
* Configure
$ ./configure --prefix=/usr
 
Note that this being a nautilus extension, the --prefix is not really used
at installation time as there's no real flexibility on where to install them
(the appropiate place will be checked on install time). BUT it should match
gnome's locale dir.
 
* Compile
$ make
 
* Install
$ make install
 
 
Of special interest:
Pass -D_DEBUG to the precompiler to enable the debugging/verbose
mode.
CPPFLAGS="-D_DEBUG" ./configure
/nautilus-follow-symlink/tags/0.8.0
Property changes:
Added: svn:mergeinfo
Merged /nautilus-follow-symlink/branches/0.7.9:r16
Merged /nautilus-follow-symlink/branches/0.6.0:r10
Merged /nautilus-follow-symlink/branches/0.5.2:r4
Merged /nautilus-follow-symlink/branches/0.7.0:r13
Merged /nautilus-follow-symlink/branches/0.8.0:r19
Merged /nautilus-follow-symlink/branches/0.5.2+debian.2:r7