[glabels/vala] Don't emit response if template not selected.



commit dc315d691fb124199635696ccd8fee25ac0e2be2
Author: Jim Evins <evins snaught com>
Date:   Sat Apr 21 21:55:31 2012 -0400

    Don't emit response if template not selected.

 glabels/new_label_dialog.vala |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/glabels/new_label_dialog.vala b/glabels/new_label_dialog.vala
index 4dd11ea..787402e 100644
--- a/glabels/new_label_dialog.vala
+++ b/glabels/new_label_dialog.vala
@@ -356,8 +356,11 @@ namespace glabels
 
 		private bool on_recent_icon_view_button_release_event( Gdk.EventButton event )
 		{
-			response( Gtk.ResponseType.OK );
-			template_history.changed.disconnect( on_template_history_changed );
+			if ( template_name != null )
+			{
+				response( Gtk.ResponseType.OK );
+				template_history.changed.disconnect( on_template_history_changed );
+			}
 			return true;
 		}
 
@@ -379,7 +382,10 @@ namespace glabels
 
 		private bool on_search_icon_view_button_release_event( Gdk.EventButton event )
 		{
-			response( Gtk.ResponseType.OK );
+			if ( template_name != null )
+			{
+				response( Gtk.ResponseType.OK );
+			}
 			return true;
 		}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]