diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2012-09-08 09:24:34 +0100 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2012-09-08 09:24:34 +0100 |
commit | 6b9bee080168767bb3c4e06a8a7787a9dd0b5827 (patch) | |
tree | 015e024b0d048d8e2df7369b7b6c8208e6d9d1a1 /src | |
parent | 7d2a23ceac44de3f306a9fa7818c0ba0c11bb077 (diff) | |
parent | c810a1e074736711bb70ed3b2910ef0147541899 (diff) |
Merge branch 'master' of https://code.google.com/r/leorobol-transmission-remote-gtk. Improvements contributed by Leonardo Robol, fix a crash during GTK3 application quit and use SHADOW_TYPE_ETCHED_IN on ScrolledWindow.
Diffstat (limited to 'src')
-rw-r--r-- | src/trg-main-window.c | 9 | ||||
-rw-r--r-- | src/util.c | 2 |
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; @@ -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; } |