Retro-fitted branch 0.7.9

git-svn-id: https://svn.outlyer.net/svn/pub/nautilus-follow-symlink/branches/0.7.9@16 da2faf11-d50b-4b07-92cd-6070d1bd8887
This commit is contained in:
Toni Corvera 2006-10-24 21:07:09 +00:00
parent dc7a1207aa
commit 925061642b
8 changed files with 79 additions and 47 deletions

View File

@ -2,6 +2,10 @@ Iterim milestones
These private versions, the version numbering bumps just denote These private versions, the version numbering bumps just denote
that a development milestone is achieved that a development milestone is achieved
0.7.9 (24 oct 2006):
* Show the symbolic link's name (unresolved) in context menu and
description
0.7.0 (24 oct 2006): 0.7.0 (24 oct 2006):
* Added support for background items (context menu on opened symlinks) * Added support for background items (context menu on opened symlinks)
* BUGFIX: Corrected translation typos * BUGFIX: Corrected translation typos

View File

@ -1,6 +1,6 @@
AC_INIT(src/follow-symlink.c) AC_INIT(src/follow-symlink.c)
AM_INIT_AUTOMAKE(libnautilus-follow-symlink, "0.7.0") AM_INIT_AUTOMAKE(libnautilus-follow-symlink, "0.7.9")
AC_CONFIG_HEADER(src/config.h) AC_CONFIG_HEADER(src/config.h)
dnl default FLAGS dnl default FLAGS

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
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 nautilus-follow-symlink (0.7.0-out.1) unstable; urgency=low
* New upstream release * New upstream release

1
dist
View File

