configure.ac | 23 +-
data/Makefile.am | 15 +-
data/gwget.schemas.in | 402 ---------------------------------
data/gwget.ui | 4 +-
data/org.gwget.gschema.xml | 145 ++++++++++++
po/POTFILES.in | 1 -
src/Makefile.am | 2 -
src/custom-cell-renderer-progressbar.c | 4 +-
src/gwget-application.c | 46 +---
src/gwget_data.c | 20 +-
src/gwget_data.h | 3 +-
src/main.c | 24 +-
src/main_window.c | 291 +++++++++---------------
src/main_window.h | 9 +-
src/main_window_cb.c | 137 ++++++-----
src/new_window.c | 29 ++-
src/systray.c | 29 +--
src/systray.h | 4 +
src/utils.c | 7 +-
src/wget-log.c | 7 +-
20 files changed, 423 insertions(+), 779 deletions(-)
diff --git a/configure.ac b/configure.ac
index 8ebee12..450001b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ AC_INIT(configure.ac)
AM_INIT_AUTOMAKE(gwget, 1.0.4)
AM_CONFIG_HEADER(config.h)
-AC_PATH_PROG(GCONFTOOL, gconftool-2)
+GLIB_GSETTINGS
IT_PROG_INTLTOOL([0.35.0])
AC_ISC_POSIX
@@ -12,17 +12,24 @@ AC_PROG_CC
AC_STDC_HEADERS
AM_PROG_LIBTOOL
-AM_GCONF_SOURCE_2
+AC_ARG_ENABLE([gtk3],
+ [AC_HELP_STRING([--enable-gtk3],
+ [compile gwget against gtk+ 3.0 (default: yes)])],
+ [enable_gtk3="${enableval}"],
+ [enable_gtk3="yes"]
+)
+
+if test x"$enable_gtk3" = x"yes"; then
+ GTK_API_VERSION="3.0"
+else
+ GTK_API_VERSION="2.0"
+fi
-LIBGNOMEUI_REQUIRED=2.0.0
-LIBGNOME_REQUIRED=2.0.0
GTK_REQUIRED=2.6.0
-GCONF_REQUIRED=1.1.11
DBUS_GLIB_REQUIRED=0.33
GIO_REQUIRED=2.16.0
-PKG_CHECK_MODULES(GNOME, libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED
- gtk+-2.0 >= $GTK_REQUIRED
+PKG_CHECK_MODULES(GNOME, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
gmodule-2.0
gio-unix-2.0 >= $GIO_REQUIRED)
@@ -282,7 +289,7 @@ AM_CONDITIONAL(ENABLE_EPIPHANY_EXTENSION, test "x$enable_epiphany_extension" = "
#
# Check for libnotify
#
-LIBNOTIFY_REQUIRED=0.2.2
+LIBNOTIFY_REQUIRED=0.7.0
AC_ARG_ENABLE(libnotify,
AC_HELP_STRING([--disable-libnotify],
[Disable libnotify support]),,
diff --git a/data/Makefile.am b/data/Makefile.am
index 381ec99..3feb349 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -16,10 +16,8 @@ service_DATA = $(service_in_files:.service.in=.service)
$(service_DATA): $(service_in_files) Makefile
@sed -e "s|\@bindir\@|$(bindir)|" $< > $@
-schemasdir = $(GCONF_SCHEMA_FILE_DIR)
-schemas_in_files = gwget.schemas.in
-schemas_DATA = $(schemas_in_files:.schemas.in=.schemas)
-@INTLTOOL_SCHEMAS_RULE@
+gsettings_SCHEMAS = org.gwget.gschema.xml
+@GSETTINGS_RULES@
desktopdir = $(datadir)/applications
desktop_in_files = gwget.desktop.in.in
@@ -30,17 +28,10 @@ desktop_DATA =$(desktop_in_files:.desktop.in.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
-if GCONF_SCHEMAS_INSTALL
-install-data-local:
- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule gwget.schemas
-else
-install-data-local:
-endif
-
EXTRA_DIST = $(gwget_data_DATA) \
$(service_in_files) \
$(desktop_in_files) \
- $(schemas_in_files)
+ $(gsettings_SCHEMAS)
DISTCLEANFILES = \
$(desktop_DATA)
diff --git a/data/gwget.schemas.in b/data/gwget.schemas.in
deleted file mode 100644
index 538f6d6..0000000
--- a/data/gwget.schemas.in
+++ /dev/null
@@ -1,402 +0,0 @@
-
-
-
-
- /schemas/apps/gwget2/convert_links
- /apps/gwget2/convert_links
- gwget
- bool
- false
-
- Convert Links
- Convert to relative links in recursive mode.
-
-
-
-
- /schemas/apps/gwget2/default_height
- /apps/gwget2/default_height
- gwget
- int
- 200
-
-
-
-
-
-
-
- /schemas/apps/gwget2/default_width
- /apps/gwget2/default_width
- gwget
- int
- 250
-
-
-
-
-
-
-
- /schemas/apps/gwget2/dl_page_requisites
- /apps/gwget2/dl_page_requisites
- gwget
- bool
- false
-
- Download Page Requisites
-
-
-
-
-
- /schemas/apps/gwget2/download_dir
- /apps/gwget2/download_dir
- gwget
- string
-
-
- Default Download Directory
-
-
-
-
-
- /schemas/apps/gwget2/ask_save_each_dl
- /apps/gwget2/ask_save_each_dl
- gwget
- bool
- true
-
- Ask where to save each new download
- 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.
-
-
-
-
-
- /schemas/apps/gwget2/follow_relative
- /apps/gwget2/follow_relative
- gwget
- bool
- false
-
- Follow relative links
-
-
-
-
-
- /schemas/apps/gwget2/limit_speed
- /apps/gwget2/limit_speed
- gwget
- bool
- false
-
- Limit maximum speed
-
-
-
-
-
- /schemas/apps/gwget2/limit_simultaneousdownloads
- /apps/gwget2/limit_simultaneousdownloads
- gwget
- bool
- false
-
- Limit number of simultaneous downloads
-
-
-
-
-
- /schemas/apps/gwget2/max_depth
- /apps/gwget2/max_depth
- gwget
- int
- 0
-
- Maximum depth in recursive mode
-
-
-
-
-
- /schemas/apps/gwget2/max_speed
- /apps/gwget2/max_speed
- gwget
- int
- 0
-
- Maximum speed limit
-
-
-
-
-
- /schemas/apps/gwget2/max_simultaneousdownloads
- /apps/gwget2/max_simultaneousdownloads
- gwget
- int
- 0
-
- Maximum number of simultaneous downloads
-
-
-
-
-
- /schemas/apps/gwget2/n_downloads
- /apps/gwget2/n_downloads
- gwget
- int
- 0
-
- Number of downloads
-
-
-
-
-
- /schemas/apps/gwget2/no_create_directories
- /apps/gwget2/no_create_directories
- gwget
- bool
- false
-
-
-
-
-
-
-
- /schemas/apps/gwget2/num_retrys
- /apps/gwget2/num_retrys
- gwget
- int
- 3
-
- Number of retries
-
-
-
-
-
- /schemas/apps/gwget2/position_x
- /apps/gwget2/position_x
- gwget
- int
- 0
-
-
-
-
-
-
-
- /schemas/apps/gwget2/position_y
- /apps/gwget2/position_y
- gwget
- int
- 0
-
-
-
-
-
-
-
- /schemas/apps/gwget2/resume_at_start
- /apps/gwget2/resume_at_start
- gwget
- bool
- false
-
- Resume downloads at startup
-
-
-
-
-
- /schemas/apps/gwget2/open_after_dl
- /apps/gwget2/open_after_dl
- gwget
- bool
- false
-
- Open the file after download
-
-
-
-
-
- /schemas/apps/gwget2/view_actual_size
- /apps/gwget2/view_actual_size
- gwget
- bool
- true
-
-
-
-
-
-
-
- /schemas/apps/gwget2/view_down_speed
- /apps/gwget2/view_down_speed
- gwget
- bool
- true
-
- View download speed column
-
-
-
-
-
- /schemas/apps/gwget2/view_elapse_time
- /apps/gwget2/view_elapse_time
- gwget
- bool
- false
-
- View elapsed time column
-
-
-
-
-
- /schemas/apps/gwget2/view_percentage
- /apps/gwget2/view_percentage
- gwget
- bool
- true
-
- View percentage column
-
-
-
-
-
- /schemas/apps/gwget2/view_rem_time
- /apps/gwget2/view_rem_time
- gwget
- bool
- true
-
- View remaining time column
-
-
-
-
-
- /schemas/apps/gwget2/view_toolbar
- /apps/gwget2/view_toolbar
- gwget
- bool
- true
-
- View toolbar
- Whether to display the toolbar.
-
-
-
-
- /schemas/apps/gwget2/view_statusbar
- /apps/gwget2/view_statusbar
- gwget
- bool
- true
-
- View statusbar
- Whether to display the statusbar.
-
-
-
-
- /schemas/apps/gwget2/view_total_size
- /apps/gwget2/view_total_size
- gwget
- bool
- true
-
- View total size column
-
-
-
-
-
- /schemas/apps/gwget2/network_mode
- /apps/gwget2/network_mode
- gwget
- string
- direct
-
-
-
-
-
-
-
- /schemas/apps/gwget2/http_proxy
- /apps/gwget2/http_proxy
- gwget
- string
-
-
-
-
-
-
-
-
- /schemas/apps/gwget2/http_proxy_port
- /apps/gwget2/http_proxy_port
- gwget
- int
- 8080
-
-
-
-
-
-
-
- /schemas/apps/gwget2/proxy_uses_auth
- /apps/gwget2/proxy_uses_auth
- gwget
- bool
- false
-
-
-
-
-
-
-
- /schemas/apps/gwget2/proxy_user
- /apps/gwget2/proxy_user
- gwget
- string
-
-
-
-
-
-
-
-
- /schemas/apps/gwget2/proxy_password
- /apps/gwget2/proxy_password
- gwget
- string
-
-
-
-
-
-
-
-
-
diff --git a/data/gwget.ui b/data/gwget.ui
index 532be2c..b37062e 100644
--- a/data/gwget.ui
+++ b/data/gwget.ui
@@ -424,7 +424,6 @@
False
center-on-parent
normal
- False