[Github-comments] [geany/geany-plugins] 'Debugger' plugin port to GTK3 with GTK2 compatibility (#791)
Benjamin Gaillard
notifications at xxxxx
Wed Dec 5 11:49:21 UTC 2018
bxgaillard commented on this pull request.
> @@ -1048,12 +1068,24 @@ void debug_init(void)
NULL);
grantpt(pty_master);
unlockpt(pty_master);
+#if GTK_CHECK_VERSION(3, 0, 0)
+ pty = vte_pty_new_foreign_sync(pty_master, NULL, NULL);
+ vte_terminal_set_pty(VTE_TERMINAL(terminal), pty);
+ g_object_unref(pty);
+ scrollbar = gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL, gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(terminal)));
+ gtk_widget_set_can_focus(GTK_WIDGET(scrollbar), FALSE);
+#else
vte_terminal_set_pty(VTE_TERMINAL(terminal), pty_master);
scrollbar = gtk_vscrollbar_new(GTK_ADJUSTMENT(VTE_TERMINAL(terminal)->adjustment));
GTK_WIDGET_UNSET_FLAGS(scrollbar, GTK_CAN_FOCUS);
If you're talking about the use of `gtk_widget_set_can_focus()`, that's right and it's fixed.
The remaining code about PTY initialization seemingly has to be different though.
--
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/791#discussion_r239034448
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20181205/39da4580/attachment.html>
More information about the Github-comments
mailing list