From db4b0c198b6b338dfb447a3321c8033488134b1c Mon Sep 17 00:00:00 2001 From: Leonardo Robol Date: Wed, 5 Sep 2012 22:20:02 +0200 Subject: Added a check in trg_update_torrents_timerfunc to make sure that the TrgMainWindow* object passed as data has not been freed. --- src/trg-main-window.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/trg-main-window.c b/src/trg-main-window.c index 28b91a0..914d061 100644 --- a/src/trg-main-window.c +++ b/src/trg-main-window.c @@ -1357,6 +1357,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; -- cgit v1.2.3 From 4fc20871927c10f63b4b6d650549ba3007ab5373 Mon Sep 17 00:00:00 2001 From: Leonardo Robol Date: Wed, 5 Sep 2012 22:20:53 +0200 Subject: Added SHADOW_TYPE_ETCHED_IN to the ScrolledWindow. --- src/util.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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; } -- cgit v1.2.3 From c810a1e074736711bb70ed3b2910ef0147541899 Mon Sep 17 00:00:00 2001 From: Leonardo Robol Date: Fri, 7 Sep 2012 22:06:42 +0200 Subject: Use g_application_quit to exit the GtkApplication. --- src/trg-main-window.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/trg-main-window.c b/src/trg-main-window.c index 914d061..6189fb7 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) -- cgit v1.2.3