Browse Source

update deprecated code

Chris Cromer 1 week ago
parent
commit
3b66f68b2c
Signed by: Chris Cromer <cromer@artixlinux.org> GPG Key ID: 39CC813FF3C8708A

+ 7
- 2
meson.build View File

@@ -11,7 +11,6 @@ find_program ('glib-compile-resources')
11 11
 find_program ('gtk-update-icon-cache', 'gtk-update-icon-cache.3.0')
12 12
 find_program ('glib-compile-schemas')
13 13
 find_program ('g-ir-compiler')
14
-gdk_3_0_dep = dependency('gdk-3.0')
15 14
 gtk_3_0_dep = dependency('gtk+-3.0')
16 15
 json_glib_1_0_dep = dependency('json-glib-1.0')
17 16
 libalpm_dep = dependency('libalpm')
@@ -19,13 +18,19 @@ libcurl_dep = dependency('libcurl')
19 18
 libnotify_dep = dependency('libnotify')
20 19
 libsoup_2_4_dep = dependency('libsoup-2.4')
21 20
 polkit_gobject_1_dep = dependency('polkit-gobject-1')
22
-vte_2_91_dep = dependency('vte-2.91')
23 21
 if KDE_TRAY
24 22
 appindicator3_0_1_dep = dependency('appindicator3-0.1')
25 23
 endif
24
+atk_dep = dependency('atk')
25
+cairo_dep = dependency('cairo')
26
+gdk_3_0_dep = dependency('gdk-3.0')
27
+gdk_pixbuf_2_0_dep = dependency('gdk-pixbuf-2.0')
26 28
 gio_2_0_dep = dependency('gio-2.0')
27 29
 glib_2_0_dep = dependency('glib-2.0')
28 30
 gobject_2_0_dep = dependency('gobject-2.0')
31
+pango_dep = dependency('pango')
32
+vte_2_91_dep = dependency('vte-2.91')
33
+x11_dep = dependency('x11')
29 34
 
30 35
 subdir('po')
31 36
 cfg_dbus_data = configuration_data()

+ 33
- 45
pamac.avprj View File

@@ -1,8 +1,8 @@
1 1
 ### AutoVala Project ###
2 2
 autovala_version: 30
3 3
 project_name: pamac
4
-project_version: 6.7.2
5
-vala_version: 0.38
4
+project_version: 7.0.0
5
+vala_version: 0.44
6 6
 
7 7
 custom: data/systemd/pamac-system.service /usr/lib/systemd/system
8 8
 custom: data/systemd/pamac-cleancache.service /usr/lib/systemd/system
@@ -22,20 +22,20 @@ define: KDE_TRAY
22 22
 vapidir: src/vapis
23 23
 
24 24
 vala_binary: src/pamac-clean-cache/pamac-clean-cache
25
-*version: 6.7.2
26
-vala_local_package: pamacclassic
25
+*version: 7.0.0
26
+vala_local_package: Pamac
27
+vala_vapi: ../vapis/libalpm.vapi
27 28
 vala_package: posix
28 29
 vala_check_package: gtk+-3.0
29 30
 vala_check_package: json-glib-1.0
30 31
 *vala_check_package: glib-2.0
31
-*vala_check_package: gobject-2.0
32 32
 *vala_source: clean_cache.vala
33
-*vala_source: pamac_config.vala
34 33
 
35 34
 vala_binary: src/pamac-install/pamac-install
36
-*version: 6.7.2
35
+*version: 7.0.0
37 36
 use_gresource: pamac_installer_gresource_xml
38
-vala_local_package: pamacclassic
37
+vala_local_package: Pamac
38
+vala_vapi: ../vapis/libalpm.vapi
39 39
 vala_check_package: gtk+-3.0
40 40
 vala_check_package: json-glib-1.0
41 41
 *vala_check_package: gio-2.0
@@ -45,10 +45,11 @@ vala_check_package: json-glib-1.0
45 45
 *vala_source: progress_dialog.vala
46 46
 
47 47
 vala_binary: src/pamac-manager/pamac-manager
48
-*version: 6.7.2
48
+*version: 7.0.0
49 49
 alias: pamac-updater
50 50
 use_gresource: pamac_manager_gresource_xml
51
-vala_local_package: pamacclassic
51
+vala_local_package: Pamac
52
+vala_vapi: ../vapis/libalpm.vapi
52 53
 vala_check_package: gtk+-3.0
53 54
 vala_check_package: json-glib-1.0
54 55
 *vala_check_package: gio-2.0
@@ -59,8 +60,8 @@ vala_check_package: json-glib-1.0
59 60
 *vala_source: manager_window.vala
60 61
 
61 62
 vala_binary: src/pamac-system-daemon/pamac-system-daemon
62
-*version: 6.7.2
63
-vala_local_package: pamacclassic
63
+*version: 7.0.0
64
+vala_local_package: Pamac
64 65
 vala_package: posix
65 66
 vala_check_package: gtk+-3.0
66 67
 vala_check_package: json-glib-1.0
@@ -71,14 +72,11 @@ vala_check_package: polkit-gobject-1
71 72
 *vala_check_package: gio-2.0
72 73
 *vala_check_package: glib-2.0
73 74
 *vala_check_package: gobject-2.0
74
-*vala_source: alpm_config.vala
75
-*vala_source: mirrors_config.vala
76
-*vala_source: pamac_config.vala
77 75
 *vala_source: system_daemon.vala
78 76
 
79 77
 vala_binary: src/pamac-tray/pamac-tray
80
-*version: 6.7.2
81
-vala_local_package: pamacclassic
78
+*version: 7.0.0
79
+vala_local_package: Pamac
82 80
 vala_package: posix
83 81
 vala_check_package: json-glib-1.0
84 82
 vala_check_package: libalpm
@@ -96,13 +94,11 @@ vala_source: tray-appindicator.vala
96 94
 else
97 95
 vala_source: tray-gtk.vala
98 96
 end
99
-*vala_source: alpm_config.vala
100
-*vala_source: pamac_config.vala
101 97
 *vala_source: tray.vala
102 98
 
103 99
 vala_binary: src/pamac-user-daemon/pamac-user-daemon
104
-*version: 6.7.2
105
-vala_local_package: pamacclassic
100
+*version: 7.0.0
101
+vala_local_package: Pamac
106 102
 vala_package: posix
107 103
 vala_check_package: gtk+-3.0
108 104
 vala_check_package: json-glib-1.0
@@ -111,31 +107,31 @@ vala_check_package: libsoup-2.4
111 107
 *vala_check_package: gio-2.0
112 108
 *vala_check_package: glib-2.0
113 109
 *vala_check_package: gobject-2.0
114
-*vala_source: alpm_config.vala
115
-*vala_source: pamac_config.vala
116 110
 *vala_source: user_daemon.vala
117 111
 
118 112
 
119
-vala_library: src/pamac-classic
120
-*version: 6.7.2
121
-namespace: pamacclassic
113
+vala_library: src/pamac
114
+*version: 7.0.0
115
+*namespace: Pamac
122 116
 use_gresource: pamac_transaction_gresource_xml
123
-vala_package: posix
124
-vala_check_package: gdk-3.0
125
-vala_check_package: gtk+-3.0
126
-vala_check_package: json-glib-1.0
127
-vala_check_package: libalpm
128
-vala_check_package: libnotify
129
-vala_check_package: libsoup-2.4
130
-vala_check_package: vte-2.91
117
+*vala_package: posix
118
+*vala_check_package: atk
119
+*vala_check_package: cairo
120
+*vala_check_package: gdk-3.0
121
+*vala_check_package: gdk-pixbuf-2.0
131 122
 *vala_check_package: gio-2.0
132 123
 *vala_check_package: glib-2.0
133 124
 *vala_check_package: gobject-2.0
125
+*vala_check_package: gtk+-3.0
126
+*vala_check_package: json-glib-1.0
127
+*vala_check_package: libalpm
128
+*vala_check_package: libsoup-2.4
129
+*vala_check_package: pango
130
+*vala_check_package: vte-2.91
131
+*vala_check_package: x11
134 132
 *c_library: m
135
-if NOT DISABLE_AUR
136
-vala_source: aur.vala
137
-end
138 133
 *vala_source: alpm_config.vala
134
+*vala_source: aur.vala
139 135
 *vala_source: choose_ignorepkgs_dialog.vala
140 136
 *vala_source: choose_provider_dialog.vala
141 137
 *vala_source: common.vala
@@ -166,23 +162,15 @@ end
166 162
 *translate: vala src/mirrors_config.vala
167 163
 *translate: vala src/package.vala
168 164
 *translate: vala src/pamac-clean-cache/clean_cache.vala
169
-*translate: vala src/pamac-clean-cache/pamac_config.vala
170 165
 *translate: vala src/pamac-install/installer.vala
171 166
 *translate: vala src/pamac-install/progress_dialog.vala
172 167
 *translate: vala src/pamac-manager/history_dialog.vala
173 168
 *translate: vala src/pamac-manager/manager.vala
174 169
 *translate: vala src/pamac-manager/manager_window.vala
175
-*translate: vala src/pamac-system-daemon/alpm_config.vala
176
-*translate: vala src/pamac-system-daemon/mirrors_config.vala
177
-*translate: vala src/pamac-system-daemon/pamac_config.vala
178 170
 *translate: vala src/pamac-system-daemon/system_daemon.vala
179
-*translate: vala src/pamac-tray/alpm_config.vala
180
-*translate: vala src/pamac-tray/pamac_config.vala
181 171
 *translate: vala src/pamac-tray/tray-appindicator.vala
182 172
 *translate: vala src/pamac-tray/tray-gtk.vala
183 173
 *translate: vala src/pamac-tray/tray.vala
184
-*translate: vala src/pamac-user-daemon/alpm_config.vala
185
-*translate: vala src/pamac-user-daemon/pamac_config.vala
186 174
 *translate: vala src/pamac-user-daemon/user_daemon.vala
187 175
 *translate: vala src/pamac_config.vala
188 176
 *translate: vala src/preferences_dialog.vala

+ 1
- 9
po/POTFILES.in View File

@@ -1,24 +1,16 @@
1 1
 src/pamac-clean-cache/clean_cache.vala
2
-src/pamac-clean-cache/pamac_config.vala
3 2
 src/pamac-install/installer.vala
4 3
 src/pamac-install/progress_dialog.vala
5 4
 src/pamac-manager/history_dialog.vala
6 5
 src/pamac-manager/manager.vala
7 6
 src/pamac-manager/manager_window.vala
8
-src/pamac-system-daemon/alpm_config.vala
9
-src/pamac-system-daemon/mirrors_config.vala
10
-src/pamac-system-daemon/pamac_config.vala
11 7
 src/pamac-system-daemon/system_daemon.vala
12 8
 src/pamac-tray/tray-appindicator.vala
13 9
 src/pamac-tray/tray-gtk.vala
14
-src/pamac-tray/alpm_config.vala
15
-src/pamac-tray/pamac_config.vala
16 10
 src/pamac-tray/tray.vala
17
-src/pamac-user-daemon/alpm_config.vala
18
-src/pamac-user-daemon/pamac_config.vala
19 11
 src/pamac-user-daemon/user_daemon.vala
20
-src/aur.vala
21 12
 src/alpm_config.vala
13
+src/aur.vala
22 14
 src/choose_ignorepkgs_dialog.vala
23 15
 src/choose_provider_dialog.vala
24 16
 src/common.vala

+ 1
- 1
po/pamac.pot View File

@@ -8,7 +8,7 @@ msgid ""
8 8
 msgstr ""
9 9
 "Project-Id-Version: Pamac\n"
10 10
 "Report-Msgid-Bugs-To: cromer@cromnix.org\n"
11
-"POT-Creation-Date: 2019-06-29 12:27-0400\n"
11
+"POT-Creation-Date: 2019-07-06 20:25-0400\n"
12 12
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 13
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14 14
 "Language-Team: LANGUAGE <LL@li.org>\n"

+ 1
- 1
src/Config.vala.base View File

@@ -1,4 +1,4 @@
1
-namespace pamacclassic {
1
+namespace Pamac {
2 2
 	public const string DATADIR = "@DATADIR@";
3 3
 	public const string PKGDATADIR = "@PKGDATADIR@";
4 4
 	public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@";

src/pamacclassic.deps → src/Pamac.deps View File

@@ -1,11 +1,15 @@
1 1
 posix
2
+atk
3
+cairo
2 4
 gdk-3.0
5
+gdk-pixbuf-2.0
6
+gio-2.0
7
+glib-2.0
8
+gobject-2.0
3 9
 gtk+-3.0
4 10
 json-glib-1.0
5 11
 libalpm
6
-libnotify
7 12
 libsoup-2.4
13
+pango
8 14
 vte-2.91
9
-gio-2.0
10
-glib-2.0
11
-gobject-2.0
15
+x11

+ 10
- 0
src/Pamac.pc View File

@@ -0,0 +1,10 @@
1
+prefix=@CMAKE_INSTALL_PREFIX@
2
+libdir=@DOLLAR@{prefix}/${CMAKE_INSTALL_LIBDIR}
3
+includedir=@DOLLAR@{prefix}/${CMAKE_INSTALL_INCLUDEDIR}
4
+
5
+Name: Pamac
6
+Description: Pamac
7
+Version: 7.0.0
8
+Libs: -L@DOLLAR@{libdir} -lPamac
9
+Cflags: -I@DOLLAR@{includedir}
10
+Requires: atk cairo gdk-3.0 gdk-pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0 gtk+-3.0 json-glib-1.0 libalpm libsoup-2.4 pango vte-2.91 x11

+ 9
- 7
src/alpm_config.vala View File

@@ -1,7 +1,7 @@
1 1
 /*
2 2
  *  alpm_config
3 3
  *
4
- *  Copyright (C) 2017 Chris Cromer <cromer@cromnix.org>
4
+ *  Copyright (C) 2017-2019 Chris Cromer <cromer@cromnix.org>
5 5
  *  Copyright (C) 2014-2017 Guillaume Benoit <guillaume@manjaro.org>
6 6
  *
7 7
  *  This program is free software; you can redistribute it and/or modify
@@ -18,6 +18,8 @@
18 18
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 19
  */
20 20
 
21
+//using Alpm
22
+
21 23
 [Compact]
22 24
 class AlpmRepo {
23 25
 	public string name;
@@ -43,7 +45,7 @@ class AlpmRepo {
43 45
 
44 46
 }
45 47
 
46
-class AlpmConfig {
48
+public class AlpmConfig {
47 49
 	string conf_path;
48 50
 	string? rootdir;
49 51
 	string? dbpath;
@@ -330,10 +332,10 @@ class AlpmConfig {
330 332
 					}
331 333
 				}
332 334
 			} catch (GLib.Error e) {
333
-				GLib.stderr.printf("%s\n", e.message);
335
+				stderr.printf("%s\n", e.message);
334 336
 			}
335 337
 		} else {
336
-			GLib.stderr.printf ("File '%s' doesn't exist.\n", path);
338
+			stderr.printf ("File '%s' doesn't exist.\n", path);
337 339
 		}
338 340
 	}
339 341
 
@@ -390,10 +392,10 @@ class AlpmConfig {
390 392
 				}
391 393
 				reload ();
392 394
 			} catch (GLib.Error e) {
393
-				GLib.stderr.printf("%s\n", e.message);
395
+				stderr.printf("%s\n", e.message);
394 396
 			}
