forked from cromer/pamac-classic
add font selection for terminal
fix manager to work better when compiling without aur
This commit is contained in:
@@ -7,7 +7,7 @@ set (GETTEXT_PACKAGE "pamac")
|
||||
set (RELEASE_NAME "pamac")
|
||||
set (CMAKE_C_FLAGS "")
|
||||
set (PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set (VERSION "6.2.1")
|
||||
set (VERSION "6.3.0")
|
||||
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}/Pamac.pc ${CMAKE_CURRENT_BINARY_DIR}/Pamac.pc)
|
||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Pamac.deps ${CMAKE_CURRENT_BINARY_DIR}/Pamac.deps)
|
||||
set (VERSION "6.2.1")
|
||||
set (VERSION "6.3.0")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
link_libraries ( ${DEPS_LIBRARIES} )
|
||||
link_directories ( ${DEPS_LIBRARY_DIRS} )
|
||||
@@ -64,7 +64,6 @@ if ((${CMAKE_BUILD_TYPE} STREQUAL "Debug") OR (${CMAKE_BUILD_TYPE} STREQUAL "Rel
|
||||
endif()
|
||||
|
||||
set (COMPILE_OPTIONS ${COMPILE_OPTIONS} --library=Pamac --gir Pamac-6.0.gir )
|
||||
set (COMPILE_OPTIONS ${COMPILE_OPTIONS} --gresources=${CMAKE_SOURCE_DIR}/data/pamac.transaction_no_aur.gresource.xml )
|
||||
set (COMPILE_OPTIONS ${COMPILE_OPTIONS} --gresources=${CMAKE_SOURCE_DIR}/data/pamac.transaction.gresource.xml )
|
||||
|
||||
vala_precompile(VALA_C Pamac
|
||||
@@ -87,7 +86,7 @@ add_dependencies( Pamac ${Pamac_DEPENDENCIES} )
|
||||
target_link_libraries( Pamac m )
|
||||
set_target_properties( Pamac PROPERTIES
|
||||
VERSION
|
||||
6.2.1
|
||||
6.3.0
|
||||
SOVERSION
|
||||
6 )
|
||||
|
||||
|
@@ -6,7 +6,7 @@ includedir=@DOLLAR@{exec_prefix}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||
|
||||
Name: Pamac
|
||||
Description: Pamac
|
||||
Version: 6.2.1
|
||||
Version: 6.3.0
|
||||
Libs: -L@DOLLAR@{libdir} -lPamac
|
||||
Cflags: -I@DOLLAR@{includedir}
|
||||
Requires: gdk-3.0 gtk+-3.0 libalpm libnotify vte-2.91 gio-2.0 glib-2.0 gobject-2.0
|
||||
|
@@ -6,7 +6,7 @@ includedir=@DOLLAR@{exec_prefix}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||
|
||||
Name: AUR
|
||||
Description: AUR
|
||||
Version: 6.2.1
|
||||
Version: 6.3.0
|
||||
Libs: -L@DOLLAR@{libdir} -lAUR
|
||||
Cflags: -I@DOLLAR@{includedir}
|
||||
Requires: json-glib-1.0 libsoup-2.4 glib-2.0
|
||||
|
@@ -7,7 +7,7 @@ set (GETTEXT_PACKAGE "pamac")
|
||||
set (RELEASE_NAME "pamac")
|
||||
set (CMAKE_C_FLAGS "")
|
||||
set (PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set (VERSION "6.2.1")
|
||||
set (VERSION "6.3.0")
|
||||
set (TESTSRCDIR "${CMAKE_SOURCE_DIR}")
|
||||
set (DOLLAR "$")
|
||||
|
||||
@@ -15,7 +15,7 @@ configure_file (${CMAKE_SOURCE_DIR}/src/aur/Config.vala.base ${CMAKE_BINARY_DIR}
|
||||
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
|
||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/AUR.pc ${CMAKE_CURRENT_BINARY_DIR}/AUR.pc)
|
||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/AUR.deps ${CMAKE_CURRENT_BINARY_DIR}/AUR.deps)
|
||||
set (VERSION "6.2.1")
|
||||
set (VERSION "6.3.0")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
link_libraries ( ${DEPS_LIBRARIES} )
|
||||
link_directories ( ${DEPS_LIBRARY_DIRS} )
|
||||
@@ -65,7 +65,7 @@ add_library(AUR SHARED ${VALA_C})
|
||||
|
||||
set_target_properties( AUR PROPERTIES
|
||||
VERSION
|
||||
6.2.1
|
||||
6.3.0
|
||||
SOVERSION
|
||||
6 )
|
||||
|
||||
|
@@ -4,7 +4,7 @@ cfg_aur.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),
|
||||
cfg_aur.set('GETTEXT_PACKAGE', 'pamac')
|
||||
cfg_aur.set('RELEASE_NAME', 'pamac')
|
||||
cfg_aur.set('PREFIX', get_option('prefix'))
|
||||
cfg_aur.set('VERSION', '6.2.1')
|
||||
cfg_aur.set('VERSION', '6.3.0')
|
||||
cfg_aur.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_2 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_aur)
|
||||
@@ -27,7 +27,7 @@ endif
|
||||
aur_vala_args += ['--gir=AUR-6.0.gir']
|
||||
|
||||
|
||||
AUR_library = shared_library('AUR',aur_sources,dependencies: aur_deps,vala_args: aur_vala_args,c_args: aur_c_args,version: '6.2.1',soversion: '6',install: true)
|
||||
AUR_library = shared_library('AUR',aur_sources,dependencies: aur_deps,vala_args: aur_vala_args,c_args: aur_c_args,version: '6.3.0',soversion: '6',install: true)
|
||||
|
||||
aur_requires = []
|
||||
aur_requires += ['json-glib-1.0']
|
||||
@@ -35,7 +35,7 @@ aur_requires += ['libsoup-2.4']
|
||||
aur_requires += ['glib-2.0']
|
||||
pkg_mod = import('pkgconfig')
|
||||
pkg_mod.generate(libraries : AUR_library,
|
||||
version : '6.2.1',
|
||||
version : '6.3.0',
|
||||
name : 'AUR',
|
||||
filebase : 'AUR',
|
||||
description : 'AUR',
|
||||
|
@@ -4,7 +4,7 @@ cfg_pamac.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'
|
||||
cfg_pamac.set('GETTEXT_PACKAGE', 'pamac')
|
||||
cfg_pamac.set('RELEASE_NAME', 'pamac')
|
||||
cfg_pamac.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac.set('VERSION', '6.2.1')
|
||||
cfg_pamac.set('VERSION', '6.3.0')
|
||||
cfg_pamac.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_1 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac)
|
||||
@@ -29,18 +29,10 @@ pamac_sources += ['preferences_dialog.vala']
|
||||
pamac_sources += ['progress_box.vala']
|
||||
pamac_sources += ['transaction.vala']
|
||||
pamac_sources += ['transaction_sum_dialog.vala']
|
||||
if DISABLE_AUR
|
||||
pamac_sources += [pamac_transaction_no_aur_gresource_xml_file_c]
|
||||
else
|
||||
pamac_sources += [pamac_transaction_gresource_xml_file_c]
|
||||
endif
|
||||
pamac_vala_args = ['--pkg','posix']
|
||||
pamac_vala_args += ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
|
||||
if DISABLE_AUR
|
||||
pamac_vala_args += ['--gresources='+join_paths(meson.source_root(),'data/pamac.transaction_no_aur.gresource.xml')]
|
||||
else
|
||||
pamac_vala_args += ['--gresources='+join_paths(meson.source_root(),'data/pamac.transaction.gresource.xml')]
|
||||
endif
|
||||
pamac_c_args = []
|
||||
if DISABLE_AUR
|
||||
pamac_vala_args += ['-D', 'DISABLE_AUR']
|
||||
@@ -54,7 +46,7 @@ pamac_deps += [meson.get_compiler('c').find_library('m', required : false)]
|
||||
pamac_vala_args += ['--gir=Pamac-6.0.gir']
|
||||
|
||||
|
||||
Pamac_library = shared_library('Pamac',pamac_sources,dependencies: pamac_deps,vala_args: pamac_vala_args,c_args: pamac_c_args,version: '6.2.1',soversion: '6',install: true)
|
||||
Pamac_library = shared_library('Pamac',pamac_sources,dependencies: pamac_deps,vala_args: pamac_vala_args,c_args: pamac_c_args,version: '6.3.0',soversion: '6',install: true)
|
||||
|
||||
pamac_requires = []
|
||||
pamac_requires += ['gdk-3.0']
|
||||
@@ -67,7 +59,7 @@ pamac_requires += ['glib-2.0']
|
||||
pamac_requires += ['gobject-2.0']
|
||||
pkg_mod = import('pkgconfig')
|
||||
pkg_mod.generate(libraries : Pamac_library,
|
||||
version : '6.2.1',
|
||||
version : '6.3.0',
|
||||
name : 'Pamac',
|
||||
filebase : 'Pamac',
|
||||
description : 'Pamac',
|
||||
|
@@ -7,13 +7,13 @@ set (GETTEXT_PACKAGE "pamac")
|
||||
set (RELEASE_NAME "pamac")
|
||||
set (CMAKE_C_FLAGS "")
|
||||
set (PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set (VERSION "6.2.1")
|
||||
set (VERSION "6.3.0")
|
||||
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.2.1")
|
||||
set (VERSION "6.3.0")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lPamac )
|
||||
|
@@ -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')
|
||||
cfg_pamac_clean_cache.set('RELEASE_NAME', 'pamac')
|
||||
cfg_pamac_clean_cache.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac_clean_cache.set('VERSION', '6.2.1')
|
||||
cfg_pamac_clean_cache.set('VERSION', '6.3.0')
|
||||
cfg_pamac_clean_cache.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_5 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_clean_cache)
|
||||
|
@@ -7,13 +7,13 @@ set (GETTEXT_PACKAGE "pamac")
|
||||
set (RELEASE_NAME "pamac")
|
||||
set (CMAKE_C_FLAGS "")
|
||||
set (PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set (VERSION "6.2.1")
|
||||
set (VERSION "6.3.0")
|
||||
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.2.1")
|
||||
set (VERSION "6.3.0")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lPamac )
|
||||
|
@@ -4,7 +4,7 @@ cfg_pamac_install.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('
|
||||
cfg_pamac_install.set('GETTEXT_PACKAGE', 'pamac')
|
||||
cfg_pamac_install.set('RELEASE_NAME', 'pamac')
|
||||
cfg_pamac_install.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac_install.set('VERSION', '6.2.1')
|
||||
cfg_pamac_install.set('VERSION', '6.3.0')
|
||||
cfg_pamac_install.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_6 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_install)
|
||||
|
@@ -7,13 +7,13 @@ set (GETTEXT_PACKAGE "pamac")
|
||||
set (RELEASE_NAME "pamac")
|
||||
set (CMAKE_C_FLAGS "")
|
||||
set (PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set (VERSION "6.2.1")
|
||||
set (VERSION "6.3.0")
|
||||
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.2.1")
|
||||
set (VERSION "6.3.0")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lPamac )
|
||||
@@ -51,7 +51,6 @@ if ((${CMAKE_BUILD_TYPE} STREQUAL "Debug") OR (${CMAKE_BUILD_TYPE} STREQUAL "Rel
|
||||
set(COMPILE_OPTIONS ${COMPILE_OPTIONS} "-g")
|
||||
endif()
|
||||
|
||||
set (COMPILE_OPTIONS ${COMPILE_OPTIONS} --gresources=${CMAKE_SOURCE_DIR}/data/pamac.manager_no_aur.gresource.xml )
|
||||
set (COMPILE_OPTIONS ${COMPILE_OPTIONS} --gresources=${CMAKE_SOURCE_DIR}/data/pamac.manager.gresource.xml )
|
||||
|
||||
vala_precompile(VALA_C pamac-manager
|
||||
|
@@ -39,11 +39,8 @@ namespace Pamac {
|
||||
}
|
||||
}
|
||||
|
||||
#if DISABLE_AUR
|
||||
[GtkTemplate (ui = "/org/pamac/manager/interface/manager_window_no_aur.ui")]
|
||||
#else
|
||||
|
||||
[GtkTemplate (ui = "/org/pamac/manager/interface/manager_window.ui")]
|
||||
#endif
|
||||
class ManagerWindow : Gtk.ApplicationWindow {
|
||||
// icons
|
||||
Gdk.Pixbuf? installed_icon;
|
||||
@@ -67,6 +64,8 @@ namespace Pamac {
|
||||
[GtkChild]
|
||||
Gtk.TreeViewColumn packages_state_column;
|
||||
#if DISABLE_AUR
|
||||
[GtkChild]
|
||||
Gtk.ScrolledWindow aur_scrolledwindow;
|
||||
#else
|
||||
[GtkChild]
|
||||
Gtk.TreeView aur_treeview;
|
||||
@@ -172,8 +171,13 @@ namespace Pamac {
|
||||
Object (application: application);
|
||||
|
||||
#if DISABLE_AUR
|
||||
packages_stack.remove (aur_scrolledwindow);
|
||||
packages_stackswitcher.visible = false;
|
||||
#else
|
||||
support_aur (false);
|
||||
aur_treeview.row_activated.connect (on_aur_treeview_row_activated);
|
||||
aur_treeview.button_press_event.connect (on_aur_treeview_button_press_event);
|
||||
aur_treeview.query_tooltip.connect (on_aur_treeview_query_tooltip);
|
||||
#endif
|
||||
button_back.visible = false;
|
||||
transaction_infobox.visible = false;
|
||||
@@ -1208,7 +1212,6 @@ namespace Pamac {
|
||||
|
||||
#if DISABLE_AUR
|
||||
#else
|
||||
[GtkCallback]
|
||||
void on_aur_treeview_row_activated (Gtk.TreeView treeview, Gtk.TreePath path, Gtk.TreeViewColumn column) {
|
||||
if (column.title == dgettext (null, "Name")) {
|
||||
main_stack.visible_child_name = "details";
|
||||
@@ -1508,7 +1511,6 @@ namespace Pamac {
|
||||
|
||||
#if DISABLE_AUR
|
||||
#else
|
||||
[GtkCallback]
|
||||
bool on_aur_treeview_button_press_event (Gdk.EventButton event) {
|
||||
aur_treeview.grab_focus ();
|
||||
// Check if right mouse button was clicked
|
||||
@@ -1568,7 +1570,6 @@ namespace Pamac {
|
||||
return false;
|
||||
}
|
||||
|
||||
[GtkCallback]
|
||||
bool on_aur_treeview_query_tooltip (int x, int y, bool keyboard_tooltip, Gtk.Tooltip tooltip) {
|
||||
Gtk.TreePath path;
|
||||
Gtk.TreeIter iter;
|
||||
|
@@ -4,7 +4,7 @@ cfg_pamac_manager.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('
|
||||
cfg_pamac_manager.set('GETTEXT_PACKAGE', 'pamac')
|
||||
cfg_pamac_manager.set('RELEASE_NAME', 'pamac')
|
||||
cfg_pamac_manager.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac_manager.set('VERSION', '6.2.1')
|
||||
cfg_pamac_manager.set('VERSION', '6.3.0')
|
||||
cfg_pamac_manager.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_7 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_manager)
|
||||
@@ -17,17 +17,9 @@ pamac_manager_sources = [cfgfile_7]
|
||||
pamac_manager_sources += ['history_dialog.vala']
|
||||
pamac_manager_sources += ['manager.vala']
|
||||
pamac_manager_sources += ['manager_window.vala']
|
||||
if DISABLE_AUR
|
||||
pamac_manager_sources += [pamac_manager_no_aur_gresource_xml_file_c]
|
||||
else
|
||||
pamac_manager_sources += [pamac_manager_gresource_xml_file_c]
|
||||
endif
|
||||
pamac_manager_vala_args = ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
|
||||
if DISABLE_AUR
|
||||
pamac_manager_vala_args += ['--gresources='+join_paths(meson.source_root(),'data/pamac.manager_no_aur.gresource.xml')]
|
||||
else
|
||||
pamac_manager_vala_args += ['--gresources='+join_paths(meson.source_root(),'data/pamac.manager.gresource.xml')]
|
||||
endif
|
||||
pamac_manager_dependencies = [Pamac_library]
|
||||
pamac_manager_c_args = []
|
||||
if DISABLE_AUR
|
||||
|
@@ -7,13 +7,13 @@ set (GETTEXT_PACKAGE "pamac")
|
||||
set (RELEASE_NAME "pamac")
|
||||
set (CMAKE_C_FLAGS "")
|
||||
set (PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set (VERSION "6.2.1")
|
||||
set (VERSION "6.3.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.2.1")
|
||||
set (VERSION "6.3.0")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src ${CMAKE_BINARY_DIR}/src/aur )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lPamac -lAUR )
|
||||
|
@@ -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')
|
||||
cfg_pamac_system_daemon.set('RELEASE_NAME', 'pamac')
|
||||
cfg_pamac_system_daemon.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac_system_daemon.set('VERSION', '6.2.1')
|
||||
cfg_pamac_system_daemon.set('VERSION', '6.3.0')
|
||||
cfg_pamac_system_daemon.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_8 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_system_daemon)
|
||||
|
@@ -7,13 +7,13 @@ set (GETTEXT_PACKAGE "pamac")
|
||||
set (RELEASE_NAME "pamac")
|
||||
set (CMAKE_C_FLAGS "")
|
||||
set (PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set (VERSION "6.2.1")
|
||||
set (VERSION "6.3.0")
|
||||
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.2.1")
|
||||
set (VERSION "6.3.0")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src ${CMAKE_BINARY_DIR}/src/aur )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lPamac -lAUR )
|
||||
|
@@ -4,7 +4,7 @@ cfg_pamac_tray.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('dat
|
||||
cfg_pamac_tray.set('GETTEXT_PACKAGE', 'pamac')
|
||||
cfg_pamac_tray.set('RELEASE_NAME', 'pamac')
|
||||
cfg_pamac_tray.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac_tray.set('VERSION', '6.2.1')
|
||||
cfg_pamac_tray.set('VERSION', '6.3.0')
|
||||
cfg_pamac_tray.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_4 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_tray)
|
||||
|
@@ -7,13 +7,13 @@ set (GETTEXT_PACKAGE "pamac")
|
||||
set (RELEASE_NAME "pamac")
|
||||
set (CMAKE_C_FLAGS "")
|
||||
set (PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set (VERSION "6.2.1")
|
||||
set (VERSION "6.3.0")
|
||||
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.2.1")
|
||||
set (VERSION "6.3.0")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src ${CMAKE_BINARY_DIR}/src/aur )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lPamac -lAUR )
|
||||
|
@@ -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')
|
||||
cfg_pamac_user_daemon.set('RELEASE_NAME', 'pamac')
|
||||
cfg_pamac_user_daemon.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac_user_daemon.set('VERSION', '6.2.1')
|
||||
cfg_pamac_user_daemon.set('VERSION', '6.3.0')
|
||||
cfg_pamac_user_daemon.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_3 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_user_daemon)
|
||||
|
@@ -37,6 +37,7 @@ namespace Pamac {
|
||||
public bool rm_only_uninstalled { get; private set; }
|
||||
public string terminal_background { get; private set; }
|
||||
public string terminal_foreground { get; private set; }
|
||||
public string terminal_font { get; private set; }
|
||||
public unowned HashTable<string,string> environment_variables {
|
||||
get {
|
||||
return _environment_variables;
|
||||
@@ -89,6 +90,7 @@ namespace Pamac {
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -150,6 +152,10 @@ namespace Pamac {
|
||||
if (splitted.length == 2) {
|
||||
terminal_foreground = splitted[1]._strip ();
|
||||
}
|
||||
} else if (key == "TerminalFont") {
|
||||
if (splitted.length == 2) {
|
||||
terminal_font = splitted[1]._strip ();
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (GLib.Error e) {
|
||||
@@ -279,6 +285,13 @@ namespace Pamac {
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
} else if (line.contains ("TerminalFont")) {
|
||||
if (new_conf.lookup_extended ("TerminalFont", null, out variant)) {
|
||||
data.append ("TerminalFont = %s\n".printf (variant.get_string ()));
|
||||
new_conf.remove ("TerminalFont");
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
@@ -347,6 +360,8 @@ namespace Pamac {
|
||||
data.append ("BackgroundColor = %s\n".printf (val.get_string ()));
|
||||
} else if (key == "ForegroundColor") {
|
||||
data.append ("ForegroundCOlor = %s\n".printf (val.get_string ()));
|
||||
} else if (key == "TerminalFont") {
|
||||
data.append ("TerminalFont = %s\n".printf (val.get_string ()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -20,11 +20,7 @@
|
||||
|
||||
namespace Pamac {
|
||||
|
||||
#if DISABLE_AUR
|
||||
[GtkTemplate (ui = "/org/pamac/preferences/interface/preferences_dialog_no_aur.ui")]
|
||||
#else
|
||||
[GtkTemplate (ui = "/org/pamac/preferences/interface/preferences_dialog.ui")]
|
||||
#endif
|
||||
class PreferencesDialog : Gtk.Dialog {
|
||||
|
||||
[GtkChild]
|
||||
@@ -52,6 +48,10 @@ namespace Pamac {
|
||||
[GtkChild]
|
||||
Gtk.Button generate_mirrors_list_button;
|
||||
#if DISABLE_AUR
|
||||
[GtkChild]
|
||||
Gtk.Stack stack;
|
||||
[GtkChild]
|
||||
Gtk.Box aur_config_box;
|
||||
#else
|
||||
[GtkChild]
|
||||
Gtk.Switch enable_aur_button;
|
||||
@@ -74,6 +74,8 @@ namespace Pamac {
|
||||
Gtk.ColorButton terminal_background;
|
||||
[GtkChild]
|
||||
Gtk.ColorButton terminal_foreground;
|
||||
[GtkChild]
|
||||
Gtk.FontButton terminal_font;
|
||||
|
||||
Gtk.ListStore ignorepkgs_liststore;
|
||||
Transaction transaction;
|
||||
@@ -87,6 +89,7 @@ namespace Pamac {
|
||||
refresh_period_label.set_markup (dgettext (null, "How often to check for updates, value in hours") +":");
|
||||
cache_keep_nb_label.set_markup (dgettext (null, "Number of versions of each package to keep in the cache") +":");
|
||||
#if DISABLE_AUR
|
||||
stack.remove (aur_config_box);
|
||||
#else
|
||||
aur_build_dir_label.set_markup (dgettext (null, "Build directory") +":");
|
||||
#endif
|
||||
@@ -110,7 +113,7 @@ namespace Pamac {
|
||||
cache_keep_nb_spin_button.value = transaction.keep_num_pkgs;
|
||||
cache_only_uninstalled_checkbutton.active = transaction.rm_only_uninstalled;
|
||||
|
||||
// Set up terminal colors
|
||||
// Set up terminal
|
||||
terminal_background.set_use_alpha (false);
|
||||
terminal_foreground.set_use_alpha (false);
|
||||
Gdk.RGBA rgba = Gdk.RGBA ();
|
||||
@@ -118,6 +121,7 @@ namespace Pamac {
|
||||
terminal_background.rgba = rgba;
|
||||
tmp = rgba.parse (transaction.terminal_foreground);
|
||||
terminal_foreground.rgba = rgba;
|
||||
terminal_font.set_font(transaction.terminal_font);
|
||||
|
||||
// populate ignorepkgs_liststore
|
||||
ignorepkgs_liststore = new Gtk.ListStore (1, typeof (string));
|
||||
@@ -136,6 +140,7 @@ namespace Pamac {
|
||||
transaction.write_pamac_config_finished.connect (on_write_pamac_config_finished);
|
||||
terminal_background.color_set.connect (on_select_background);
|
||||
terminal_foreground.color_set.connect (on_select_foreground);
|
||||
terminal_font.font_set.connect (on_select_font);
|
||||
|
||||
AlpmPackage pkg = transaction.find_installed_satisfier ("pacman-mirrors");
|
||||
if (pkg.name == "") {
|
||||
@@ -249,6 +254,13 @@ namespace Pamac {
|
||||
transaction.update_terminal_foreground (terminal_foreground.rgba.to_string ());
|
||||
}
|
||||
|
||||
void on_select_font () {
|
||||
var new_pamac_conf = new HashTable<string,Variant> (str_hash, str_equal);
|
||||
new_pamac_conf.insert ("TerminalFont", new Variant.string (terminal_font.get_font_name ()));
|
||||
transaction.start_write_pamac_config (new_pamac_conf);
|
||||
transaction.update_terminal_font (terminal_font.get_font_name ());
|
||||
}
|
||||
|
||||
#if DISABLE_AUR
|
||||
#else
|
||||
bool on_enable_aur_button_state_set (bool new_state) {
|
||||
|
@@ -148,6 +148,7 @@ namespace Pamac {
|
||||
public bool rm_only_uninstalled { get { return pamac_config.rm_only_uninstalled; } }
|
||||
public string terminal_background { get { return pamac_config.terminal_background; } }
|
||||
public string terminal_foreground { get { return pamac_config.terminal_foreground; } }
|
||||
public string terminal_font { get { return pamac_config.terminal_font; } }
|
||||
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; } }
|
||||
@@ -198,6 +199,7 @@ namespace Pamac {
|
||||
//dialogs
|
||||
TransactionSumDialog transaction_sum_dialog;
|
||||
public ProgressBox progress_box;
|
||||
//Pango.FontDescription pfd;
|
||||
Vte.Terminal term;
|
||||
Vte.Pty pty;
|
||||
#if DISABLE_AUR
|
||||
@@ -270,6 +272,8 @@ namespace Pamac {
|
||||
term.set_color_background (tmp);
|
||||
tmp.parse (terminal_foreground);
|
||||
term.set_color_foreground (tmp);
|
||||
stdout.printf("Terminal font: %s\n", terminal_font);
|
||||
term.set_font (Pango.FontDescription.from_string (terminal_font));
|
||||
term.button_press_event.connect (on_term_button_press_event);
|
||||
term.key_press_event.connect (on_term_key_press_event);
|
||||
// creating pty for term
|
||||
@@ -316,6 +320,10 @@ namespace Pamac {
|
||||
term.set_color_foreground (tmp);
|
||||
}
|
||||
|
||||
public void update_terminal_font (string font) {
|
||||
term.set_font (Pango.FontDescription.from_string (terminal_font));
|
||||
}
|
||||
|
||||
public void run_preferences_dialog () {
|
||||
check_authorization.begin ((obj, res) => {
|
||||
bool authorized = check_authorization.end (res);
|
||||
|
Reference in New Issue
Block a user