[glabels/vala] Don't process non-existant templates.
- From: Jim Evins <jimevins src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glabels/vala] Don't process non-existant templates.
- Date: Fri, 14 Sep 2012 01:53:27 +0000 (UTC)
commit ea2afd2fb4f0034144eb3e5008d6370085dd2293
Author: Jim Evins <evins snaught com>
Date: Thu Sep 13 21:52:30 2012 -0400
Don't process non-existant templates.
glabels/new_label_dialog.vala | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/glabels/new_label_dialog.vala b/glabels/new_label_dialog.vala
index 588f957..8db64da 100644
--- a/glabels/new_label_dialog.vala
+++ b/glabels/new_label_dialog.vala
@@ -223,18 +223,21 @@ namespace glabels
{
libglabels.Template template = libglabels.Db.lookup_template_from_name( name );
- Gtk.TreeIter iter;
- recent_model.append( out iter );
+ if ( template != null )
+ {
+ Gtk.TreeIter iter;
+ recent_model.append( out iter );
- string tooltip = build_tooltip( template );
+ string tooltip = build_tooltip( template );
- recent_model.set( iter,
- 0, template.name,
- 1, template.preview_pixbuf,
- 2, tooltip,
- -1);
+ recent_model.set( iter,
+ 0, template.name,
+ 1, template.preview_pixbuf,
+ 2, tooltip,
+ -1);
- recent_info_bar.hide();
+ recent_info_bar.hide();
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]