395 397
 		} else {
396
-			GLib.stderr.printf ("File '%s' doesn't exist.\n", conf_path);
398
+			stderr.printf ("File '%s' doesn't exist.\n", conf_path);
397 399
 		}
398 400
 	}
399 401
 
@@ -477,7 +479,7 @@ class AlpmConfig {
477 479
 					siglevel_mask |= (Alpm.Signature.Level.DATABASE_MARGINAL_OK | Alpm.Signature.Level.DATABASE_UNKNOWN_OK);
478 480
 				}
479 481
 			} else {
480
-				GLib.stderr.printf("unrecognized siglevel: %s\n", conf_string);
482
+				stderr.printf("unrecognized siglevel: %s\n", conf_string);
481 483
 			}
482 484
 		}
483 485
 		siglevel &= ~Alpm.Signature.Level.USE_DEFAULT;

+ 5
- 1
src/aur.vala View File

@@ -18,7 +18,11 @@
18 18
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 19
  */
20 20
 
21
-namespace AUR {
21
+//using Json
22
+//using Soup
23
+//using Alpm
24
+
25
+namespace Pamac {
22 26
 	// AUR urls
23 27
 	const string aur_url = "http://aur.archlinux.org";
24 28
 	const string rpc_url = aur_url + "/rpc/?v=5";

+ 1
- 0
src/choose_ignorepkgs_dialog.vala View File

@@ -19,6 +19,7 @@
19 19
  */
20 20
 
21 21
 //using GIO
22
+//using Gtk
22 23
 
23 24
 namespace Pamac {
24 25
 

+ 80
- 74
src/meson.build View File

@@ -1,93 +1,99 @@
1
-cfg_pamac_classic = configuration_data()
2
-cfg_pamac_classic.set('DATADIR', join_paths(get_option('prefix'),get_option('datadir')))
3
-cfg_pamac_classic.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
4
-cfg_pamac_classic.set('GETTEXT_PACKAGE', 'pamac')
5
-cfg_pamac_classic.set('RELEASE_NAME', 'pamac')
6
-cfg_pamac_classic.set('PREFIX', get_option('prefix'))
7
-cfg_pamac_classic.set('VERSION', '6.7.2')
8
-cfg_pamac_classic.set('TESTSRCDIR', meson.source_root())
1
+cfg_pamac = configuration_data()
2
+cfg_pamac.set('DATADIR', join_paths(get_option('prefix'),get_option('datadir')))
3
+cfg_pamac.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
4
+cfg_pamac.set('GETTEXT_PACKAGE', 'pamac')
5
+cfg_pamac.set('RELEASE_NAME', 'pamac')
6
+cfg_pamac.set('PREFIX', get_option('prefix'))
7
+cfg_pamac.set('VERSION', '7.0.0')
8
+cfg_pamac.set('TESTSRCDIR', meson.source_root())
9 9
 
10 10
 cfgfile_1 = configure_file(
11 11
 	input: 'Config.vala.base',
12 12
 	output: 'Config.vala',
13
-	configuration: cfg_pamac_classic)
13
+	configuration: cfg_pamac)
14 14
 
15
-pamac_classic_deps = [gdk_3_0_dep]
16
-pamac_classic_deps += [gtk_3_0_dep]
17
-pamac_classic_deps += [json_glib_1_0_dep]
18
-pamac_classic_deps += [libalpm_dep]
19
-pamac_classic_deps += [libnotify_dep]
20
-pamac_classic_deps += [libsoup_2_4_dep]
21
-pamac_classic_deps += [vte_2_91_dep]
22
-pamac_classic_deps += [gio_2_0_dep]
23
-pamac_classic_deps += [glib_2_0_dep]
24
-pamac_classic_deps += [gobject_2_0_dep]
25
-pamac_classic_sources = [cfgfile_1]
26
-if not DISABLE_AUR
27
-pamac_classic_sources += ['aur.vala']
28
-endif
29
-pamac_classic_sources += ['alpm_config.vala']
30
-pamac_classic_sources += ['choose_ignorepkgs_dialog.vala']
31
-pamac_classic_sources += ['choose_provider_dialog.vala']
32
-pamac_classic_sources += ['common.vala']
33
-pamac_classic_sources += ['mirrors_config.vala']
34
-pamac_classic_sources += ['package.vala']
35
-pamac_classic_sources += ['pamac_config.vala']
36
-pamac_classic_sources += ['preferences_dialog.vala']
37
-pamac_classic_sources += ['progress_box.vala']
38
-pamac_classic_sources += ['transaction.vala']
39
-pamac_classic_sources += ['transaction_sum_dialog.vala']
40
-pamac_classic_sources += [pamac_transaction_gresource_xml_file_c]
41
-pamac_classic_vala_args = ['--pkg','posix']
42
-pamac_classic_vala_args += ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
43
-pamac_classic_vala_args += ['--gresources='+join_paths(meson.source_root(),'data/pamac.transaction.gresource.xml')]
44
-pamac_classic_c_args = []
15
+pamac_deps = [atk_dep]
16
+pamac_deps += [cairo_dep]
17
+pamac_deps += [gdk_3_0_dep]
18
+pamac_deps += [gdk_pixbuf_2_0_dep]
19
+pamac_deps += [gio_2_0_dep]
20
+pamac_deps += [glib_2_0_dep]
21
+pamac_deps += [gobject_2_0_dep]
22
+pamac_deps += [gtk_3_0_dep]
23
+pamac_deps += [json_glib_1_0_dep]
24
+pamac_deps += [libalpm_dep]
25
+pamac_deps += [libsoup_2_4_dep]
26
+pamac_deps += [pango_dep]
27
+pamac_deps += [vte_2_91_dep]
28
+pamac_deps += [x11_dep]
29
+pamac_sources = [cfgfile_1]
30
+pamac_sources += ['alpm_config.vala']
31
+pamac_sources += ['aur.vala']
32
+pamac_sources += ['choose_ignorepkgs_dialog.vala']
33
+pamac_sources += ['choose_provider_dialog.vala']
34
+pamac_sources += ['common.vala']
35
+pamac_sources += ['mirrors_config.vala']
36
+pamac_sources += ['package.vala']
37
+pamac_sources += ['pamac_config.vala']
38
+pamac_sources += ['preferences_dialog.vala']
39
+pamac_sources += ['progress_box.vala']
40
+pamac_sources += ['transaction.vala']
41
+pamac_sources += ['transaction_sum_dialog.vala']
42
+pamac_sources += [pamac_transaction_gresource_xml_file_c]
43
+pamac_vala_args = ['--pkg','posix']
44
+pamac_vala_args += ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
45
+pamac_vala_args += ['--gresources='+join_paths(meson.source_root(),'data/pamac.transaction.gresource.xml')]
46
+pamac_c_args = []
45 47
 if ENABLE_UPDATE_ICON
46
-  pamac_classic_vala_args += ['-D', 'ENABLE_UPDATE_ICON']
47
-  pamac_classic_c_args += ['-DENABLE_UPDATE_ICON']
48
+  pamac_vala_args += ['-D', 'ENABLE_UPDATE_ICON']
49
+  pamac_c_args += ['-DENABLE_UPDATE_ICON']
48 50
 endif
49 51
 if ENABLE_HAMBURGER
50
-  pamac_classic_vala_args += ['-D', 'ENABLE_HAMBURGER']
51
-  pamac_classic_c_args += ['-DENABLE_HAMBURGER']
52
+  pamac_vala_args += ['-D', 'ENABLE_HAMBURGER']
53
+  pamac_c_args += ['-DENABLE_HAMBURGER']
52 54
 endif
53 55
 if KDE_TRAY
54
-  pamac_classic_vala_args += ['-D', 'KDE_TRAY']
55
-  pamac_classic_c_args += ['-DKDE_TRAY']
56
+  pamac_vala_args += ['-D', 'KDE_TRAY']
57
+  pamac_c_args += ['-DKDE_TRAY']
56 58
 endif
57 59
 if DISABLE_AUR
58
-  pamac_classic_vala_args += ['-D', 'DISABLE_AUR']
59
-  pamac_classic_c_args += ['-DDISABLE_AUR']
60
+  pamac_vala_args += ['-D', 'DISABLE_AUR']
61
+  pamac_c_args += ['-DDISABLE_AUR']
60 62
 endif
61
-pamac_classic_deps += [meson.get_compiler('c').find_library('m', required : false)]
62
-pamac_classic_link_args = ['-rdynamic']
63
+pamac_deps += [meson.get_compiler('c').find_library('m', required : false)]
64
+pamac_link_args = ['-rdynamic']
63 65
 
64
-pamacclassic_library = shared_library('pamacclassic', pamac_classic_sources,
65
-    dependencies: pamac_classic_deps,
66
-    vala_args: pamac_classic_vala_args,
67
-    c_args: pamac_classic_c_args,
68
-    link_args: pamac_classic_link_args,
69
-    version: '6.7.2',
70
-    soversion: '6',
66
+Pamac_library = shared_library('Pamac', pamac_sources,
67
+    dependencies: pamac_deps,
68
+    vala_args: pamac_vala_args,
69
+    c_args: pamac_c_args,
70
+    link_args: pamac_link_args,
71
+    version: '7.0.0',
72
+    soversion: '7',
71 73
     install: true,
72 74
     install_dir: [true, true, true])
73 75
 
74
-pamac_classic_requires = []
75
-pamac_classic_requires += ['gdk-3.0']
76
-pamac_classic_requires += ['gtk+-3.0']
77
-pamac_classic_requires += ['json-glib-1.0']
78
-pamac_classic_requires += ['libalpm']
79
-pamac_classic_requires += ['libnotify']
80
-pamac_classic_requires += ['libsoup-2.4']
81
-pamac_classic_requires += ['vte-2.91']
82
-pamac_classic_requires += ['gio-2.0']
83
-pamac_classic_requires += ['glib-2.0']
84
-pamac_classic_requires += ['gobject-2.0']
76
+pamac_requires = []
77
+pamac_requires += ['atk']
78
+pamac_requires += ['cairo']
79
+pamac_requires += ['gdk-3.0']
80
+pamac_requires += ['gdk-pixbuf-2.0']
81
+pamac_requires += ['gio-2.0']
82
+pamac_requires += ['glib-2.0']
83
+pamac_requires += ['gobject-2.0']
84
+pamac_requires += ['gtk+-3.0']
85
+pamac_requires += ['json-glib-1.0']
86
+pamac_requires += ['libalpm']
87
+pamac_requires += ['libsoup-2.4']
88
+pamac_requires += ['pango']
89
+pamac_requires += ['vte-2.91']
90
+pamac_requires += ['x11']
85 91
 pkg_mod = import('pkgconfig')
86
-pkg_mod.generate(libraries : pamacclassic_library,
87
-	version : '6.7.2',
88
-	name : 'pamacclassic',
89
-	filebase : 'pamacclassic',
90
-	description : 'pamacclassic',
91
-	requires : pamac_classic_requires)
92
+pkg_mod.generate(libraries : Pamac_library,
93
+	version : '7.0.0',
94
+	name : 'Pamac',
95
+	filebase : 'Pamac',
96
+	description : 'Pamac',
97
+	requires : pamac_requires)
92 98
 
93
-install_data(join_paths(meson.current_source_dir(),'pamacclassic.deps'),install_dir: join_paths(get_option('prefix'),'share','vala','vapi'))
99
+install_data(join_paths(meson.current_source_dir(),'Pamac.deps'),install_dir: join_paths(get_option('prefix'),'share','vala','vapi'))

+ 5
- 5
src/mirrors_config.vala View File

@@ -19,7 +19,7 @@
19 19
  */
20 20
 
21 21
 namespace Pamac {
22
-	class MirrorsConfig {
22
+	public class MirrorsConfig {
23 23
 		string conf_path;
24 24
 
25 25
 		public string choosen_generation_method { get; private set; }
@@ -69,10 +69,10 @@ namespace Pamac {
69 69
 						}
70 70
 					}
71 71
 				} catch (Error e) {
72
-					GLib.stderr.printf("%s\n", e.message);
72
+					stderr.printf("%s\n", e.message);
73 73
 				}
74 74
 			} else {
75
-				GLib.stderr.printf ("File '%s' doesn't exist.\n", path);
75
+				stderr.printf ("File '%s' doesn't exist.\n", path);
76 76
 			}
77 77
 		}
78 78
 
@@ -121,10 +121,10 @@ namespace Pamac {
121 121
 						dos.put_string (new_line);
122 122
 					}
123 123
 				} catch (GLib.Error e) {
124
-					GLib.stderr.printf("%s\n", e.message);
124
+					stderr.printf("%s\n", e.message);
125 125
 				}
126 126
 			} else {
127
-				GLib.stderr.printf ("File '%s' doesn't exist.\n", file.get_path ());
127
+				stderr.printf ("File '%s' doesn't exist.\n", file.get_path ());
128 128
 			}
129 129
 		}
130 130
 	}

+ 3
- 4
src/pamac-clean-cache/meson.build View File

