summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/trg-main-window.c9
-rw-r--r--src/util.c2
2 files changed, 11 insertions, 0 deletions
diff --git a/src/trg-main-window.c b/src/trg-main-window.c
index 036c81c..acdef89 100644
--- a/src/trg-main-window.c
+++ b/src/trg-main-window.c
@@ -421,7 +421,11 @@ destroy_window(TrgMainWindow * win, gpointer data G_GNUC_UNUSED)
TRG_TREE_VIEW_PERSIST_LAYOUT);
trg_prefs_save(prefs);
+#if ! GTK_CHECK_VERSION( 3, 0, 0 )
gtk_main_quit();
+#else
+ g_application_quit (g_application_get_default ());
+#endif
}
static void open_props_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win)
@@ -1358,6 +1362,11 @@ static gboolean trg_session_update_timerfunc(gpointer data)
static gboolean trg_update_torrents_timerfunc(gpointer data)
{
+ /* Check if the TrgMainWindow* has already been destroyed
+ * and, in that case, stop polling the server. */
+ if (!TRG_IS_MAIN_WINDOW (data))
+ return FALSE;
+
TrgMainWindow *win = TRG_MAIN_WINDOW(data);
TrgMainWindowPrivate *priv = win->priv;
TrgClient *tc = priv->client;
diff --git a/src/util.c b/src/util.c
index daeac53..a118025 100644
--- a/src/util.c
+++ b/src/util.c
@@ -305,6 +305,8 @@ GtkWidget *my_scrolledwin_new(GtkWidget * child)
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_win),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(scrolled_win),
+ GTK_SHADOW_ETCHED_IN);
gtk_container_add(GTK_CONTAINER(scrolled_win), child);
return scrolled_win;
}