@ -28,6 +28,7 @@ clean:
rm -f aclocal.m4 rm -f aclocal.m4
rm -f configure Makefile Makefile.in src/Makefile src/Makefile.in rm -f configure Makefile Makefile.in src/Makefile src/Makefile.in
rm -f po/*.gmo po/Makefile po/Makefile.in po/POTFILES 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) # The following are moved thanks to Makefile.am (var DISTCLEANFILES)
# (kept for situations in which make distclean fails) # (kept for situations in which make distclean fails)
# Undo libtoolize # Undo libtoolize

View File

@ -7,26 +7,30 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: libnautilus-follow-symlink\n" "Project-Id-Version: libnautilus-follow-symlink\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-10-24 21:27+0200\n" "POT-Creation-Date: 2006-10-24 22:55+0200\n"
"PO-Revision-Date: 2006-10-24 19:37+0200\n" "PO-Revision-Date: 2006-10-24 22:59+0200\n"
"Last-Translator: Toni Corvera <outlyer@outlyer.net>\n" "Last-Translator: Toni Corvera <outlyer@outlyer.net>\n"
"Language-Team: Catalan <outlyer@outlyer.net>\n" "Language-Team: Catalan <outlyer@outlyer.net>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: ../src/follow-symlink.c:156 #: ../src/follow-symlink.c:159
msgid "Follow symbolic _link" #, c-format
msgstr "Segueix l'en_llaç simbòlic" msgid "Follow symbolic _link '%s'"
msgstr "Segueix l'en_llaç simbòlic '%s'"
#: ../src/follow-symlink.c:157
msgid "Open the directory pointed by the currently selected symbolic link"
msgstr "Obre el directori apuntat per l'enllaç simbòlic seleccionat"
#: ../src/follow-symlink.c:160 #: ../src/follow-symlink.c:160
msgid "Open real path" #, c-format
msgstr "Obre la ruta real" 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:161 #: ../src/follow-symlink.c:169
msgid "Open the real path of the folder pointed by this symbolic link" #, c-format
msgstr "Obre el directori apuntat per aquest enllaç" msgid "Open real path of '%s'"
msgstr "Obre la ruta real de '%s'"
#: ../src/follow-symlink.c:170
#, c-format
msgid "Open the real path of the folder pointed by '%s'"
msgstr "Obre el directori apuntat per '%s'"

View File

@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: libnautilus-follow-symlink\n" "Project-Id-Version: libnautilus-follow-symlink\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-10-24 21:27+0200\n" "POT-Creation-Date: 2006-10-24 22:55+0200\n"
"PO-Revision-Date: 2006-10-24 19:09+0200\n" "PO-Revision-Date: 2006-10-24 23:00+0200\n"
"Last-Translator: Toni Corvera <outlyer@outlyer.net>\n" "Last-Translator: Toni Corvera <outlyer@outlyer.net>\n"
"Language-Team: Spanish <outlyer@outlyer.net>\n" "Language-Team: Spanish <outlyer@outlyer.net>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -17,19 +17,23 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../src/follow-symlink.c:156 #: ../src/follow-symlink.c:159
msgid "Follow symbolic _link" #, c-format
msgstr "Seguir en_lace simbólico" msgid "Follow symbolic _link '%s'"
msgstr "Seguir en_lace simbólico '%s'"
#: ../src/follow-symlink.c:157
msgid "Open the directory pointed by the currently selected symbolic link"
msgstr ""
"Abrir el directorio apuntado por el enlace simbólico seleccionado actualmente"
#: ../src/follow-symlink.c:160 #: ../src/follow-symlink.c:160
msgid "Open real path" #, c-format
msgstr "Abrir la ruta real" 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:161 #: ../src/follow-symlink.c:169
msgid "Open the real path of the folder pointed by this symbolic link" #, c-format
msgstr "Abrir el directoro apuntado por éste enlace simbólico" msgid "Open real path of '%s'"
msgstr "Abrir la ruta real de '%s'"
#: ../src/follow-symlink.c:170
#, c-format
msgid "Open the real path of the folder pointed by '%s'"
msgstr "Abrir el directoro apuntado por '%s'"

View File

@ -50,7 +50,9 @@ GList * fsl_get_items_impl(GtkWidget * window,
} }
} }
item = fsl_menu_item_new(gtk_widget_get_screen(window), is_file_item); 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), g_signal_connect(item, "activate", G_CALLBACK(fsl_callback),
file_info); file_info);
@ -117,14 +119,9 @@ void fsl_callback (NautilusMenuItem * item, NautilusFileInfo * file_info)
g_assert( FALSE ); g_assert( FALSE );
} }
const gchar const * BASE_CMD = "nautilus --no-desktop --no-default-window \""; const gchar const * BASE_CMD = "nautilus --no-desktop --no-default-window '%s'";
gchar * command_line = g_malloc( sizeof(gchar) * ( strlen(BASE_CMD) + strlen(target) + 2 ) ); gchar * command_line = g_malloc( sizeof(gchar) * ( strlen(BASE_CMD) + strlen(target) + 1 ) );
g_sprintf(command_line, BASE_CMD, target);
gchar * offset = g_stpcpy(command_line, BASE_CMD);
//offset = g_stpcpy(offset, "file://"); // unneeded; also makes nautilus think it may be incorrect
// if it contains spaces (instead of %20's)
offset = g_stpcpy(offset, target);
g_stpcpy(offset, "\"");
if (FALSE == g_shell_parse_argv(command_line, NULL, &argv, NULL)) { if (FALSE == g_shell_parse_argv(command_line, NULL, &argv, NULL)) {
g_assert( FALSE ); g_assert( FALSE );
@ -144,26 +141,42 @@ void fsl_callback (NautilusMenuItem * item, NautilusFileInfo * file_info)
/* Create the new menu item */ /* Create the new menu item */
NautilusMenuItem * NautilusMenuItem *
fsl_menu_item_new(GdkScreen *screen, gboolean is_file_item) fsl_menu_item_new(GdkScreen *screen, gboolean is_file_item, const gchar * base_name)
{ {
TRACE(); TRACE();
NautilusMenuItem *ret; NautilusMenuItem *ret;
const char *name;
const char *tooltip; char * name;
char * tooltip;
if (is_file_item) { if (is_file_item) {
name = _("Follow symbolic _link"); const gchar * fmt_name = _("Follow symbolic _link '%s'");
tooltip = _("Open the directory pointed by the currently selected symbolic link"); 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 { else {
name = _("Open real path"); const gchar * fmt_name = _("Open real path of '%s'");
tooltip = _("Open the real path of the folder pointed by this symbolic link"); 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);
} }
// (name, label, tip, icon) // (name, label, tip, icon)
ret = nautilus_menu_item_new("FsymlinkExtension::follow_symlink", ret = nautilus_menu_item_new("FsymlinkExtension::follow_symlink",
name, tooltip, NULL); name, tooltip, NULL);
g_free(name);
g_free(tooltip);
//g_object_set_data(G_OBJECT(ret), "FsymlinkExtension::screen", screen); //g_object_set_data(G_OBJECT(ret), "FsymlinkExtension::screen", screen);
return ret; return ret;
} }

View File

@ -26,7 +26,7 @@ static GList * fsl_get_background_items(NautilusMenuProvider *, GtkWidget *, Nau
static GList * fsl_get_items_impl(GtkWidget *, NautilusFileInfo *, gboolean); static GList * fsl_get_items_impl(GtkWidget *, NautilusFileInfo *, gboolean);
static NautilusMenuItem * fsl_menu_item_new(GdkScreen *, gboolean); static NautilusMenuItem * fsl_menu_item_new(GdkScreen *, gboolean, const gchar *);
/* Exported Prototypes /* Exported Prototypes
* Here the namespace is a bit more explicit just in case * Here the namespace is a bit more explicit just in case