@@ -4,7 +4,7 @@ cfg_pamac_clean_cache.set('PKGDATADIR', join_paths(get_option('prefix'),get_opti
4 4
 cfg_pamac_clean_cache.set('GETTEXT_PACKAGE', 'pamac')
5 5
 cfg_pamac_clean_cache.set('RELEASE_NAME', 'pamac')
6 6
 cfg_pamac_clean_cache.set('PREFIX', get_option('prefix'))
7
-cfg_pamac_clean_cache.set('VERSION', '6.7.2')
7
+cfg_pamac_clean_cache.set('VERSION', '7.0.0')
8 8
 cfg_pamac_clean_cache.set('TESTSRCDIR', meson.source_root())
9 9
 
10 10
 cfgfile_4 = configure_file(
@@ -15,13 +15,12 @@ cfgfile_4 = configure_file(
15 15
 pamac_clean_cache_deps = [gtk_3_0_dep]
16 16
 pamac_clean_cache_deps += [json_glib_1_0_dep]
17 17
 pamac_clean_cache_deps += [glib_2_0_dep]
18
-pamac_clean_cache_deps += [gobject_2_0_dep]
19 18
 pamac_clean_cache_sources = [cfgfile_4]
20 19
 pamac_clean_cache_sources += ['clean_cache.vala']
21
-pamac_clean_cache_sources += ['pamac_config.vala']
20
+pamac_clean_cache_sources += [join_paths(meson.current_source_dir(),'../vapis/libalpm.vapi')]
22 21
 pamac_clean_cache_vala_args = ['--pkg','posix']
23 22
 pamac_clean_cache_vala_args += ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
24
-pamac_clean_cache_dependencies = [pamacclassic_library]
23
+pamac_clean_cache_dependencies = [Pamac_library]
25 24
 pamac_clean_cache_c_args = []
26 25
 if ENABLE_UPDATE_ICON
27 26
   pamac_clean_cache_vala_args += ['-D', 'ENABLE_UPDATE_ICON']

+ 0
- 1
src/pamac-clean-cache/pamac_config.vala View File

@@ -1 +0,0 @@
1
-../pamac_config.vala

+ 3
- 1
src/pamac-install/installer.vala View File

@@ -32,8 +32,10 @@ namespace Pamac {
32 32
 
33 33
 		public override void startup () {
34 34
 			// i18n
35
-			Intl.textdomain ("pamac");
35
+			Intl.bindtextdomain(Constants.GETTEXT_PACKAGE, Path.build_filename(Constants.DATADIR,"locale"));
36 36
 			Intl.setlocale (LocaleCategory.ALL, "");
37
+			Intl.textdomain(Constants.GETTEXT_PACKAGE);
38
+			Intl.bind_textdomain_codeset(Constants.GETTEXT_PACKAGE, "utf-8" );
37 39
 
38 40
 			base.startup ();
39 41
 

+ 3
- 2
src/pamac-install/meson.build View File

@@ -4,7 +4,7 @@ cfg_pamac_install.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('
4 4
 cfg_pamac_install.set('GETTEXT_PACKAGE', 'pamac')
5 5
 cfg_pamac_install.set('RELEASE_NAME', 'pamac')
6 6
 cfg_pamac_install.set('PREFIX', get_option('prefix'))
7
-cfg_pamac_install.set('VERSION', '6.7.2')
7
+cfg_pamac_install.set('VERSION', '7.0.0')
8 8
 cfg_pamac_install.set('TESTSRCDIR', meson.source_root())
9 9
 
10 10
 cfgfile_5 = configure_file(
@@ -21,9 +21,10 @@ pamac_install_sources = [cfgfile_5]
21 21
 pamac_install_sources += ['installer.vala']
22 22
 pamac_install_sources += ['progress_dialog.vala']
23 23
 pamac_install_sources += [pamac_installer_gresource_xml_file_c]
24
+pamac_install_sources += [join_paths(meson.current_source_dir(),'../vapis/libalpm.vapi')]
24 25
 pamac_install_vala_args = ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
25 26
 pamac_install_vala_args += ['--gresources='+join_paths(meson.source_root(),'data/pamac.installer.gresource.xml')]
26
-pamac_install_dependencies = [pamacclassic_library]
27
+pamac_install_dependencies = [Pamac_library]
27 28
 pamac_install_c_args = []
28 29
 if ENABLE_UPDATE_ICON
29 30
   pamac_install_vala_args += ['-D', 'ENABLE_UPDATE_ICON']

+ 3
- 1
src/pamac-manager/manager.vala View File

@@ -31,8 +31,10 @@ namespace Pamac {
31 31
 
32 32
 		public override void startup () {
33 33
 			// i18n
34
-			Intl.textdomain ("pamac");
34
+			Intl.bindtextdomain(Constants.GETTEXT_PACKAGE, Path.build_filename(Constants.DATADIR,"locale"));
35 35
 			Intl.setlocale (LocaleCategory.ALL, "");
36
+			Intl.textdomain(Constants.GETTEXT_PACKAGE);
37
+			Intl.bind_textdomain_codeset(Constants.GETTEXT_PACKAGE, "utf-8" );
36 38
 
37 39
 			base.startup ();
38 40
 

+ 9
- 7
src/pamac-manager/manager_window.vala View File

@@ -100,8 +100,11 @@ namespace Pamac {
100 100
 		Gtk.Label updated_label;
101 101
 		[GtkChild]
102 102
 		Gtk.Stack properties_stack;
103
+#if DISABLE_AUR
104
+#else
103 105
 		[GtkChild]
104 106
 		Gtk.StackSwitcher properties_stackswitcher;
107
+#endif
105 108
 		[GtkChild]
106 109
 		Gtk.Grid deps_grid;
107 110
 		[GtkChild]
@@ -1525,7 +1528,7 @@ namespace Pamac {
1525 1528
 							}
1526 1529
 						}
1527 1530
 					}
1528
-					right_click_menu.popup (null, null, null, event.button, event.time);
1531
+					right_click_menu.popup_at_pointer (event);
1529 1532
 					return true;
1530 1533
 				}
1531 1534
 			}
@@ -1606,7 +1609,7 @@ namespace Pamac {
1606 1609
 							upgrade_item.sensitive = true;
1607 1610
 						}
1608 1611
 					}
1609
-					right_click_menu.popup (null, null, null, event.button, event.time);
1612
+					right_click_menu.popup_at_pointer (event);
1610 1613
 					return true;
1611 1614
 				}
1612 1615
 			}
@@ -1887,12 +1890,11 @@ namespace Pamac {
1887 1890
 			refresh_packages_list ();
1888 1891
 		}
1889 1892
 
1890
-
1891
-		void on_menu_button_toggled () {
1892 1893
 #if ENABLE_HAMBURGER
1894
+		void on_menu_button_toggled () {
1893 1895
 			preferences_button.sensitive = !(transaction_running || sysupgrade_running);
1894
-#endif
1895 1896
 		}
1897
+#endif
1896 1898
 
1897 1899
 		[GtkCallback]
1898 1900
 		void on_history_button_clicked () {
@@ -1902,7 +1904,7 @@ namespace Pamac {
1902 1904
 			}
1903 1905
 			var file = GLib.File.new_for_path ("/var/log/pacman.log");
1904 1906
 			if (!file.query_exists ()) {
1905
-				GLib.stderr.printf ("File '%s' doesn't exist.\n", file.get_path ());
1907
+				stderr.printf ("File '%s' doesn't exist.\n", file.get_path ());
1906 1908
 			} else {
1907 1909
 				StringBuilder text = new StringBuilder ();
1908 1910
 				try {
@@ -1916,7 +1918,7 @@ namespace Pamac {
1916 1918
 						text.prepend (line + "\n");
1917 1919
 					}
1918 1920
 				} catch (GLib.Error e) {
1919
-					GLib.stderr.printf ("%s\n", e.message);
1921
+					stderr.printf ("%s\n", e.message);
1920 1922
 				}
1921 1923
 				var history_dialog = new HistoryDialog (this);
1922 1924
 				history_dialog.textview.buffer.set_text (text.str, (int) text.len);

+ 3
- 2
src/pamac-manager/meson.build View File

@@ -4,7 +4,7 @@ cfg_pamac_manager.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('
4 4
 cfg_pamac_manager.set('GETTEXT_PACKAGE', 'pamac')
5 5
 cfg_pamac_manager.set('RELEASE_NAME', 'pamac')
6 6
 cfg_pamac_manager.set('PREFIX', get_option('prefix'))
7
-cfg_pamac_manager.set('VERSION', '6.7.2')
7
+cfg_pamac_manager.set('VERSION', '7.0.0')
8 8
 cfg_pamac_manager.set('TESTSRCDIR', meson.source_root())
9 9
 
10 10
 cfgfile_6 = configure_file(
@@ -22,9 +22,10 @@ pamac_manager_sources += ['history_dialog.vala']
22 22
 pamac_manager_sources += ['manager.vala']
23 23
 pamac_manager_sources += ['manager_window.vala']
24 24
 pamac_manager_sources += [pamac_manager_gresource_xml_file_c]
25
+pamac_manager_sources += [join_paths(meson.current_source_dir(),'../vapis/libalpm.vapi')]
25 26
 pamac_manager_vala_args = ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
26 27
 pamac_manager_vala_args += ['--gresources='+join_paths(meson.source_root(),'data/pamac.manager.gresource.xml')]
27
-pamac_manager_dependencies = [pamacclassic_library]
28
+pamac_manager_dependencies = [Pamac_library]
28 29
 pamac_manager_c_args = []
29 30
 if ENABLE_UPDATE_ICON
30 31
   pamac_manager_vala_args += ['-D', 'ENABLE_UPDATE_ICON']

+ 0
- 1
src/pamac-system-daemon/alpm_config.vala View File

@@ -1 +0,0 @@
1
-../alpm_config.vala

+ 2
- 5
src/pamac-system-daemon/meson.build View File

@@ -4,7 +4,7 @@ cfg_pamac_system_daemon.set('PKGDATADIR', join_paths(get_option('prefix'),get_op
4 4
 cfg_pamac_system_daemon.set('GETTEXT_PACKAGE', 'pamac')
5 5
 cfg_pamac_system_daemon.set('RELEASE_NAME', 'pamac')
6 6
 cfg_pamac_system_daemon.set('PREFIX', get_option('prefix'))
7
-cfg_pamac_system_daemon.set('VERSION', '6.7.2')
7
+cfg_pamac_system_daemon.set('VERSION', '7.0.0')
8 8
 cfg_pamac_system_daemon.set('TESTSRCDIR', meson.source_root())
9 9
 
10 10
 cfgfile_7 = configure_file(
@@ -22,13 +22,10 @@ pamac_system_daemon_deps += [gio_2_0_dep]
22 22
 pamac_system_daemon_deps += [glib_2_0_dep]
23 23
 pamac_system_daemon_deps += [gobject_2_0_dep]
24 24
 pamac_system_daemon_sources = [cfgfile_7]
25
-pamac_system_daemon_sources += ['alpm_config.vala']
26
-pamac_system_daemon_sources += ['mirrors_config.vala']
27
-pamac_system_daemon_sources += ['pamac_config.vala']
28 25
 pamac_system_daemon_sources += ['system_daemon.vala']
29 26
 pamac_system_daemon_vala_args = ['--pkg','posix']
30 27
 pamac_system_daemon_vala_args += ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
31
-pamac_system_daemon_dependencies = [pamacclassic_library]
28
+pamac_system_daemon_dependencies = [Pamac_library]
32 29
 pamac_system_daemon_c_args = []
33 30
 if ENABLE_UPDATE_ICON
34 31
   pamac_system_daemon_vala_args += ['-D', 'ENABLE_UPDATE_ICON']

+ 0
- 1
src/pamac-system-daemon/mirrors_config.vala View File

@@ -1 +0,0 @@
1
-../mirrors_config.vala

+ 0
- 1
src/pamac-system-daemon/pamac_config.vala View File

@@ -1 +0,0 @@
1
-../pamac_config.vala

+ 105
- 49
src/pamac-system-daemon/system_daemon.vala View File

@@ -1,7 +1,7 @@
1 1
 /*
2 2
  *  pamac-vala
3 3
  *
4
- *  Copyright (C) 2017 Chris Cromer <cromer@cromnix.org>
4
+ *  Copyright (C) 2017-2019 Chris Cromer <cromer@cromnix.org>
5 5
  *  Copyright (C) 2014-2017 Guillaume Benoit <guillaume@manjaro.org>
6 6
  *
7 7
  *  This program is free software; you can redistribute it and/or modify
@@ -18,9 +18,6 @@
18 18
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 19
  */
20 20
 
21
-// i18n
22
-const string GETTEXT_PACKAGE = "pamac";
23
-
24 21
 Pamac.SystemDaemon system_daemon;
25 22
 MainLoop loop;
26 23
 
@@ -140,7 +137,7 @@ namespace Pamac {
140 137
 			refreshed = false;
141 138
 		}
142 139
 
143
-		public void set_environment_variables (HashTable<string,string> variables) {
140
+		public void set_environment_variables (HashTable<string,string> variables) throws DBusError, IOError {
144 141
 			string[] keys = { "HTTP_USER_AGENT",
145 142
 							"http_proxy",
146 143
 							"https_proxy",
@@ -155,7 +152,7 @@ namespace Pamac {
155 152
 			}
156 153
 		}
157 154
 
158
-		public ErrorInfos get_current_error () {
155
+		public ErrorInfos get_current_error () throws DBusError, IOError {
159 156
 			return current_error;
160 157
 		}
161 158
 
@@ -277,7 +274,7 @@ namespace Pamac {
277 274
 			return true;
278 275
 		}
279 276
 
280
-		public string[] get_mirrors_countries () {
277
+		public string[] get_mirrors_countries () throws DBusError, IOError {
281 278
 			string[] countries = {};
282 279
 			try {
283 280
 				string countries_str;
@@ -297,7 +294,7 @@ namespace Pamac {
297 294
 			return countries;
298 295
 		}
299 296
 
300
-		public bool get_lock (GLib.BusName sender) {
297
+		public bool get_lock (GLib.BusName sender) throws DBusError, IOError {
301 298
 			if (lock_id == sender) {
302 299
 				return true;
303 300
 			} else if (lock_id == "") {
@@ -307,7 +304,7 @@ namespace Pamac {
307 304
 			return false;
308 305
 		}
309 306
 
310
-		public bool unlock (GLib.BusName sender) {
307
+		public bool unlock (GLib.BusName sender) throws DBusError, IOError {
311 308
 			if (lock_id == sender) {
312 309
 				lock_id = new BusName ("");
313 310
 				return true;
@@ -354,14 +351,14 @@ namespace Pamac {
354 351
 			return authorized;
355 352
 		}
356 353
 
357
-		public void start_get_authorization (GLib.BusName sender) {
354
+		public void start_get_authorization (GLib.BusName sender) throws DBusError, IOError {
358 355
 			check_authorization.begin (sender, (obj, res) => {
359 356
 				bool authorized = check_authorization.end (res);
360 357
 				get_authorization_finished (authorized);
361 358
 			});
362 359
 		}
363 360
 
364
-		public void start_save_pamac_config () {
361
+		public void start_save_pamac_config () throws DBusError, IOError {
365 362
 				var pamac_config = new Pamac.Config ();
366 363
 				pamac_config.reload ();
367 364
 #if DISABLE_AUR
@@ -379,7 +376,7 @@ namespace Pamac {
379 376
 			write_alpm_config_finished ((alpm_handle.checkspace == 1));
380 377
 		}
381 378
 
382
-		public void start_write_alpm_config (HashTable<string,Variant> new_alpm_conf_, GLib.BusName sender) {
379
+		public void start_write_alpm_config (HashTable<string,Variant> new_alpm_conf_, GLib.BusName sender) throws DBusError, IOError {
383 380
 			check_authorization.begin (sender, (obj, res) => {
384 381
 				bool authorized = check_authorization.end (res);
385 382
 				if (authorized ) {
@@ -413,7 +410,7 @@ namespace Pamac {
413 410
 			generate_mirrors_list_finished ();
414 411
 		}
415 412
 
416
-		public void start_generate_mirrors_list (GLib.BusName sender) {
413
+		public void start_generate_mirrors_list (GLib.BusName sender) throws DBusError, IOError {
417 414
 			check_authorization.begin (sender, (obj, res) => {
418 415
 				bool authorized = check_authorization.end (res);
419 416
 				if (authorized) {
@@ -426,7 +423,7 @@ namespace Pamac {
426 423
 			});
427 424
 		}
428 425
 
429
-		public void clean_cache (uint64 keep_nb, bool only_uninstalled, GLib.BusName sender) {
426
+		public void clean_cache (uint64 keep_nb, bool only_uninstalled, GLib.BusName sender) throws DBusError, IOError {
430 427
 			check_authorization.begin (sender, (obj, res) => {
431 428
 				bool authorized = check_authorization.end (res);
432 429
 				if (authorized) {
@@ -446,7 +443,7 @@ namespace Pamac {
446 443
 			});
447 444
 		}
448 445
 
449
-		public void start_write_mirrors_config (HashTable<string,Variant> new_mirrors_conf, GLib.BusName sender) {
446
+		public void start_write_mirrors_config (HashTable<string,Variant> new_mirrors_conf, GLib.BusName sender) throws DBusError, IOError {
450 447
 			check_authorization.begin (sender, (obj, res) => {
451 448
 				var mirrors_config = new MirrorsConfig ("/etc/pacman-mirrors.conf");
452 449
 				bool authorized = check_authorization.end (res);
@@ -458,7 +455,7 @@ namespace Pamac {
458 455
 			});
459 456
 		}
460 457
 
461
-		public void start_set_pkgreason (string pkgname, uint reason, GLib.BusName sender) {
458
+		public void start_set_pkgreason (string pkgname, uint reason, GLib.BusName sender) throws DBusError, IOError {
462 459
 			check_authorization.begin (sender, (obj, res) => {
463 460
 				bool authorized = check_authorization.end (res);
464 461
 				if (authorized) {
@@ -535,7 +532,7 @@ namespace Pamac {
535 532
 			}
536 533
 		}
537 534
 
538
-		public void start_refresh (bool force, GLib.BusName sender) {
535
+		public void start_refresh (bool force, GLib.BusName sender) throws DBusError, IOError {
539 536
 			if (lock_id != sender) {
540 537
 				refresh_finished (false);
541 538
 				return;
@@ -644,7 +641,7 @@ namespace Pamac {
644 641
 		private async void check_aur_dep_list (string[] pkgnames) {
645 642
 			string[] dep_types = {"Depends", "MakeDepends", "CheckDepends"};
646 643
 			string[] dep_to_check = {};
647
-			Json.Array results = yield AUR.multiinfo (pkgnames);
644
+			Json.Array results = yield multiinfo (pkgnames);
648 645
 			results.foreach_element ((array, index, node) => {
649 646
 				unowned Json.Object? pkg_info = node.get_object ();
650 647
 				// create fake db desc file
@@ -722,12 +719,12 @@ namespace Pamac {
722 719
 										try {
723 720
 											dos.put_string ("%s\n".printf (_node.get_string ()));
724 721
 										} catch (GLib.Error e) {
725
-											GLib.stderr.printf("%s\n", e.message);
722
+											stderr.printf("%s\n", e.message);
726 723
 										}
727 724
 									});
728 725
 									dos.put_string ("\n");
729 726
 								} catch (GLib.Error e) {
730
-									GLib.stderr.printf("%s\n", e.message);
727
+									stderr.printf("%s\n", e.message);
731 728
 								}
732 729
 							}
733 730
 							// provides
@@ -739,12 +736,12 @@ namespace Pamac {
739 736
 										try {
740 737
 											dos.put_string ("%s\n".printf (_node.get_string ()));
741 738
 										} catch (GLib.Error e) {
742
-											GLib.stderr.printf("%s\n", e.message);
739
+											stderr.printf("%s\n", e.message);
743 740
 										}
744 741
 									});
745 742
 									dos.put_string ("\n");
746 743
 								} catch (GLib.Error e) {
747
-									GLib.stderr.printf("%s\n", e.message);
744
+									stderr.printf("%s\n", e.message);
748 745
 								}
749 746
 							}
750 747
 							// replaces
@@ -756,17 +753,17 @@ namespace Pamac {
756 753
 										try {
757 754
 											dos.put_string ("%s\n".printf (_node.get_string ()));
758 755
 										} catch (GLib.Error e) {
759
-											GLib.stderr.printf("%s\n", e.message);
756
+											stderr.printf("%s\n", e.message);
760 757
 										}
761 758
 									});
762 759
 									dos.put_string ("\n");
763 760
 								} catch (GLib.Error e) {
764
-									GLib.stderr.printf("%s\n", e.message);
761
+									stderr.printf("%s\n", e.message);
765 762
 								}
766 763
 							}
767 764
 						}
768 765
 					} catch (GLib.Error e) {
769
-						GLib.stderr.printf("%s\n", e.message);
766
+						stderr.printf("%s\n", e.message);
770 767
 					}
771 768
 				}
772 769
 			});
@@ -803,7 +800,10 @@ namespace Pamac {
803 800
 				};
804 801
 				get_updates_finished (updates);
805 802
 			} else {
803
+#if DISABLE_AUR
804
+#else
806 805
 				string[] local_pkgs = {};
806
+#endif
807 807
 				unowned Alpm.List<unowned Alpm.Package> pkgcache = alpm_handle.localdb.pkgcache;
808 808
 				while (pkgcache != null) {
809 809
 					unowned Alpm.Package installed_pkg = pkgcache.data;
@@ -842,8 +842,8 @@ namespace Pamac {
842 842
 				if (check_aur_updates) {
843 843
 					// get aur updates
844 844
 					if (!aur_updates_checked) {
845
-						AUR.multiinfo.begin (local_pkgs, (obj, res) => {
846
-							aur_updates_results = AUR.multiinfo.end (res);
845
+						multiinfo.begin (local_pkgs, (obj, res) => {
846
+							aur_updates_results = multiinfo.end (res);
847 847
 							aur_updates_checked = true;
848 848
 							var updates = Updates () {
849 849
 								is_syncfirst = false,
@@ -899,9 +899,9 @@ namespace Pamac {
899 899
 #endif
900 900
 
901 901
 #if DISABLE_AUR
902
-		public void start_get_updates () {
902
+		public void start_get_updates () throws DBusError, IOError {
903 903
 #else
904
-		public void start_get_updates (bool check_aur_updates_) {
904
+		public void start_get_updates (bool check_aur_updates_) throws DBusError, IOError {
905 905
 			check_aur_updates = check_aur_updates_;
906 906
 #endif
907 907
 			try {
@@ -938,7 +938,13 @@ namespace Pamac {
938 938
 					if (errno != 0) {
939 939
 						current_error.details = { Alpm.strerror (errno) };
940 940
 					}
941
-					trans_release (lock_id);
941
+					try {
942
+						trans_release (lock_id);
943
+					} catch (IOError e) {
944
+						stderr.printf ("IOError: %s\n", e.message);
945
+					} catch (DBusError e) {
946
+						stderr.printf ("DBusError: %s\n", e.message);
947
+					}
942 948
 					success = false;
943 949
 				} else {
944 950
 					success = trans_prepare_real ();
@@ -947,7 +953,7 @@ namespace Pamac {
947 953
 			trans_prepare_finished (success);
948 954
 		}
949 955
 
950
-		public void start_sysupgrade_prepare (bool enable_downgrade_, string[] temporary_ignorepkgs_, GLib.BusName sender) {
956
+		public void start_sysupgrade_prepare (bool enable_downgrade_, string[] temporary_ignorepkgs_, GLib.BusName sender) throws DBusError, IOError {
951 957
 			if (lock_id != sender) {
952 958
 				trans_prepare_finished (false);
953 959
 				return;
@@ -1162,7 +1168,13 @@ namespace Pamac {
1162 1168
 						break;
1163 1169
 				}
1164 1170
 				current_error.details = (owned) details;
1165
-				trans_release (lock_id);
1171
+				try {
1172
+					trans_release (lock_id);
1173
+				} catch (IOError e) {
1174
+					stderr.printf ("IOError: %s\n", e.message);
1175
+				} catch (DBusError e) {
1176
+					stderr.printf ("DBusError: %s\n", e.message);
1177
+				}
1166 1178
 				success = false;
1167 1179
 			} else {
1168 1180
 				// Search for holdpkg in target list
@@ -1180,7 +1192,13 @@ namespace Pamac {
1180 1192
 				if (found_locked_pkg) {
1181 1193
 					current_error.message = _("Failed to prepare transaction");
1182 1194
 					current_error.details = (owned) details;
1183
-					trans_release (lock_id);
1195
+					try {
1196
+						trans_release (lock_id);
1197
+					} catch (IOError e) {
1198
+						stderr.printf ("IOError: %s\n", e.message);
1199
+					} catch (DBusError e) {
1200
+						stderr.printf ("DBusError: %s\n", e.message);
1201
+					}
1184 1202
 					success = false;
1185 1203
 				}
1186 1204
 			}
@@ -1215,7 +1233,13 @@ namespace Pamac {
1215 1233
 				if (success) {
1216 1234
 					success = trans_prepare_real ();
1217 1235
 				} else {
1218
-					trans_release (lock_id);
1236
+					try {
1237
+						trans_release (lock_id);
1238
+					} catch (IOError e) {
1239
+						stderr.printf ("IOError: %s\n", e.message);
1240
+					} catch (DBusError e) {
1241
+						stderr.printf ("DBusError: %s\n", e.message);
1242
+					}
1219 1243
 				}
1220 1244
 			}
1221 1245
 			trans_prepare_finished (success);
@@ -1378,7 +1402,13 @@ namespace Pamac {
1378 1402
 								}
1379 1403
 								pkgs_to_remove.next ();
1380 1404
 							}
1381
-							trans_release (lock_id);
1405
+							try {
1406
+								trans_release (lock_id);
1407
+							} catch (IOError e) {
1408
+								stderr.printf ("IOError: %s\n", e.message);
1409
+							} catch (DBusError e) {
1410
+								stderr.printf ("DBusError: %s\n", e.message);
1411
+							}
1382 1412
 							try {
1383 1413
 								Process.spawn_command_line_sync ("rm -f %ssync/aur.db".printf (alpm_handle.dbpath));
1384 1414
 							} catch (SpawnError e) {
@@ -1391,7 +1421,13 @@ namespace Pamac {
1391 1421
 							trans_prepare ();
1392 1422
 						}
1393 1423
 					} else {
1394
-						trans_release (lock_id);
1424
+						try {
1425
+							trans_release (lock_id);
1426
+						} catch (IOError e) {
1427
+							stderr.printf ("IOError: %s\n", e.message);
1428
+						} catch (DBusError e) {
1429
+							stderr.printf ("DBusError: %s\n", e.message);
1430
+						}
1395 1431
 					}
1396 1432
 				}
1397 1433
 				if (!success) {
@@ -1408,14 +1444,14 @@ namespace Pamac {
1408 1444
 										string[] to_install_,
1409 1445
 										string[] to_remove_,
1410 1446
 										string[] to_load_,
1411
-										GLib.BusName sender) {
1447
+										GLib.BusName sender) throws DBusError, IOError {
1412 1448
 #else
1413 1449
 		public void start_trans_prepare (Alpm.TransFlag flags_,
1414 1450
 										string[] to_install_,
1415 1451
 										string[] to_remove_,
1416 1452
 										string[] to_load_,
1417 1453
 										string[] to_build_,
1418
-										GLib.BusName sender) {
1454
+										GLib.BusName sender) throws DBusError, IOError {
1419 1455
 #endif
1420 1456
 			if (lock_id != sender) {
1421 1457
 				trans_prepare_finished (false);
@@ -1451,14 +1487,14 @@ namespace Pamac {
1451 1487
 #endif
1452 1488
 		}
1453 1489
 
1454
-		public void choose_provider (int provider) {
1490
+		public void choose_provider (int provider) throws DBusError, IOError {
1455 1491
 			provider_mutex.lock ();
1456 1492
 			choosen_provider = provider;
1457 1493
 			provider_cond.signal ();
1458 1494
 			provider_mutex.unlock ();
1459 1495
 		}
1460 1496
 
1461
-		public TransactionSummary get_transaction_summary () {
1497
+		public TransactionSummary get_transaction_summary () throws DBusError, IOError {
1462 1498
 			UpdateInfos[] to_install = {};
1463 1499
 			UpdateInfos[] to_upgrade = {};
1464 1500
 			UpdateInfos[] to_downgrade = {};
@@ -1502,9 +1538,9 @@ namespace Pamac {
1502 1538
 				to_remove += (owned) infos;
1503 1539
 				pkgs_to_remove.next ();
1504 1540
 			}
1505
-			UpdateInfos[] conflicts_to_remove = {};
1506 1541
 #if DISABLE_AUR
1507 1542
 #else
1543
+			UpdateInfos[] conflicts_to_remove = {};
1508 1544
 			foreach (unowned UpdateInfos infos in aur_conflicts_to_remove){
1509 1545
 				conflicts_to_remove += infos;
1510 1546
 			}
@@ -1540,7 +1576,13 @@ namespace Pamac {
1540 1576
 				current_error.errno = (uint) errno;
1541 1577
 				// cancel the download return an EXTERNAL_DOWNLOAD error
1542 1578
 				if (errno == Alpm.Errno.EXTERNAL_DOWNLOAD && cancellable.is_cancelled ()) {
1543
-					trans_release (lock_id);
1579
+					try {
1580
+						trans_release (lock_id);
1581
+					} catch (IOError e) {
1582
+						stderr.printf ("IOError: %s\n", e.message);
1583
+					} catch (DBusError e) {
1584
+						stderr.printf ("DBusError: %s\n", e.message);
1585
+					}
1544 1586
 					trans_commit_finished (false);
1545 1587
 					return;
1546 1588
 				}
@@ -1595,7 +1637,13 @@ namespace Pamac {
1595 1637
 				}
1596 1638
 				success = false;
1597 1639
 			}
1598
-			trans_release (lock_id);
1640
+			try {
1641
+				trans_release (lock_id);
1642
+			} catch (IOError e) {
1643
+				stderr.printf ("IOError: %s\n", e.message);
1644
+			} catch (DBusError e) {
1645
+				stderr.printf ("DBusError: %s\n", e.message);
1646
+			}
1599 1647
 			to_install_as_dep.foreach_remove ((pkgname, val) => {
1600 1648
 				unowned Alpm.Package? pkg = alpm_handle.localdb.get_pkg (pkgname);
1601 1649
 				if (pkg != null) {
@@ -1607,7 +1655,7 @@ namespace Pamac {
1607 1655
 			trans_commit_finished (success);
1608 1656
 		}
1609 1657
 
1610
-		public void start_trans_commit (GLib.BusName sender) {
1658
+		public void start_trans_commit (GLib.BusName sender) throws DBusError, IOError {
1611 1659
 			check_authorization.begin (sender, (obj, res) => {
1612 1660
 				bool authorized = check_authorization.end (res);
1613 1661
 				if (authorized) {
@@ -1617,13 +1665,19 @@ namespace Pamac {
1617 1665
 						stderr.printf ("Thread Error %s\n", e.message);
1618 1666
 					}
1619 1667
 				} else {
1620
-					trans_release (lock_id);
1668
+					try {
1669
+						trans_release (lock_id);
1670
+					} catch (IOError e) {
1671
+						stderr.printf ("IOError: %s\n", e.message);
1672
+					} catch (DBusError e) {
1673
+						stderr.printf ("DBusError: %s\n", e.message);
1674
+					}
1621 1675
 					trans_commit_finished (false);
1622 1676
 				}
1623 1677
 			});
1624 1678
 		}
1625 1679
 
1626
-		public void trans_release (GLib.BusName sender) {
1680
+		public void trans_release (GLib.BusName sender) throws DBusError, IOError {
1627 1681
 			if (lock_id != sender) {
1628 1682
 				return;
1629 1683
 			}
@@ -1631,7 +1685,7 @@ namespace Pamac {
1631 1685
 			remove_ignorepkgs ();
1632 1686
 		}
1633 1687
 
1634
-		public void trans_cancel (GLib.BusName sender) {
1688
+		public void trans_cancel (GLib.BusName sender) throws DBusError, IOError {
1635 1689
 			if (lock_id != sender) {
1636 1690
 				return;
1637 1691
 			}
@@ -1644,7 +1698,7 @@ namespace Pamac {
1644 1698
 		}
1645 1699
 
1646 1700
 		[DBus (no_reply = true)]
1647
-		public void quit () {
1701
+		public void quit () throws DBusError, IOError {
1648 1702
 			// wait for all tasks to be processed
1649 1703
 			ThreadPool.free ((owned) thread_pool, false, true);
1650 1704
 			loop.quit ();
@@ -2066,8 +2120,10 @@ void on_bus_acquired (DBusConnection conn) {
2066 2120
 
2067 2121
 void main () {
2068 2122
 	// i18n
2123
+	Intl.bindtextdomain(Constants.GETTEXT_PACKAGE, Path.build_filename(Constants.DATADIR,"locale"));
2069 2124
 	Intl.setlocale (LocaleCategory.ALL, "");
2070
-	Intl.textdomain (GETTEXT_PACKAGE);
2125
+	Intl.textdomain(Constants.GETTEXT_PACKAGE);
2126
+	Intl.bind_textdomain_codeset(Constants.GETTEXT_PACKAGE, "utf-8" );
2071 2127
 
2072 2128
 	Bus.own_name (BusType.SYSTEM,
2073 2129
 				"org.pamac.system",

+ 0
- 1
src/pamac-tray/alpm_config.vala View File

@@ -1 +0,0 @@
1
-../alpm_config.vala

+ 2
- 4
src/pamac-tray/meson.build View File

@@ -4,7 +4,7 @@ cfg_pamac_tray.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('dat
4 4
 cfg_pamac_tray.set('GETTEXT_PACKAGE', 'pamac')
5 5
 cfg_pamac_tray.set('RELEASE_NAME', 'pamac')
6 6
 cfg_pamac_tray.set('PREFIX', get_option('prefix'))
7
-cfg_pamac_tray.set('VERSION', '6.7.2')
7
+cfg_pamac_tray.set('VERSION', '7.0.0')
8 8
 cfg_pamac_tray.set('TESTSRCDIR', meson.source_root())
9 9
 
10 10
 cfgfile_3 = configure_file(
@@ -29,12 +29,10 @@ pamac_tray_sources += ['tray-appindicator.vala']
29 29
 else
30 30
 pamac_tray_sources += ['tray-gtk.vala']
31 31
 endif
32
-pamac_tray_sources += ['alpm_config.vala']
33
-pamac_tray_sources += ['pamac_config.vala']
34 32
 pamac_tray_sources += ['tray.vala']
35 33
 pamac_tray_vala_args = ['--pkg','posix']
36 34
 pamac_tray_vala_args += ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
37
-pamac_tray_dependencies = [pamacclassic_library]
35
+pamac_tray_dependencies = [Pamac_library]
38 36
 pamac_tray_c_args = []
39 37
 if ENABLE_UPDATE_ICON
40 38
   pamac_tray_vala_args += ['-D', 'ENABLE_UPDATE_ICON']

+ 0
- 1
src/pamac-tray/pamac_config.vala View File

@@ -1 +0,0 @@
1
-../pamac_config.vala

+ 1
- 1
src/pamac-tray/tray-gtk.vala View File

@@ -32,7 +32,7 @@ namespace Pamac {
32 32
 
33 33
 		// Show popup menu on right button
34 34
 		void menu_popup (uint button, uint time) {
35
-			menu.popup (null, null, null, button, time);
35
+			menu.popup_at_pointer (null);
36 36
 		}
37 37
 
38 38
 		public override void set_tooltip (string info) {

+ 18
- 9
src/pamac-tray/tray.vala View File

@@ -18,9 +18,6 @@
18 18
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 19
  */
20 20
 
21
-// i18n
22
-const string GETTEXT_PACKAGE = "pamac";
23
-
24 21
 const string update_icon_name = "pamac-tray-update";
25 22
 const string noupdate_icon_name = "pamac-tray-no-update";
26 23
 const string noupdate_info = _("Your system is up-to-date");
@@ -28,15 +25,15 @@ const string noupdate_info = _("Your system is up-to-date");
28 25
 namespace Pamac {
29 26
 	[DBus (name = "org.pamac.user")]
30 27
 	interface UserDaemon : Object {
31
-		public abstract void refresh_handle () throws IOError;
32
-		public abstract string get_lockfile () throws IOError;
28
+		public abstract void refresh_handle () throws DBusError, IOError;
29
+		public abstract string get_lockfile () throws DBusError, IOError;
33 30
 #if DISABLE_AUR
34
-		public abstract void start_get_updates () throws IOError;
31
+		public abstract void start_get_updates () throws DBusError, IOError;
35 32
 #else
36
-		public abstract void start_get_updates (bool check_aur_updates) throws IOError;
33
+		public abstract void start_get_updates (bool check_aur_updates) throws DBusError, IOError;
37 34
 #endif
38 35
 		[DBus (no_reply = true)]
39
-		public abstract void quit () throws IOError;
36
+		public abstract void quit () throws DBusError, IOError;
40 37
 		public signal void get_updates_finished (Updates updates);
41 38
 	}
42 39
 
@@ -71,6 +68,8 @@ namespace Pamac {
71 68
 					daemon.quit ();
72 69
 				} catch (IOError e) {
73 70
 					stderr.printf ("IOError: %s\n", e.message);
71
+				} catch (DBusError e) {
72
+					stderr.printf ("DBusError: %s\n", e.message);
74 73
 				}
75 74
 			}
76 75
 		}
@@ -132,6 +131,8 @@ namespace Pamac {
132 131
 #endif
133 132
 				} catch (IOError e) {
134 133
 					stderr.printf ("IOError: %s\n", e.message);
134
+				} catch (DBusError e) {
135
+					stderr.printf ("DBusError: %s\n", e.message);
135 136
 				}
136 137
 			}
137 138
 			return true;
@@ -233,6 +234,8 @@ namespace Pamac {
233 234
 						daemon.refresh_handle ();
234 235
 					} catch (IOError e) {
235 236
 						stderr.printf ("IOError: %s\n", e.message);
237
+					} catch (DBusError e) {
238
+						stderr.printf ("DBusError: %s\n", e.message);
236 239
 					}
237 240
 					check_updates ();
238 241
 				}
@@ -274,8 +277,10 @@ namespace Pamac {
274 277
 
275 278
 		public override void startup () {
276 279
 			// i18n
277
-			Intl.textdomain ("pamac");
280
+			Intl.bindtextdomain(Constants.GETTEXT_PACKAGE, Path.build_filename(Constants.DATADIR,"locale"));
278 281
 			Intl.setlocale (LocaleCategory.ALL, "");
282
+			Intl.textdomain(Constants.GETTEXT_PACKAGE);
283
+			Intl.bind_textdomain_codeset(Constants.GETTEXT_PACKAGE, "utf-8" );
279 284
 
280 285
 			var pamac_config = new Pamac.Config ();
281 286
 			// if refresh period is 0, just return so tray will exit
@@ -303,6 +308,10 @@ namespace Pamac {
303 308
 				stderr.printf ("IOError: %s\n", e.message);
304 309
 				//try standard lock file
305 310
 				lockfile = GLib.File.new_for_path ("var/lib/pacman/db.lck");
311
+			} catch (DBusError e) {
312
+				stderr.printf ("DBusError: %s\n", e.message);
313
+				//try standard lock file
314
+				lockfile = GLib.File.new_for_path ("var/lib/pacman/db.lck");
306 315
 			}
307 316
 			Timeout.add (200, check_extern_lock);
308 317
 			// wait 30 seconds before check updates

+ 0
- 1
src/pamac-user-daemon/alpm_config.vala View File

@@ -1 +0,0 @@
1
-../alpm_config.vala

+ 2
- 4
src/pamac-user-daemon/meson.build View File

@@ -4,7 +4,7 @@ cfg_pamac_user_daemon.set('PKGDATADIR', join_paths(get_option('prefix'),get_opti
4 4
 cfg_pamac_user_daemon.set('GETTEXT_PACKAGE', 'pamac')
5 5
 cfg_pamac_user_daemon.set('RELEASE_NAME', 'pamac')
6 6
 cfg_pamac_user_daemon.set('PREFIX', get_option('prefix'))
7
-cfg_pamac_user_daemon.set('VERSION', '6.7.2')
7
+cfg_pamac_user_daemon.set('VERSION', '7.0.0')
8 8
 cfg_pamac_user_daemon.set('TESTSRCDIR', meson.source_root())
9 9
 
10 10
 cfgfile_2 = configure_file(
@@ -20,12 +20,10 @@ pamac_user_daemon_deps += [gio_2_0_dep]
20 20
 pamac_user_daemon_deps += [glib_2_0_dep]
21 21
 pamac_user_daemon_deps += [gobject_2_0_dep]
22 22
 pamac_user_daemon_sources = [cfgfile_2]
23
-pamac_user_daemon_sources += ['alpm_config.vala']
24
-pamac_user_daemon_sources += ['pamac_config.vala']
25 23
 pamac_user_daemon_sources += ['user_daemon.vala']
26 24
 pamac_user_daemon_vala_args = ['--pkg','posix']
27 25
 pamac_user_daemon_vala_args += ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
28
-pamac_user_daemon_dependencies = [pamacclassic_library]
26
+pamac_user_daemon_dependencies = [Pamac_library]
29 27
 pamac_user_daemon_c_args = []
30 28
 if ENABLE_UPDATE_ICON
31 29
   pamac_user_daemon_vala_args += ['-D', 'ENABLE_UPDATE_ICON']

+ 0
- 1
src/pamac-user-daemon/pamac_config.vala View File

@@ -1 +0,0 @@
1
-../pamac_config.vala

+ 49
- 35
src/pamac-user-daemon/user_daemon.vala View File

@@ -34,10 +34,10 @@ namespace Pamac {
34 34
 #else
35 35
 		private bool check_aur_updates;
36 36
 		private bool aur_updates_checked;
37
-#endif
38 37
 		private Json.Array aur_updates_results;
39 38
 		private HashTable<string, Json.Array> aur_search_results;
40 39
 		private HashTable<string, Json.Object> aur_infos;
40
+#endif
41 41
 
42 42
 		public signal void get_updates_finished (Updates updates);
43 43
 
@@ -49,10 +49,16 @@ namespace Pamac {
49 49
 			aur_search_results = new HashTable<string, Json.Array> (str_hash, str_equal);
50 50
 			aur_infos = new HashTable<string, Json.Object> (str_hash, str_equal);
51 51
 #endif
52
-			refresh_handle ();
52
+			try {
53
+				refresh_handle ();
54
+			} catch (IOError e) {
55
+				stderr.printf ("IOError: %s\n", e.message);
56
+			} catch (DBusError e) {
57
+				stderr.printf ("DBusError: %s\n", e.message);
58
+			}
53 59
 		}
54 60
 
55
-		public void refresh_handle () {
61
+		public void refresh_handle () throws DBusError, IOError {
56 62
 			alpm_config.reload ();
57 63
 			alpm_handle = alpm_config.get_handle ();
58 64
 			if (alpm_handle == null) {
@@ -67,15 +73,15 @@ namespace Pamac {
67 73
 			}
68 74
 		}
69 75
 
70
-		public bool get_checkspace () {
76
+		public bool get_checkspace () throws DBusError, IOError {
71 77
 			return alpm_handle.checkspace == 1 ? true : false;
72 78
 		}
73 79
 
74
-		public string get_lockfile () {
80
+		public string get_lockfile () throws DBusError, IOError {
75 81
 			return alpm_handle.lockfile;
76 82
 		}
77 83
 
78
-		public string[] get_ignorepkgs () {
84
+		public string[] get_ignorepkgs () throws DBusError, IOError {
79 85
 			string[] result = {};
80 86
 			unowned Alpm.List<unowned string> ignorepkgs = alpm_handle.ignorepkgs;
81 87
 			while (ignorepkgs != null) {
@@ -86,14 +92,14 @@ namespace Pamac {
86 92
 			return result;
87 93
 		}
88 94
 
89
-		public bool should_hold (string pkgname) {
95
+		public bool should_hold (string pkgname) throws DBusError, IOError {
90 96
 			if (alpm_config.get_holdpkgs ().find_custom (pkgname, strcmp) != null) {
91 97
 				return true;
92 98
 			}
93 99
 			return false;
94 100
 		}
95 101
 
96
-		public uint get_pkg_reason (string pkgname) {
102
+		public uint get_pkg_reason (string pkgname) throws DBusError, IOError {
97 103
 			unowned Alpm.Package? pkg = alpm_handle.localdb.get_pkg (pkgname);
98 104
 			if (pkg != null) {
99 105
 				return pkg.reason;
@@ -101,7 +107,7 @@ namespace Pamac {
101 107
 			return 0;
102 108
 		}
103 109
 
104
-		public uint get_pkg_origin (string pkgname) {
110
+		public uint get_pkg_origin (string pkgname) throws DBusError, IOError {
105 111
 			unowned Alpm.Package? pkg = alpm_handle.localdb.get_pkg (pkgname);
106 112
 			if (pkg != null) {
107 113
 				return pkg.origin;
@@ -153,7 +159,7 @@ namespace Pamac {
153 159
 			}
154 160
 		}
155 161
 
156
-		public async AlpmPackage[] get_installed_pkgs () {
162
+		public async AlpmPackage[] get_installed_pkgs () throws DBusError, IOError {
157 163
 			AlpmPackage[] pkgs = {};
158 164
 			unowned Alpm.List<unowned Alpm.Package> pkgcache = alpm_handle.localdb.pkgcache;
159 165
 			while (pkgcache != null) {
@@ -164,7 +170,7 @@ namespace Pamac {
164 170
 			return pkgs;
165 171
 		}
166 172
 
167
-		public async AlpmPackage[] get_explicitly_installed_pkgs () {
173
+		public async AlpmPackage[] get_explicitly_installed_pkgs () throws DBusError, IOError {
168 174
 			AlpmPackage[] pkgs = {};
169 175
 			unowned Alpm.List<unowned Alpm.Package> pkgcache = alpm_handle.localdb.pkgcache;
170 176
 			while (pkgcache != null) {
@@ -177,7 +183,7 @@ namespace Pamac {
177 183
 			return pkgs;
178 184
 		}
179 185
 
180
-		public async AlpmPackage[] get_foreign_pkgs () {
186
+		public async AlpmPackage[] get_foreign_pkgs () throws DBusError, IOError {
181 187
 			AlpmPackage[] pkgs = {};
182 188
 			unowned Alpm.List<unowned Alpm.Package> pkgcache = alpm_handle.localdb.pkgcache;
183 189
 			while (pkgcache != null) {
@@ -201,7 +207,7 @@ namespace Pamac {
201 207
 			return pkgs;
202 208
 		}
203 209
 
204
-		public async AlpmPackage[] get_orphans () {
210
+		public async AlpmPackage[] get_orphans () throws DBusError, IOError {
205 211
 			AlpmPackage[] pkgs = {};
206 212
 			unowned Alpm.List<unowned Alpm.Package> pkgcache = alpm_handle.localdb.pkgcache;
207 213
 			while (pkgcache != null) {
@@ -224,11 +230,11 @@ namespace Pamac {
224 230
 			return pkgs;
225 231
 		}
226 232
 
227
-		public AlpmPackage get_installed_pkg (string pkgname) {
233
+		public AlpmPackage get_installed_pkg (string pkgname) throws DBusError, IOError {
228 234
 			return initialise_pkg_struct (alpm_handle.localdb.get_pkg (pkgname));
229 235
 		}
230 236
 
231
-		public AlpmPackage find_installed_satisfier (string depstring) {
237
+		public AlpmPackage find_installed_satisfier (string depstring) throws DBusError, IOError {
232 238
 			return initialise_pkg_struct (Alpm.find_satisfier (alpm_handle.localdb.pkgcache, depstring));
233 239
 		}
234 240
 
@@ -246,7 +252,7 @@ namespace Pamac {
246 252
 			return pkg;
247 253
 		}
248 254
 
249
-		public AlpmPackage get_sync_pkg (string pkgname) {
255
+		public AlpmPackage get_sync_pkg (string pkgname) throws DBusError, IOError {
250 256
 			return initialise_pkg_struct (get_syncpkg (pkgname));
251 257
 		}
252 258
 
@@ -264,7 +270,7 @@ namespace Pamac {
264 270
 			return pkg;
265 271
 		}
266 272
 
267
-		public AlpmPackage find_sync_satisfier (string depstring) {
273
+		public AlpmPackage find_sync_satisfier (string depstring) throws DBusError, IOError {
268 274
 			return initialise_pkg_struct (find_dbs_satisfier (depstring));
269 275
 		}
270 276
 
@@ -293,7 +299,7 @@ namespace Pamac {
293 299
 			return result;
294 300
 		}
295 301
 
296
-		public async AlpmPackage[] search_pkgs (string search_string) {
302
+		public async AlpmPackage[] search_pkgs (string search_string) throws DBusError, IOError {
297 303
 			AlpmPackage[] result = {};
298 304
 			Alpm.List<unowned Alpm.Package> alpm_pkgs = search_all_dbs (search_string);
299 305
 			unowned Alpm.List<unowned Alpm.Package> list = alpm_pkgs;
@@ -323,9 +329,9 @@ namespace Pamac {
323 329
 			};
324 330
 		}
325 331
 
326
-		public async AURPackage[] search_in_aur (string search_string) {
332
+		public async AURPackage[] search_in_aur (string search_string) throws DBusError, IOError {
327 333
 			if (!aur_search_results.contains (search_string)) {
328
-				Json.Array pkgs = yield AUR.search (search_string.split (" "));
334
+				Json.Array pkgs = yield search (search_string.split (" "));
329 335
 				aur_search_results.insert (search_string, pkgs);
330 336
 			}
331 337
 			AURPackage[] result = {};
@@ -340,7 +346,7 @@ namespace Pamac {
340 346
 			return result;
341 347
 		}
342 348
 
343
-		public async AURPackageDetails get_aur_details (string pkgname) {
349
+		public async AURPackageDetails get_aur_details (string pkgname) throws DBusError, IOError {
344 350
 			string name = "";
345 351
 			string version = "";
346 352
 			string desc = "";
@@ -362,7 +368,7 @@ namespace Pamac {
362 368
 			string[] conflicts = {};
363 369
 			var details = AURPackageDetails ();
364 370
 			if (!aur_infos.contains (pkgname)) {
365
-				Json.Array results = yield AUR.multiinfo ({pkgname});
371
+				Json.Array results = yield multiinfo ({pkgname});
366 372
 				if (results.get_length () > 0) {
367 373
 					aur_infos.insert (pkgname, results.get_object_element (0));
368 374
 				}
@@ -483,7 +489,7 @@ namespace Pamac {
483 489
 		}
484 490
 #endif
485 491
 
486
-		public string[] get_repos_names () {
492
+		public string[] get_repos_names () throws DBusError, IOError {
487 493
 			string[] repos_names = {};
488 494
 			unowned Alpm.List<unowned Alpm.DB> syncdbs = alpm_handle.syncdbs;
489 495
 			while (syncdbs != null) {
@@ -494,7 +500,7 @@ namespace Pamac {
494 500
 			return repos_names;
495 501
 		}
496 502
 
497
-		public async AlpmPackage[] get_repo_pkgs (string repo) {
503
+		public async AlpmPackage[] get_repo_pkgs (string repo) throws DBusError, IOError {
498 504
 			AlpmPackage[] pkgs = {};
499 505
 			unowned Alpm.List<unowned Alpm.DB> syncdbs = alpm_handle.syncdbs;
500 506
 			while (syncdbs != null) {
@@ -518,7 +524,7 @@ namespace Pamac {
518 524
 			return pkgs;
519 525
 		}
520 526
 
521
-		public string[] get_groups_names () {
527
+		public string[] get_groups_names () throws DBusError, IOError {
522 528
 			string[] groups_names = {};
523 529
 			unowned Alpm.List<unowned Alpm.Group> groupcache = alpm_handle.localdb.groupcache;
524 530
 			while (groupcache != null) {
@@ -574,7 +580,7 @@ namespace Pamac {
574 580
 			return result;
575 581
 		}
576 582
 
577
-		public async AlpmPackage[] get_group_pkgs (string groupname) {
583
+		public async AlpmPackage[] get_group_pkgs (string groupname) throws DBusError, IOError {
578 584
 			AlpmPackage[] pkgs = {};
579 585
 			Alpm.List<unowned Alpm.Package> alpm_pkgs = group_pkgs (groupname);
580 586
 			unowned Alpm.List<unowned Alpm.Package> list = alpm_pkgs;
@@ -586,7 +592,7 @@ namespace Pamac {
586 592
 			return pkgs;
587 593
 		}
588 594
 
589
-		public string[] get_pkg_uninstalled_optdeps (string pkgname) {
595
+		public string[] get_pkg_uninstalled_optdeps (string pkgname) throws DBusError, IOError {
590 596
 			string[] optdeps = {};
591 597
 			unowned Alpm.Package? alpm_pkg = alpm_handle.localdb.get_pkg (pkgname);
592 598
 			if (alpm_pkg == null) {
@@ -605,7 +611,7 @@ namespace Pamac {
605 611
 			return optdeps;
606 612
 		}
607 613
 
608
-		public AlpmPackageDetails get_pkg_details (string pkgname) {
614
+		public AlpmPackageDetails get_pkg_details (string pkgname) throws DBusError, IOError {
609 615
 			string name = "";
610 616
 			string version = "";
611 617
 			string desc = "";
@@ -779,7 +785,7 @@ namespace Pamac {
779 785
 			return details;
780 786
 		}
781 787
 
782
-		public string[] get_pkg_files (string pkgname) {
788
+		public string[] get_pkg_files (string pkgname) throws DBusError, IOError {
783 789
 			string[] files = {};
784 790
 			unowned Alpm.Package? alpm_pkg = alpm_handle.localdb.get_pkg (pkgname);
785 791
 			if (alpm_pkg != null) {
@@ -813,7 +819,10 @@ namespace Pamac {
813 819
 
814 820
 		private int get_updates () {
815 821
 			AlpmPackage[] updates_infos = {};
822
+#if DISABLE_AUR
823
+#else
816 824
 			unowned Alpm.Package? pkg = null;
825
+#endif
817 826
 			unowned Alpm.Package? candidate = null;
818 827
 			// use a tmp handle
819 828
 			var tmp_handle = alpm_config.get_handle (false, true);
@@ -843,7 +852,10 @@ namespace Pamac {
843 852
 					syncdbs.next ();
844 853
 				}
845 854
 			}
855
+#if DISABLE_AUR
856
+#else
846 857
 			string[] local_pkgs = {};
858
+#endif
847 859
 			unowned Alpm.List<unowned Alpm.Package> pkgcache = tmp_handle.localdb.pkgcache;
848 860
 			while (pkgcache != null) {
849 861
 				unowned Alpm.Package installed_pkg = pkgcache.data;
@@ -882,8 +894,8 @@ namespace Pamac {
882 894
 			if (check_aur_updates) {
883 895
 				// get aur updates
884 896
 				if (!aur_updates_checked) {
885
-					AUR.multiinfo.begin (local_pkgs, (obj, res) => {
886
-						aur_updates_results = AUR.multiinfo.end (res);
897
+					multiinfo.begin (local_pkgs, (obj, res) => {
898
+						aur_updates_results = multiinfo.end (res);
887 899
 						aur_updates_checked = true;
888 900
 						var updates = Updates () {
889 901
 							repos_updates = (owned) updates_infos,
@@ -936,16 +948,16 @@ namespace Pamac {
936 948
 #endif
937 949
 
938 950
 #if DISABLE_AUR
939
-		public void start_get_updates () {
951
+		public void start_get_updates () throws DBusError, IOError {
940 952
 #else
941
-		public void start_get_updates (bool check_aur_updates_) {
953
+		public void start_get_updates (bool check_aur_updates_) throws DBusError, IOError {
942 954
 			check_aur_updates = check_aur_updates_;
943 955
 #endif
944 956
 			new Thread<int> ("get updates thread", get_updates);
945 957
 		}
946 958
 
947 959
 		[DBus (no_reply = true)]
948
-		public void quit () {
960
+		public void quit () throws DBusError, IOError {
949 961
 			loop.quit ();
950 962
 		}
951 963
 	// End of Daemon Object
@@ -1020,8 +1032,10 @@ void on_bus_acquired (DBusConnection conn) {
1020 1032
 
1021 1033
 void main () {
1022 1034
 	// i18n
1035
+	Intl.bindtextdomain(Constants.GETTEXT_PACKAGE, Path.build_filename(Constants.DATADIR,"locale"));
1023 1036
 	Intl.setlocale (LocaleCategory.ALL, "");
1024
-	Intl.textdomain (GETTEXT_PACKAGE);
1037
+	Intl.textdomain(Constants.GETTEXT_PACKAGE);
1038
+	Intl.bind_textdomain_codeset(Constants.GETTEXT_PACKAGE, "utf-8" );
1025 1039
 
1026 1040
 	Bus.own_name (BusType.SESSION,
1027 1041
 				"org.pamac.user",

+ 1
- 1
src/pamac_config.vala View File

@@ -19,7 +19,7 @@
19 19
  */
20 20
 
21 21
 namespace Pamac {
22
-	class Config {
22
+	public class Config {
23 23
 		HashTable<string,string> _environment_variables;
24 24
 
25 25
 		public bool recurse { get; private set; }

+ 0
- 10
src/pamacclassic.pc View File

@@ -1,10 +0,0 @@
1
-prefix=@CMAKE_INSTALL_PREFIX@
2
-libdir=@DOLLAR@{prefix}/${CMAKE_INSTALL_LIBDIR}
3
-includedir=@DOLLAR@{prefix}/${CMAKE_INSTALL_INCLUDEDIR}
4
-
5
-Name: pamacclassic
6
-Description: pamacclassic
7
-Version: 6.7.2
8
-Libs: -L@DOLLAR@{libdir} -lpamacclassic
9
-Cflags: -I@DOLLAR@{includedir}
10
-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

+ 5
- 5
src/preferences_dialog.vala View File

@@ -1,7 +1,7 @@
1 1
 /*
2 2
  *  pamac-vala
3 3
  *
4
- *  Copyright (C) 2017 Chris Cromer <cromer@cromnix.org>
4
+ *  Copyright (C) 2017-2019 Chris Cromer <cromer@cromnix.org>
5 5
  *  Copyright (C) 2015-2017 Guillaume Benoit <guillaume@manjaro.org>
6 6
  *
7 7
  *  This program is free software; you can redistribute it and/or modify
@@ -117,8 +117,8 @@ namespace Pamac {
117 117
 			cache_only_uninstalled_checkbutton.active = transaction.rm_only_uninstalled;
118 118
 
119 119
 			// Set up terminal
120
-			terminal_background.set_use_alpha (false);
121
-			terminal_foreground.set_use_alpha (false);
120
+			terminal_background.use_alpha = false;
121
+			terminal_foreground.use_alpha = false;
122 122
 			Gdk.RGBA rgba = Gdk.RGBA ();
123 123
 			bool tmp = rgba.parse (transaction.terminal_background);
124 124
 			terminal_background.rgba = rgba;
@@ -274,10 +274,10 @@ namespace Pamac {
274 274
 
275 275
 		void on_select_font () {
276 276
 			var settings = new Settings ("org.pamac.main");
277
-			settings.set_string ("terminal-font", terminal_font.get_font_name ());
277
+			settings.set_string ("terminal-font", terminal_font.get_font ());
278 278
 			config_changed();
279 279
 			transaction.start_save_pamac_config ();
280
-			transaction.update_terminal_font (terminal_font.get_font_name ());
280
+			transaction.update_terminal_font (terminal_font.get_font ());
281 281
 		}
282 282
 
283 283
 #if DISABLE_AUR

+ 213
- 55
src/transaction.vala View File

@@ -1,7 +1,7 @@
1 1
 /*
2 2
  *  pamac-vala
3 3
  *
4
- *  Copyright (C) 2017 Chris Cromer <cromer@cromnix.org>
4
+ *  Copyright (C) 2017-2019 Chris Cromer <cromer@cromnix.org>
5 5
  *  Copyright (C) 2014-2017 Guillaume Benoit <guillaume@manjaro.org>
6 6
  *
7 7
  *  This program is free software; you can redistribute it and/or modify
@@ -19,82 +19,85 @@
19 19
  */
20 20
 
21 21
 //using Math
22
+//using Vte
23
+//using Posix
22 24
 
23 25
 namespace Pamac {
26
+	
24 27
 	[DBus (name = "org.pamac.user")]
25 28
 	interface UserDaemon : Object {
26
-		public abstract void refresh_handle () throws IOError;
27
-		public abstract AlpmPackage get_installed_pkg (string pkgname) throws IOError;
28
-		public abstract bool get_checkspace () throws IOError;
29
-		public abstract string[] get_ignorepkgs () throws IOError;
30
-		public abstract bool should_hold (string pkgname) throws IOError;
31
-		public abstract uint get_pkg_reason (string pkgname) throws IOError;
32
-		public abstract uint get_pkg_origin (string pkgname) throws IOError;
33
-		public abstract async AlpmPackage[] get_installed_pkgs () throws IOError;
34
-		public abstract async AlpmPackage[] get_explicitly_installed_pkgs () throws IOError;
35
-		public abstract async AlpmPackage[] get_foreign_pkgs () throws IOError;
36
-		public abstract async AlpmPackage[] get_orphans () throws IOError;
37
-		public abstract AlpmPackage find_installed_satisfier (string depstring) throws IOError;
38
-		public abstract AlpmPackage get_sync_pkg (string pkgname) throws IOError;
39
-		public abstract AlpmPackage find_sync_satisfier (string depstring) throws IOError;
40
-		public abstract async AlpmPackage[] search_pkgs (string search_string) throws IOError;
29
+		public abstract void refresh_handle () throws DBusError, IOError;
30
+		public abstract AlpmPackage get_installed_pkg (string pkgname) throws DBusError, IOError;
31
+		public abstract bool get_checkspace () throws DBusError, IOError;
32
+		public abstract string[] get_ignorepkgs () throws DBusError, IOError;
33
+		public abstract bool should_hold (string pkgname) throws DBusError, IOError;
34
+		public abstract uint get_pkg_reason (string pkgname) throws DBusError, IOError;
35
+		public abstract uint get_pkg_origin (string pkgname) throws DBusError, IOError;
36
+		public abstract async AlpmPackage[] get_installed_pkgs () throws DBusError, IOError;
37
+		public abstract async AlpmPackage[] get_explicitly_installed_pkgs () throws DBusError, IOError;
38
+		public abstract async AlpmPackage[] get_foreign_pkgs () throws DBusError, IOError;
39
+		public abstract async AlpmPackage[] get_orphans () throws DBusError, IOError;
40
+		public abstract AlpmPackage find_installed_satisfier (string depstring) throws DBusError, IOError;
41
+		public abstract AlpmPackage get_sync_pkg (string pkgname) throws DBusError, IOError;
42
+		public abstract AlpmPackage find_sync_satisfier (string depstring) throws DBusError, IOError;
43
+		public abstract async AlpmPackage[] search_pkgs (string search_string) throws DBusError, IOError;
41 44
 #if DISABLE_AUR
42 45
 #else
43
-		public abstract async AURPackage[] search_in_aur (string search_string) throws IOError;
46
+		public abstract async AURPackage[] search_in_aur (string search_string) throws DBusError, IOError;
44 47
 #endif
45
-		public abstract string[] get_repos_names () throws IOError;
46
-		public abstract async AlpmPackage[] get_repo_pkgs (string repo) throws IOError;
47
-		public abstract string[] get_groups_names () throws IOError;
48
-		public abstract async AlpmPackage[] get_group_pkgs (string groupname) throws IOError;
49
-		public abstract AlpmPackageDetails get_pkg_details (string pkgname) throws IOError;
50
-		public abstract string[] get_pkg_files (string pkgname) throws IOError;
48
+		public abstract string[] get_repos_names () throws DBusError, IOError;
49
+		public abstract async AlpmPackage[] get_repo_pkgs (string repo) throws DBusError, IOError;
50
+		public abstract string[] get_groups_names () throws DBusError, IOError;
51
+		public abstract async AlpmPackage[] get_group_pkgs (string groupname) throws DBusError, IOError;
52
+		public abstract AlpmPackageDetails get_pkg_details (string pkgname) throws DBusError, IOError;
53
+		public abstract string[] get_pkg_files (string pkgname) throws DBusError, IOError;
51 54
 #if DISABLE_AUR
52 55
 #else
53
-		public abstract async AURPackageDetails get_aur_details (string pkgname) throws IOError;
56
+		public abstract async AURPackageDetails get_aur_details (string pkgname) throws DBusError, IOError;
54 57
 #endif
55
-		public abstract string[] get_pkg_uninstalled_optdeps (string pkgname) throws IOError;
58
+		public abstract string[] get_pkg_uninstalled_optdeps (string pkgname) throws DBusError, IOError;
56 59
 #if DISABLE_AUR
57
-		public abstract void start_get_updates () throws IOError;
60
+		public abstract void start_get_updates () throws DBusError, IOError;
58 61
 #else
59
-		public abstract void start_get_updates (bool check_aur_updates) throws IOError;
62
+		public abstract void start_get_updates (bool check_aur_updates) throws DBusError, IOError;
60 63
 #endif
61 64
 		[DBus (no_reply = true)]
62
-		public abstract void quit () throws IOError;
65
+		public abstract void quit () throws DBusError, IOError;
63 66
 		public signal void get_updates_finished (Updates updates);
64 67
 	}
65 68
 	[DBus (name = "org.pamac.system")]
66 69
 	interface SystemDaemon : Object {
67
-		public abstract void set_environment_variables (HashTable<string,string> variables) throws IOError;
68
-		public abstract string[] get_mirrors_countries () throws IOError;
69
-		public abstract ErrorInfos get_current_error () throws IOError;
70
-		public abstract bool get_lock () throws IOError;
71
-		public abstract bool unlock () throws IOError;
72
-		public abstract void start_get_authorization () throws IOError;
73
-		public abstract void start_save_pamac_config () throws IOError;
74
-		public abstract void start_write_alpm_config (HashTable<string,Variant> new_alpm_conf) throws IOError;
75
-		public abstract void start_write_mirrors_config (HashTable<string,Variant> new_mirrors_conf) throws IOError;
76
-		public abstract void start_generate_mirrors_list () throws IOError;
77
-		public abstract void clean_cache (uint64 keep_nb, bool only_uninstalled) throws IOError;
78
-		public abstract void start_set_pkgreason (string pkgname, uint reason) throws IOError;
79
-		public abstract void start_refresh (bool force) throws IOError;
80
-		public abstract void start_sysupgrade_prepare (bool enable_downgrade, string[] temporary_ignorepkgs) throws IOError;
70
+		public abstract void set_environment_variables (HashTable<string,string> variables) throws DBusError, IOError;
71
+		public abstract string[] get_mirrors_countries () throws DBusError, IOError;
72
+		public abstract ErrorInfos get_current_error () throws DBusError, IOError;
73
+		public abstract bool get_lock () throws DBusError, IOError;
74
+		public abstract bool unlock () throws DBusError, IOError;
75
+		public abstract void start_get_authorization () throws DBusError, IOError;
76
+		public abstract void start_save_pamac_config () throws DBusError, IOError;
77
+		public abstract void start_write_alpm_config (HashTable<string,Variant> new_alpm_conf) throws DBusError, IOError;
78
+		public abstract void start_write_mirrors_config (HashTable<string,Variant> new_mirrors_conf) throws DBusError, IOError;
79
+		public abstract void start_generate_mirrors_list () throws DBusError, IOError;
80
+		public abstract void clean_cache (uint64 keep_nb, bool only_uninstalled) throws DBusError, IOError;
81
+		public abstract void start_set_pkgreason (string pkgname, uint reason) throws DBusError, IOError;
82
+		public abstract void start_refresh (bool force) throws DBusError, IOError;
83
+		public abstract void start_sysupgrade_prepare (bool enable_downgrade, string[] temporary_ignorepkgs) throws DBusError, IOError;
81 84
 #if DISABLE_AUR
82
-		public abstract void start_trans_prepare (int transflags, string[] to_install, string[] to_remove, string[] to_load) throws IOError;
85
+		public abstract void start_trans_prepare (int transflags, string[] to_install, string[] to_remove, string[] to_load) throws DBusError, IOError;
83 86
 #else
84
-		public abstract void start_trans_prepare (int transflags, string[] to_install, string[] to_remove, string[] to_load, string[] to_build) throws IOError;
87
+		public abstract void start_trans_prepare (int transflags, string[] to_install, string[] to_remove, string[] to_load, string[] to_build) throws DBusError, IOError;
85 88
 #endif
86
-		public abstract void choose_provider (int provider) throws IOError;
87
-		public abstract TransactionSummary get_transaction_summary () throws IOError;
88
-		public abstract void start_trans_commit () throws IOError;
89
-		public abstract void trans_release () throws IOError;
90
-		public abstract void trans_cancel () throws IOError;
89
+		public abstract void choose_provider (int provider) throws DBusError, IOError;
90
+		public abstract TransactionSummary get_transaction_summary () throws DBusError, IOError;
91
+		public abstract void start_trans_commit () throws DBusError, IOError;
92
+		public abstract void trans_release () throws DBusError, IOError;
93
+		public abstract void trans_cancel () throws DBusError, IOError;
91 94
 #if DISABLE_AUR
92
-		public abstract void start_get_updates () throws IOError;
95
+		public abstract void start_get_updates () throws DBusError, IOError;
93 96
 #else
94
-		public abstract void start_get_updates (bool check_aur_updates) throws IOError;
97
+		public abstract void start_get_updates (bool check_aur_updates) throws DBusError, IOError;
95 98
 #endif
96 99
 		[DBus (no_reply = true)]
97
-		public abstract void quit () throws IOError;
100
+		public abstract void quit () throws DBusError, IOError;
98 101
 		public signal void get_updates_finished (Updates updates);
99 102
 		public signal void emit_event (uint primary_event, uint secondary_event, string[] details);
100 103
 		public signal void emit_providers (string depend, string[] providers);
@@ -344,6 +347,9 @@ namespace Pamac {
344 347
 			} catch (IOError e) {
345 348
 				stderr.printf ("IOError: %s\n", e.message);
346 349
 				return ErrorInfos ();
350
+			} catch (DBusError e) {
351
+				stderr.printf ("DBusError: %s\n", e.message);
352
+				return ErrorInfos ();
347 353
 			}
348 354
 		}
349 355
 
@@ -354,6 +360,8 @@ namespace Pamac {
354 360
 				countries = system_daemon.get_mirrors_countries ();
355 361
 			} catch (IOError e) {
356 362
 				stderr.printf ("IOError: %s\n", e.message);
363
+			} catch (DBusError e) {
364
+				stderr.printf ("DBusError: %s\n", e.message);
357 365
 			}
358 366
 			return countries;
359 367
 		}
@@ -365,6 +373,8 @@ namespace Pamac {
365 373
 				locked = system_daemon.get_lock ();
366 374
 			} catch (IOError e) {
367 375
 				stderr.printf ("IOError: %s\n", e.message);
376
+			} catch (DBusError e) {
377
+				stderr.printf ("DBusError: %s\n", e.message);
368 378
 			}
369 379
 			return locked;
370 380
 		}
@@ -375,6 +385,8 @@ namespace Pamac {
375 385
 				unlocked = system_daemon.unlock ();
376 386
 			} catch (IOError e) {
377 387
 				stderr.printf ("IOError: %s\n", e.message);
388
+			} catch (DBusError e) {
389
+				stderr.printf ("DBusError: %s\n", e.message);
378 390
 			}
379 391
 			return unlocked;
380 392
 		}
@@ -390,6 +402,8 @@ namespace Pamac {
390 402
 				system_daemon.start_get_authorization ();
391 403
 			} catch (IOError e) {
392 404
 				stderr.printf ("IOError: %s\n", e.message);
405
+			} catch (DBusError e) {
406
+				stderr.printf ("DBusError: %s\n", e.message);
393 407
 			}
394 408
 			yield;
395 409
 			system_daemon.disconnect (handler_id);
@@ -403,6 +417,9 @@ namespace Pamac {
403 417
 			} catch (IOError e) {
404 418
 				stderr.printf ("IOError: %s\n", e.message);
405 419
 				system_daemon.save_pamac_config_finished.disconnect (on_save_pamac_config_finished);
420
+			} catch (DBusError e) {
421
+				stderr.printf ("DBusError: %s\n", e.message);
422
+				system_daemon.save_pamac_config_finished.disconnect (on_save_pamac_config_finished);
406 423
 			}
407 424
 		}
408 425
 
@@ -413,6 +430,9 @@ namespace Pamac {
413 430
 			} catch (IOError e) {
414 431
 				stderr.printf ("IOError: %s\n", e.message);
415 432
 				system_daemon.write_alpm_config_finished.disconnect (on_write_alpm_config_finished);
433
+			} catch (DBusError e) {
434
+				stderr.printf ("DBusError: %s\n", e.message);
435
+				system_daemon.write_alpm_config_finished.disconnect (on_write_alpm_config_finished);
416 436
 			}
417 437
 		}
418 438
 
@@ -423,6 +443,9 @@ namespace Pamac {
423 443
 			} catch (IOError e) {
424 444
 				stderr.printf ("IOError: %s\n", e.message);
425 445
 				system_daemon.write_mirrors_config_finished.disconnect (on_write_mirrors_config_finished);
446
+			} catch (DBusError e) {
447
+				stderr.printf ("DBusError: %s\n", e.message);
448
+				system_daemon.write_mirrors_config_finished.disconnect (on_write_mirrors_config_finished);
426 449
 			}
427 450
 		}
428 451
 
@@ -435,7 +458,7 @@ namespace Pamac {
435 458
 					copy_item.activate.connect (() => {term.copy_clipboard ();});
436 459
 					right_click_menu.append (copy_item);
437 460
 					right_click_menu.show_all ();
438
-					right_click_menu.popup (null, null, null, event.button, event.time);
461
+					right_click_menu.popup_at_pointer (event);
439 462
 					return true;
440 463
 				}
441 464
 			}
@@ -480,8 +503,8 @@ namespace Pamac {
480 503
 						}
481 504
 					} catch (Error e) {
482 505
 						// cancelled
483
-						process.send_signal (Posix.SIGINT);
484
-						process.send_signal (Posix.SIGKILL);
506
+						process.send_signal (Posix.Signal.INT);
507
+						process.send_signal (Posix.Signal.KILL);
485 508
 					}
486 509
 					Idle.add ((owned) callback);
487 510
 				});
@@ -529,6 +552,11 @@ namespace Pamac {
529 552
 				stop_progressbar_pulse ();
530 553
 				system_daemon.generate_mirrors_list_data.disconnect (on_generate_mirrors_list_data);
531 554
 				system_daemon.generate_mirrors_list_finished.disconnect (on_generate_mirrors_list_finished);
555
+			} catch (DBusError e) {
556
+				stderr.printf ("DBusError: %s\n", e.message);
557
+				stop_progressbar_pulse ();
558
+				system_daemon.generate_mirrors_list_data.disconnect (on_generate_mirrors_list_data);
559
+				system_daemon.generate_mirrors_list_finished.disconnect (on_generate_mirrors_list_finished);
532 560
 			}
533 561
 		}
534 562
 
@@ -537,6 +565,8 @@ namespace Pamac {
537 565
 				system_daemon.clean_cache (keep_nb, only_uninstalled);
538 566
 			} catch (IOError e) {
539 567
 				stderr.printf ("IOError: %s\n", e.message);
568
+			} catch (DBusError e) {
569
+				stderr.printf ("DBusError: %s\n", e.message);
540 570
 			}
541 571
 		}
542 572
 
@@ -547,6 +577,9 @@ namespace Pamac {
547 577
 			} catch (IOError e) {
548 578
 				stderr.printf ("IOError: %s\n", e.message);
549 579
 				system_daemon.set_pkgreason_finished.disconnect (on_set_pkgreason_finished);
580
+			} catch (DBusError e) {
581
+				stderr.printf ("DBusError: %s\n", e.message);
582
+				system_daemon.set_pkgreason_finished.disconnect (on_set_pkgreason_finished);
550 583
 			}
551 584
 		}
552 585
 
@@ -566,6 +599,11 @@ namespace Pamac {
566 599
 						system_daemon.refresh_finished.disconnect (on_refresh_finished);
567 600
 						success = false;
568 601
 						finish_transaction ();
602
+					} catch (DBusError e) {
603
+						stderr.printf ("DBusError: %s\n", e.message);
604
+						system_daemon.refresh_finished.disconnect (on_refresh_finished);
605
+						success = false;
606
+						finish_transaction ();
569 607
 					}
570 608
 				} else {
571 609
 					success = false;
@@ -579,6 +617,8 @@ namespace Pamac {
579 617
 				user_daemon.refresh_handle ();
580 618
 			} catch (IOError e) {
581 619
 				stderr.printf ("IOError: %s\n", e.message);
620
+			} catch (DBusError e) {
621
+				stderr.printf ("DBusError: %s\n", e.message);
582 622
 			}
583 623
 		}
584 624
 
@@ -588,6 +628,8 @@ namespace Pamac {
588 628
 				checkspace = user_daemon.get_checkspace ();
589 629
 			} catch (IOError e) {
590 630
 				stderr.printf ("IOError: %s\n", e.message);
631
+			} catch (DBusError e) {
632
+				stderr.printf ("DBusError: %s\n", e.message);
591 633
 			}
592 634
 			return checkspace;
593 635
 		}
@@ -598,6 +640,8 @@ namespace Pamac {
598 640
 				ignorepkgs = user_daemon.get_ignorepkgs ();
599 641
 			} catch (IOError e) {
600 642
 				stderr.printf ("IOError: %s\n", e.message);
643
+			} catch (DBusError e) {
644
+				stderr.printf ("DBusError: %s\n", e.message);
601 645
 			}
602 646
 			return ignorepkgs;
603 647
 		}
@@ -613,6 +657,14 @@ namespace Pamac {
613 657
 					desc = "",
614 658
 					repo = ""
615 659
 				};
660
+			} catch (DBusError e) {
661
+				stderr.printf ("DBusError: %s\n", e.message);
662
+				return AlpmPackage () {
663
+					name = "",
664
+					version = "",
665
+					desc = "",
666
+					repo = ""
667
+				};
616 668
 			}
617 669
 		}
618 670
 
@@ -627,6 +679,14 @@ namespace Pamac {
627 679
 					desc = "",
628 680
 					repo = ""
629 681
 				};
682
+			} catch (DBusError e) {
683
+				stderr.printf ("DBusError: %s\n", e.message);
684
+				return AlpmPackage () {
685
+					name = "",
686
+					version = "",
687
+					desc = "",
688
+					repo = ""
689
+				};
630 690
 			}
631 691
 		}
632 692
 
@@ -636,6 +696,8 @@ namespace Pamac {
636 696
 				should_hold = user_daemon.should_hold (pkgname);
637 697
 			} catch (IOError e) {
638 698
 				stderr.printf ("IOError: %s\n", e.message);
699
+			} catch (DBusError e) {
700
+				stderr.printf ("DBusError: %s\n", e.message);
639 701
 			}
640 702
 			return should_hold;
641 703
 		}
@@ -646,6 +708,8 @@ namespace Pamac {
646 708
 				reason = user_daemon.get_pkg_reason (pkgname);
647 709
 			} catch (IOError e) {
648 710
 				stderr.printf ("IOError: %s\n", e.message);
711
+			} catch (DBusError e) {
712
+				stderr.printf ("DBusError: %s\n", e.message);
649 713
 			}
650 714
 			return reason;
651 715
 		}
@@ -656,6 +720,8 @@ namespace Pamac {
656 720
 				origin = user_daemon.get_pkg_origin (pkgname);
657 721
 			} catch (IOError e) {
658 722
 				stderr.printf ("IOError: %s\n", e.message);
723
+			} catch (DBusError e) {
724
+				stderr.printf ("DBusError: %s\n", e.message);
659 725
 			}
660 726
 			return origin;
661 727
 		}
@@ -666,6 +732,8 @@ namespace Pamac {
666 732
 				pkgs = yield user_daemon.get_installed_pkgs ();
667 733
 			} catch (IOError e) {
668 734
 				stderr.printf ("IOError: %s\n", e.message);
735
+			} catch (DBusError e) {
736
+				stderr.printf ("DBusError: %s\n", e.message);
669 737
 			}
670 738
 			return pkgs;
671 739
 		}
@@ -676,6 +744,8 @@ namespace Pamac {
676 744
 				pkgs = yield user_daemon.get_explicitly_installed_pkgs ();
677 745
 			} catch (IOError e) {
678 746
 				stderr.printf ("IOError: %s\n", e.message);
747
+			} catch (DBusError e) {
748
+				stderr.printf ("DBusError: %s\n", e.message);
679 749
 			}
680 750
 			return pkgs;
681 751
 		}
@@ -686,6 +756,8 @@ namespace Pamac {
686 756
 				pkgs = yield user_daemon.get_foreign_pkgs ();
687 757
 			} catch (IOError e) {
688 758
 				stderr.printf ("IOError: %s\n", e.message);
759
+			} catch (DBusError e) {
760
+				stderr.printf ("DBusError: %s\n", e.message);
689 761
 			}
690 762
 			return pkgs;
691 763
 		}
@@ -696,6 +768,8 @@ namespace Pamac {
696 768
 				pkgs = yield user_daemon.get_orphans ();
697 769
 			} catch (IOError e) {
698 770
 				stderr.printf ("IOError: %s\n", e.message);
771
+			} catch (DBusError e) {
772
+				stderr.printf ("DBusError: %s\n", e.message);
699 773
 			}
700 774
 			return pkgs;
701 775
 		}
@@ -711,6 +785,14 @@ namespace Pamac {
711 785
 					desc = "",
712 786
 					repo = ""
713 787
 				};
788
+			} catch (DBusError e) {
789
+				stderr.printf ("DBusError: %s\n", e.message);
790
+				return AlpmPackage () {
791
+					name = "",
792
+					version = "",
793
+					desc = "",
794
+					repo = ""
795
+				};
714 796
 			}
715 797
 		}
716 798
 
@@ -725,6 +807,14 @@ namespace Pamac {
725 807
 					desc = "",
726 808
 					repo = ""
727 809
 				};
810
+			} catch (DBusError e) {
811
+				stderr.printf ("DBusError: %s\n", e.message);
812
+				return AlpmPackage () {
813
+					name = "",
814
+					version = "",
815
+					desc = "",
816
+					repo = ""
817
+				};
728 818
 			}
729 819
 		}
730 820
 
@@ -734,6 +824,8 @@ namespace Pamac {
734 824
 				pkgs = yield user_daemon.search_pkgs (search_string);
735 825
 			} catch (IOError e) {
736 826
 				stderr.printf ("IOError: %s\n", e.message);
827
+			} catch (DBusError e) {
828
+				stderr.printf ("DBusError: %s\n", e.message);
737 829
 			}
738 830
 			return pkgs;
739 831
 		}
@@ -746,6 +838,8 @@ namespace Pamac {
746 838
 				pkgs = yield user_daemon.search_in_aur (search_string);
747 839
 			} catch (IOError e) {
748 840
 				stderr.printf ("IOError: %s\n", e.message);
841
+			} catch (DBusError e) {
842
+				stderr.printf ("DBusError: %s\n", e.message);
749 843
 			}
750 844
 			return pkgs;
751 845
 		}
@@ -757,6 +851,8 @@ namespace Pamac {
757 851
 				repos_names = user_daemon.get_repos_names ();
758 852
 			} catch (IOError e) {
759 853
 				stderr.printf ("IOError: %s\n", e.message);
854
+			} catch (DBusError e) {
855
+				stderr.printf ("DBusError: %s\n", e.message);
760 856
 			}
761 857
 			return repos_names;
762 858
 		}
@@ -767,6 +863,8 @@ namespace Pamac {
767 863
 				pkgs = yield user_daemon.get_repo_pkgs (repo);
768 864
 			} catch (IOError e) {
769 865
 				stderr.printf ("IOError: %s\n", e.message);
866
+			} catch (DBusError e) {
867
+				stderr.printf ("DBusError: %s\n", e.message);
770 868
 			}
771 869
 			return pkgs;
772 870
 		}
@@ -777,6 +875,8 @@ namespace Pamac {
777 875
 				groups_names = user_daemon.get_groups_names ();
778 876
 			} catch (IOError e) {
779 877
 				stderr.printf ("IOError: %s\n", e.message);
878
+			} catch (DBusError e) {
879
+				stderr.printf ("DBusError: %s\n", e.message);
780 880
 			}
781 881
 			return groups_names;
782 882
 		}
@@ -787,6 +887,8 @@ namespace Pamac {
787 887
 				pkgs = yield user_daemon.get_group_pkgs (group_name);
788 888
 			} catch (IOError e) {
789 889
 				stderr.printf ("IOError: %s\n", e.message);
890
+			} catch (DBusError e) {
891
+				stderr.printf ("DBusError: %s\n", e.message);
790 892
 			}
791 893
 			return pkgs;
792 894
 		}
@@ -797,6 +899,8 @@ namespace Pamac {
797 899
 				optdeps = user_daemon.get_pkg_uninstalled_optdeps (pkgname);
798 900
 			} catch (IOError e) {
799 901
 				stderr.printf ("IOError: %s\n", e.message);
902
+			} catch (DBusError e) {
903
+				stderr.printf ("DBusError: %s\n", e.message);
800 904
 			}
801 905
 			return optdeps;
802 906
 		}
@@ -820,6 +924,22 @@ namespace Pamac {
820 924
 					downloadsize = "",
821 925
 					installsize = ""
822 926
 				};
927
+			} catch (DBusError e) {
928
+				stderr.printf ("DBusError: %s\n", e.message);
929
+				return AlpmPackageDetails () {
930
+					name = "",
931
+					version = "",
932
+					desc = "",
933
+					repo = "",
934
+					url = "",
935
+					packager = "",
936
+					builddate = "",
937
+					installdate = "",
938
+					reason = "",
939
+					has_signature = "",
940
+					downloadsize = "",
941
+					installsize = ""
942
+				};
823 943
 			}
824 944
 		}
825 945
 
@@ -829,6 +949,9 @@ namespace Pamac {
829 949
 			} catch (IOError e) {
830 950
 				stderr.printf ("IOError: %s\n", e.message);
831 951
 				return {};
952
+			} catch (DBusError e) {
953
+				stderr.printf ("DBusError: %s\n", e.message);
954
+				return {};
832 955
 			}
833 956
 		}
834 957
 
@@ -847,6 +970,8 @@ namespace Pamac {
847 970
 				pkg = yield user_daemon.get_aur_details (pkgname);
848 971
 			} catch (IOError e) {
849 972
 				stderr.printf ("IOError: %s\n", e.message);
973
+			} catch (DBusError e) {
974
+				stderr.printf ("DBusError: %s\n", e.message);
850 975
 			}
851 976
 			return pkg;
852 977
 		}
@@ -864,6 +989,10 @@ namespace Pamac {
864 989
 				stderr.printf ("IOError: %s\n", e.message);
865 990
 				success = false;
866 991
 				finish_transaction ();
992
+			} catch (DBusError e) {
993
+				stderr.printf ("DBusError: %s\n", e.message);
994
+				success = false;
995
+				finish_transaction ();
867 996
 			}
868 997
 		}
869 998
 
@@ -879,6 +1008,10 @@ namespace Pamac {
879 1008
 				stderr.printf ("IOError: %s\n", e.message);
880 1009
 				success = false;
881 1010
 				finish_transaction ();
1011
+			} catch (DBusError e) {
1012
+				stderr.printf ("DBusError: %s\n", e.message);
1013
+				success = false;
1014
+				finish_transaction ();
882 1015
 			}
883 1016
 		}
884 1017
 
@@ -897,6 +1030,10 @@ namespace Pamac {
897 1030
 				stderr.printf ("IOError: %s\n", e.message);
898 1031
 				success = false;
899 1032
 				finish_transaction ();
1033
+			} catch (DBusError e) {
1034
+				stderr.printf ("DBusError: %s\n", e.message);
1035
+				success = false;
1036
+				finish_transaction ();
900 1037
 			}
901 1038
 		}
902 1039
 
@@ -989,6 +1126,11 @@ namespace Pamac {
989 1126
 				stop_progressbar_pulse ();
990 1127
 				success = false;
991 1128
 				finish_transaction ();
1129
+			} catch (DBusError e) {
1130
+				stderr.printf ("DBusError: %s\n", e.message);
1131
+				stop_progressbar_pulse ();
1132
+				success = false;
1133
+				finish_transaction ();
992 1134
 			}
993 1135
 		}
994 1136
 
@@ -1056,6 +1198,8 @@ namespace Pamac {
1056 1198
 						system_daemon.choose_provider (index);
1057 1199
 					} catch (IOError e) {
1058 1200
 						stderr.printf ("IOError: %s\n", e.message);
1201
+					} catch (DBusError e) {
1202
+						stderr.printf ("DBusError: %s\n", e.message);
1059 1203
 					}
1060 1204
 				}
1061 1205
 				index++;
@@ -1077,6 +1221,8 @@ namespace Pamac {
1077 1221
 				summary = system_daemon.get_transaction_summary ();
1078 1222
 			} catch (IOError e) {
1079 1223
 				stderr.printf ("IOError: %s\n", e.message);
1224
+			} catch (DBusError e) {
1225
+				stderr.printf ("DBusError: %s\n", e.message);
1080 1226
 			}
1081 1227
 			var iter = Gtk.TreeIter ();
1082 1228
 			if (summary.to_remove.length > 0) {
@@ -1206,6 +1352,10 @@ namespace Pamac {
1206 1352
 				stderr.printf ("IOError: %s\n", e.message);
1207 1353
 				success = false;
1208 1354
 				finish_transaction ();
1355
+			} catch (DBusError e) {
1356
+				stderr.printf ("DBusError: %s\n", e.message);
1357
+				success = false;
1358
+				finish_transaction ();
1209 1359
 			}
1210 1360
 		}
1211 1361
 
@@ -1297,6 +1447,8 @@ namespace Pamac {
1297 1447
 					system_daemon.trans_cancel ();
1298 1448
 				} catch (IOError e) {
1299 1449
 					stderr.printf ("IOError: %s\n", e.message);
1450
+				} catch (DBusError e) {
1451
+					stderr.printf ("DBusError: %s\n", e.message);
1300 1452
 				}
1301 1453
 #if DISABLE_AUR
1302 1454
 #else
@@ -1312,6 +1464,8 @@ namespace Pamac {
1312 1464
 				system_daemon.trans_release ();
1313 1465
 			} catch (IOError e) {
1314 1466
 				stderr.printf ("IOError: %s\n", e.message);
1467
+			} catch (DBusError e) {
1468
+				stderr.printf ("DBusError: %s\n", e.message);
1315 1469
 			}
1316 1470
 			warning_textbuffer = new StringBuilder ();
1317 1471
 		}
@@ -1324,6 +1478,8 @@ namespace Pamac {
1324 1478
 				}
1325 1479
 			} catch (IOError e) {
1326 1480
 				stderr.printf ("IOError: %s\n", e.message);
1481
+			} catch (DBusError e) {
1482
+				stderr.printf ("DBusError: %s\n", e.message);
1327 1483
 			}
1328 1484
 		}
1329 1485
 
@@ -1982,6 +2138,8 @@ namespace Pamac {
1982 2138
 				system_daemon.set_environment_variables (pamac_config.environment_variables);
1983 2139
 			} catch (IOError e) {
1984 2140
 				stderr.printf ("IOError: %s\n", e.message);
2141
+			} catch (DBusError e) {
2142
+				stderr.printf ("DBusError: %s\n", e.message);
1985 2143
 			}
1986 2144
 		}
1987 2145
 

+ 7
- 7
src/vapis/libalpm.vapi View File

@@ -38,9 +38,9 @@ namespace Alpm {
38 38
 	}
39 39
 	public int capabilities();
40 40
 
41
-	public unowned Package? find_satisfier(Alpm.List<weak Package> pkgs, string depstring);
41
+	public unowned Package? find_satisfier(Alpm.List<unowned Package> pkgs, string depstring);
42 42
 
43
-	public unowned Package? pkg_find(Alpm.List<weak Package> haystack, string needle);
43
+	public unowned Package? pkg_find(Alpm.List<unowned Package> haystack, string needle);
44 44
 
45 45
 	public int pkg_vercmp(string a, string b);
46 46
 
@@ -48,7 +48,7 @@ namespace Alpm {
48 48
 	 * If a member exists in several databases, only the first database is used.
49 49
 	 * IgnorePkg is also handled.
50 50
 	 */
51