1 diff -Naur gwget-1.0.4.orig/configure.ac gwget-1.0.4/configure.ac
2 --- gwget-1.0.4.orig/configure.ac 2018-09-02 09:37:59.856756000 +0200
3 +++ gwget-1.0.4/configure.ac 2018-09-02 09:43:52.956200139 +0200
5 AM_INIT_AUTOMAKE(gwget, 1.0.4)
6 AM_CONFIG_HEADER(config.h)
8 -AC_PATH_PROG(GCONFTOOL, gconftool-2)
10 IT_PROG_INTLTOOL([0.35.0])
20 [AC_HELP_STRING([--enable-gtk3],
21 [compile gwget against gtk+ 3.0 (default: yes)])],
26 -GCONF_REQUIRED=1.1.11
27 DBUS_GLIB_REQUIRED=0.33
30 PKG_CHECK_MODULES(GNOME, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
33 gio-unix-2.0 >= $GIO_REQUIRED)
35 diff -Naur gwget-1.0.4.orig/data/gwget.schemas.in gwget-1.0.4/data/gwget.schemas.in
36 --- gwget-1.0.4.orig/data/gwget.schemas.in 2009-06-16 19:58:06.000000000 +0200
37 +++ gwget-1.0.4/data/gwget.schemas.in 1970-01-01 01:00:00.000000000 +0100
43 - <key>/schemas/apps/gwget2/convert_links</key>
44 - <applyto>/apps/gwget2/convert_links</applyto>
45 - <owner>gwget</owner>
47 - <default>false</default>
49 - <short>Convert Links</short>
50 - <long>Convert to relative links in recursive mode.</long>
55 - <key>/schemas/apps/gwget2/default_height</key>
56 - <applyto>/apps/gwget2/default_height</applyto>
57 - <owner>gwget</owner>
59 - <default>200</default>
67 - <key>/schemas/apps/gwget2/default_width</key>
68 - <applyto>/apps/gwget2/default_width</applyto>
69 - <owner>gwget</owner>
71 - <default>250</default>
79 - <key>/schemas/apps/gwget2/dl_page_requisites</key>
80 - <applyto>/apps/gwget2/dl_page_requisites</applyto>
81 - <owner>gwget</owner>
83 - <default>false</default>
85 - <short>Download Page Requisites</short>
91 - <key>/schemas/apps/gwget2/download_dir</key>
92 - <applyto>/apps/gwget2/download_dir</applyto>
93 - <owner>gwget</owner>
97 - <short>Default Download Directory</short>
103 - <key>/schemas/apps/gwget2/ask_save_each_dl</key>
104 - <applyto>/apps/gwget2/ask_save_each_dl</applyto>
105 - <owner>gwget</owner>
107 - <default>true</default>
109 - <short>Ask where to save each new download</short>
110 - <long>If true, always ask for a destination folder when starting a new download. If false, always save in the default directory without asking the user.</long>
116 - <key>/schemas/apps/gwget2/follow_relative</key>
117 - <applyto>/apps/gwget2/follow_relative</applyto>
118 - <owner>gwget</owner>
120 - <default>false</default>
122 - <short>Follow relative links</short>
128 - <key>/schemas/apps/gwget2/limit_speed</key>
129 - <applyto>/apps/gwget2/limit_speed</applyto>
130 - <owner>gwget</owner>
132 - <default>false</default>
134 - <short>Limit maximum speed</short>
140 - <key>/schemas/apps/gwget2/limit_simultaneousdownloads</key>
141 - <applyto>/apps/gwget2/limit_simultaneousdownloads</applyto>
142 - <owner>gwget</owner>
144 - <default>false</default>
146 - <short>Limit number of simultaneous downloads</short>
152 - <key>/schemas/apps/gwget2/max_depth</key>
153 - <applyto>/apps/gwget2/max_depth</applyto>
154 - <owner>gwget</owner>
156 - <default>0</default>
158 - <short>Maximum depth in recursive mode</short>
164 - <key>/schemas/apps/gwget2/max_speed</key>
165 - <applyto>/apps/gwget2/max_speed</applyto>
166 - <owner>gwget</owner>
168 - <default>0</default>
170 - <short>Maximum speed limit</short>
176 - <key>/schemas/apps/gwget2/max_simultaneousdownloads</key>
177 - <applyto>/apps/gwget2/max_simultaneousdownloads</applyto>
178 - <owner>gwget</owner>
180 - <default>0</default>
182 - <short>Maximum number of simultaneous downloads</short>
188 - <key>/schemas/apps/gwget2/n_downloads</key>
189 - <applyto>/apps/gwget2/n_downloads</applyto>
190 - <owner>gwget</owner>
192 - <default>0</default>
194 - <short>Number of downloads</short>
200 - <key>/schemas/apps/gwget2/no_create_directories</key>
201 - <applyto>/apps/gwget2/no_create_directories</applyto>
202 - <owner>gwget</owner>
204 - <default>false</default>
212 - <key>/schemas/apps/gwget2/num_retrys</key>
213 - <applyto>/apps/gwget2/num_retrys</applyto>
214 - <owner>gwget</owner>
216 - <default>3</default>
218 - <short>Number of retries</short>
224 - <key>/schemas/apps/gwget2/position_x</key>
225 - <applyto>/apps/gwget2/position_x</applyto>
226 - <owner>gwget</owner>
228 - <default>0</default>
236 - <key>/schemas/apps/gwget2/position_y</key>
237 - <applyto>/apps/gwget2/position_y</applyto>
238 - <owner>gwget</owner>
240 - <default>0</default>
248 - <key>/schemas/apps/gwget2/resume_at_start</key>
249 - <applyto>/apps/gwget2/resume_at_start</applyto>
250 - <owner>gwget</owner>
252 - <default>false</default>
254 - <short>Resume downloads at startup</short>
260 - <key>/schemas/apps/gwget2/open_after_dl</key>
261 - <applyto>/apps/gwget2/open_after_dl</applyto>
262 - <owner>gwget</owner>
264 - <default>false</default>
266 - <short>Open the file after download</short>
272 - <key>/schemas/apps/gwget2/view_actual_size</key>
273 - <applyto>/apps/gwget2/view_actual_size</applyto>
274 - <owner>gwget</owner>
276 - <default>true</default>
284 - <key>/schemas/apps/gwget2/view_down_speed</key>
285 - <applyto>/apps/gwget2/view_down_speed</applyto>
286 - <owner>gwget</owner>
288 - <default>true</default>
290 - <short>View download speed column</short>
296 - <key>/schemas/apps/gwget2/view_elapse_time</key>
297 - <applyto>/apps/gwget2/view_elapse_time</applyto>
298 - <owner>gwget</owner>
300 - <default>false</default>
302 - <short>View elapsed time column</short>
308 - <key>/schemas/apps/gwget2/view_percentage</key>
309 - <applyto>/apps/gwget2/view_percentage</applyto>
310 - <owner>gwget</owner>
312 - <default>true</default>
314 - <short>View percentage column</short>
320 - <key>/schemas/apps/gwget2/view_rem_time</key>
321 - <applyto>/apps/gwget2/view_rem_time</applyto>
322 - <owner>gwget</owner>
324 - <default>true</default>
326 - <short>View remaining time column</short>
332 - <key>/schemas/apps/gwget2/view_toolbar</key>
333 - <applyto>/apps/gwget2/view_toolbar</applyto>
334 - <owner>gwget</owner>
336 - <default>true</default>
338 - <short>View toolbar</short>
339 - <long>Whether to display the toolbar.</long>
344 - <key>/schemas/apps/gwget2/view_statusbar</key>
345 - <applyto>/apps/gwget2/view_statusbar</applyto>
346 - <owner>gwget</owner>
348 - <default>true</default>
350 - <short>View statusbar</short>
351 - <long>Whether to display the statusbar.</long>
356 - <key>/schemas/apps/gwget2/view_total_size</key>
357 - <applyto>/apps/gwget2/view_total_size</applyto>
358 - <owner>gwget</owner>
360 - <default>true</default>
362 - <short>View total size column</short>
368 - <key>/schemas/apps/gwget2/network_mode</key>
369 - <applyto>/apps/gwget2/network_mode</applyto>
370 - <owner>gwget</owner>
371 - <type>string</type>
372 - <default>direct</default>
380 - <key>/schemas/apps/gwget2/http_proxy</key>
381 - <applyto>/apps/gwget2/http_proxy</applyto>
382 - <owner>gwget</owner>
383 - <type>string</type>
384 - <default></default>
392 - <key>/schemas/apps/gwget2/http_proxy_port</key>
393 - <applyto>/apps/gwget2/http_proxy_port</applyto>
394 - <owner>gwget</owner>
396 - <default>8080</default>
404 - <key>/schemas/apps/gwget2/proxy_uses_auth</key>
405 - <applyto>/apps/gwget2/proxy_uses_auth</applyto>
406 - <owner>gwget</owner>
408 - <default>false</default>
416 - <key>/schemas/apps/gwget2/proxy_user</key>
417 - <applyto>/apps/gwget2/proxy_user</applyto>
418 - <owner>gwget</owner>
419 - <type>string</type>
420 - <default></default>
428 - <key>/schemas/apps/gwget2/proxy_password</key>
429 - <applyto>/apps/gwget2/proxy_password</applyto>
430 - <owner>gwget</owner>
431 - <type>string</type>
432 - <default></default>
441 diff -Naur gwget-1.0.4.orig/data/Makefile.am gwget-1.0.4/data/Makefile.am
442 --- gwget-1.0.4.orig/data/Makefile.am 2009-08-14 19:55:48.000000000 +0200
443 +++ gwget-1.0.4/data/Makefile.am 2018-09-02 09:46:22.127182302 +0200
445 $(service_DATA): $(service_in_files) Makefile
446 @sed -e "s|\@bindir\@|$(bindir)|" $< > $@
448 -schemasdir = $(GCONF_SCHEMA_FILE_DIR)
449 -schemas_in_files = gwget.schemas.in
450 -schemas_DATA = $(schemas_in_files:.schemas.in=.schemas)
451 -@INTLTOOL_SCHEMAS_RULE@
452 +gsettings_SCHEMAS = org.gwget.gschema.xml
455 desktopdir = $(datadir)/applications
456 desktop_in_files = gwget.desktop.in.in
459 @INTLTOOL_DESKTOP_RULE@
461 -if GCONF_SCHEMAS_INSTALL
463 - GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule gwget.schemas
468 EXTRA_DIST = $(gwget_data_DATA) \
469 $(service_in_files) \
470 $(desktop_in_files) \
471 - $(schemas_in_files)
472 + $(gsettings_SCHEMAS)
476 diff -Naur gwget-1.0.4.orig/data/org.gwget.gschema.xml gwget-1.0.4/data/org.gwget.gschema.xml
477 --- gwget-1.0.4.orig/data/org.gwget.gschema.xml 1970-01-01 01:00:00.000000000 +0100
478 +++ gwget-1.0.4/data/org.gwget.gschema.xml 2018-09-02 11:44:17.589889148 +0200
481 + <schema id="org.gwget" path="/org/gwget2/">
482 + <key name="convert-links" type="b">
483 + <default>false</default>
484 + <summary>Convert Links</summary>
485 + <description>Convert to relative links in recursive mode.</description>
487 + <key name="default-height" type="i">
488 + <default>200</default>
490 + <key name="default-width" type="i">
491 + <default>250</default>
493 + <key name="dl-page-requisites" type="b">
494 + <default>false</default>
495 + <summary>Download Page Requisites</summary>
497 + <key name="download-dir" type="s">
498 + <default>''</default>
499 + <summary>Default Download Directory</summary>
501 + <key name="ask-save-each-dl" type="b">
502 + <default>true</default>
503 + <summary>Ask where to save each new download</summary>
504 + <description>If true, always ask for a destination folder when starting a new download. If false, always save in the default directory without asking the user.</description>
506 + <key name="follow-relative" type="b">
507 + <default>false</default>
508 + <summary>Follow relative links</summary>
510 + <key name="limit-speed" type="b">
511 + <default>false</default>
512 + <summary>Limit maximum speed</summary>
514 + <key name="limit-simultaneousdownloads" type="b">
515 + <default>false</default>
516 + <summary>Limit number of simultaneous downloads</summary>
518 + <key name="max-depth" type="i">
519 + <default>0</default>
520 + <summary>Maximum depth in recursive mode</summary>
522 + <key name="max-speed" type="i">
523 + <default>0</default>
524 + <summary>Maximum speed limit</summary>
526 + <key name="max-simultaneousdownloads" type="i">
527 + <default>0</default>
528 + <summary>Maximum number of simultaneous downloads</summary>
530 + <key name="n-downloads" type="i">
531 + <default>0</default>
532 + <summary>Number of downloads</summary>
534 + <key name="no-create-directories" type="b">
535 + <default>false</default>
537 + <key name="num-retries" type="i">
538 + <default>3</default>
539 + <summary>Number of retries</summary>
541 + <key name="position-x" type="i">
542 + <default>0</default>
544 + <key name="position-y" type="i">
545 + <default>0</default>
547 + <key name="resume-at-start" type="b">
548 + <default>false</default>
549 + <summary>Resume downloads at startup</summary>
551 + <key name="open-after-dl" type="b">
552 + <default>false</default>
553 + <summary>Open the file after download</summary>
555 + <key name="view-actual-size" type="b">
556 + <default>true</default>
558 + <key name="view-down-speed" type="b">
559 + <default>true</default>
560 + <summary>View download speed column</summary>
562 + <key name="view-elapse-time" type="b">
563 + <default>false</default>
564 + <summary>View elapsed time column</summary>
566 + <key name="view-percentage" type="b">
567 + <default>true</default>
568 + <summary>View percentage column</summary>
570 + <key name="view-rem-time" type="b">
571 + <default>true</default>
572 + <summary>View remaining time column</summary>
574 + <key name="view-toolbar" type="b">
575 + <default>true</default>
576 + <summary>View toolbar</summary>
577 + <description>Whether to display the toolbar.</description>
579 + <key name="view-statusbar" type="b">
580 + <default>true</default>
581 + <summary>View statusbar</summary>
582 + <description>Whether to display the statusbar.</description>
584 + <key name="view-total-size" type="b">
585 + <default>true</default>
586 + <summary>View total size column</summary>
588 + <key name="network-mode" type="s">
589 + <default>'direct'</default>
591 + <key name="http-proxy" type="s">
592 + <default>''</default>
594 + <key name="http-proxy-port" type="i">
595 + <default>8080</default>
597 + <key name="proxy-uses-auth" type="b">
598 + <default>false</default>
600 + <key name="proxy-user" type="s">
601 + <default>''</default>
603 + <key name="proxy-password" type="s">
604 + <default>''</default>
607 + <schema id="org.gwget.download">
608 + <key name="url" type="s">
609 + <default>''</default>
611 + <key name="dir" type="s">
612 + <default>''</default>
614 + <key name="filename" type="s">
615 + <default>''</default>
617 + <key name="state" type="i">
618 + <default>0</default>
620 + <key name="file-size" type="s">
621 + <default>''</default>
625 diff -Naur gwget-1.0.4.orig/src/gwget_data.c gwget-1.0.4/src/gwget_data.c
626 --- gwget-1.0.4.orig/src/gwget_data.c 2018-09-02 09:37:59.863423000 +0200
627 +++ gwget-1.0.4/src/gwget_data.c 2018-09-02 09:47:56.523025131 +0200
632 - * Update download list in gconf
633 + * Update download list in gsettings
635 gwget_remember_downloads();
637 diff -Naur gwget-1.0.4.orig/src/gwget_data.h gwget-1.0.4/src/gwget_data.h
638 --- gwget-1.0.4.orig/src/gwget_data.h 2018-09-02 09:37:59.863423000 +0200
639 +++ gwget-1.0.4/src/gwget_data.h 2018-09-02 11:51:39.469071743 +0200
641 gboolean view_down_speed;
642 gboolean view_toolbar;
643 gboolean view_statusbar;
644 - gboolean view_file_type;
646 gboolean limit_speed;
647 gboolean limit_simultaneousdownloads;
648 diff -Naur gwget-1.0.4.orig/src/main.c gwget-1.0.4/src/main.c
649 --- gwget-1.0.4.orig/src/main.c 2018-09-02 09:37:59.863423000 +0200
650 +++ gwget-1.0.4/src/main.c 2018-09-02 09:47:22.658808668 +0200
652 #include <glib/gi18n.h>
655 -#include <gconf/gconf-client.h>
659 diff -Naur gwget-1.0.4.orig/src/main_window.c gwget-1.0.4/src/main_window.c
660 --- gwget-1.0.4.orig/src/main_window.c 2018-09-02 09:37:59.856756000 +0200
661 +++ gwget-1.0.4/src/main_window.c 2018-09-02 17:08:45.436630472 +0200
664 #include <glib/gi18n.h>
666 -#include <gconf/gconf-client.h>
667 #include <glib/gstdio.h>
669 #include <sys/types.h>
672 gwget_destination_file_exists(GwgetData *data);
675 -gwget_gconf_notify_toolbar(GConfClient *client,
678 - gpointer user_data);
681 view_selection_func (GtkTreeSelection *selection,
686 GtkWidget * window = NULL;
687 - gchar *builder_file = NULL,*toolbar_setting;
688 + gchar *builder_file = NULL;
689 GtkWidget *treev,*toolbar,*menu_item, *combo;
690 GtkTreeSelection *select;
691 GError* error = NULL;
693 gtk_tree_selection_set_select_function(select, view_selection_func, NULL, NULL);
696 - * Update window size in gconf on resize
697 + * Update window size in gsettings on resize
699 g_signal_connect(GTK_WIDGET(window),
702 /* add the columns titles to the tree view */
703 add_columns (GTK_TREE_VIEW (treev));
705 - gconf_client = gconf_client_get_default();
706 - gconf_client_add_dir (gconf_client,
708 - GCONF_CLIENT_PRELOAD_NONE,
710 + settings = g_settings_new("org.gwget");
712 /* gwget_pref.download_dir=NULL; */
713 - gwget_get_defaults_from_gconf();
714 + gwget_get_defaults_from_gsettings();
716 /* Drag and drop set up */
717 gtk_drag_dest_set(GTK_WIDGET(window),
719 G_CALLBACK(on_gwget_drag_received),
720 GUINT_TO_POINTER(dnd_type));
722 - /* Set the toolbar like gnome preferences */
723 - toolbar = GTK_WIDGET (gtk_builder_get_object(builder,"toolbar1"));
724 - toolbar_setting = gconf_client_get_string(gconf_client,"/desktop/gnome/interface/toolbar_style",NULL);
726 - if (toolbar_setting!=NULL) {
727 - if (!strcmp(toolbar_setting,"icons")) {
728 - gtk_toolbar_set_style(GTK_TOOLBAR(toolbar),GTK_TOOLBAR_ICONS);
731 - if (!strcmp(toolbar_setting,"both")) {
732 - gtk_toolbar_set_style(GTK_TOOLBAR(toolbar),GTK_TOOLBAR_BOTH);
735 - if (!strcmp(toolbar_setting,"both-horiz")) {
736 - gtk_toolbar_set_style(GTK_TOOLBAR(toolbar),GTK_TOOLBAR_BOTH_HORIZ);
739 - if (!strcmp(toolbar_setting,"text")) {
740 - gtk_toolbar_set_style(GTK_TOOLBAR(toolbar),GTK_TOOLBAR_TEXT);
744 - /* Listen to changes to the key. */
745 - gconf_client_notify_add (gconf_client,
746 - "/desktop/gnome/interface/toolbar_style",
747 - gwget_gconf_notify_toolbar,
752 /* Show the toolbar ? */
753 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM (gtk_builder_get_object(builder,"view_toolbar")),gwget_pref.view_toolbar);
754 toolbar = GTK_WIDGET (gtk_builder_get_object(builder,"toolbar1"));
755 @@ -228,90 +187,91 @@
759 -gwget_get_defaults_from_gconf(void)
760 +gwget_get_defaults_from_gsettings(void)
765 - gchar *key,*url,*dir,*name;
766 + gchar *path,*url,*dir,*name;
768 gint default_width, default_height;
769 - GError *error = NULL;
771 - gwget_pref.http_proxy=gconf_client_get_string(gconf_client,"/apps/gwget2/http_proxy",NULL);
772 - gwget_pref.http_proxy_port=gconf_client_get_int(gconf_client,"/apps/gwget2/http_proxy_port",NULL);
773 - gwget_pref.proxy_uses_auth=gconf_client_get_bool(gconf_client,"/apps/gwget2/proxy_uses_auth",NULL);
774 - gwget_pref.proxy_user=gconf_client_get_string(gconf_client,"/apps/gwget2/proxy_user",NULL);
775 - gwget_pref.proxy_password=gconf_client_get_string(gconf_client,"/apps/gwget2/proxy_password",NULL);
777 - gwget_pref.gnome_http_proxy=gconf_client_get_string(gconf_client,"/system/http_proxy/host",NULL);
778 - gwget_pref.gnome_http_proxy_port=gconf_client_get_int(gconf_client,"/system/http_proxy/port",NULL);
779 - gwget_pref.gnome_proxy_uses_auth=gconf_client_get_bool(gconf_client,"/system/http_proxy/use_authentication",NULL);
780 - gwget_pref.gnome_proxy_user=gconf_client_get_string(gconf_client,"/system/http_proxy/authentication_user",NULL);
781 - gwget_pref.gnome_proxy_password=gconf_client_get_string(gconf_client,"/system/http_proxy/authentication_password",NULL);
782 - gwget_pref.gnome_use_proxy=gconf_client_get_bool(gconf_client,"/system/http_proxy/use_http_proxy",NULL);
784 - gwget_pref.network_mode=gconf_client_get_string(gconf_client,"/apps/gwget2/network_mode",NULL);
785 - gwget_pref.download_dir=gconf_client_get_string(gconf_client,"/apps/gwget2/download_dir",NULL);
786 - gwget_pref.num_retries=gconf_client_get_int(gconf_client,"/apps/gwget2/num_retries",NULL);
787 - gwget_pref.resume_at_start=gconf_client_get_bool(gconf_client,"/apps/gwget2/resume_at_start",NULL);
788 - gwget_pref.open_after_dl=gconf_client_get_bool(gconf_client,"/apps/gwget2/open_after_dl",NULL);
789 - gwget_pref.no_create_directories=gconf_client_get_bool(gconf_client,"/apps/gwget2/no_create_directories",NULL);
790 - gwget_pref.follow_relative=gconf_client_get_bool(gconf_client,"/apps/gwget2/follow_relative",NULL);
791 - gwget_pref.convert_links = gconf_client_get_bool(gconf_client,"/apps/gwget2/convert_links",NULL);
792 - gwget_pref.dl_page_requisites = gconf_client_get_bool(gconf_client,"/apps/gwget2/dl_page_requisites",NULL);
793 - gwget_pref.max_depth=gconf_client_get_int(gconf_client,"/apps/gwget2/max_depth",NULL);
794 - gwget_pref.view_actual_size=gconf_client_get_bool(gconf_client,"/apps/gwget2/view_actual_size",NULL);
795 - gwget_pref.view_total_size=gconf_client_get_bool(gconf_client,"/apps/gwget2/view_total_size",NULL);
796 - gwget_pref.view_percentage=gconf_client_get_bool(gconf_client,"/apps/gwget2/view_percentage",NULL);
797 - gwget_pref.view_elapse_time=gconf_client_get_bool(gconf_client,"/apps/gwget2/view_elapse_time",NULL);
798 - gwget_pref.view_down_speed=gconf_client_get_bool(gconf_client,"/apps/gwget2/view_down_speed",NULL);
799 - gwget_pref.view_toolbar=gconf_client_get_bool(gconf_client,"/apps/gwget2/view_toolbar",NULL);
800 - gwget_pref.view_statusbar=gconf_client_get_bool(gconf_client,"/apps/gwget2/view_statusbar",NULL);
801 - gwget_pref.view_file_type=gconf_client_get_bool(gconf_client,"/apps/gwget2/view_file_type",NULL);
802 - gwget_pref.limit_speed = gconf_client_get_bool (gconf_client,"/apps/gwget2/limit_speed", NULL);
803 - gwget_pref.max_speed=gconf_client_get_int(gconf_client,"/apps/gwget2/max_speed",NULL);
804 - gwget_pref.limit_simultaneousdownloads = gconf_client_get_bool (gconf_client,"/apps/gwget2/limit_simultaneousdownloads", NULL);
805 - gwget_pref.max_simultaneousdownloads=gconf_client_get_int(gconf_client,"/apps/gwget2/max_simultaneousdownloads",NULL);
806 - gwget_pref.ask_save_each_dl = gconf_client_get_bool (gconf_client,"/apps/gwget2/ask_save_each_dl", NULL);
807 + GSettingsSchemaSource *schema_source;
808 + GSettingsSchema *http_proxy_schema;
809 + GSettings *http_proxy_settings,*download_settings;
811 + gwget_pref.http_proxy=g_settings_get_string(settings,"http-proxy");
812 + gwget_pref.http_proxy_port=g_settings_get_int(settings,"http-proxy-port");
813 + gwget_pref.proxy_uses_auth=g_settings_get_boolean(settings,"proxy-uses-auth");
814 + gwget_pref.proxy_user=g_settings_get_string(settings,"proxy-user");
815 + gwget_pref.proxy_password=g_settings_get_string(settings,"proxy-password");
817 + schema_source=g_settings_schema_source_get_default();
818 + http_proxy_schema=g_settings_schema_source_lookup(schema_source,"org.gnome.system.proxy.http",FALSE);
820 + if (http_proxy_schema != NULL) {
821 + http_proxy_settings=g_settings_new("org.gnome.system.proxy.http");
822 + gwget_pref.gnome_http_proxy=g_settings_get_string(http_proxy_settings,"host");
823 + gwget_pref.gnome_http_proxy_port=g_settings_get_int(http_proxy_settings,"port");
824 + gwget_pref.gnome_proxy_uses_auth=g_settings_get_boolean(http_proxy_settings,"use-authentication");
825 + gwget_pref.gnome_proxy_user=g_settings_get_string(http_proxy_settings,"authentication-user");
826 + gwget_pref.gnome_proxy_password=g_settings_get_string(http_proxy_settings,"authentication-password");
827 + gwget_pref.gnome_use_proxy=g_settings_get_boolean(http_proxy_settings,"enabled");
828 + g_settings_schema_unref(http_proxy_schema);
831 + gwget_pref.network_mode=g_settings_get_string(settings,"network-mode");
832 + gwget_pref.download_dir=g_settings_get_string(settings,"download-dir");
833 + gwget_pref.num_retries=g_settings_get_int(settings,"num-retries");
834 + gwget_pref.resume_at_start=g_settings_get_boolean(settings,"resume-at-start");
835 + gwget_pref.open_after_dl=g_settings_get_boolean(settings,"open-after-dl");
836 + gwget_pref.no_create_directories=g_settings_get_boolean(settings,"no-create-directories");
837 + gwget_pref.follow_relative=g_settings_get_boolean(settings,"follow-relative");
838 + gwget_pref.convert_links = g_settings_get_boolean(settings,"convert-links");
839 + gwget_pref.dl_page_requisites = g_settings_get_boolean(settings,"dl-page-requisites");
840 + gwget_pref.max_depth=g_settings_get_int(settings,"max-depth");
841 + gwget_pref.view_actual_size=g_settings_get_boolean(settings,"view-actual-size");
842 + gwget_pref.view_total_size=g_settings_get_boolean(settings,"view-total-size");
843 + gwget_pref.view_percentage=g_settings_get_boolean(settings,"view-percentage");
844 + gwget_pref.view_elapse_time=g_settings_get_boolean(settings,"view-elapse-time");
845 + gwget_pref.view_down_speed=g_settings_get_boolean(settings,"view-down-speed");
846 + gwget_pref.view_toolbar=g_settings_get_boolean(settings,"view-toolbar");
847 + gwget_pref.view_statusbar=g_settings_get_boolean(settings,"view-statusbar");
848 + gwget_pref.limit_speed = g_settings_get_boolean(settings,"limit-speed");
849 + gwget_pref.max_speed=g_settings_get_int(settings,"max-speed");
850 + gwget_pref.limit_simultaneousdownloads = g_settings_get_boolean(settings,"limit-simultaneousdownloads");
851 + gwget_pref.max_simultaneousdownloads=g_settings_get_int(settings,"max-simultaneousdownloads");
852 + gwget_pref.ask_save_each_dl = g_settings_get_boolean(settings,"ask-save-each-dl");
854 if (!gwget_pref.download_dir) {
855 gwget_pref.download_dir = g_strdup(g_get_home_dir());
856 - gconf_client_set_string (gconf_client, "/apps/gwget2/download_dir", g_strdup(g_get_home_dir()), NULL);
857 + g_settings_set_string (settings, "download-dir", g_strdup(g_get_home_dir()));
860 if (!gwget_pref.network_mode) {
861 gwget_pref.network_mode = g_strdup("direct");
862 - gconf_client_set_string (gconf_client, "/apps/gwget2/network_mode", "direct", NULL);
863 + g_settings_set_string (settings, "network-mode", "direct");
866 /* Put in the list of save_in_paths (used by new dialog window) the initial download directory */
867 save_in_paths = g_list_append (save_in_paths, gwget_pref.download_dir);
869 - num_dl=gconf_client_get_int(gconf_client,"/apps/gwget2/n_downloads",NULL);
870 + num_dl=g_settings_get_int(settings,"n-downloads");
871 for (i=0;i<num_dl;i++) {
872 - key=g_strdup_printf("/apps/gwget2/downloads_data/%d/url",i);
873 - url=gconf_client_get_string(gconf_client,key,NULL);
874 - key=g_strdup_printf("/apps/gwget2/downloads_data/%d/dir",i);
875 - dir=gconf_client_get_string(gconf_client,key,NULL);
876 + path=g_strdup_printf("/org/gwget2/downloads-data/%d/",i);
877 + download_settings = g_settings_new_with_path("org.gwget.download", path);
878 + url=g_settings_get_string(download_settings,"url");
879 + dir=g_settings_get_string(download_settings,"dir");
882 data=gwget_data_create(url,dir);
884 - key=g_strdup_printf("/apps/gwget2/downloads_data/%d/filename",i);
885 - name=gconf_client_get_string(gconf_client,key,NULL);
886 + name=g_settings_get_string(download_settings,"filename");
887 gwget_data_set_filename(data,name);
889 - key=g_strdup_printf("/apps/gwget2/downloads_data/%d/state",i);
890 - state=gconf_client_get_int(gconf_client,key,NULL);
891 + state=g_settings_get_int(download_settings,"state");
893 - key=g_strdup_printf("/apps/gwget2/downloads_data/%d/file_size",i);
894 - total_size = atoll(gconf_client_get_string (gconf_client, key, &error));
896 - gwget_data_set_total_size (data, total_size);
898 - gwget_data_set_total_size (data, 0);
900 + total_size = atoll(g_settings_get_string (download_settings, "file-size"));
901 + gwget_data_set_total_size (data, total_size);
903 if ( state != DL_COMPLETED ) {
906 if ( !gwget_destination_file_exists(data) ) {
908 * We do not add download, the gwget_remember_downloads
909 - * call after the cycle will flush gconf
910 + * call after the cycle will flush gsettings
918 + g_object_unref (download_settings);
920 gwget_data_set_state_no_sync(data,DL_NOT_RUNNING);
921 if (gwget_pref.resume_at_start && data->state!=DL_COMPLETED) {
922 gwget_data_start_download(data);
923 @@ -351,21 +313,21 @@
927 - * We may have altered the download list so we sync gconf
928 + * We may have altered the download list so we sync gsettings
930 gwget_remember_downloads();
932 show_prefered_columns();
934 /* Default width and height */
935 - default_width=gconf_client_get_int (gconf_client,"/apps/gwget2/default_width",NULL);
936 - default_height=gconf_client_get_int (gconf_client,"/apps/gwget2/default_height",NULL);
937 + default_width=g_settings_get_int (settings,"default-width");
938 + default_height=g_settings_get_int (settings,"default-height");
939 gtk_window_resize (GTK_WINDOW (gtk_builder_get_object(builder,"main_window")),default_width,default_height);
941 /* Default position */
942 gtk_window_move(GTK_WINDOW(GTK_WIDGET (gtk_builder_get_object(builder,"main_window"))),
943 - gconf_client_get_int (gconf_client,"/apps/gwget2/position_x",NULL),
944 - gconf_client_get_int (gconf_client,"/apps/gwget2/position_y",NULL)
945 + g_settings_get_int (settings,"position-x"),
946 + g_settings_get_int (settings,"position-y")
955 -gwget_gconf_notify_toolbar(GConfClient *client,
958 - gpointer user_data)
961 - GtkWidget *toolbar;
962 - gchar *toolbar_setting;
964 - value = gconf_entry_get_value (entry);
966 - toolbar = GTK_WIDGET (gtk_builder_get_object(builder,"toolbar1"));
967 - toolbar_setting = (gchar *)gconf_value_get_string(value);
969 - if (!strcmp(toolbar_setting,"icons")) {
970 - gtk_toolbar_set_style(GTK_TOOLBAR(toolbar),GTK_TOOLBAR_ICONS);
973 - if (!strcmp(toolbar_setting,"both")) {
974 - gtk_toolbar_set_style(GTK_TOOLBAR(toolbar),GTK_TOOLBAR_BOTH);
977 - if (!strcmp(toolbar_setting,"both-horiz")) {
978 - gtk_toolbar_set_style(GTK_TOOLBAR(toolbar),GTK_TOOLBAR_BOTH_HORIZ);
981 - if (!strcmp(toolbar_setting,"text")) {
982 - gtk_toolbar_set_style(GTK_TOOLBAR(toolbar),GTK_TOOLBAR_TEXT);
985 - g_free(toolbar_setting);
989 show_prefered_columns(void)
992 GtkWidget *main_window;
993 GtkAllocation allocation;
994 gint position_x,position_y;
995 - GConfChangeSet *cs;
997 main_window=GTK_WIDGET (gtk_builder_get_object(builder,"main_window"));
999 @@ -738,18 +665,13 @@
1001 /* Remember the size of the window */
1002 gtk_widget_get_allocation (main_window, &allocation);
1003 - cs = gconf_change_set_new ();
1004 - gconf_change_set_set_int (cs, "/apps/gwget2/default_height", allocation.height);
1005 - gconf_change_set_set_int (cs, "/apps/gwget2/default_width", allocation.width);
1006 + g_settings_set_int (settings, "default-height", allocation.height);
1007 + g_settings_set_int (settings, "default-width", allocation.width);
1009 /* Remember the position */
1010 gtk_window_get_position(GTK_WINDOW(main_window), &position_x, &position_y);
1011 - gconf_change_set_set_int (cs, "/apps/gwget2/position_x", position_x);
1012 - gconf_change_set_set_int (cs, "/apps/gwget2/position_y", position_y);
1014 - gconf_client_commit_change_set (gconf_client, cs, TRUE, NULL);
1016 - gconf_change_set_unref (cs);
1017 + g_settings_set_int (settings, "position-x", position_x);
1018 + g_settings_set_int (settings, "position-y", position_y);
1022 @@ -760,48 +682,40 @@
1024 gwget_remember_downloads(void)
1028 GwgetData *gwgetdata;
1031 gboolean running = FALSE;
1032 gchar down_size[2048];
1033 + GSettings *download_settings;
1035 /* calculate the number of items in the treeview */
1036 length=gtk_tree_model_iter_n_children(GTK_TREE_MODEL(model),NULL);
1038 /* Save the number of current downloads in the treev */
1039 /* When load again we can known the number of directories to load */
1040 - gconf_client_set_int(gconf_client,"/apps/gwget2/n_downloads",length,NULL);
1041 + g_settings_set_int(settings,"n-downloads",length);
1043 gtk_tree_model_get_iter_first(model,&iter);
1044 - /* Save current downloads in GConf */
1045 + /* Save current downloads in GSettings */
1046 /* Calculate if there are any dl in retriving state */
1047 for (i=0;i<length;i++) {
1048 gtk_tree_model_get (model, &iter, URL_COLUMN, &url, -1);
1049 gwgetdata=g_object_get_data(G_OBJECT(model),url);
1051 - key=g_strdup_printf("/apps/gwget2/downloads_data/%d",i);
1052 - gconf_client_add_dir(gconf_client,
1054 - GCONF_CLIENT_PRELOAD_NONE,
1056 - key=g_strdup_printf("/apps/gwget2/downloads_data/%d/url",i);
1057 - gconf_client_set_string(gconf_client,key,gwgetdata->url,NULL);
1059 - key=g_strdup_printf("/apps/gwget2/downloads_data/%d/filename",i);
1060 - gconf_client_set_string(gconf_client,key,gwgetdata->filename,NULL);
1062 - key=g_strdup_printf("/apps/gwget2/downloads_data/%d/dir",i);
1063 - gconf_client_set_string(gconf_client,key,gwgetdata->dir,NULL);
1065 - key=g_strdup_printf("/apps/gwget2/downloads_data/%d/state",i);
1066 - gconf_client_set_int(gconf_client,key,gwgetdata->state,NULL);
1067 + path=g_strdup_printf("/org/gwget2/downloads-data/%d/",i);
1068 + download_settings = g_settings_new_with_path("org.gwget.download", path);
1070 + g_settings_set_string(download_settings,"url",gwgetdata->url);
1071 + g_settings_set_string(download_settings,"filename",gwgetdata->filename);
1072 + g_settings_set_string(download_settings,"dir",gwgetdata->dir);
1073 + g_settings_set_int(download_settings,"state",gwgetdata->state);
1075 - key=g_strdup_printf ("/apps/gwget2/downloads_data/%d/file_size",i);
1077 g_snprintf(down_size,2047, "%" G_GINT64_FORMAT,gwgetdata->total_size);
1078 - gconf_client_set_string (gconf_client,key,down_size,NULL);
1079 + g_settings_set_string(download_settings,"file-size",down_size);
1081 + g_object_unref (download_settings);
1083 if (gwgetdata->log_tag != -1)
1085 @@ -827,9 +741,11 @@
1086 _("There is at least one active download left. Really cancel all running transfers?"), _("No"), _("Yes"));
1087 if (response == GTK_RESPONSE_OK) {
1088 stop_all_downloads();
1089 + g_settings_sync();
1093 + g_settings_sync();
1097 diff -Naur gwget-1.0.4.orig/src/main_window_cb.c gwget-1.0.4/src/main_window_cb.c
1098 --- gwget-1.0.4.orig/src/main_window_cb.c 2018-09-02 09:37:59.856756000 +0200
1099 +++ gwget-1.0.4/src/main_window_cb.c 2018-09-02 14:01:49.066804085 +0200
1102 #include <glib/gi18n.h>
1103 #include <gtk/gtk.h>
1104 -#include <gconf/gconf-client.h>
1107 #include "main_window.h"
1108 @@ -422,53 +421,53 @@
1110 http_proxy=GTK_WIDGET (gtk_builder_get_object(builder_pref,"http_proxy_entry"));
1111 gwget_pref.http_proxy=g_strdup(gtk_entry_get_text(GTK_ENTRY(http_proxy)));
1112 - gconf_client_set_string(gconf_client,"/apps/gwget2/http_proxy",
1113 - g_strdup(gtk_entry_get_text(GTK_ENTRY(http_proxy))),NULL);
1114 + g_settings_set_string(settings,"http-proxy",
1115 + g_strdup(gtk_entry_get_text(GTK_ENTRY(http_proxy))));
1117 proxy_user=GTK_WIDGET (gtk_builder_get_object(builder_pref,"proxy_user"));
1118 gwget_pref.proxy_user=g_strdup(gtk_entry_get_text(GTK_ENTRY(proxy_user)));
1119 - gconf_client_set_string(gconf_client,"/apps/gwget2/proxy_user",
1120 - g_strdup(gtk_entry_get_text(GTK_ENTRY(proxy_user))),NULL);
1121 + g_settings_set_string(settings,"proxy-user",
1122 + g_strdup(gtk_entry_get_text(GTK_ENTRY(proxy_user))));
1124 proxy_password=GTK_WIDGET (gtk_builder_get_object(builder_pref,"proxy_password"));
1125 gwget_pref.proxy_password=g_strdup(gtk_entry_get_text(GTK_ENTRY(proxy_password)));
1126 - gconf_client_set_string(gconf_client,"/apps/gwget2/proxy_password",
1127 - g_strdup(gtk_entry_get_text(GTK_ENTRY(proxy_password))),NULL);
1128 + g_settings_set_string(settings,"proxy-password",
1129 + g_strdup(gtk_entry_get_text(GTK_ENTRY(proxy_password))));
1131 http_proxy_port_spin = GTK_WIDGET (gtk_builder_get_object (builder_pref, "http_proxy_port_spin"));
1132 gwget_pref.http_proxy_port = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(http_proxy_port_spin));
1133 - gconf_client_set_int(gconf_client,"/apps/gwget2/http_proxy_port",
1134 - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(http_proxy_port_spin)),NULL);
1135 + g_settings_set_int(settings,"http-proxy-port",
1136 + gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(http_proxy_port_spin)));
1138 proxy_uses_auth_radio=GTK_WIDGET (gtk_builder_get_object(builder_pref,"proxy_uses_auth_radio"));
1140 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (proxy_uses_auth_radio))) {
1141 - gconf_client_set_bool(gconf_client,"/apps/gwget2/network_mode",TRUE,NULL);
1142 + g_settings_set_boolean(settings,"network-mode",TRUE);
1143 gwget_pref.proxy_uses_auth=TRUE;
1146 manual_radio=GTK_WIDGET (gtk_builder_get_object(builder_pref,"manual_radio"));
1147 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(manual_radio))) {
1148 - gconf_client_set_string(gconf_client,"/apps/gwget2/network_mode","manual",NULL);
1149 + g_settings_set_string(settings,"network-mode","manual");
1150 gwget_pref.network_mode="manual";
1153 direct_radio=GTK_WIDGET (gtk_builder_get_object(builder_pref,"direct_radio"));
1154 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(direct_radio))) {
1155 - gconf_client_set_string(gconf_client,"/apps/gwget2/network_mode","direct",NULL);
1156 + g_settings_set_string(settings,"network-mode","direct");
1157 gwget_pref.network_mode="direct";
1160 default_radio=GTK_WIDGET (gtk_builder_get_object(builder_pref,"default_radio"));
1161 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(default_radio))) {
1162 - gconf_client_set_string(gconf_client,"/apps/gwget2/network_mode","default",NULL);
1163 + g_settings_set_string(settings,"network-mode","default");
1164 gwget_pref.network_mode="default";
1167 ask_each_dl = GTK_WIDGET (gtk_builder_get_object(builder_pref, "ask_save_each_dl_check"));
1168 gwget_pref.ask_save_each_dl = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ask_each_dl));
1169 - gconf_client_set_bool(gconf_client, "/apps/gwget2/ask_save_each_dl",
1170 - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ask_each_dl)), NULL);
1171 + g_settings_set_boolean(settings,"ask-save-each-dl",
1172 + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ask_each_dl)));
1175 num_retries = GTK_WIDGET (gtk_builder_get_object(builder_pref,"num_retries_spin"));
1176 @@ -479,18 +478,18 @@
1178 open_after_dl = GTK_WIDGET (gtk_builder_get_object(builder_pref, "open_after_dl"));
1179 gwget_pref.open_after_dl = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(open_after_dl));
1180 - gconf_client_set_bool(gconf_client, "/apps/gwget2/open_after_dl",
1181 - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(open_after_dl)), NULL);
1182 + g_settings_set_boolean(settings,"open-after-dl",
1183 + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(open_after_dl)));
1185 pref_window = GTK_WIDGET (gtk_builder_get_object(builder_pref,"pref_window"));
1186 gtk_widget_hide(pref_window);
1188 - gconf_client_set_string(gconf_client,"/apps/gwget2/download_dir",
1189 - g_strdup(gtk_entry_get_text(GTK_ENTRY(save_in))),NULL);
1190 - gconf_client_set_int(gconf_client,"/apps/gwget2/num_retries",
1191 - atoi(gtk_entry_get_text(GTK_ENTRY(num_retries))),NULL);
1192 - gconf_client_set_bool(gconf_client,"/apps/gwget2/resume_at_start",
1193 - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resume)),NULL);
1194 + g_settings_set_string(settings,"download-dir",
1195 + g_strdup(gtk_entry_get_text(GTK_ENTRY(save_in))));
1196 + g_settings_set_int(settings,"num-retries",
1197 + atoi(gtk_entry_get_text(GTK_ENTRY(num_retries))));
1198 + g_settings_set_boolean(settings,"resume-at-start",
1199 + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(resume)));
1202 limit_speed_check = GTK_WIDGET (gtk_builder_get_object (builder_pref, "limit_speed_check"));
1203 @@ -505,71 +504,71 @@
1204 inform_limit_speed_change();
1206 gwget_pref.limit_speed = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(limit_speed_check));
1207 - gconf_client_set_bool(gconf_client,"/apps/gwget2/limit_speed",
1208 - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(limit_speed_check)),NULL);
1209 + g_settings_set_boolean(settings,"limit-speed",
1210 + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(limit_speed_check)));
1211 gwget_pref.max_speed = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(limit_speed_spin));
1212 - gconf_client_set_int(gconf_client,"/apps/gwget2/max_speed",
1213 - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(limit_speed_spin)),NULL);
1214 + g_settings_set_int(settings,"max-speed",
1215 + gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(limit_speed_spin)));
1217 /* Limit Simultaneous downloads */
1218 limit_simultaneousdownloads_check = GTK_WIDGET (gtk_builder_get_object (builder_pref, "limit_simultaneousdownloads_check"));
1219 gwget_pref.limit_simultaneousdownloads = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(limit_simultaneousdownloads_check));
1220 - gconf_client_set_bool(gconf_client,"/apps/gwget2/limit_simultaneousdownloads",
1221 - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(limit_simultaneousdownloads_check)),NULL);
1222 + g_settings_set_boolean(settings,"limit-simultaneousdownloads",
1223 + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(limit_simultaneousdownloads_check)));
1224 limit_simultaneousdownloads_spin = GTK_WIDGET (gtk_builder_get_object (builder_pref, "limit_simultaneousdownloads_spin"));
1225 gwget_pref.max_simultaneousdownloads = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(limit_simultaneousdownloads_spin));
1226 - gconf_client_set_int(gconf_client,"/apps/gwget2/max_simultaneousdownloads",
1227 - gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(limit_simultaneousdownloads_spin)),NULL);
1228 + g_settings_set_int(settings,"max-simultaneousdownloads",
1229 + gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(limit_simultaneousdownloads_spin)));
1232 no_create_directories = GTK_WIDGET (gtk_builder_get_object(builder_pref,"no_create_directories"));
1233 gwget_pref.no_create_directories = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(no_create_directories));
1234 - gconf_client_set_bool(gconf_client,"/apps/gwget2/no_create_directories",
1235 - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(no_create_directories)),NULL);
1236 + g_settings_set_boolean(settings,"no-create-directories",
1237 + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(no_create_directories)));
1239 /* Follow relative links only */
1240 follow_relative = GTK_WIDGET (gtk_builder_get_object(builder_pref,"follow_relative"));
1241 gwget_pref.follow_relative = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(follow_relative));
1242 - gconf_client_set_bool(gconf_client,"/apps/gwget2/follow_relative",gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(follow_relative)), NULL);
1243 + g_settings_set_boolean(settings,"follow-relative",gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(follow_relative)));
1246 convert_links = GTK_WIDGET (gtk_builder_get_object(builder_pref,"convert_links"));
1247 gwget_pref.follow_relative = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(convert_links));
1248 - gconf_client_set_bool(gconf_client,"/apps/gwget2/convert_links",gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(convert_links)), NULL);
1249 + g_settings_set_boolean(settings,"convert-links",gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(convert_links)));
1250 /* Download page requisites */
1251 dl_page_requisites= GTK_WIDGET (gtk_builder_get_object(builder_pref,"dl_page_requisites"));
1252 gwget_pref.follow_relative = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dl_page_requisites));
1253 - gconf_client_set_bool(gconf_client,"/apps/gwget2/dl_page_requisites", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dl_page_requisites)), NULL);
1254 + g_settings_set_boolean(settings,"dl-page-requisites", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dl_page_requisites)));
1256 max_depth=GTK_WIDGET (gtk_builder_get_object(builder_pref,"max_depth"));
1257 gwget_pref.max_depth=gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(max_depth));
1258 - gconf_client_set_int(gconf_client,"/apps/gwget2/max_depth",gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(max_depth)), NULL);
1259 + g_settings_set_int(settings,"max-depth",gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(max_depth)));
1261 /* Column listing */
1262 gwget_pref.view_actual_size=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_WIDGET (gtk_builder_get_object(builder_pref,"check_actual_size"))));
1263 - gconf_client_set_bool(gconf_client,"/apps/gwget2/view_actual_size",
1264 - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_WIDGET (gtk_builder_get_object(builder_pref,"check_actual_size")))),NULL);
1265 + g_settings_set_boolean(settings,"view-actual-size",
1266 + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_WIDGET (gtk_builder_get_object(builder_pref,"check_actual_size")))));
1268 gwget_pref.view_total_size=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_WIDGET (gtk_builder_get_object(builder_pref,"check_total_size"))));
1269 - gconf_client_set_bool(gconf_client,"/apps/gwget2/view_total_size",
1270 - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_WIDGET (gtk_builder_get_object(builder_pref,"check_total_size")))),NULL);
1271 + g_settings_set_boolean(settings,"view-total-size",
1272 + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_WIDGET (gtk_builder_get_object(builder_pref,"check_total_size")))));
1274 gwget_pref.view_percentage=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_WIDGET (gtk_builder_get_object(builder_pref,"check_percentage"))));
1275 - gconf_client_set_bool(gconf_client,"/apps/gwget2/view_percentage",
1276 - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_WIDGET (gtk_builder_get_object(builder_pref,"check_percentage")))),NULL);
1277 + g_settings_set_boolean(settings,"view-percentage",
1278 + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_WIDGET (gtk_builder_get_object(builder_pref,"check_percentage")))));
1281 gwget_pref.view_elapse_time=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_WIDGET (gtk_builder_get_object(builder_pref,"check_elapse_time"))));
1282 - gconf_client_set_bool(gconf_client,"/apps/gwget2/view_elapse_time",
1283 - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_WIDGET (gtk_builder_get_object(builder_pref,"check_elapse_time")))),NULL);
1284 + g_settings_set_boolean(settings,"view-elapse-time",
1285 + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_WIDGET (gtk_builder_get_object(builder_pref,"check_elapse_time")))));
1287 gwget_pref.view_rem_time=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_WIDGET (gtk_builder_get_object(builder_pref,"check_rem_time"))));
1288 - gconf_client_set_bool(gconf_client,"/apps/gwget2/view_rem_time",
1289 - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_WIDGET (gtk_builder_get_object(builder_pref,"check_rem_time")))),NULL);
1290 + g_settings_set_boolean(settings,"view-rem-time",
1291 + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_WIDGET (gtk_builder_get_object(builder_pref,"check_rem_time")))));
1293 gwget_pref.view_down_speed=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_WIDGET (gtk_builder_get_object(builder_pref,"check_down_speed"))));
1294 - gconf_client_set_bool(gconf_client,"/apps/gwget2/view_down_speed",
1295 - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_WIDGET (gtk_builder_get_object(builder_pref,"check_down_speed")))),NULL);
1296 + g_settings_set_boolean(settings,"view-down-speed",
1297 + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(GTK_WIDGET (gtk_builder_get_object(builder_pref,"check_down_speed")))));
1303 gtk_widget_show(GTK_WIDGET(toolbar));
1305 - gconf_client_set_bool(gconf_client,"/apps/gwget2/view_toolbar",state,NULL);
1306 + g_settings_set_boolean(settings,"view-toolbar",state);
1312 gtk_widget_show(GTK_WIDGET(statusbar));
1314 - gconf_client_set_bool(gconf_client,"/apps/gwget2/view_statusbar",state,NULL);
1315 + g_settings_set_boolean(settings,"view-statusbar",state);
1319 diff -Naur gwget-1.0.4.orig/src/main_window.h gwget-1.0.4/src/main_window.h
1320 --- gwget-1.0.4.orig/src/main_window.h 2009-08-14 19:19:51.000000000 +0200
1321 +++ gwget-1.0.4/src/main_window.h 2018-09-02 10:05:16.705190543 +0200
1323 #ifndef _MAIN_WINDOW_H
1324 #define _MAIN_WINDOW_H
1326 -#include <gconf/gconf-client.h>
1327 #include <gtk/gtk.h>
1331 /* declared here for be used to add by main_window_cb */
1332 GtkTreeModel *model;
1335 -GConfClient *gconf_client;
1337 +GSettings *settings;
1339 /* List of all current downloads */
1343 /* XML for the preferences gui */
1344 /* It's here because we must load it from main_window.c to put */
1345 -/* the options of the column list from Gconf on load */
1346 +/* the options of the column list from GSettings on load */
1347 GtkBuilder *builder_pref;
1349 /* List of introduced path in save in dialogs */
1351 void on_main_window_delete_event(GtkWidget *widget, gpointer data);
1352 GtkTreeModel* create_model(void);
1353 void add_columns (GtkTreeView *treeview);
1354 -void gwget_get_defaults_from_gconf(void);
1355 +void gwget_get_defaults_from_gsettings(void);
1356 /* Drag received callback */
1357 void on_gwget_drag_received(GtkWidget * widget, GdkDragContext * context, int x,
1358 int y, GtkSelectionData * seldata, guint info,