change config to gsettings

This commit is contained in:
2017-11-10 22:36:50 -03:00
parent e8a11f6960
commit 00f4092ee4
35 changed files with 347 additions and 545 deletions

View File

@@ -7,13 +7,13 @@ set (GETTEXT_PACKAGE "pamac-classic")
set (RELEASE_NAME "pamac-classic")
set (CMAKE_C_FLAGS "")
set (PREFIX ${CMAKE_INSTALL_PREFIX})
set (VERSION "6.5.2")
set (VERSION "6.6.0")
set (TESTSRCDIR "${CMAKE_SOURCE_DIR}")
set (DOLLAR "$")
configure_file (${CMAKE_SOURCE_DIR}/src/pamac-system-daemon/Config.vala.base ${CMAKE_BINARY_DIR}/src/pamac-system-daemon/Config.vala)
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
set (VERSION "6.5.2")
set (VERSION "6.6.0")
add_definitions (${DEPS_CFLAGS})
include_directories ( ${CMAKE_BINARY_DIR}/src )
link_libraries ( ${DEPS_LIBRARIES} -lpamacclassic )

View File

@@ -4,7 +4,7 @@ cfg_pamac_system_daemon.set('PKGDATADIR', join_paths(get_option('prefix'),get_op
cfg_pamac_system_daemon.set('GETTEXT_PACKAGE', 'pamac-classic')
cfg_pamac_system_daemon.set('RELEASE_NAME', 'pamac-classic')
cfg_pamac_system_daemon.set('PREFIX', get_option('prefix'))
cfg_pamac_system_daemon.set('VERSION', '6.5.2')
cfg_pamac_system_daemon.set('VERSION', '6.6.0')
cfg_pamac_system_daemon.set('TESTSRCDIR', meson.source_root())
cfgfile_7 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_system_daemon)

View File

@@ -103,9 +103,9 @@ namespace Pamac {
public signal void trans_commit_finished (bool success);
public signal void get_authorization_finished (bool authorized);
#if DISABLE_AUR
public signal void write_pamac_config_finished (bool recurse, uint64 refresh_period, bool no_update_hide_icon);
public signal void save_pamac_config_finished (bool recurse, uint64 refresh_period, bool no_update_hide_icon);
#else
public signal void write_pamac_config_finished (bool recurse, uint64 refresh_period, bool no_update_hide_icon,
public signal void save_pamac_config_finished (bool recurse, uint64 refresh_period, bool no_update_hide_icon,
bool enable_aur, bool search_aur, string aur_build_dir, bool check_aur_updates);
#endif
public signal void write_alpm_config_finished (bool checkspace);
@@ -356,21 +356,15 @@ namespace Pamac {
});
}
public void start_write_pamac_config (HashTable<string,Variant> new_pamac_conf, GLib.BusName sender) {
check_authorization.begin (sender, (obj, res) => {
var pamac_config = new Pamac.Config ("/etc/pamac.conf");
bool authorized = check_authorization.end (res);
if (authorized ) {
pamac_config.write (new_pamac_conf);
pamac_config.reload ();
}
public void start_save_pamac_config () {
var pamac_config = new Pamac.Config ();
pamac_config.reload ();
#if DISABLE_AUR
write_pamac_config_finished (pamac_config.recurse, pamac_config.refresh_period, pamac_config.no_update_hide_icon);
save_pamac_config_finished (pamac_config.recurse, pamac_config.refresh_period, pamac_config.no_update_hide_icon);
#else
write_pamac_config_finished (pamac_config.recurse, pamac_config.refresh_period, pamac_config.no_update_hide_icon,
save_pamac_config_finished (pamac_config.recurse, pamac_config.refresh_period, pamac_config.no_update_hide_icon,
pamac_config.enable_aur, pamac_config.search_aur, pamac_config.aur_build_dir, pamac_config.check_aur_updates);
#endif
});
}
private void write_alpm_config () {