<p></p>
<p><b>@codebrainz</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/2550#discussion_r456729110">src/notebook.c</a>:</p>
<pre style='color:#555'>> @@ -455,6 +455,30 @@ static void on_close_documents_right_activate(GtkMenuItem *menuitem, GeanyDocume
 }
 
 
+static void on_copy_filename_to_clipboard_activate(GtkMenuItem *menuitem, GeanyDocument *doc)
+{
+               g_return_if_fail(doc->is_valid);
+
+               gtk_clipboard_set_text(gtk_clipboard_get(GDK_NONE), g_path_get_basename(doc->real_path), -1);
</pre>
<p>Yep, except it needs to be a pointer (<code>*</code>) to the first character of the sequence of characters that makes up the string. This should probably do (untested):</p>
<div class="highlight highlight-source-c"><pre>gchar *path = g_path_get_base(doc->real_path);
<span class="pl-en">gtk_clipboard_set_text</span>(gtk_clipboard_get(GDK_NONE), path, -1);
<span class="pl-en">g_free</span>(path);</pre></div>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/2550#discussion_r456729110">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ4Y7NL7YYJHDTJRZQLR4DXYDANCNFSM4O6VNGHQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAIOWJ3FVXGY5CPTYR4TVT3R4DXYDA5CNFSM4O6VNGH2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGODLQ7UVQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/2550#discussion_r456729110",
"url": "https://github.com/geany/geany/pull/2550#discussion_r456729110",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>