SF.net SVN: geany:[5470] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Tue Dec 7 13:02:47 UTC 2010


Revision: 5470
          http://geany.svn.sourceforge.net/geany/?rev=5470&view=rev
Author:   ntrel
Date:     2010-12-07 13:02:46 +0000 (Tue, 07 Dec 2010)

Log Message:
-----------
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).

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/callbacks.c
    trunk/src/keybindings.c
    trunk/src/main.c
    trunk/src/vte.h

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-12-07 06:25:18 UTC (rev 5469)
+++ trunk/ChangeLog	2010-12-07 13:02:46 UTC (rev 5470)
@@ -1,3 +1,11 @@
+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:

Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c	2010-12-07 06:25:18 UTC (rev 5469)
+++ trunk/src/callbacks.c	2010-12-07 13:02:46 UTC (rev 5470)
@@ -2168,7 +2168,7 @@
                                         gpointer         user_data)
 {
 #ifdef HAVE_VTE
-	if (vte_info.load_vte)
+	if (vte_info.have_vte)
 		vte_send_selection_to_vte();
 #endif
 }

Modified: trunk/src/keybindings.c
===================================================================
--- trunk/src/keybindings.c	2010-12-07 06:25:18 UTC (rev 5469)
+++ trunk/src/keybindings.c	2010-12-07 13:02:46 UTC (rev 5470)
@@ -2445,7 +2445,7 @@
 	}
 	/* 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;

Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c	2010-12-07 06:25:18 UTC (rev 5469)
+++ trunk/src/main.c	2010-12-07 13:02:46 UTC (rev 5470)
@@ -213,7 +213,7 @@
 	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"));

Modified: trunk/src/vte.h
===================================================================
--- trunk/src/vte.h	2010-12-07 06:25:18 UTC (rev 5469)
+++ trunk/src/vte.h	2010-12-07 13:02:46 UTC (rev 5470)
@@ -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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list