Merge lp:~mterry/indicator-datetime/727089 into lp:indicator-datetime/0.3

Proposed by Michael Terry
Status: Merged
Merged at revision: 91
Proposed branch: lp:~mterry/indicator-datetime/727089
Merge into: lp:indicator-datetime/0.3
Diff against target: 25 lines (+9/-6)
1 file modified
src/timezone-completion.c (+9/-6)
To merge this branch: bzr merge lp:~mterry/indicator-datetime/727089
Reviewer Review Type Date Requested Status
Indicator Applet Developers Pending
Review via email: mp+55409@code.launchpad.net

Description of the change

Guard entry-specific calls by checking if we even have an entry now. Works around crash in gtk if they are called without an entry.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/timezone-completion.c'
2--- src/timezone-completion.c 2011-03-29 16:18:57 +0000
3+++ src/timezone-completion.c 2011-03-29 19:21:43 +0000
4@@ -79,12 +79,15 @@
5 gtk_entry_completion_set_match_func (GTK_ENTRY_COMPLETION (completion), match_func, NULL, NULL);
6
7 gtk_entry_completion_set_model (GTK_ENTRY_COMPLETION (completion), model);
8- gtk_entry_completion_complete (GTK_ENTRY_COMPLETION (completion));
9-
10- /* By this time, the changed signal has come and gone. We didn't give a
11- model to use, so no popup appeared for user. Poke the entry again to show
12- popup in 300ms. */
13- g_signal_emit_by_name (priv->entry, "changed");
14+
15+ if (priv->entry != NULL) {
16+ gtk_entry_completion_complete (GTK_ENTRY_COMPLETION (completion));
17+
18+ /* By this time, the changed signal has come and gone. We didn't give a
19+ model to use, so no popup appeared for user. Poke the entry again to show
20+ popup in 300ms. */
21+ g_signal_emit_by_name (priv->entry, "changed");
22+ }
23 }
24
25 static gint

Subscribers

People subscribed via source and target branches