[Github-comments] [geany/geany-plugins] Workbench (#598)

LarsGit223 notifications at xxxxx
Fri Aug 18 19:34:41 UTC 2017


LarsGit223 commented on this pull request.



> +	GtkWidget *dialog;
+
+	dialog = gtk_file_chooser_dialog_new(_("Add directory"),
+		GTK_WINDOW(wb_globals.geany_plugin->geany_data->main_widgets->window), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
+		_("_Cancel"), GTK_RESPONSE_CANCEL,
+		_("Add"), GTK_RESPONSE_ACCEPT, NULL);
+	if (project != NULL)
+	{
+		gchar *path;
+
+		/* Set the current folder to the location of the project file */
+		path = wb_project_get_filename(project);
+		if (path != NULL)
+		{
+			path = g_path_get_dirname(path);
+			gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), path);

As I have removed the encoding conversion in the dialogs now, yes. The filename is set with the  filename returned by the file chooser dialog. ```wb_project_get_filename()``` returns that filename (a copy).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/598#discussion_r134039018
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20170818/24229567/attachment.html>


More information about the Github-comments mailing list