Commit 5cd1716a authored by Julian Sparber's avatar Julian Sparber

[fix] update download path inside teleport when gsettings changes #5

parent 426307b1
......@@ -14,7 +14,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <>.
#include <gtk/gtk.h>
......@@ -62,6 +62,16 @@ change_download_directory_cb (GtkWidget *widget,
static void
update_download_directory (GSettings *settings,
gchar *key,
gpointer *data) {
if (g_strcmp0 (key, "download-dir") == 0) {
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (data),
g_settings_get_string(settings, key));
static void
on_click_this_device_settings_button (GtkWidget *widget,
gpointer user_data) {
......@@ -114,22 +124,13 @@ teleport_window_init (TeleportWindow *win)
priv->this_device_name_label, "label",
/*gtk_label_set_text (GTK_LABEL (priv->this_device_name_label),
g_settings_get_string (priv->settings, "device-name"));
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (downloadDir),
g_signal_connect (downloadDir, "file-set", G_CALLBACK (change_download_directory_cb), priv->settings);
/*g_settings_bind (priv->settings, "download-dir",
GTK_FILE_CHOOSER (downloadDir), "current-folder",
g_signal_connect (priv->settings, "changed", G_CALLBACK (update_download_directory), downloadDir);
//g_object_unref (menu);
//g_object_unref (label);
g_object_unref (builder);
/* Add popover for device settings */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment