Kaydet (Commit) d65d3adc authored tarafından Nick Treleaven's avatar Nick Treleaven

Fix segfaults when using 'Send Selection to Terminal' and the VTE

is not loaded, and when using Ctrl-A after enabling the 'Load VTE'
pref (patch by Dimitar Zhekov, thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5470 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 6d464cbe
2010-12-07 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/keybindings.c, src/callbacks.c, src/vte.h, src/main.c:
Fix segfaults when using 'Send Selection to Terminal' and the VTE
is not loaded, and when using Ctrl-A after enabling the 'Load VTE'
pref (patch by Dimitar Zhekov, thanks).
2010-12-06 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/document.c:
......
......@@ -2168,7 +2168,7 @@ on_send_selection_to_vte1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
#ifdef HAVE_VTE
if (vte_info.load_vte)
if (vte_info.have_vte)
vte_send_selection_to_vte();
#endif
}
......
......@@ -2445,7 +2445,7 @@ static gboolean cb_func_select_action(guint key_id)
}
/* special case for Select All in the VTE widget */
#ifdef HAVE_VTE
else if (key_id == GEANY_KEYS_SELECT_ALL && vte_info.load_vte && focusw == vc->vte)
else if (key_id == GEANY_KEYS_SELECT_ALL && vte_info.have_vte && focusw == vc->vte)
{
vte_select_all();
return TRUE;
......
......@@ -213,7 +213,7 @@ static void apply_settings(void)
gtk_notebook_set_show_tabs(GTK_NOTEBOOK(main_widgets.notebook), interface_prefs.show_notebook_tabs);
#ifdef HAVE_VTE
if (! vte_info.load_vte)
if (! vte_info.have_vte)
gtk_widget_hide(ui_lookup_widget(main_widgets.window, "send_selection_to_vte1"));
#else
gtk_widget_hide(ui_lookup_widget(main_widgets.window, "send_selection_to_vte1"));
......
......@@ -30,8 +30,8 @@
typedef struct
{
gboolean load_vte;
gboolean have_vte;
gboolean load_vte; /* this is the preference, NOT the current instance VTE state */
gboolean have_vte; /* use this field to check if the current instance has VTE */
gchar *lib_vte;
gchar *dir;
} VteInfo;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment