mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
(gtk) #5271 'once we start shutting down the application, stop updating the Action states': fixed
This commit is contained in:
15
gtk/main.c
15
gtk/main.c
@@ -73,6 +73,7 @@ struct cbdata
|
||||
char * config_dir;
|
||||
gboolean start_paused;
|
||||
gboolean is_iconified;
|
||||
gboolean is_closing;
|
||||
|
||||
guint activation_count;
|
||||
guint timer;
|
||||
@@ -87,7 +88,6 @@ struct cbdata
|
||||
GSList * duplicates_list;
|
||||
GSList * details;
|
||||
GtkTreeSelection * sel;
|
||||
gpointer quit_dialog;
|
||||
};
|
||||
|
||||
static void
|
||||
@@ -275,7 +275,7 @@ refresh_actions_soon (gpointer gdata)
|
||||
{
|
||||
struct cbdata * data = gdata;
|
||||
|
||||
if (data->refresh_actions_tag == 0)
|
||||
if (!data->is_closing && !data->refresh_actions_tag)
|
||||
data->refresh_actions_tag = gdk_threads_add_idle (refresh_actions, data);
|
||||
}
|
||||
|
||||
@@ -916,9 +916,11 @@ static void
|
||||
on_app_exit (gpointer vdata)
|
||||
{
|
||||
GtkWidget *r, *p, *b, *w, *c;
|
||||
struct cbdata *cbdata = vdata;
|
||||
struct cbdata * cbdata = vdata;
|
||||
struct session_close_struct * session_close_data;
|
||||
|
||||
cbdata->is_closing = true;
|
||||
|
||||
/* stop the update timer */
|
||||
if (cbdata->timer)
|
||||
{
|
||||
@@ -926,6 +928,13 @@ on_app_exit (gpointer vdata)
|
||||
cbdata->timer = 0;
|
||||
}
|
||||
|
||||
/* stop the refresh-actions timer */
|
||||
if (cbdata->refresh_actions_tag)
|
||||
{
|
||||
g_source_remove (cbdata->refresh_actions_tag);
|
||||
cbdata->refresh_actions_tag = 0;
|
||||
}
|
||||
|
||||
c = GTK_WIDGET (cbdata->wind);
|
||||
gtk_container_remove (GTK_CONTAINER (c), gtk_bin_get_child (GTK_BIN (c)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user