Yasumichi Akahoshi
yasum****@users*****
2005年 3月 31日 (木) 02:34:30 JST
Index: libcxp/src/cxp-handler.c diff -u libcxp/src/cxp-handler.c:1.3 libcxp/src/cxp-handler.c:1.4 --- libcxp/src/cxp-handler.c:1.3 Thu Mar 31 01:38:45 2005 +++ libcxp/src/cxp-handler.c Thu Mar 31 02:34:30 2005 @@ -141,19 +141,24 @@ gchar *suffix = NULL; gchar *cmd = NULL; gchar *fullcmd; + gchar *message; gint index; GtkWidget *dialog; g_return_if_fail (fullpath != NULL); filename = g_path_get_basename (fullpath); - if ((suffix = strstr (filename, ".")) != NULL) + if ((suffix = g_strrstr (filename, ".")) != NULL) { cmd = cxp_profile_get_string (handler->priv->profile, suffix); if (cmd == NULL) { - dialog = cxp_entry_dialog_new (_("Undefined suffix"), - _("input command"), ""); + message = + g_strdup_printf (_ + ("Please input the command that opens the file whose extension is %s"), + suffix); + dialog = cxp_entry_dialog_new (_("Undefined extension"), + message, ""); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) { @@ -167,19 +172,24 @@ } } gtk_widget_destroy (dialog); + g_free (message); } - g_free (suffix); } else { - dialog = cxp_entry_dialog_new (_("Open file"), - _("input command"), ""); + message = + g_strdup_printf (_ + ("Please input the command that opens file %s"), + filename); + dialog = cxp_entry_dialog_new (_("File without extension"), + message, ""); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) { cmd = cxp_entry_dialog_get_entry_text (CXP_ENTRY_DIALOG (dialog)); } gtk_widget_destroy (dialog); + g_free (message); } if (cmd != NULL)