diff options
author | Michael Terry <mike@mterry.name> | 2011-03-29 15:18:55 -0400 |
---|---|---|
committer | Michael Terry <mike@mterry.name> | 2011-03-29 15:18:55 -0400 |
commit | 37106c9e4c1d59285fdc0185ea2f55891d19c4cf (patch) | |
tree | 347a6a96375b152c8eb4beb121969e7612d3fde5 /src | |
parent | 20bbf39bdad31e943d0a292bdf4d73bed6d65928 (diff) | |
download | ayatana-indicator-datetime-37106c9e4c1d59285fdc0185ea2f55891d19c4cf.tar.gz ayatana-indicator-datetime-37106c9e4c1d59285fdc0185ea2f55891d19c4cf.tar.bz2 ayatana-indicator-datetime-37106c9e4c1d59285fdc0185ea2f55891d19c4cf.zip |
don't call complete() unless we have an entry
Diffstat (limited to 'src')
-rw-r--r-- | src/timezone-completion.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/timezone-completion.c b/src/timezone-completion.c index 2e1afc0..1c47bc0 100644 --- a/src/timezone-completion.c +++ b/src/timezone-completion.c @@ -79,12 +79,15 @@ save_and_use_model (TimezoneCompletion * completion, GtkTreeModel * model) gtk_entry_completion_set_match_func (GTK_ENTRY_COMPLETION (completion), match_func, NULL, NULL); gtk_entry_completion_set_model (GTK_ENTRY_COMPLETION (completion), model); - gtk_entry_completion_complete (GTK_ENTRY_COMPLETION (completion)); - /* By this time, the changed signal has come and gone. We didn't give a - model to use, so no popup appeared for user. Poke the entry again to show - popup in 300ms. */ - g_signal_emit_by_name (priv->entry, "changed"); + if (priv->entry != NULL) { + gtk_entry_completion_complete (GTK_ENTRY_COMPLETION (completion)); + + /* By this time, the changed signal has come and gone. We didn't give a + model to use, so no popup appeared for user. Poke the entry again to show + popup in 300ms. */ + g_signal_emit_by_name (priv->entry, "changed"); + } } static gint |