From 925061642bf4bc7ced3333d3bea7209f6d3beadd Mon Sep 17 00:00:00 2001 From: Toni Corvera Date: Tue, 24 Oct 2006 21:07:09 +0000 Subject: [PATCH] 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 --- ChangeLog | 4 ++++ configure.in | 2 +- debian/changelog | 6 ++++++ dist | 1 + po/ca.po | 32 +++++++++++++++++-------------- po/es.po | 34 ++++++++++++++++++--------------- src/follow-symlink.c | 45 ++++++++++++++++++++++++++++---------------- src/follow-symlink.h | 2 +- 8 files changed, 79 insertions(+), 47 deletions(-) diff --git a/ChangeLog b/ChangeLog index 35ecb49..0430363 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ Iterim milestones These private versions, the version numbering bumps just denote 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): * Added support for background items (context menu on opened symlinks) * BUGFIX: Corrected translation typos diff --git a/configure.in b/configure.in index e4a705c..d8aed15 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ 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) dnl default FLAGS diff --git a/debian/changelog b/debian/changelog index 10042e9..9f84514 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +nautilus-follow-symlink (0.7.9-out.1) unstable; urgency=low + + * New upstream release + + -- Toni Corvera Tue, 24 Oct 2006 23:00:48 +0200 + nautilus-follow-symlink (0.7.0-out.1) unstable; urgency=low * New upstream release diff --git a/dist b/dist index f963b38..20e3a5a 100755 --- a/dist +++ b/dist @@ -28,6 +28,7 @@ clean: 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 diff --git a/po/ca.po b/po/ca.po index ec81268..c431e32 100644 --- a/po/ca.po +++ b/po/ca.po @@ -7,26 +7,30 @@ msgid "" msgstr "" "Project-Id-Version: libnautilus-follow-symlink\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-10-24 21:27+0200\n" -"PO-Revision-Date: 2006-10-24 19:37+0200\n" +"POT-Creation-Date: 2006-10-24 22:55+0200\n" +"PO-Revision-Date: 2006-10-24 22:59+0200\n" "Last-Translator: Toni Corvera \n" "Language-Team: Catalan \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../src/follow-symlink.c:156 -msgid "Follow symbolic _link" -msgstr "Segueix l'en_llaç simbòlic" - -#: ../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:159 +#, c-format +msgid "Follow symbolic _link '%s'" +msgstr "Segueix l'en_llaç simbòlic '%s'" #: ../src/follow-symlink.c:160 -msgid "Open real path" -msgstr "Obre la ruta real" +#, 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:161 -msgid "Open the real path of the folder pointed by this symbolic link" -msgstr "Obre el directori apuntat per aquest enllaç" +#: ../src/follow-symlink.c:169 +#, c-format +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'" diff --git a/po/es.po b/po/es.po index b8e3277..e1abdcc 100644 --- a/po/es.po +++ b/po/es.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: libnautilus-follow-symlink\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-10-24 21:27+0200\n" -"PO-Revision-Date: 2006-10-24 19:09+0200\n" +"POT-Creation-Date: 2006-10-24 22:55+0200\n" +"PO-Revision-Date: 2006-10-24 23:00+0200\n" "Last-Translator: Toni Corvera \n" "Language-Team: Spanish \n" "MIME-Version: 1.0\n" @@ -17,19 +17,23 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ../src/follow-symlink.c:156 -msgid "Follow symbolic _link" -msgstr "Seguir en_lace simbólico" - -#: ../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:159 +#, c-format +msgid "Follow symbolic _link '%s'" +msgstr "Seguir en_lace simbólico '%s'" #: ../src/follow-symlink.c:160 -msgid "Open real path" -msgstr "Abrir la ruta real" +#, 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:161 -msgid "Open the real path of the folder pointed by this symbolic link" -msgstr "Abrir el directoro apuntado por éste enlace simbólico" +#: ../src/follow-symlink.c:169 +#, c-format +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'" diff --git a/src/follow-symlink.c b/src/follow-symlink.c index 589557c..5f911ad 100644 --- a/src/follow-symlink.c +++ b/src/follow-symlink.c @@ -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), file_info); @@ -117,14 +119,9 @@ void fsl_callback (NautilusMenuItem * item, NautilusFileInfo * file_info) g_assert( FALSE ); } - const gchar const * BASE_CMD = "nautilus --no-desktop --no-default-window \""; - gchar * command_line = g_malloc( sizeof(gchar) * ( strlen(BASE_CMD) + strlen(target) + 2 ) ); - - 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, "\""); + 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 ); @@ -144,26 +141,42 @@ void fsl_callback (NautilusMenuItem * item, NautilusFileInfo * file_info) /* Create the new menu item */ 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(); NautilusMenuItem *ret; - const char *name; - const char *tooltip; + + char * name; + char * tooltip; if (is_file_item) { - name = _("Follow symbolic _link"); - tooltip = _("Open the directory pointed by the currently selected symbolic link"); + 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 { - name = _("Open real path"); - tooltip = _("Open the real path of the folder pointed by this symbolic link"); + 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); } // (name, label, tip, icon) ret = nautilus_menu_item_new("FsymlinkExtension::follow_symlink", name, tooltip, NULL); + g_free(name); + g_free(tooltip); + //g_object_set_data(G_OBJECT(ret), "FsymlinkExtension::screen", screen); return ret; } diff --git a/src/follow-symlink.h b/src/follow-symlink.h index 5ec3056..3612041 100644 --- a/src/follow-symlink.h +++ b/src/follow-symlink.h @@ -26,7 +26,7 @@ static GList * fsl_get_background_items(NautilusMenuProvider *, GtkWidget *, Nau 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 * Here the namespace is a bit more explicit just in case