forked from cromer/pamac-classic
option to update files databases or not
This commit is contained in:
@@ -7,7 +7,7 @@ set (GETTEXT_PACKAGE "pamac-classic")
|
||||
set (RELEASE_NAME "pamac-classic")
|
||||
set (CMAKE_C_FLAGS "")
|
||||
set (PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set (VERSION "6.6.0")
|
||||
set (VERSION "6.6.1")
|
||||
set (TESTSRCDIR "${CMAKE_SOURCE_DIR}")
|
||||
set (DOLLAR "$")
|
||||
|
||||
@@ -15,7 +15,7 @@ configure_file (${CMAKE_SOURCE_DIR}/src/Config.vala.base ${CMAKE_BINARY_DIR}/src
|
||||
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
|
||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/pamacclassic.pc ${CMAKE_CURRENT_BINARY_DIR}/pamacclassic.pc)
|
||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/pamacclassic.deps ${CMAKE_CURRENT_BINARY_DIR}/pamacclassic.deps)
|
||||
set (VERSION "6.6.0")
|
||||
set (VERSION "6.6.1")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
link_libraries ( ${DEPS_LIBRARIES} )
|
||||
link_directories ( ${DEPS_LIBRARY_DIRS} )
|
||||
@@ -101,7 +101,7 @@ add_dependencies( pamacclassic ${pamacclassic_DEPENDENCIES} )
|
||||
target_link_libraries( pamacclassic m )
|
||||
set_target_properties( pamacclassic PROPERTIES
|
||||
VERSION
|
||||
6.6.0
|
||||
6.6.1
|
||||
SOVERSION
|
||||
6 )
|
||||
|
||||
|
@@ -4,7 +4,7 @@ cfg_pamac_classic.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('
|
||||
cfg_pamac_classic.set('GETTEXT_PACKAGE', 'pamac-classic')
|
||||
cfg_pamac_classic.set('RELEASE_NAME', 'pamac-classic')
|
||||
cfg_pamac_classic.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac_classic.set('VERSION', '6.6.0')
|
||||
cfg_pamac_classic.set('VERSION', '6.6.1')
|
||||
cfg_pamac_classic.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_1 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_classic)
|
||||
@@ -59,7 +59,7 @@ pamac_classic_deps += [meson.get_compiler('c').find_library('m', required : fals
|
||||
pamac_classic_vala_args += ['--gir=pamacclassic-6.0.gir']
|
||||
|
||||
|
||||
pamacclassic_library = shared_library('pamacclassic',pamac_classic_sources,dependencies: pamac_classic_deps,vala_args: pamac_classic_vala_args,c_args: pamac_classic_c_args,version: '6.6.0',soversion: '6',install: true)
|
||||
pamacclassic_library = shared_library('pamacclassic',pamac_classic_sources,dependencies: pamac_classic_deps,vala_args: pamac_classic_vala_args,c_args: pamac_classic_c_args,version: '6.6.1',soversion: '6',install: true)
|
||||
|
||||
pamac_classic_requires = []
|
||||
pamac_classic_requires += ['gdk-3.0']
|
||||
@@ -74,7 +74,7 @@ pamac_classic_requires += ['glib-2.0']
|
||||
pamac_classic_requires += ['gobject-2.0']
|
||||
pkg_mod = import('pkgconfig')
|
||||
pkg_mod.generate(libraries : pamacclassic_library,
|
||||
version : '6.6.0',
|
||||
version : '6.6.1',
|
||||
name : 'pamacclassic',
|
||||
filebase : 'pamacclassic',
|
||||
description : 'pamacclassic',
|
||||
|
@@ -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.6.0")
|
||||
set (VERSION "6.6.1")
|
||||
set (TESTSRCDIR "${CMAKE_SOURCE_DIR}")
|
||||
set (DOLLAR "$")
|
||||
|
||||
configure_file (${CMAKE_SOURCE_DIR}/src/pamac-clean-cache/Config.vala.base ${CMAKE_BINARY_DIR}/src/pamac-clean-cache/Config.vala)
|
||||
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
|
||||
set (VERSION "6.6.0")
|
||||
set (VERSION "6.6.1")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lpamacclassic )
|
||||
|
@@ -4,7 +4,7 @@ cfg_pamac_clean_cache.set('PKGDATADIR', join_paths(get_option('prefix'),get_opti
|
||||
cfg_pamac_clean_cache.set('GETTEXT_PACKAGE', 'pamac-classic')
|
||||
cfg_pamac_clean_cache.set('RELEASE_NAME', 'pamac-classic')
|
||||
cfg_pamac_clean_cache.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac_clean_cache.set('VERSION', '6.6.0')
|
||||
cfg_pamac_clean_cache.set('VERSION', '6.6.1')
|
||||
cfg_pamac_clean_cache.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_4 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_clean_cache)
|
||||
|
@@ -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.6.0")
|
||||
set (VERSION "6.6.1")
|
||||
set (TESTSRCDIR "${CMAKE_SOURCE_DIR}")
|
||||
set (DOLLAR "$")
|
||||
|
||||
configure_file (${CMAKE_SOURCE_DIR}/src/pamac-install/Config.vala.base ${CMAKE_BINARY_DIR}/src/pamac-install/Config.vala)
|
||||
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
|
||||
set (VERSION "6.6.0")
|
||||
set (VERSION "6.6.1")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lpamacclassic )
|
||||
|
@@ -4,7 +4,7 @@ cfg_pamac_install.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('
|
||||
cfg_pamac_install.set('GETTEXT_PACKAGE', 'pamac-classic')
|
||||
cfg_pamac_install.set('RELEASE_NAME', 'pamac-classic')
|
||||
cfg_pamac_install.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac_install.set('VERSION', '6.6.0')
|
||||
cfg_pamac_install.set('VERSION', '6.6.1')
|
||||
cfg_pamac_install.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_5 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_install)
|
||||
|
@@ -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.6.0")
|
||||
set (VERSION "6.6.1")
|
||||
set (TESTSRCDIR "${CMAKE_SOURCE_DIR}")
|
||||
set (DOLLAR "$")
|
||||
|
||||
configure_file (${CMAKE_SOURCE_DIR}/src/pamac-manager/Config.vala.base ${CMAKE_BINARY_DIR}/src/pamac-manager/Config.vala)
|
||||
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
|
||||
set (VERSION "6.6.0")
|
||||
set (VERSION "6.6.1")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lpamacclassic )
|
||||
|
@@ -4,7 +4,7 @@ cfg_pamac_manager.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('
|
||||
cfg_pamac_manager.set('GETTEXT_PACKAGE', 'pamac-classic')
|
||||
cfg_pamac_manager.set('RELEASE_NAME', 'pamac-classic')
|
||||
cfg_pamac_manager.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac_manager.set('VERSION', '6.6.0')
|
||||
cfg_pamac_manager.set('VERSION', '6.6.1')
|
||||
cfg_pamac_manager.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_6 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_manager)
|
||||
|
@@ -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.6.0")
|
||||
set (VERSION "6.6.1")
|
||||
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.6.0")
|
||||
set (VERSION "6.6.1")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lpamacclassic )
|
||||
|
@@ -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.6.0')
|
||||
cfg_pamac_system_daemon.set('VERSION', '6.6.1')
|
||||
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)
|
||||
|
@@ -193,7 +193,12 @@ namespace Pamac {
|
||||
alpm_handle.totaldlcb = (Alpm.TotalDownloadCallBack) cb_totaldownload;
|
||||
alpm_handle.logcb = (Alpm.LogCallBack) cb_log;
|
||||
lockfile = GLib.File.new_for_path (alpm_handle.lockfile);
|
||||
files_handle = alpm_config.get_handle (false, true);
|
||||
var pamac_config = new Pamac.Config ();
|
||||
if (pamac_config.update_files_db) {
|
||||
files_handle = alpm_config.get_handle (true);
|
||||
} else {
|
||||
files_handle = alpm_config.get_handle (false);
|
||||
}
|
||||
files_handle.eventcb = (Alpm.EventCallBack) cb_event;
|
||||
files_handle.progresscb = (Alpm.ProgressCallBack) cb_progress;
|
||||
files_handle.questioncb = (Alpm.QuestionCallBack) cb_question;
|
||||
|
@@ -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.6.0")
|
||||
set (VERSION "6.6.1")
|
||||
set (TESTSRCDIR "${CMAKE_SOURCE_DIR}")
|
||||
set (DOLLAR "$")
|
||||
|
||||
configure_file (${CMAKE_SOURCE_DIR}/src/pamac-tray/Config.vala.base ${CMAKE_BINARY_DIR}/src/pamac-tray/Config.vala)
|
||||
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
|
||||
set (VERSION "6.6.0")
|
||||
set (VERSION "6.6.1")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lpamacclassic )
|
||||
|
@@ -4,7 +4,7 @@ cfg_pamac_tray.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('dat
|
||||
cfg_pamac_tray.set('GETTEXT_PACKAGE', 'pamac-classic')
|
||||
cfg_pamac_tray.set('RELEASE_NAME', 'pamac-classic')
|
||||
cfg_pamac_tray.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac_tray.set('VERSION', '6.6.0')
|
||||
cfg_pamac_tray.set('VERSION', '6.6.1')
|
||||
cfg_pamac_tray.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_3 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_tray)
|
||||
|
@@ -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.6.0")
|
||||
set (VERSION "6.6.1")
|
||||
set (TESTSRCDIR "${CMAKE_SOURCE_DIR}")
|
||||
set (DOLLAR "$")
|
||||
|
||||
configure_file (${CMAKE_SOURCE_DIR}/src/pamac-user-daemon/Config.vala.base ${CMAKE_BINARY_DIR}/src/pamac-user-daemon/Config.vala)
|
||||
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
|
||||
set (VERSION "6.6.0")
|
||||
set (VERSION "6.6.1")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lpamacclassic )
|
||||
@@ -34,6 +34,7 @@ set (VALA_PACKAGES ${VALA_PACKAGES} gobject-2.0)
|
||||
|
||||
set (APP_SOURCES ${APP_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/Config.vala)
|
||||
set (APP_SOURCES ${APP_SOURCES} alpm_config.vala)
|
||||
set (APP_SOURCES ${APP_SOURCES} pamac_config.vala)
|
||||
set (APP_SOURCES ${APP_SOURCES} user_daemon.vala)
|
||||
|
||||
set (CUSTOM_VAPIS_LIST ${CUSTOM_VAPIS_LIST} ${CMAKE_BINARY_DIR}/src/pamacclassic.vapi)
|
||||
|
@@ -4,7 +4,7 @@ cfg_pamac_user_daemon.set('PKGDATADIR', join_paths(get_option('prefix'),get_opti
|
||||
cfg_pamac_user_daemon.set('GETTEXT_PACKAGE', 'pamac-classic')
|
||||
cfg_pamac_user_daemon.set('RELEASE_NAME', 'pamac-classic')
|
||||
cfg_pamac_user_daemon.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac_user_daemon.set('VERSION', '6.6.0')
|
||||
cfg_pamac_user_daemon.set('VERSION', '6.6.1')
|
||||
cfg_pamac_user_daemon.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_2 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_user_daemon)
|
||||
@@ -18,6 +18,7 @@ pamac_user_daemon_deps += [glib_2_0_dep]
|
||||
pamac_user_daemon_deps += [gobject_2_0_dep]
|
||||
pamac_user_daemon_sources = [cfgfile_2]
|
||||
pamac_user_daemon_sources += ['alpm_config.vala']
|
||||
pamac_user_daemon_sources += ['pamac_config.vala']
|
||||
pamac_user_daemon_sources += ['user_daemon.vala']
|
||||
pamac_user_daemon_vala_args = ['--pkg','posix']
|
||||
pamac_user_daemon_vala_args += ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
|
||||
|
1
src/pamac-user-daemon/pamac_config.vala
Symbolic link
1
src/pamac-user-daemon/pamac_config.vala
Symbolic link
@@ -0,0 +1 @@
|
||||
../pamac_config.vala
|
@@ -58,7 +58,12 @@ namespace Pamac {
|
||||
if (alpm_handle == null) {
|
||||
return;
|
||||
} else {
|
||||
files_handle = alpm_config.get_handle (false, true);
|
||||
var pamac_config = new Pamac.Config ();
|
||||
if (pamac_config.update_files_db) {
|
||||
files_handle = alpm_config.get_handle (true);
|
||||
} else {
|
||||
files_handle = alpm_config.get_handle (false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -812,12 +817,23 @@ namespace Pamac {
|
||||
syncdbs.next ();
|
||||
}
|
||||
// refresh file dbs
|
||||
var tmp_files_handle = alpm_config.get_handle (false, true);
|
||||
syncdbs = tmp_files_handle.syncdbs;
|
||||
while (syncdbs != null) {
|
||||
unowned Alpm.DB db = syncdbs.data;
|
||||
db.update (0);
|
||||
syncdbs.next ();
|
||||
var pamac_config = new Pamac.Config ();
|
||||
if (pamac_config.update_files_db) {
|
||||
var tmp_files_handle = alpm_config.get_handle (true, true);
|
||||
syncdbs = tmp_files_handle.syncdbs;
|
||||
while (syncdbs != null) {
|
||||
unowned Alpm.DB db = syncdbs.data;
|
||||
db.update (0);
|
||||
syncdbs.next ();
|
||||
}
|
||||
} else {
|
||||
var tmp_files_handle = alpm_config.get_handle (false, true);
|
||||
syncdbs = tmp_files_handle.syncdbs;
|
||||
while (syncdbs != null) {
|
||||
unowned Alpm.DB db = syncdbs.data;
|
||||
db.update (0);
|
||||
syncdbs.next ();
|
||||
}
|
||||
}
|
||||
string[] local_pkgs = {};
|
||||
unowned Alpm.List<unowned Alpm.Package> pkgcache = tmp_handle.localdb.pkgcache;
|
||||
|
@@ -37,6 +37,7 @@ namespace Pamac {
|
||||
public string terminal_background { get; private set; }
|
||||
public string terminal_foreground { get; private set; }
|
||||
public string terminal_font { get; private set; }
|
||||
public bool update_files_db { get; private set; }
|
||||
public unowned HashTable<string,string> environment_variables {
|
||||
get {
|
||||
return _environment_variables;
|
||||
@@ -74,26 +75,6 @@ namespace Pamac {
|
||||
}
|
||||
|
||||
public void reload () {
|
||||
// set default options
|
||||
recurse = false;
|
||||
no_update_hide_icon = false;
|
||||
#if DISABLE_AUR
|
||||
#else
|
||||
enable_aur = false;
|
||||
search_aur = false;
|
||||
aur_build_dir = "/tmp";
|
||||
check_aur_updates = false;
|
||||
#endif
|
||||
keep_num_pkgs = 3;
|
||||
rm_only_uninstalled = false;
|
||||
terminal_background = "rgb(0,0,0)";
|
||||
terminal_foreground = "rgb(255,255,255)";
|
||||
terminal_font = "Sans Regular 12";
|
||||
//parse_file (conf_path);
|
||||
load_settings ();
|
||||
}
|
||||
|
||||
void load_settings () {
|
||||
var settings = new Settings ("org.pamac.main");
|
||||
recurse = settings.get_boolean ("remove-unrequired-deps");
|
||||
refresh_period = settings.get_uint64 ("refresh-period");
|
||||
@@ -103,7 +84,7 @@ namespace Pamac {
|
||||
terminal_background = settings.get_string ("background-color");
|
||||
terminal_foreground = settings.get_string ("foreground-color");
|
||||
terminal_font = settings.get_string ("terminal-font");
|
||||
|
||||
update_files_db = settings.get_boolean ("update-files-db");
|
||||
#if DISABLE_AUR
|
||||
#else
|
||||
settings = new Settings ("org.pamac.aur");
|
||||
|
@@ -4,7 +4,7 @@ includedir=@DOLLAR@{prefix}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||
|
||||
Name: pamacclassic
|
||||
Description: pamacclassic
|
||||
Version: 6.6.0
|
||||
Version: 6.6.1
|
||||
Libs: -L@DOLLAR@{libdir} -lpamacclassic
|
||||
Cflags: -I@DOLLAR@{includedir}
|
||||
Requires: gdk-3.0 gtk+-3.0 json-glib-1.0 libalpm libnotify libsoup-2.4 vte-2.91 gio-2.0 glib-2.0 gobject-2.0
|
||||
|
@@ -26,6 +26,8 @@ namespace Pamac {
|
||||
[GtkChild]
|
||||
Gtk.Switch remove_unrequired_deps_button;
|
||||
[GtkChild]
|
||||
Gtk.Switch update_files_db_button;
|
||||
[GtkChild]
|
||||
Gtk.Switch check_space_button;
|
||||
[GtkChild]
|
||||
Gtk.Switch check_updates_button;
|
||||
@@ -94,6 +96,7 @@ namespace Pamac {
|
||||
aur_build_dir_label.set_markup (dgettext (null, "Build directory") +":");
|
||||
#endif
|
||||
remove_unrequired_deps_button.active = transaction.recurse;
|
||||
update_files_db_button.active = transaction.update_files_db;
|
||||
check_space_button.active = transaction.get_checkspace ();
|
||||
if (transaction.refresh_period == 0) {
|
||||
check_updates_button.active = false;
|
||||
@@ -130,6 +133,7 @@ namespace Pamac {
|
||||
ignorepkgs_liststore.insert_with_values (null, -1, 0, ignorepkg);
|
||||
}
|
||||
remove_unrequired_deps_button.state_set.connect (on_remove_unrequired_deps_button_state_set);
|
||||
update_files_db_button.state_set.connect (on_update_files_db_button_state_set);
|
||||
check_space_button.state_set.connect (on_check_space_button_state_set);
|
||||
transaction.write_alpm_config_finished.connect (on_write_alpm_config_finished);
|
||||
check_updates_button.state_set.connect (on_check_updates_button_state_set);
|
||||
@@ -200,6 +204,14 @@ namespace Pamac {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool on_update_files_db_button_state_set (bool new_state) {
|
||||
var settings = new Settings ("org.pamac.main");
|
||||
settings.set_boolean ("update-files-db", new_state);
|
||||
config_changed();
|
||||
transaction.start_save_pamac_config ();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool on_check_updates_button_state_set (bool new_state) {
|
||||
var settings = new Settings ("org.pamac.main");
|
||||
refresh_period_label.sensitive = new_state;
|
||||
@@ -303,6 +315,7 @@ namespace Pamac {
|
||||
void config_changed() {
|
||||
transaction.config_changed();
|
||||
remove_unrequired_deps_button.state = transaction.recurse;
|
||||
update_files_db_button.state = transaction.update_files_db;
|
||||
if (transaction.refresh_period == 0) {
|
||||
check_updates_button.state = false;
|
||||
refresh_period_label.sensitive = false;
|
||||
|
@@ -152,6 +152,7 @@ namespace Pamac {
|
||||
public unowned GLib.HashTable<string,string> environment_variables { get { return pamac_config.environment_variables; } }
|
||||
public bool no_update_hide_icon { get { return pamac_config.no_update_hide_icon; } }
|
||||
public bool recurse { get { return pamac_config.recurse; } }
|
||||
public bool update_files_db { get { return pamac_config.update_files_db; } }
|
||||
public uint64 refresh_period { get { return pamac_config.refresh_period; } }
|
||||
|
||||
//Alpm.TransFlag
|
||||
|
Reference in New Issue
Block a user