gtk-demo: Fix up some warnings
The search entry example was a bit sloppy in cleaning up its sources, causing warnings.
This commit is contained in:
parent
76af907676
commit
2fd984987d
@ -43,8 +43,11 @@ static gboolean
|
|||||||
finish_search (GtkButton *button)
|
finish_search (GtkButton *button)
|
||||||
{
|
{
|
||||||
show_find_button ();
|
show_find_button ();
|
||||||
g_source_remove (search_progress_id);
|
if (search_progress_id)
|
||||||
search_progress_id = 0;
|
{
|
||||||
|
g_source_remove (search_progress_id);
|
||||||
|
search_progress_id = 0;
|
||||||
|
}
|
||||||
return G_SOURCE_REMOVE;
|
return G_SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,7 +74,11 @@ static void
|
|||||||
stop_search (GtkButton *button,
|
stop_search (GtkButton *button,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
g_source_remove (finish_search_id);
|
if (finish_search_id)
|
||||||
|
{
|
||||||
|
g_source_remove (finish_search_id);
|
||||||
|
finish_search_id = 0;
|
||||||
|
}
|
||||||
finish_search (button);
|
finish_search (button);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user