Browse Source

v4.0.0-beta

guinux 2 years ago
parent
commit
b59e68459b

+ 16
- 13
examples/pactree.vala View File

@@ -18,7 +18,7 @@
18 18
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 19
  */
20 20
 
21
-// Compile with: valac --pkg=libalpm --vapidir=../vapi --Xcc=-I../util ../util/alpm-util.c pactree.vala -o pactree
21
+// Compile with: valac --pkg=libalpm --vapidir=../vapi pactree.vala
22 22
 
23 23
 using Alpm;
24 24
 
@@ -37,10 +37,10 @@ string leaf2_color;
37 37
 string color_off;
38 38
 
39 39
 /* globals */
40
-unowned Handle? handle;
40
+Handle handle;
41 41
 unowned DB localdb;
42
-Alpm.List<string?> walked = null;
43
-Alpm.List<string?> provisions = null;
42
+Alpm.List<string> walked;
43
+Alpm.List<string> provisions;
44 44
 
45 45
 /* options */
46 46
 bool color;
@@ -127,7 +127,7 @@ static int parse_options(ref unowned string[] args) {
127 127
 
128 128
 static void local_init() {
129 129
   Alpm.Errno error;
130
-  handle = Handle.new ("/", dbpath, out error);
130
+  handle = new Handle ("/", dbpath, out error);
131 131
   assert (error == 0);
132 132
   localdb = handle.localdb;
133 133
   assert (localdb != null);
@@ -187,11 +187,11 @@ static void walk_reverse_deps(Package pkg, int depth) {
187 187
   if((max_depth >= 0) && (depth > max_depth)) return;
188 188
 
189 189
   walked.add(pkg.name);
190
-  Alpm.List<string?> *required_by = pkg.compute_requiredby();
190
+  Alpm.List<string> required_by = pkg.compute_requiredby();
191 191
 
192
-  int i = 0;
193
-  while (i < required_by->length) {
194
-    string? pkgname = required_by->nth_data(i);
192
+  unowned Alpm.List<string> list = required_by;
193
+  while (list != null) {
194
+    unowned string pkgname = list.data;
195 195
     if (walked.find_str(pkgname) != null) {
196 196
       /* if we've already seen this package, don't print in "unique" output
197 197
        * and don't recurse */
@@ -202,9 +202,9 @@ static void walk_reverse_deps(Package pkg, int depth) {
202 202
       print(pkg.name, pkgname, null, depth);
203 203
       walk_reverse_deps(localdb.get_pkg(pkgname), depth + 1);
204 204
     }
205
-    i++;
205
+    list.next ();
206 206
   }
207
-  Alpm.List.free_all(required_by);
207
+  required_by.free_inner(GLib.free);
208 208
 }
209 209
 
210 210
 /**
@@ -216,8 +216,10 @@ static void walk_deps(Package pkg, int depth)
216 216
 
217 217
   walked.add(pkg.name);
218 218
 
219
-  foreach (unowned Depend depend in pkg.depends) {
220
-    string depname = depend.name;
219
+  unowned Alpm.List<unowned Depend> depends = pkg.depends;
220
+  while (depends != null) {
221
+    unowned Alpm.Depend depend = depends.data;
222
+    unowned string depname = depend.name;
221 223
     unowned Package? provider = find_satisfier (localdb.pkgcache, depname);
222 224
 
223 225
     if (provider != null) {
@@ -237,6 +239,7 @@ static void walk_deps(Package pkg, int depth)
237 239
       /* unresolvable package */
238 240
       print(pkg.name, null, depname, depth);
239 241
     }
242
+    depends.next ();
240 243
   }
241 244
 }
242 245
 

+ 101
- 97
po/pamac.pot View File

@@ -21,7 +21,7 @@ msgstr ""
21 21
 msgid "Authentication is required"
22 22
 msgstr ""
23 23
 
24
-#: ../src/daemon.vala ../src/transaction.vala
24
+#: ../src/daemon.vala
25 25
 msgid "Failed to initialize alpm library"
26 26
 msgstr ""
27 27
 
@@ -30,6 +30,26 @@ msgid "Failed to synchronize any databases"
30 30
 msgstr ""
31 31
 
32 32
 #: ../src/daemon.vala
33
+msgid "Unknown"
34
+msgstr ""
35
+
36
+#: ../src/daemon.vala
37
+msgid "Explicitly installed"
38
+msgstr ""
39
+
40
+#: ../src/daemon.vala
41
+msgid "Installed as a dependency for another package"
42
+msgstr ""
43
+
44
+#: ../src/daemon.vala
45
+msgid "Yes"
46
+msgstr ""
47
+
48
+#: ../src/daemon.vala
49
+msgid "No"
50
+msgstr ""
51
+
52
+#: ../src/daemon.vala
33 53
 msgid "Failed to init transaction"
34 54
 msgstr ""
35 55
 
@@ -120,7 +140,7 @@ msgstr ""
120 140
 msgid "Transaction Summary"
121 141
 msgstr ""
122 142
 
123
-#: ../src/transaction.vala ../src/manager_window.vala
143
+#: ../src/transaction.vala
124 144
 msgid "To remove"
125 145
 msgstr ""
126 146
 
@@ -132,7 +152,7 @@ msgstr ""
132 152
 msgid "To build"
133 153
 msgstr ""
134 154
 
135
-#: ../src/transaction.vala ../src/manager_window.vala
155
+#: ../src/transaction.vala
136 156
 msgid "To install"
137 157
 msgstr ""
138 158
 
@@ -153,11 +173,7 @@ msgid "Building packages"
153 173
 msgstr ""
154 174
 
155 175
 #: ../src/transaction.vala
156
-msgid "Running pre-transaction hooks"
157
-msgstr ""
158
-
159
-#: ../src/transaction.vala
160
-msgid "Running post-transaction hooks"
176
+msgid "Transaction cancelled"
161 177
 msgstr ""
162 178
 
163 179
 #: ../src/transaction.vala
@@ -183,22 +199,22 @@ msgstr ""
183 199
 
184 200
 #: ../src/transaction.vala
185 201
 #, c-format
186
-msgid "Reinstalling %s"
202
+msgid "Upgrading %s"
187 203
 msgstr ""
188 204
 
189 205
 #: ../src/transaction.vala
190 206
 #, c-format
191
-msgid "Removing %s"
207
+msgid "Reinstalling %s"
192 208
 msgstr ""
193 209
 
194 210
 #: ../src/transaction.vala
195 211
 #, c-format
196
-msgid "Upgrading %s"
212
+msgid "Downgrading %s"
197 213
 msgstr ""
198 214
 
199 215
 #: ../src/transaction.vala
200 216
 #, c-format
201
-msgid "Downgrading %s"
217
+msgid "Removing %s"
202 218
 msgstr ""
203 219
 
204 220
 #: ../src/transaction.vala
@@ -206,14 +222,6 @@ msgid "Checking integrity"
206 222
 msgstr ""
207 223
 
208 224
 #: ../src/transaction.vala
209
-msgid "Checking keyring"
210
-msgstr ""
211
-
212
-#: ../src/transaction.vala
213
-msgid "Downloading required keys"
214
-msgstr ""
215
-
216
-#: ../src/transaction.vala
217 225
 msgid "Loading packages files"
218 226
 msgstr ""
219 227
 
@@ -248,6 +256,11 @@ msgid "Downloading"
248 256
 msgstr ""
249 257
 
250 258
 #: ../src/transaction.vala
259
+#, c-format
260
+msgid "Downloading %s"
261
+msgstr ""
262
+
263
+#: ../src/transaction.vala
251 264
 msgid "Checking available disk space"
252 265
 msgstr ""
253 266
 
@@ -262,6 +275,14 @@ msgid "Database file for %s does not exist"
262 275
 msgstr ""
263 276
 
264 277
 #: ../src/transaction.vala
278
+msgid "Checking keyring"
279
+msgstr ""
280
+
281
+#: ../src/transaction.vala
282
+msgid "Downloading required keys"
283
+msgstr ""
284
+
285
+#: ../src/transaction.vala
265 286
 #, c-format
266 287
 msgid "%s installed as %s.pacnew"
267 288
 msgstr ""
@@ -272,13 +293,11 @@ msgid "%s installed as %s.pacsave"
272 293
 msgstr ""
273 294
 
274 295
 #: ../src/transaction.vala
275
-#, c-format
276
-msgid "Refreshing %s"
296
+msgid "Running pre-transaction hooks"
277 297
 msgstr ""
278 298
 
279 299
 #: ../src/transaction.vala
280
-#, c-format
281
-msgid "Downloading %s"
300
+msgid "Running post-transaction hooks"
282 301
 msgstr ""
283 302
 
284 303
 #: ../src/transaction.vala
@@ -294,7 +313,8 @@ msgstr[0] ""
294 313
 msgstr[1] ""
295 314
 
296 315
 #: ../src/transaction.vala
297
-msgid "Warning"
316
+#, c-format
317
+msgid "Refreshing %s"
298 318
 msgstr ""
299 319
 
300 320
 #: ../src/transaction.vala
@@ -302,7 +322,7 @@ msgid "Error"
302 322
 msgstr ""
303 323
 
304 324
 #: ../src/transaction.vala
305
-msgid "Transaction cancelled"
325
+msgid "Warning"
306 326
 msgstr ""
307 327
 
308 328
 #: ../src/transaction.vala
@@ -369,8 +389,11 @@ msgid "Mark as explicitly installed"
369 389
 msgstr ""
370 390
 
371 391
 #: ../src/manager_window.vala
372
-msgid "local"
373
-msgstr ""
392
+#, c-format
393
+msgid "%u pending operation"
394
+msgid_plural "%u pending operations"
395
+msgstr[0] ""
396
+msgstr[1] ""
374 397
 
375 398
 #: ../src/manager_window.vala
376 399
 msgid "Installed"
@@ -381,95 +404,76 @@ msgid "Orphans"
381 404
 msgstr ""
382 405
 
383 406
 #: ../src/manager_window.vala
384
-msgid "Licenses"
385
-msgstr ""
386
-
387
-#: ../src/manager_window.vala
388
-msgid "Unknown"
389
-msgstr ""
390
-
391
-#: ../src/manager_window.vala
392
-msgid "Depends On"
407
+msgid "Foreign"
393 408
 msgstr ""
394 409
 
395 410
 #: ../src/manager_window.vala
396
-msgid "Optional Dependencies"
397
-msgstr ""
398
-
399
-#: ../src/manager_window.vala
400
-msgid "Required By"
411
+msgid "Pending"
401 412
 msgstr ""
402 413
 
403 414
 #: ../src/manager_window.vala
404
-msgid "Optional For"
415
+msgid "Licenses"
405 416
 msgstr ""
406 417
 
407
-#: ../src/manager_window.vala
408
-msgid "Provides"
418
+#: ../src/manager_window.vala ../resources/manager_window.ui
419
+#: ../resources/updater_window.ui
420
+msgid "Repository"
409 421
 msgstr ""
410 422
 
411
-#: ../src/manager_window.vala
412
-msgid "Replaces"
423
+#: ../src/manager_window.vala ../resources/manager_window.ui
424
+msgid "Groups"
413 425
 msgstr ""
414 426
 
415 427
 #: ../src/manager_window.vala
416
-msgid "Conflicts With"
428
+msgid "Packager"
417 429
 msgstr ""
418 430
 
419 431
 #: ../src/manager_window.vala
420
-msgid "Make Dependencies"
432
+msgid "Build Date"
421 433
 msgstr ""
422 434
 
423 435
 #: ../src/manager_window.vala
424
-msgid "Check Dependencies"
425
-msgstr ""
426
-
427
-#: ../src/manager_window.vala ../resources/manager_window.ui
428
-msgid "Repository"
429
-msgstr ""
430
-
431
-#: ../src/manager_window.vala ../resources/manager_window.ui
432
-msgid "Groups"
436
+msgid "Install Date"
433 437
 msgstr ""
434 438
 
435 439
 #: ../src/manager_window.vala
436
-msgid "Packager"
440
+msgid "Install Reason"
437 441
 msgstr ""
438 442
 
439 443
 #: ../src/manager_window.vala
440
-msgid "Build Date"
444
+msgid "Signatures"
441 445
 msgstr ""
442 446
 
443 447
 #: ../src/manager_window.vala
444
-msgid "Install Date"
448
+msgid "Backup files"
445 449
 msgstr ""
446 450
 
447 451
 #: ../src/manager_window.vala
448
-msgid "Explicitly installed"
452
+msgid "Depends On"
449 453
 msgstr ""
450 454
 
451 455
 #: ../src/manager_window.vala
452
-msgid "Installed as a dependency for another package"
456
+msgid "Optional Dependencies"
453 457
 msgstr ""
454 458
 
455 459
 #: ../src/manager_window.vala
456
-msgid "Install Reason"
460
+msgid "Required By"
457 461
 msgstr ""
458 462
 
459 463
 #: ../src/manager_window.vala
460
-msgid "Yes"
464
+msgid "Optional For"
461 465
 msgstr ""
462 466
 
463 467
 #: ../src/manager_window.vala
464
-msgid "No"
468
+msgid "Provides"
465 469
 msgstr ""
466 470
 
467 471
 #: ../src/manager_window.vala
468
-msgid "Signatures"
472
+msgid "Replaces"
469 473
 msgstr ""
470 474
 
471 475
 #: ../src/manager_window.vala
472
-msgid "Backup files"
476
+msgid "Conflicts With"
473 477
 msgstr ""
474 478
 
475 479
 #: ../src/manager_window.vala
@@ -488,7 +492,7 @@ msgstr ""
488 492
 msgid "Last Modified"
489 493
 msgstr ""
490 494
 
491
-#: ../src/manager_window.vala ../resources/manager_window.ui
495
+#: ../src/manager_window.vala
492 496
 msgid "Votes"
493 497
 msgstr ""
494 498
 
@@ -496,6 +500,11 @@ msgstr ""
496 500
 msgid "Out of Date"
497 501
 msgstr ""
498 502
 
503
+#: ../src/manager_window.vala ../resources/manager_window.ui
504
+#: ../resources/updater_window.ui
505
+msgid "Name"
506
+msgstr ""
507
+
499 508
 #: ../src/manager_window.vala
500 509
 #, c-format
501 510
 msgid ""
@@ -507,17 +516,13 @@ msgid_plural ""
507 516
 msgstr[0] ""
508 517
 msgstr[1] ""
509 518
 
510
-#: ../src/manager_window.vala
511
-msgid "Uninstalled"
512
-msgstr ""
513
-
514 519
 #: ../src/manager_window.vala ../resources/manager_window.ui
515 520
 msgid "Install Local Packages"
516 521
 msgstr ""
517 522
 
518 523
 #: ../src/manager_window.vala ../resources/progress_dialog.ui
519 524
 #: ../resources/transaction_sum_dialog.ui ../resources/choose_dep_dialog.ui
520
-#: ../resources/choose_ignorepkgs_dialog.ui
525
+#: ../resources/manager_window.ui ../resources/choose_ignorepkgs_dialog.ui
521 526
 msgid "_Cancel"
522 527
 msgstr ""
523 528
 
@@ -571,10 +576,8 @@ msgstr ""
571 576
 msgid "Progress"
572 577
 msgstr ""
573 578
 
574
-#: ../resources/progress_dialog.ui ../resources/history_dialog.ui
575
-#: ../resources/transaction_info_dialog.ui ../resources/updater_window.ui
576
-#: ../resources/preferences_dialog.ui
577
-msgid "_Close"
579
+#: ../resources/progress_dialog.ui
580
+msgid "_Hide"
578 581
 msgstr ""
579 582
 
580 583
 #: ../resources/progress_dialog.ui ../resources/transaction_info_dialog.ui
@@ -586,6 +589,11 @@ msgstr ""
586 589
 msgid "Pamac History"
587 590
 msgstr ""
588 591
 
592
+#: ../resources/history_dialog.ui ../resources/transaction_info_dialog.ui
593
+#: ../resources/updater_window.ui ../resources/preferences_dialog.ui
594
+msgid "_Close"
595
+msgstr ""
596
+
589 597
 #: ../resources/choose_dep_dialog.ui
590 598
 msgid "Choose Optional Dependencies"
591 599
 msgstr ""
@@ -607,14 +615,6 @@ msgid "Refresh databases"
607 615
 msgstr ""
608 616
 
609 617
 #: ../resources/manager_window.ui
610
-msgid "Apply changes"
611
-msgstr ""
612
-
613
-#: ../resources/manager_window.ui
614
-msgid "Cancel all planned changes"
615
-msgstr ""
616
-
617
-#: ../resources/manager_window.ui
618 618
 msgid "Search in AUR"
619 619
 msgstr ""
620 620
 
@@ -622,7 +622,7 @@ msgstr ""
622 622
 msgid "Search"
623 623
 msgstr ""
624 624
 
625
-#: ../resources/manager_window.ui
625
+#: ../resources/manager_window.ui ../resources/updater_window.ui
626 626
 msgid "State"
627 627
 msgstr ""
628 628
 
@@ -630,16 +630,16 @@ msgstr ""
630 630
 msgid "Repositories"
631 631
 msgstr ""
632 632
 
633
-#: ../resources/manager_window.ui
634
-msgid "Name"
633
+#: ../resources/manager_window.ui ../resources/updater_window.ui
634
+msgid "Version"
635 635
 msgstr ""
636 636
 
637
-#: ../resources/manager_window.ui
638
-msgid "Version"
637
+#: ../resources/manager_window.ui ../resources/updater_window.ui
638
+msgid "Size"
639 639
 msgstr ""
640 640
 
641 641
 #: ../resources/manager_window.ui
642
-msgid "Size"
642
+msgid "Popularity"
643 643
 msgstr ""
644 644
 
645 645
 #: ../resources/manager_window.ui ../resources/updater_window.ui
@@ -647,8 +647,12 @@ msgstr ""
647 647
 msgid "AUR"
648 648
 msgstr ""
649 649
 
650
+#: ../resources/manager_window.ui ../resources/updater_window.ui
651
+msgid "_Apply"
652
+msgstr ""
653
+
650 654
 #: ../resources/manager_window.ui
651
-msgid "Description"
655
+msgid "Browse"
652 656
 msgstr ""
653 657
 
654 658
 #: ../resources/manager_window.ui
@@ -663,10 +667,6 @@ msgstr ""
663 667
 msgid "_Refresh"
664 668
 msgstr ""
665 669
 
666
-#: ../resources/updater_window.ui
667
-msgid "_Apply"
668
-msgstr ""
669
-
670 670
 #: ../resources/preferences_dialog.ui
671 671
 msgid "Preferences"
672 672
 msgstr ""
@@ -690,6 +690,10 @@ msgid "Check for updates"
690 690
 msgstr ""
691 691
 
692 692
 #: ../resources/preferences_dialog.ui
693
+msgid "6"
694
+msgstr ""
695
+
696
+#: ../resources/preferences_dialog.ui
693 697
 msgid "Hide tray icon when no update available"
694 698
 msgstr ""
695 699
 

+ 1
- 0
resources/Makefile View File

@@ -3,6 +3,7 @@ MANAGER_RESOURCES_FILES = 	manager_window.ui \
3 3
 							choose_dep_dialog.ui \
4 4
 							history_dialog.ui \
5 5
 							package-available.png \
6
+							package-available-locked.png \
6 7
 							package-install.png \
7 8
 							package-installed-locked.png \
8 9
 							package-installed-updated.png \

+ 11
- 2
resources/choose_dep_dialog.ui View File

@@ -1,13 +1,16 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2
+<!-- Generated with glade 3.19.0 -->
2 3
 <interface>
3 4
   <requires lib="gtk+" version="3.12"/>
4 5
   <template class="PamacChooseDependenciesDialog" parent="GtkDialog">
6
+    <property name="can_focus">False</property>
5 7
     <property name="border_width">6</property>
6 8
     <property name="title" translatable="yes">Choose Optional Dependencies</property>
7 9
     <property name="modal">True</property>
8 10
     <property name="window_position">center-on-parent</property>
9 11
     <property name="icon_name">system-software-install</property>
10 12
     <property name="type_hint">dialog</property>
13
+    <property name="urgency_hint">True</property>
11 14
     <child internal-child="vbox">
12 15
       <object class="GtkBox" id="dialog-vbox1">
13 16
         <property name="can_focus">False</property>
@@ -23,25 +26,28 @@
23 26
                 <property name="visible">True</property>
24 27
                 <property name="can_focus">True</property>
25 28
                 <property name="has_focus">True</property>
26
-                <property name="use_underline">True</property>
27 29
                 <property name="receives_default">False</property>
30
+                <property name="use_underline">True</property>
28 31
               </object>
29 32
               <packing>
30 33
                 <property name="expand">False</property>
31 34
                 <property name="fill">True</property>
35
+                <property name="position">0</property>
32 36
               </packing>
33 37
             </child>
34 38
             <child>
35 39
               <object class="GtkButton" id="valid_button">
36 40
                 <property name="label" translatable="yes">_OK</property>
37
-                <property name="use_underline">True</property>
38 41
                 <property name="visible">True</property>
39 42
                 <property name="can_focus">True</property>
40 43
                 <property name="has_focus">True</property>
44
+                <property name="receives_default">False</property>
45
+                <property name="use_underline">True</property>
41 46
               </object>
42 47
               <packing>
43 48
                 <property name="expand">False</property>
44 49
                 <property name="fill">True</property>
50
+                <property name="position">1</property>
45 51
               </packing>
46 52
             </child>
47 53
           </object>
@@ -49,6 +55,7 @@
49 55
             <property name="expand">False</property>
50 56
             <property name="fill">True</property>
51 57
             <property name="pack_type">end</property>
58
+            <property name="position">0</property>
52 59
           </packing>
53 60
         </child>
54 61
         <child>
@@ -59,6 +66,7 @@
59 66
           <packing>
60 67
             <property name="expand">False</property>
61 68
             <property name="fill">True</property>
69
+            <property name="position">1</property>
62 70
           </packing>
63 71
         </child>
64 72
         <child>
@@ -112,6 +120,7 @@
112 120
           <packing>
113 121
             <property name="expand">True</property>
114 122
             <property name="fill">True</property>
123
+            <property name="position">2</property>
115 124
           </packing>
116 125
         </child>
117 126
       </object>

+ 1
- 0
resources/choose_ignorepkgs_dialog.ui View File

@@ -10,6 +10,7 @@
10 10
     <property name="window_position">center-on-parent</property>
11 11
     <property name="icon_name">system-software-install</property>
12 12
     <property name="type_hint">dialog</property>
13
+    <property name="urgency_hint">True</property>
13 14
     <child internal-child="vbox">
14 15
       <object class="GtkBox" id="dialog-vbox1">
15 16
         <property name="can_focus">False</property>

+ 10
- 1
resources/choose_provider_dialog.ui View File

@@ -1,13 +1,16 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2
+<!-- Generated with glade 3.19.0 -->
2 3
 <interface>
3 4
   <requires lib="gtk+" version="3.12"/>
4 5
   <template class="PamacChooseProviderDialog" parent="GtkDialog">
6
+    <property name="can_focus">False</property>
5 7
     <property name="border_width">6</property>
6 8
     <property name="title" translatable="yes">Choose a Provider</property>
7 9
     <property name="modal">True</property>
8 10
     <property name="window_position">center-on-parent</property>
9 11
     <property name="icon_name">system-software-install</property>
10 12
     <property name="type_hint">dialog</property>
13
+    <property name="urgency_hint">True</property>
11 14
     <child internal-child="vbox">
12 15
       <object class="GtkBox" id="dialog-vbox2">
13 16
         <property name="can_focus">False</property>
@@ -20,14 +23,16 @@
20 23
             <child>
21 24
               <object class="GtkButton" id="valid_button">
22 25
                 <property name="label" translatable="yes">_OK</property>
23
-                <property name="use_underline">True</property>
24 26
                 <property name="visible">True</property>
25 27
                 <property name="can_focus">True</property>
26 28
                 <property name="has_focus">True</property>
29
+                <property name="receives_default">False</property>
30
+                <property name="use_underline">True</property>
27 31
               </object>
28 32
               <packing>
29 33
                 <property name="expand">True</property>
30 34
                 <property name="fill">True</property>
35
+                <property name="position">0</property>
31 36
               </packing>
32 37
             </child>
33 38
           </object>
@@ -35,6 +40,7 @@
35 40
             <property name="expand">False</property>
36 41
             <property name="fill">True</property>
37 42
             <property name="pack_type">end</property>
43
+            <property name="position">0</property>
38 44
           </packing>
39 45
         </child>
40 46
         <child>
@@ -52,6 +58,7 @@
52 58
               <packing>
53 59
                 <property name="expand">False</property>
54 60
                 <property name="fill">True</property>
61
+                <property name="position">0</property>
55 62
               </packing>
56 63
             </child>
57 64
             <child>
@@ -62,12 +69,14 @@
62 69
               <packing>
63 70
                 <property name="expand">False</property>
64 71
                 <property name="fill">True</property>
72
+                <property name="position">1</property>
65 73
               </packing>
66 74
             </child>
67 75
           </object>
68 76
           <packing>
69 77
             <property name="expand">False</property>
70 78
             <property name="fill">True</property>
79
+            <property name="position">1</property>
71 80
           </packing>
72 81
         </child>
73 82
       </object>

+ 8
- 1
resources/history_dialog.ui View File

@@ -1,9 +1,12 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2
+<!-- Generated with glade 3.20.0 -->
2 3
 <interface>
3 4
   <requires lib="gtk+" version="3.12"/>
4 5
   <template class="PamacHistoryDialog" parent="GtkDialog">
6
+    <property name="can_focus">False</property>
5 7
     <property name="border_width">6</property>
6 8
     <property name="title" translatable="yes">Pamac History</property>
9
+    <property name="window_position">center-on-parent</property>
7 10
     <property name="default_width">600</property>
8 11
     <property name="default_height">500</property>
9 12
     <property name="icon_name">system-software-install</property>
@@ -20,14 +23,16 @@
20 23
             <child>
21 24
               <object class="GtkButton" id="close_button">
22 25
                 <property name="label" translatable="yes">_Close</property>
23
-                <property name="use_underline">True</property>
24 26
                 <property name="visible">True</property>
25 27
                 <property name="can_focus">True</property>
26 28
                 <property name="has_focus">True</property>
29
+                <property name="receives_default">False</property>
30
+                <property name="use_underline">True</property>
27 31
               </object>
28 32
               <packing>
29 33
                 <property name="expand">False</property>
30 34
                 <property name="fill">True</property>
35
+                <property name="position">0</property>
31 36
               </packing>
32 37
             </child>
33 38
           </object>
@@ -35,6 +40,7 @@
35 40
             <property name="expand">False</property>
36 41
             <property name="fill">True</property>
37 42
             <property name="pack_type">end</property>
43
+            <property name="position">0</property>
38 44
           </packing>
39 45
         </child>
40 46
         <child>
@@ -58,6 +64,7 @@
58 64
           <packing>
59 65
             <property name="expand">True</property>
60 66
             <property name="fill">True</property>
67
+            <property name="position">1</property>
61 68
           </packing>
62 69
         </child>
63 70
       </object>

+ 670
- 627
resources/manager_window.ui
File diff suppressed because it is too large
View File


BIN
resources/package-available-locked.png View File


+ 1
- 0
resources/pamac.manager.gresource.xml View File

@@ -5,6 +5,7 @@
5 5
     <file preprocess="xml-stripblanks">history_dialog.ui</file>
6 6
     <file preprocess="xml-stripblanks">choose_dep_dialog.ui</file>
7 7
     <file preprocess="to-pixdata">package-available.png</file>
8
+    <file preprocess="to-pixdata">package-available-locked.png</file>
8 9
     <file preprocess="to-pixdata">package-install.png</file>
9 10
     <file preprocess="to-pixdata">package-installed-locked.png</file>
10 11
     <file preprocess="to-pixdata">package-installed-updated.png</file>

+ 46
- 43
resources/preferences_dialog.ui View File

@@ -1,5 +1,5 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2
-<!-- Generated with glade 3.19.0 -->
2
+<!-- Generated with glade 3.20.0 -->
3 3
 <interface>
4 4
   <requires lib="gtk+" version="3.14"/>
5 5
   <object class="GtkAdjustment" id="adjustment">
@@ -9,19 +9,13 @@
9 9
     <property name="step_increment">1</property>
10 10
     <property name="page_increment">10</property>
11 11
   </object>
12
-  <object class="GtkListStore" id="ignorepkgs_liststore">
13
-    <columns>
14
-      <!-- column-name name -->
15
-      <column type="gchararray"/>
16
-    </columns>
17
-  </object>
18 12
   <template class="PamacPreferencesDialog" parent="GtkDialog">
19 13
     <property name="can_focus">False</property>
20 14
     <property name="border_width">6</property>
21 15
     <property name="title" translatable="yes">Preferences</property>
22 16
     <property name="window_position">center-on-parent</property>
23 17
     <property name="icon_name">system-software-install</property>
24
-    <property name="type_hint">normal</property>
18
+    <property name="type_hint">dialog</property>
25 19
     <child internal-child="vbox">
26 20
       <object class="GtkBox" id="dialog-vbox">
27 21
         <property name="can_focus">False</property>
@@ -54,13 +48,28 @@
54 48
           </packing>
55 49
         </child>
56 50
         <child>
57
-          <object class="GtkNotebook" id="notebook1">
51
+          <object class="GtkStackSwitcher" id="stackswitcher">
58 52
             <property name="visible">True</property>
59
-            <property name="can_focus">True</property>
53
+            <property name="can_focus">False</property>
54
+            <property name="halign">center</property>
55
+            <property name="stack">stack</property>
56
+          </object>
57
+          <packing>
58
+            <property name="expand">False</property>
59
+            <property name="fill">True</property>
60
+            <property name="position">0</property>
61
+          </packing>
62
+        </child>
63
+        <child>
64
+          <object class="GtkStack" id="stack">
65
+            <property name="visible">True</property>
66
+            <property name="can_focus">False</property>
60 67
             <child>
61 68
               <object class="GtkBox" id="general_config_box">
62 69
                 <property name="visible">True</property>
63 70
                 <property name="can_focus">False</property>
71
+                <property name="margin_left">6</property>
72
+                <property name="margin_right">6</property>
64 73
                 <property name="margin_start">6</property>
65 74
                 <property name="margin_end">6</property>
66 75
                 <property name="margin_top">6</property>
@@ -168,6 +177,7 @@
168 177
                       <object class="GtkSwitch" id="check_updates_button">
169 178
                         <property name="visible">True</property>
170 179
                         <property name="can_focus">True</property>
180
+                        <property name="tooltip_text" translatable="yes">Check for updates</property>
171 181
                         <property name="halign">end</property>
172 182
                       </object>
173 183
                       <packing>
@@ -192,6 +202,7 @@
192 202
                       <object class="GtkLabel" id="refresh_period_label">
193 203
                         <property name="visible">True</property>
194 204
                         <property name="can_focus">False</property>
205
+                        <property name="margin_left">24</property>
195 206
                         <property name="margin_start">24</property>
196 207
                         <property name="hexpand">True</property>
197 208
                         <property name="xalign">0</property>
@@ -208,6 +219,7 @@
208 219
                         <property name="can_focus">True</property>
209 220
                         <property name="tooltip_text" translatable="yes">How often to check for updates, value in hours</property>
210 221
                         <property name="halign">end</property>
222
+                        <property name="text" translatable="yes">6</property>
211 223
                         <property name="caps_lock_warning">False</property>
212 224
                         <property name="input_purpose">number</property>
213 225
                         <property name="adjustment">adjustment</property>
@@ -234,8 +246,10 @@
234 246
                     <property name="visible">True</property>
235 247
                     <property name="can_focus">True</property>
236 248
                     <property name="receives_default">False</property>
249
+                    <property name="margin_left">22</property>
237 250
                     <property name="margin_start">22</property>
238 251
                     <property name="hexpand">True</property>
252
+                    <property name="xalign">0</property>
239 253
                     <property name="draw_indicator">True</property>
240 254
                   </object>
241 255
                   <packing>
@@ -255,6 +269,7 @@
255 269
                         <property name="can_focus">False</property>
256 270
                         <property name="halign">start</property>
257 271
                         <property name="valign">start</property>
272
+                        <property name="margin_left">26</property>
258 273
                         <property name="margin_start">26</property>
259 274
                         <property name="label" translatable="yes">Ignore upgrades for:</property>
260 275
                         <property name="xalign">0</property>
@@ -269,6 +284,7 @@
269 284
                       <object class="GtkBox" id="box10">
270 285
                         <property name="visible">True</property>
271 286
                         <property name="can_focus">False</property>
287
+                        <property name="margin_left">12</property>
272 288
                         <property name="margin_start">12</property>
273 289
                         <property name="hexpand">True</property>
274 290
                         <property name="vexpand">True</property>
@@ -284,12 +300,11 @@
284 300
                               <object class="GtkTreeView" id="ignorepkgs_treeview">
285 301
                                 <property name="visible">True</property>
286 302
                                 <property name="can_focus">True</property>
287
-                                <property name="model">ignorepkgs_liststore</property>
288 303
                                 <property name="headers_visible">False</property>
289 304
                                 <property name="search_column">0</property>
290 305
                                 <property name="show_expanders">False</property>
291 306
                                 <child internal-child="selection">
292
-                                  <object class="GtkTreeSelection" id="treeview-selection1"/>
307
+                                  <object class="GtkTreeSelection" id="treeview-selection"/>
293 308
                                 </child>
294 309
                                 <child>
295 310
                                   <object class="GtkTreeViewColumn" id="treeviewcolumn1">
@@ -368,21 +383,17 @@
368 383
                   </packing>
369 384
                 </child>
370 385
               </object>
371
-            </child>
372
-            <child type="tab">
373
-              <object class="GtkLabel" id="tab_label1">
374
-                <property name="visible">True</property>
375
-                <property name="can_focus">False</property>
376
-                <property name="label" translatable="yes">General</property>
377
-              </object>
378 386
               <packing>
379
-                <property name="tab_fill">False</property>
387
+                <property name="name">general</property>
388
+                <property name="title" translatable="yes">General</property>
380 389
               </packing>
381 390
             </child>
382 391
             <child>
383 392
               <object class="GtkBox" id="mirrors_config_box">
384 393
                 <property name="visible">True</property>
385 394
                 <property name="can_focus">False</property>
395
+                <property name="margin_left">6</property>
396
+                <property name="margin_right">6</property>
386 397
                 <property name="margin_start">6</property>
387 398
                 <property name="margin_end">6</property>
388 399
                 <property name="margin_top">6</property>
@@ -483,20 +494,11 @@
483 494
                 </child>
484 495
               </object>
485 496
               <packing>
497
+                <property name="name">official_repositories</property>
498
+                <property name="title" translatable="yes">Official Repositories</property>
486 499
                 <property name="position">1</property>
487 500
               </packing>
488 501
             </child>
489
-            <child type="tab">
490
-              <object class="GtkLabel" id="tab_label2">
491
-                <property name="visible">True</property>
492
-                <property name="can_focus">False</property>
493
-                <property name="label" translatable="yes">Official Repositories</property>
494
-              </object>
495
-              <packing>
496
-                <property name="position">1</property>
497
-                <property name="tab_fill">False</property>
498
-              </packing>
499
-            </child>
500 502
             <child>
501 503
               <object class="GtkBox" id="aur_config_box">
502 504
                 <property name="visible">True</property>
@@ -568,6 +570,8 @@ All AUR users should be familiar with the build process.</property>
568 570
                       <object class="GtkLabel" id="enable_aur_label">
569 571
                         <property name="visible">True</property>
570 572
                         <property name="can_focus">False</property>
573
+                        <property name="margin_left">6</property>
574
+                        <property name="margin_right">6</property>
571 575
                         <property name="margin_start">6</property>
572 576
                         <property name="margin_end">6</property>
573 577
                         <property name="hexpand">True</property>
@@ -586,6 +590,8 @@ All AUR users should be familiar with the build process.</property>
586 590
                         <property name="can_focus">True</property>
587 591
                         <property name="tooltip_text" translatable="yes">Allow Pamac to search and install packages from AUR</property>
588 592
                         <property name="halign">end</property>
593
+                        <property name="margin_left">6</property>
594
+                        <property name="margin_right">6</property>
589 595
                         <property name="margin_start">6</property>
590 596
                         <property name="margin_end">6</property>
591 597
                       </object>
@@ -608,8 +614,10 @@ All AUR users should be familiar with the build process.</property>
608 614
                     <property name="visible">True</property>
609 615
                     <property name="can_focus">True</property>
610 616
                     <property name="receives_default">False</property>
617
+                    <property name="margin_left">24</property>
611 618
                     <property name="margin_start">24</property>
612 619
                     <property name="hexpand">True</property>
620
+                    <property name="xalign">0</property>
613 621
                     <property name="draw_indicator">True</property>
614 622
                   </object>
615 623
                   <packing>
@@ -624,8 +632,10 @@ All AUR users should be familiar with the build process.</property>
624 632
                     <property name="visible">True</property>
625 633
                     <property name="can_focus">True</property>
626 634
                     <property name="receives_default">False</property>
635
+                    <property name="margin_left">24</property>
627 636
                     <property name="margin_start">24</property>
628 637
                     <property name="hexpand">True</property>
638
+                    <property name="xalign">0</property>
629 639
                     <property name="draw_indicator">True</property>
630 640
                   </object>
631 641
                   <packing>
@@ -640,8 +650,10 @@ All AUR users should be familiar with the build process.</property>
640 650
                     <property name="visible">True</property>
641 651
                     <property name="can_focus">True</property>
642 652
                     <property name="receives_default">False</property>
653
+                    <property name="margin_left">24</property>
643 654
                     <property name="margin_start">24</property>
644 655
                     <property name="hexpand">True</property>
656
+                    <property name="xalign">0</property>
645 657
                     <property name="draw_indicator">True</property>
646 658
                   </object>
647 659
                   <packing>
@@ -652,25 +664,16 @@ All AUR users should be familiar with the build process.</property>
652 664
                 </child>
653 665
               </object>
654 666
               <packing>
667
+                <property name="name">aur</property>
668
+                <property name="title" translatable="yes">AUR</property>
655 669
                 <property name="position">2</property>
656 670
               </packing>
657 671
             </child>
658
-            <child type="tab">
659
-              <object class="GtkLabel" id="tab_label3">
660
-                <property name="visible">True</property>
661
-                <property name="can_focus">False</property>
662
-                <property name="label" translatable="yes">AUR</property>
663
-              </object>
664
-              <packing>
665
-                <property name="position">2</property>
666
-                <property name="tab_fill">False</property>
667
-              </packing>
668
-            </child>
669 672
           </object>
670 673
           <packing>
671 674
             <property name="expand">True</property>
672 675
             <property name="fill">True</property>
673
-            <property name="position">1</property>
676
+            <property name="position">2</property>
674 677
           </packing>
675 678
         </child>
676 679
       </object>

+ 2
- 4
resources/progress_dialog.ui View File

@@ -1,5 +1,5 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2
-<!-- Generated with glade 3.19.0 -->
2
+<!-- Generated with glade 3.20.0 -->
3 3
 <interface>
4 4
   <requires lib="gtk+" version="3.12"/>
5 5
   <template class="PamacProgressDialog" parent="GtkDialog">
@@ -7,11 +7,9 @@
7 7
     <property name="can_focus">False</property>
8 8
     <property name="border_width">6</property>
9 9
     <property name="title" translatable="yes">Progress</property>
10
-    <property name="modal">True</property>
11 10
     <property name="window_position">center-on-parent</property>
12 11
     <property name="icon_name">system-software-install</property>
13 12
     <property name="type_hint">dialog</property>
14
-    <property name="deletable">False</property>
15 13
     <child internal-child="vbox">
16 14
       <object class="GtkBox" id="dialog-vbox1">
17 15
         <property name="visible">True</property>
@@ -39,7 +37,7 @@
39 37
             </child>
40 38
             <child>
41 39
               <object class="GtkButton" id="close_button">
42
-                <property name="label" translatable="yes">_Close</property>
40
+                <property name="label" translatable="yes">_Hide</property>
43 41
                 <property name="visible">True</property>
44 42
                 <property name="can_focus">True</property>
45 43
                 <property name="receives_default">False</property>

+ 10
- 0
resources/transaction_info_dialog.ui View File

@@ -1,11 +1,16 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2
+<!-- Generated with glade 3.20.0 -->
2 3
 <interface>
3 4
   <requires lib="gtk+" version="3.12"/>
4 5
   <template class="PamacTransactionInfoDialog" parent="GtkDialog">
6
+    <property name="can_focus">False</property>
5 7
     <property name="border_width">6</property>
8
+    <property name="modal">True</property>
9
+    <property name="window_position">center-on-parent</property>
6 10
     <property name="default_width">300</property>
7 11
     <property name="icon_name">system-software-install</property>
8 12
     <property name="type_hint">dialog</property>
13
+    <property name="urgency_hint">True</property>
9 14
     <child internal-child="vbox">
10 15
       <object class="GtkBox" id="dialog-vbox4">
11 16
         <property name="can_focus">False</property>
@@ -21,11 +26,13 @@
21 26
                 <property name="visible">True</property>
22 27
                 <property name="can_focus">True</property>
23 28
                 <property name="has_focus">True</property>
29
+                <property name="receives_default">False</property>
24 30
                 <property name="use_underline">True</property>
25 31
               </object>
26 32
               <packing>
27 33
                 <property name="expand">True</property>
28 34
                 <property name="fill">True</property>
35
+                <property name="position">0</property>
29 36
               </packing>
30 37
             </child>
31 38
           </object>
@@ -33,6 +40,7 @@
33 40
             <property name="expand">False</property>
34 41
             <property name="fill">True</property>
35 42
             <property name="pack_type">end</property>
43
+            <property name="position">0</property>
36 44
           </packing>
37 45
         </child>
38 46
         <child>
@@ -43,6 +51,7 @@
43 51
           <packing>
44 52
             <property name="expand">False</property>
45 53
             <property name="fill">True</property>
54
+            <property name="position">1</property>
46 55
           </packing>
47 56
         </child>
48 57
         <child>
@@ -83,6 +92,7 @@
83 92
           <packing>
84 93
             <property name="expand">True</property>
85 94
             <property name="fill">True</property>
95
+            <property name="position">2</property>
86 96
           </packing>
87 97
         </child>
88 98
       </object>

+ 35
- 9
resources/transaction_sum_dialog.ui View File

@@ -1,11 +1,14 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2
+<!-- Generated with glade 3.20.0 -->
2 3
 <interface>
3 4
   <requires lib="gtk+" version="3.12"/>
4 5
   <template class="PamacTransactionSumDialog" parent="GtkDialog">
5
-    <property name="title" translatable="yes">Transaction Summary</property>
6
+    <property name="can_focus">False</property>
6 7
     <property name="border_width">6</property>
7
-    <property name="type_hint">dialog</property>
8
+    <property name="title" translatable="yes">Transaction Summary</property>
9
+    <property name="window_position">center-on-parent</property>
8 10
     <property name="icon_name">system-software-install</property>
11
+    <property name="type_hint">dialog</property>
9 12
     <child internal-child="vbox">
10 13
       <object class="GtkBox" id="dialog-vbox6">
11 14
         <property name="can_focus">False</property>
@@ -21,12 +24,13 @@
21 24
                 <property name="visible">True</property>
22 25
                 <property name="can_focus">True</property>
23 26
                 <property name="has_focus">True</property>
24
-                <property name="use_underline">True</property>
25 27
                 <property name="receives_default">False</property>
28
+                <property name="use_underline">True</property>
26 29
               </object>
27 30
               <packing>
28 31
                 <property name="expand">False</property>
29 32
                 <property name="fill">True</property>
33
+                <property name="position">0</property>
30 34
               </packing>
31 35
             </child>
32 36
             <child>
@@ -34,11 +38,13 @@
34 38
                 <property name="label" translatable="yes">_OK</property>
35 39
                 <property name="visible">True</property>
36 40
                 <property name="can_focus">True</property>
41
+                <property name="receives_default">False</property>
37 42
                 <property name="use_underline">True</property>
38 43
               </object>
39 44
               <packing>
40 45
                 <property name="expand">False</property>
41 46
                 <property name="fill">True</property>
47
+                <property name="position">1</property>
42 48
               </packing>
43 49
             </child>
44 50
           </object>
@@ -46,6 +52,7 @@
46 52
             <property name="expand">False</property>
47 53
             <property name="fill">True</property>
48 54
             <property name="pack_type">end</property>
55
+            <property name="position">0</property>
49 56
           </packing>
50 57
         </child>
51 58
         <child>
@@ -56,6 +63,7 @@
56 63
           <packing>
57 64
             <property name="expand">False</property>
58 65
             <property name="fill">True</property>
66
+            <property name="position">1</property>
59 67
           </packing>
60 68
         </child>
61 69
         <child>
@@ -65,7 +73,7 @@
65 73
             <property name="hexpand">True</property>
66 74
             <property name="vexpand">True</property>
67 75
             <property name="shadow_type">in</property>
68
-            <property name="min_content_width">330</property>
76
+            <property name="min_content_width">450</property>
69 77
             <property name="min_content_height">250</property>
70 78
             <child>
71 79
               <object class="GtkTreeView" id="treeview">
@@ -75,7 +83,6 @@
75 83
                 <property name="vexpand">True</property>
76 84
                 <property name="headers_visible">False</property>
77 85
                 <property name="headers_clickable">False</property>
78
-                <property name="enable_search">False</property>
79 86
                 <property name="search_column">0</property>
80 87
                 <property name="show_expanders">False</property>
81 88
                 <child internal-child="selection">
@@ -87,12 +94,11 @@
87 94
                   <object class="GtkTreeViewColumn" id="_action">
88 95
                     <property name="sizing">autosize</property>
89 96
                     <child>
90
-                      <object class="GtkCellRendererText" id="cellrenderertext5">
97
+                      <object class="GtkCellRendererText" id="cellrenderertext1">
91 98
                         <property name="yalign">0</property>
92
-                        <property name="weight">600</property>
93 99
                       </object>
94 100
                       <attributes>
95
-                        <attribute name="text">0</attribute>
101
+                        <attribute name="markup">0</attribute>
96 102
                       </attributes>
97 103
                     </child>
98 104
                   </object>
@@ -101,19 +107,38 @@
101 107
                   <object class="GtkTreeViewColumn" id="_packages">
102 108
                     <property name="sizing">autosize</property>
103 109
                     <child>
104
-                      <object class="GtkCellRendererText" id="cellrenderertext6"/>
110
+                      <object class="GtkCellRendererText" id="cellrenderertext2"/>
105 111
                       <attributes>
106 112
                         <attribute name="text">1</attribute>
107 113
                       </attributes>
108 114
                     </child>
109 115
                   </object>
110 116
                 </child>
117
+                <child>
118
+                  <object class="GtkTreeViewColumn" id="_version">
119
+                    <property name="sizing">autosize</property>
120
+                    <property name="title" translatable="yes">column</property>
121
+                    <child>
122
+                      <object class="GtkCellRendererText" id="cellrenderertext3"/>
123
+                      <attributes>
124
+                        <attribute name="text">2</attribute>
125
+                      </attributes>
126
+                    </child>
127
+                    <child>
128
+                      <object class="GtkCellRendererText" id="cellrenderertext4"/>
129
+                      <attributes>
130
+                        <attribute name="text">3</attribute>
131
+                      </attributes>
132
+                    </child>
133
+                  </object>
134
+                </child>
111 135
               </object>
112 136
             </child>
113 137
           </object>
114 138
           <packing>
115 139
             <property name="expand">True</property>
116 140
             <property name="fill">True</property>
141
+            <property name="position">2</property>
117 142
           </packing>
118 143
         </child>
119 144
         <child>
@@ -124,6 +149,7 @@
124 149
           <packing>
125 150
             <property name="expand">False</property>
126 151
             <property name="fill">True</property>
152
+            <property name="position">3</property>
127 153
           </packing>
128 154
         </child>
129 155
       </object>

+ 111
- 43
resources/updater_window.ui View File

@@ -1,5 +1,5 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2
-<!-- Generated with glade 3.19.0 -->
2
+<!-- Generated with glade 3.20.0 -->
3 3
 <interface>
4 4
   <requires lib="gtk+" version="3.12"/>
5 5
   <template class="PamacUpdaterWindow" parent="GtkApplicationWindow">
@@ -7,9 +7,9 @@
7 7
     <property name="can_focus">False</property>
8 8
     <property name="border_width">6</property>
9 9
     <property name="title" translatable="yes">Update Manager</property>
10
-    <property name="window_position">center</property>
11
-    <property name="default_width">500</property>
10
+    <property name="default_width">600</property>
12 11
     <property name="icon_name">system-software-update</property>
12
+    <property name="gravity">center</property>
13 13
     <child>
14 14
       <object class="GtkBox" id="box1">
15 15
         <property name="visible">True</property>
@@ -30,25 +30,35 @@
30 30
           </packing>
31 31
         </child>
32 32
         <child>
33
-          <object class="GtkNotebook" id="notebook">
33
+          <object class="GtkStackSwitcher" id="stackswitcher">
34 34
             <property name="visible">True</property>
35
-            <property name="can_focus">True</property>
35
+            <property name="can_focus">False</property>
36
+            <property name="halign">center</property>
37
+            <property name="stack">stack</property>
38
+          </object>
39
+          <packing>
40
+            <property name="expand">False</property>
41
+            <property name="fill">True</property>
42
+            <property name="position">1</property>
43
+          </packing>
44
+        </child>
45
+        <child>
46
+          <object class="GtkStack" id="stack">
47
+            <property name="visible">True</property>
48
+            <property name="can_focus">False</property>
36 49
             <child>
37 50
               <object class="GtkScrolledWindow" id="repos_scrolledwindow">
38
-                <property name="width_request">400</property>
39
-                <property name="height_request">400</property>
51
+                <property name="width_request">600</property>
52
+                <property name="height_request">450</property>
40 53
                 <property name="visible">True</property>
41 54
                 <property name="can_focus">True</property>
42
-                <property name="hexpand">True</property>
43
-                <property name="vexpand">True</property>
44 55
                 <child>
45 56
                   <object class="GtkTreeView" id="repos_updates_treeview">
46 57
                     <property name="visible">True</property>
47 58
                     <property name="can_focus">True</property>
48
-                    <property name="vexpand">True</property>
49
-                    <property name="headers_visible">False</property>
50 59
                     <property name="headers_clickable">False</property>
51
-                    <property name="search_column">0</property>
60
+                    <property name="search_column">1</property>
61
+                    <property name="show_expanders">False</property>
52 62
                     <child internal-child="selection">
53 63
                       <object class="GtkTreeSelection" id="treeview-selection">
54 64
                         <property name="mode">none</property>
@@ -56,6 +66,11 @@
56 66
                     </child>
57 67
                     <child>
58 68
                       <object class="GtkTreeViewColumn" id="treeviewcolumn3">
69
+                        <property name="resizable">True</property>
70
+                        <property name="sizing">fixed</property>
71
+                        <property name="fixed_width">40</property>
72
+                        <property name="min_width">20</property>
73
+                        <property name="title" translatable="yes">State</property>
59 74
                         <child>
60 75
                           <object class="GtkCellRendererToggle" id="repos_select_update">
61 76
                             <signal name="toggled" handler="on_repos_select_update_toggled" swapped="no"/>
@@ -68,6 +83,11 @@
68 83
                     </child>
69 84
                     <child>
70 85
                       <object class="GtkTreeViewColumn" id="treeviewcolumn1">
86
+                        <property name="resizable">True</property>
87
+                        <property name="sizing">fixed</property>
88
+                        <property name="fixed_width">200</property>
89
+                        <property name="min_width">20</property>
90
+                        <property name="title" translatable="yes">Name</property>
71 91
                         <property name="expand">True</property>
72 92
                         <child>
73 93
                           <object class="GtkCellRendererText" id="repos_update_name"/>
@@ -78,45 +98,77 @@
78 98
                       </object>
79 99
                     </child>
80 100
                     <child>
81
-                      <object class="GtkTreeViewColumn" id="treeviewcolumn2">
101
+                      <object class="GtkTreeViewColumn" id="treeviewcolumn6">
102
+                        <property name="resizable">True</property>
103
+                        <property name="sizing">fixed</property>
104
+                        <property name="fixed_width">150</property>
105
+                        <property name="min_width">20</property>
106
+                        <property name="title" translatable="yes">Version</property>
82 107
                         <child>
83
-                          <object class="GtkCellRendererText" id="repos_update_download_size"/>
108
+                          <object class="GtkCellRendererText" id="repos_new_update_version"/>
84 109
                           <attributes>
85 110
                             <attribute name="text">2</attribute>
86 111
                           </attributes>
87 112
                         </child>
113
+                        <child>
114
+                          <object class="GtkCellRendererText" id="repos_old_update_version"/>
115
+                          <attributes>
116
+                            <attribute name="text">3</attribute>
117
+                          </attributes>
118
+                        </child>
119
+                      </object>
120
+                    </child>
121
+                    <child>
122
+                      <object class="GtkTreeViewColumn" id="treeviewcolumn10">
123
+                        <property name="resizable">True</property>
124
+                        <property name="fixed_width">90</property>
125
+                        <property name="min_width">20</property>
126
+                        <property name="title" translatable="yes">Repository</property>
127
+                        <child>
128
+                          <object class="GtkCellRendererText" id="repos_update_repo"/>
129
+                          <attributes>
130
+                            <attribute name="text">4</attribute>
131
+                          </attributes>
132
+                        </child>
133
+                      </object>
134
+                    </child>
135
+                    <child>
136
+                      <object class="GtkTreeViewColumn" id="treeviewcolumn2">
137
+                        <property name="resizable">True</property>
138
+                        <property name="sizing">fixed</property>
139
+                        <property name="fixed_width">90</property>
140
+                        <property name="min_width">20</property>
141
+                        <property name="title" translatable="yes">Size</property>
142
+                        <child>
143
+                          <object class="GtkCellRendererText" id="repos_update_size"/>
144
+                          <attributes>
145
+                            <attribute name="text">5</attribute>
146
+                          </attributes>
147
+                        </child>
88 148
                       </object>
89 149
                     </child>
90 150
                   </object>
91 151
                 </child>
92 152
               </object>
93
-            </child>
94
-            <child type="tab">
95
-              <object class="GtkLabel" id="label1">
96
-                <property name="visible">True</property>
97
-                <property name="can_focus">False</property>
98
-                <property name="label" translatable="yes">Repositories</property>
99
-              </object>
100 153
               <packing>
101
-                <property name="tab_fill">False</property>
154
+                <property name="name">repos</property>
155
+                <property name="title" translatable="yes">Repositories</property>
102 156
               </packing>
103 157
             </child>
104 158
             <child>
105 159
               <object class="GtkScrolledWindow" id="aur_scrolledwindow">
106
-                <property name="width_request">400</property>
107
-                <property name="height_request">400</property>
160
+                <property name="width_request">600</property>
161
+                <property name="height_request">450</property>
108 162
                 <property name="visible">True</property>
109 163
                 <property name="can_focus">True</property>
110
-                <property name="hexpand">True</property>
111
-                <property name="vexpand">True</property>
112 164
                 <child>
113 165
                   <object class="GtkTreeView" id="aur_updates_treeview">
114 166
                     <property name="visible">True</property>
115 167
                     <property name="can_focus">True</property>
116 168
                     <property name="vexpand">True</property>
117
-                    <property name="headers_visible">False</property>
118 169
                     <property name="headers_clickable">False</property>
119
-                    <property name="search_column">0</property>
170
+                    <property name="search_column">1</property>
171
+                    <property name="show_expanders">False</property>
120 172
                     <child internal-child="selection">
121 173
                       <object class="GtkTreeSelection" id="treeview-selection2">
122 174
                         <property name="mode">none</property>
@@ -124,6 +176,11 @@
124 176
                     </child>
125 177
                     <child>
126 178
                       <object class="GtkTreeViewColumn" id="treeviewcolumn4">
179
+                        <property name="resizable">True</property>
180
+                        <property name="sizing">fixed</property>
181
+                        <property name="fixed_width">40</property>
182
+                        <property name="min_width">20</property>
183
+                        <property name="title" translatable="yes">State</property>
127 184
                         <child>
128 185
                           <object class="GtkCellRendererToggle" id="aur_select_update">
129 186
                             <signal name="toggled" handler="on_aur_select_update_toggled" swapped="no"/>
@@ -136,6 +193,11 @@
136 193
                     </child>
137 194
                     <child>
138 195
                       <object class="GtkTreeViewColumn" id="treeviewcolumn5">
196
+                        <property name="resizable">True</property>
197
+                        <property name="sizing">fixed</property>
198
+                        <property name="fixed_width">200</property>
199
+                        <property name="min_width">20</property>
200
+                        <property name="title" translatable="yes">Name</property>
139 201
                         <property name="expand">True</property>
140 202
                         <child>
141 203
                           <object class="GtkCellRendererText" id="aur_update_name"/>
@@ -145,29 +207,35 @@
145 207
                         </child>
146 208
                       </object>
147 209
                     </child>
210
+                    <child>
211
+                      <object class="GtkTreeViewColumn" id="treeviewcolumn8">
212
+                        <property name="resizable">True</property>
213
+                        <property name="sizing">fixed</property>
214
+                        <property name="fixed_width">150</property>
215
+                        <property name="min_width">20</property>
216
+                        <property name="title" translatable="yes">Version</property>
217
+                        <child>
218
+                          <object class="GtkCellRendererText" id="aur_update_version"/>
219
+                          <attributes>
220
+                            <attribute name="text">2</attribute>
221
+                          </attributes>
222
+                        </child>
223
+                      </object>
224
+                    </child>
148 225
                   </object>
149 226
                 </child>
150 227
               </object>
151 228
               <packing>
229
+                <property name="name">aur</property>
230
+                <property name="title" translatable="yes">AUR</property>
152 231
                 <property name="position">1</property>
153 232
               </packing>
154 233
             </child>
155
-            <child type="tab">
156
-              <object class="GtkLabel" id="label2">
157
-                <property name="visible">True</property>
158
-                <property name="can_focus">False</property>
159
-                <property name="label" translatable="yes">AUR</property>
160
-              </object>
161
-              <packing>
162
-                <property name="position">1</property>
163
-                <property name="tab_fill">False</property>
164
-              </packing>
165
-            </child>
166 234
           </object>
167 235
           <packing>
168
-            <property name="expand">False</property>
236
+            <property name="expand">True</property>
169 237
             <property name="fill">True</property>
170
-            <property name="position">1</property>
238
+            <property name="position">2</property>
171 239
           </packing>
172 240
         </child>
173 241
         <child>
@@ -178,7 +246,7 @@
178 246
           <packing>
179 247
             <property name="expand">False</property>
180 248
             <property name="fill">True</property>
181
-            <property name="position">2</property>
249
+            <property name="position">3</property>
182 250
           </packing>
183 251
         </child>
184 252
         <child>
@@ -277,7 +345,7 @@
277 345
           <packing>
278 346
             <property name="expand">False</property>
279 347
             <property name="fill">True</property>
280
-            <property name="position">3</property>
348
+            <property name="position">4</property>
281 349
           </packing>
282 350
         </child>
283 351
       </object>

+ 27
- 36
src/Makefile View File

@@ -1,30 +1,30 @@
1 1
 
2
-COMMON_VALA_FLAGS = 	-X -w \
3
-						--pkg=libalpm \
2
+ALPM_VALA_FLAGS = 		--pkg=libalpm \
4 3
 						--pkg=gio-2.0 \
5
-						--pkg=posix \
6
-						--vapidir=./ \
7 4
 						--vapidir=../vapi \
8
-						-X -I../util \
9
-						-X -D_FILE_OFFSET_BITS=64 \
5
+						-X -D_FILE_OFFSET_BITS=64
6
+
7
+COMMON_VALA_FLAGS = 	-X -w \
8
+						--pkg=posix \
10 9
 						-X -DGETTEXT_PACKAGE="pamac" \
11 10
 						--target-glib=2.38
12 11
 
13
-TRANSACTION_VALA_FLAGS = 	--pkg=json-glib-1.0 \
14
-							--pkg=libsoup-2.4 \
15
-							--pkg=gtk+-3.0 \
12
+TRANSACTION_VALA_FLAGS = 	--pkg=gtk+-3.0 \
16 13
 							--pkg=gdk-3.0 \
17 14
 							--pkg=vte-2.91 \
18 15
 							-X -lm
19 16
 
20
-COMMON_SOURCES = 	../util/alpm-util.c \
21
-					common.vala \
22
-					pamac_config.vala \
23
-					alpm_config.vala \
17
+PAMAC_LIB_FLAGS = 	-X -I. \
18
+					-X -L. \
19
+					-X -lpamac \
20
+					--vapidir=./ \
21
+					--pkg=pamac \
22
+
23
+COMMON_SOURCES = 	common.vala \
24
+					pamac_config.vala
24 25
 
25
-TRANSACTION_SOURCES = 	transaction.vala \
26
-						alpm_utils.vala \
27
-						aur.vala \
26
+TRANSACTION_SOURCES = 	package.vala \
27
+						transaction.vala \
28 28
 						choose_provider_dialog.vala \
29 29
 						transaction_sum_dialog.vala \
30 30
 						transaction_info_dialog.vala \
@@ -42,7 +42,7 @@ UPDATER_GRESOURCE_FILE = ../resources/pamac.updater.gresource.xml
42 42
 
43 43
 INSTALLER_GRESOURCE_FILE = ../resources/pamac.installer.gresource.xml
44 44
 
45
-binaries: pamac-refresh pamac-daemon pamac-tray libpamac.so pamac-updater pamac-manager pamac-install
45
+binaries: pamac-refresh pamac-daemon pamac-tray pamac-updater pamac-manager pamac-install
46 46
 
47 47
 clean:
48 48
 	rm -f *.c pamac.h pamac.vapi libpamac.so pamac-refresh pamac-daemon pamac-tray pamac-updater pamac-manager pamac-install
@@ -55,7 +55,7 @@ pamac-refresh: pamac_config.vala refresh.vala
55 55
 			pamac_config.vala \
56 56
 			refresh.vala
57 57
 
58
-pamac-tray: ../vapi/libalpm.vapi $(COMMON_SOURCES) tray.vala
58
+pamac-tray: $(COMMON_SOURCES) alpm_config.vala tray.vala
59 59
 	valac 	-o pamac-tray \
60 60
 			$(COMMON_VALA_FLAGS) \
61 61
 			--pkg=gtk+-3.0 \
@@ -63,20 +63,23 @@ pamac-tray: ../vapi/libalpm.vapi $(COMMON_SOURCES) tray.vala
63 63
 			$(COMMON_SOURCES) \
64 64
 			tray.vala
65 65
 
66
-pamac-daemon: ../vapi/libalpm.vapi ../vapi/polkit-gobject-1.vapi ../vapi/libcurl.vapi $(COMMON_SOURCES) aur.vala mirrors_config.vala daemon.vala
66
+pamac-daemon: ../vapi/libalpm.vapi ../vapi/polkit-gobject-1.vapi ../vapi/libcurl.vapi alpm_config.vala $(COMMON_SOURCES) package.vala aur.vala mirrors_config.vala daemon.vala
67 67
 	valac 	-o pamac-daemon \
68 68
 			$(COMMON_VALA_FLAGS) \
69
+			$(ALPM_VALA_FLAGS) \
69 70
 			--pkg=polkit-gobject-1 \
70 71
 			--pkg=libcurl \
71 72
 			--pkg=json-glib-1.0 \
72 73
 			--pkg=libsoup-2.4 \
73 74
 			--thread \
75
+			alpm_config.vala \
74 76
 			$(COMMON_SOURCES) \
77
+			package.vala \
75 78
 			aur.vala \
76 79
 			mirrors_config.vala \
77 80
 			daemon.vala
78 81
 
79
-libpamac.so: ../vapi/libalpm.vapi $(COMMON_SOURCES) $(TRANSACTION_SOURCES) $(PREFERENCES_SOURCES) ../resources/transaction_resources.c
82
+libpamac.so: $(COMMON_SOURCES) $(TRANSACTION_SOURCES) $(PREFERENCES_SOURCES) ../resources/transaction_resources.c
80 83
 	valac	-o libpamac.so \
81 84
 			-X -fPIC \
82 85
 			-X --shared \
@@ -91,33 +94,24 @@ libpamac.so: ../vapi/libalpm.vapi $(COMMON_SOURCES) $(TRANSACTION_SOURCES) $(PRE
91 94
 			$(TRANSACTION_SOURCES) \
92 95
 			$(PREFERENCES_SOURCES)
93 96
 
94
-pamac-manager: libpamac.so choose_dep_dialog.vala history_dialog.vala transaction_info_dialog.vala ../resources/manager_resources.c ../util/alpm-util.c packages_model.vala aur_model.vala manager_window.vala manager.vala
97
+pamac-manager: libpamac.so choose_dep_dialog.vala history_dialog.vala transaction_info_dialog.vala ../resources/manager_resources.c manager_window.vala manager.vala
95 98
 	valac 	-o pamac-manager \
96 99
 			$(COMMON_VALA_FLAGS) \
97
-			-X -I. \
98
-			-X -L. \
99
-			-X -lpamac \
100
-			--pkg=pamac \
100
+			$(PAMAC_LIB_FLAGS) \
101 101
 			--pkg=json-glib-1.0 \
102 102
 			--pkg=gtk+-3.0 \
103 103
 			--pkg=gdk-3.0 \
104 104
 			--gresources=$(MANAGER_GRESOURCE_FILE) \
105 105
 			../resources/manager_resources.c \
106
-			../util/alpm-util.c \
107 106
 			choose_dep_dialog.vala \
108 107
 			history_dialog.vala \
109
-			packages_model.vala \
110
-			aur_model.vala \
111 108
 			manager_window.vala \
112 109
 			manager.vala
113 110
 
114 111
 pamac-updater: libpamac.so ../resources/updater_resources.c updater_window.vala updater.vala
115 112
 	valac 	-o pamac-updater \
116 113
 			$(COMMON_VALA_FLAGS) \
117
-			-X -I. \
118
-			-X -L. \
119
-			-X -lpamac \
120
-			--pkg=pamac \
114
+			$(PAMAC_LIB_FLAGS) \
121 115
 			--pkg=json-glib-1.0 \
122 116
 			--pkg=gtk+-3.0 \
123 117
 			--pkg=gdk-3.0 \
@@ -129,10 +123,7 @@ pamac-updater: libpamac.so ../resources/updater_resources.c updater_window.vala
129 123
 pamac-install: libpamac.so installer.vala
130 124
 	valac 	-o pamac-install \
131 125
 			$(COMMON_VALA_FLAGS) \
132
-			-X -I. \
133
-			-X -L. \
134
-			-X -lpamac \
135
-			--pkg=pamac \
126
+			$(PAMAC_LIB_FLAGS) \
136 127
 			--pkg=json-glib-1.0 \
137 128
 			--pkg=gtk+-3.0 \
138 129
 			installer.vala

+ 76
- 78
src/alpm_config.vala View File

@@ -1,5 +1,5 @@
1 1
 /*
2
- *  pamac-vala
2
+ *  alpm_config
3 3
  *
4 4
  *  Copyright (C) 2014-2016 Guillaume Benoit <guillaume@manjaro.org>
5 5
  *
@@ -18,7 +18,7 @@
18 18
  */
19 19
 
20 20
 [Compact]
21
-public class AlpmRepo {
21
+class AlpmRepo {
22 22
 	public string name;
23 23
 	public Alpm.Signature.Level siglevel;
24 24
 	public Alpm.Signature.Level siglevel_mask;
@@ -42,68 +42,55 @@ public class AlpmRepo {
42 42
 
43 43
 }
44 44
 
45
-[Compact]
46
-public class AlpmConfig {
47
-	public string conf_path;
48
-	public string? rootdir;
49
-	public string? dbpath;
50
-	public string? logfile;
51
-	public string? gpgdir;
52
-	public string? arch;
53
-	public double deltaratio;
54
-	public int usesyslog;
55
-	public int checkspace;
56
-	public Alpm.List<string?>? cachedirs;
57
-	public Alpm.List<string?>? hookdirs;
58
-	public Alpm.List<string?>? ignoregroups;
59
-	public Alpm.List<string?>? ignorepkgs;
60
-	public Alpm.List<string?>? noextracts;
61
-	public Alpm.List<string?>? noupgrades;
62
-	public GLib.List<string>? holdpkgs;
63
-	public GLib.List<string>? syncfirsts;
64
-	public Alpm.Signature.Level siglevel;
65
-	public Alpm.Signature.Level localfilesiglevel;
66
-	public Alpm.Signature.Level remotefilesiglevel;
67
-	public Alpm.Signature.Level siglevel_mask;
68
-	public Alpm.Signature.Level localfilesiglevel_mask;
69
-	public Alpm.Signature.Level remotefilesiglevel_mask;
70
-	public GLib.List<AlpmRepo> repo_order;
71
-	public Alpm.Handle? handle;
45
+class AlpmConfig {
46
+	string conf_path;
47
+	string? rootdir;
48
+	string? dbpath;
49
+	string? logfile;
50
+	string? gpgdir;
51
+	string? arch;
52
+	double deltaratio;
53
+	int usesyslog;
54
+	int checkspace;
55
+	GLib.List<string> cachedirs;
56
+	GLib.List<string> hookdirs;
57
+	GLib.List<string> ignoregroups;
58
+	GLib.List<string> ignorepkgs;
59
+	GLib.List<string> noextracts;
60
+	GLib.List<string> noupgrades;
61
+	GLib.List<string> holdpkgs;
62
+	GLib.List<string> syncfirsts;
63
+	Alpm.Signature.Level siglevel;
64
+	Alpm.Signature.Level localfilesiglevel;
65
+	Alpm.Signature.Level remotefilesiglevel;
66
+	Alpm.Signature.Level siglevel_mask;
67
+	Alpm.Signature.Level localfilesiglevel_mask;
68
+	Alpm.Signature.Level remotefilesiglevel_mask;
69
+	GLib.List<AlpmRepo> repo_order;
72 70
 
73 71
 	public AlpmConfig (string path) {
74 72
 		conf_path = path;
75 73
 		reload ();
76 74
 	}
77 75
 
76
+	public unowned GLib.List<string> get_holdpkgs () {
77
+		return holdpkgs;
78
+	}
79
+
80
+	public unowned GLib.List<string> get_syncfirsts () {
81
+		return syncfirsts;
82
+	}
83
+
78 84
 	public void reload () {
79 85
 		// set default options
86
+		cachedirs = new GLib.List<string> ();
87
+		hookdirs = new GLib.List<string> ();
88
+		ignoregroups = new GLib.List<string> ();
89
+		ignorepkgs = new GLib.List<string> ();
90
+		noextracts = new GLib.List<string> ();
91
+		noupgrades = new GLib.List<string> ();
80 92
 		holdpkgs = new GLib.List<string> ();
81 93
 		syncfirsts = new GLib.List<string> ();
82
-		// free internal data of alpm lists
83
-		if (cachedirs != null) {
84
-			cachedirs.free_data ();
85
-			cachedirs = new Alpm.List<string> ();
86
-		}
87
-		if (hookdirs != null) {
88
-			hookdirs.free_data ();
89
-			hookdirs = new Alpm.List<string?> ();
90
-		}
91
-		if (ignoregroups != null) {
92
-			ignoregroups.free_data ();
93
-			ignoregroups = new Alpm.List<string> ();
94
-		}
95
-		if (ignorepkgs != null) {
96
-			ignorepkgs.free_data ();
97
-			ignorepkgs = new Alpm.List<string> ();
98
-		}
99
-		if (noextracts != null) {
100
-			noextracts.free_data ();
101
-			noextracts = new Alpm.List<string> ();
102
-		}
103
-		if (noupgrades != null) {
104
-			noupgrades.free_data ();
105
-			noupgrades = new Alpm.List<string> ();
106
-		}
107 94
 		usesyslog = 0;
108 95
 		checkspace = 0;
109 96
 		deltaratio = 0.7;
@@ -131,11 +118,11 @@ public class AlpmConfig {
131 118
 				logfile = "/var/log/pacman.log";
132 119
 			}
133 120
 		}
134
-		if (cachedirs.length == 0) {
135
-			cachedirs.add ("/var/cache/pacman/pkg/");
121
+		if (cachedirs.length () == 0) {
122
+			cachedirs.append ("/var/cache/pacman/pkg/");
136 123
 		}
137
-		if (hookdirs.length == 0) {
138
-			hookdirs.add ("/etc/pacman.d/hooks/");
124
+		if (hookdirs.length () == 0) {
125
+			hookdirs.append ("/etc/pacman.d/hooks/");
139 126
 		}
140 127
 		if (gpgdir == null) {
141 128
 			// gpgdir it is not relative to rootdir, even if
@@ -147,12 +134,12 @@ public class AlpmConfig {
147 134
 		}
148 135
 	}
149 136
 
150
-	public void set_handle () {
137
+	public Alpm.Handle? get_handle () {
151 138
 		Alpm.Errno error;
152
-		handle = Alpm.Handle.new (rootdir, dbpath, out error);
139
+		Alpm.Handle? handle = new Alpm.Handle (rootdir, dbpath, out error);
153 140
 		if (handle == null) {
154
-			stderr.printf ("Failed to initialize alpm library" + " (%s)\n".printf(Alpm.strerror (error)));
155
-			return;
141
+			stderr.printf ("Failed to initialize alpm library" + " (%s)\n".printf (Alpm.strerror (error)));
142
+			return null;
156 143
 		}
157 144
 		// define options
158 145
 		handle.logfile = logfile;
@@ -166,15 +153,24 @@ public class AlpmConfig {
166 153
 		remotefilesiglevel = merge_siglevel (siglevel, remotefilesiglevel, remotefilesiglevel_mask);
167 154
 		handle.localfilesiglevel = localfilesiglevel;
168 155
 		handle.remotefilesiglevel = remotefilesiglevel;
169
-		handle.cachedirs = cachedirs;
170
-		// add hook directories 1-by-1 to avoid overwriting the system directory
156
+		foreach (unowned string cachedir in cachedirs) {
157
+			handle.add_cachedir (cachedir);
158
+		}
171 159
 		foreach (unowned string hookdir in hookdirs) {
172 160
 			handle.add_hookdir (hookdir);
173 161
 		}
174
-		handle.ignoregroups = ignoregroups;
175
-		handle.ignorepkgs = ignorepkgs;
176
-		handle.noextracts = noextracts;
177
-		handle.noupgrades = noupgrades;
162
+		foreach (unowned string ignoregroup in ignoregroups) {
163
+			handle.add_ignoregroup (ignoregroup);
164
+		}
165
+		foreach (unowned string ignorepkg in ignorepkgs) {
166
+			handle.add_ignorepkg (ignorepkg);
167
+		}
168
+		foreach (unowned string noextract in noextracts) {
169
+			handle.add_noextract (noextract);
170
+		}
171
+		foreach (unowned string noupgrade in noupgrades) {
172
+			handle.add_noupgrade (noupgrade);
173
+		}
178 174
 		// register dbs
179 175
 		foreach (unowned AlpmRepo repo in repo_order) {
180 176
 			repo.siglevel = merge_siglevel (siglevel, repo.siglevel, repo.siglevel_mask);
@@ -188,9 +184,10 @@ public class AlpmConfig {
188 184
 				db.usage = repo.usage;
189 185
 			}
190 186
 		}
187
+		return handle;
191 188
 	}
192 189
 
193
-	public void parse_file (string path, string? section = null) {
190
+	void parse_file (string path, string? section = null) {
194 191
 		string? current_section = section;
195 192
 		var file = GLib.File.new_for_path (path);
196 193
 		if (file.query_exists ()) {
@@ -236,11 +233,11 @@ public class AlpmConfig {
236 233
 							dbpath = val;
237 234
 						} else if (key == "CacheDir") {
238 235
 							foreach (unowned string dir in val.split (" ")) {
239
-								cachedirs.add (dir);
236
+								cachedirs.append (dir);
240 237
 							}
241 238
 						} else if (key == "HookDir") {
242 239
 							foreach (unowned string dir in val.split (" ")) {
243
-								hookdirs.add (dir);
240
+								hookdirs.append (dir);
244 241
 							}
245 242
 						} else if (key == "LogFile") {
246 243
 							logfile = val;
@@ -276,19 +273,19 @@ public class AlpmConfig {
276 273
 							}
277 274
 						} else if (key == "IgnoreGroup") {
278 275
 							foreach (unowned string name in val.split (" ")) {
279
-								ignoregroups.add (name);
276
+								ignoregroups.append (name);
280 277
 							}
281 278
 						} else if (key == "IgnorePkg") {
282 279
 							foreach (unowned string name in val.split (" ")) {
283
-								ignorepkgs.add (name);
280
+								ignorepkgs.append (name);
284 281
 							}
285 282
 						} else if (key == "Noextract") {
286 283
 							foreach (unowned string name in val.split (" ")) {
287
-								noextracts.add (name);
284
+								noextracts.append (name);
288 285
 							}
289 286
 						} else if (key == "NoUpgrade") {
290 287
 							foreach (unowned string name in val.split (" ")) {
291
-								noupgrades.add (name);
288
+								noupgrades.append (name);
292 289
 							}
293 290
 						}
294 291
 					} else {
@@ -364,6 +361,7 @@ public class AlpmConfig {
364 361
 					// writing a short string to the stream
365 362
 					dos.put_string (new_line);
366 363
 				}
364
+				reload ();
367 365
 			} catch (GLib.Error e) {
368 366
 				GLib.stderr.printf("%s\n", e.message);
369 367
 			}
@@ -372,7 +370,7 @@ public class AlpmConfig {
372 370
 		}
373 371
 	}
374 372
 
375
-	public Alpm.DB.Usage define_usage (string conf_string) {
373
+	Alpm.DB.Usage define_usage (string conf_string) {
376 374
 		Alpm.DB.Usage usage = 0;
377 375
 		foreach (unowned string directive in conf_string.split(" ")) {
378 376
 			if (directive == "Sync") {
@@ -390,7 +388,7 @@ public class AlpmConfig {
390 388
 		return usage;
391 389
 	}
392 390
 
393
-	public void process_siglevel (string conf_string, ref Alpm.Signature.Level siglevel, ref Alpm.Signature.Level siglevel_mask) {
391
+	void process_siglevel (string conf_string, ref Alpm.Signature.Level siglevel, ref Alpm.Signature.Level siglevel_mask) {
394 392
 		foreach (unowned string directive in conf_string.split(" ")) {
395 393
 			bool affect_package = false;
396 394
 			bool affect_database = false;
@@ -458,7 +456,7 @@ public class AlpmConfig {
458 456
 		siglevel &= ~Alpm.Signature.Level.USE_DEFAULT;
459 457
 	}
460 458
 
461
-	public Alpm.Signature.Level merge_siglevel(Alpm.Signature.Level sigbase, Alpm.Signature.Level sigover, Alpm.Signature.Level sigmask) {
459
+	Alpm.Signature.Level merge_siglevel(Alpm.Signature.Level sigbase, Alpm.Signature.Level sigover, Alpm.Signature.Level sigmask) {
462 460
 		return (sigmask != 0) ? (sigover & sigmask) | (sigbase & ~sigmask) : sigover;
463 461
 	}
464 462
 }

+ 34
- 75
src/aur.vala View File

@@ -25,107 +25,66 @@ namespace AUR {
25 25
 	const string rpc_multiinfo = "&type=info";
26 26
 	const string rpc_multiinfo_arg = "&arg[]=";
27 27
 
28
-	public Json.Array search (string[] needles) {
29
-		var prev_inter = new Json.Array ();
30
-		string uri = rpc_url + rpc_search + Uri.escape_string (needles[0]);
28
+	Json.Array rpc_query (string uri) {
29
+		var results = new Json.Array ();
31 30
 		var session = new Soup.Session ();
31
+		// set a 15 seconds timeout because it is also the dbus daemon timeout
32
+		session.timeout = 15;
32 33
 		var message = new Soup.Message ("GET", uri);
33 34
 		var parser = new Json.Parser ();
34 35
 		session.send_message (message);
35 36
 		try {
36 37
 			parser.load_from_data ((string) message.response_body.flatten ().data, -1);
37 38
 		} catch (Error e) {
38
-			print (e.message);
39
+			critical (e.message);
39 40
 		}
40 41
 		unowned Json.Node? root = parser.get_root ();
41 42
 		if (root != null) {
42 43
 			if (root.get_object ().get_string_member ("type") == "error") {
43
-				stderr.printf ("Failed to search %s from AUR\n", needles[0]);
44
+				critical ("Failed to query %s from AUR", uri);
44 45
 			} else {
45
-				prev_inter = root.get_object ().get_array_member ("results");
46
+				results = root.get_object ().get_array_member ("results");
46 47
 			}
47 48
 		}
48
-		int needles_length = needles.length;
49
-		if (needles_length == 1) {
50
-			return prev_inter;
51
-		}
52
-		int i = 1;
53
-		var inter = new Json.Array ();
54
-		var found = new Json.Array ();
55
-		while (i < needles_length) {
56
-			inter = new Json.Array ();
57
-			uri = rpc_url + rpc_search + Uri.escape_string (needles[i]);
58
-			message = new Soup.Message ("GET", uri);
59
-			session.send_message (message);
60
-			try {
61
-				parser.load_from_data ((string) message.response_body.flatten ().data, -1);
62
-			} catch (Error e) {
63
-				print (e.message);
64
-			}
65
-			root = parser.get_root ();
66
-			if (root != null) {
67
-				if (root.get_object ().get_string_member ("type") == "error") {
68
-					stderr.printf ("Failed to search %s from AUR\n", needles[i]);
69
-				} else {
70
-					found = root.get_object ().get_array_member ("results");
71
-					uint j = 0;
72
-					uint k;
73
-					uint found_length = found.get_length ();
74
-					while (j < found_length) {
75
-						unowned Json.Node found_node = found.get_element (j);
76
-						k = 0;
77
-						uint prev_inter_length = prev_inter.get_length ();
78
-						while (k < prev_inter_length) {
79
-							unowned Json.Node prev_inter_node = prev_inter.get_element (k);
80
-							if (strcmp (found_node.get_object ().get_string_member ("Name"),
81
-										prev_inter_node.get_object ().get_string_member ("Name")) == 0) {
82
-								inter.add_element (prev_inter_node);
83
-								prev_inter.remove_element (k);
84
-								break;
85
-							}
86
-							k++;
49
+		return results;
50
+	}
51
+
52
+	public async Json.Array search (string[] needles) {
53
+		if (needles.length == 0) {
54
+			return new Json.Array ();
55
+		} else if (needles.length == 1) {
56
+			return rpc_query (rpc_url + rpc_search + Uri.escape_string (needles[0]));
57
+		} else {
58
+			var inter = new Json.Array ();
59
+			var prev_inter = new Json.Array ();
60
+			foreach (unowned string needle in needles) {
61
+				inter = new Json.Array ();
62
+				var found = rpc_query (rpc_url + rpc_search + Uri.escape_string (needle));
63
+				prev_inter.foreach_element ((prev_inter_array, prev_inter_index, prev_inter_node) => {
64
+					found.foreach_element ((found_array, found_index, found_node) => {
65
+						if (strcmp (prev_inter_node.get_object ().get_string_member ("Name"),
66
+									found_node.get_object ().get_string_member ("Name")) == 0) {
67
+							inter.add_element (prev_inter_node);
87 68
 						}
88
-						j++;
89
-					}
90
-				}
69
+					});
70
+				});
71
+				prev_inter = (owned) inter;
91 72
 			}
92
-			if (i != (needles_length -1)) {
93
-				prev_inter = inter;
94
-			}
95
-			i++;
73
+			return inter;
96 74
 		}
97
-		return inter;
98 75
 	}
99 76
 
100
-	public Json.Array multiinfo (string[] pkgnames) {
101
-		Json.Array results = new Json.Array ();
77
+	public async Json.Array multiinfo (string[] pkgnames) {
102 78
 		if (pkgnames.length == 0) {
103
-			return results;
79
+			return new Json.Array ();
104 80
 		}
105 81
 		var builder = new StringBuilder ();
106 82
 		builder.append (rpc_url);
107 83
 		builder.append (rpc_multiinfo);
108
-		foreach (string pkgname in pkgnames) {
84
+		foreach (unowned string pkgname in pkgnames) {
109 85
 			builder.append (rpc_multiinfo_arg);
110 86
 			builder.append (Uri.escape_string (pkgname));
111 87
 		}
112
-		var session = new Soup.Session ();
113
-		var message = new Soup.Message ("GET", builder.str);
114
-		session.send_message (message);
115
-		var parser = new Json.Parser ();
116
-		try {
117
-			parser.load_from_data ((string) message.response_body.flatten ().data, -1);
118
-		} catch (Error e) {
119
-			print (e.message);
120
-		}
121
-		unowned Json.Node? root = parser.get_root ();
122
-		if (root != null) {
123
-			if (root.get_object ().get_string_member ("type") == "error") {
124
-				stderr.printf ("Failed to multiinfo %s from AUR\n", builder.str);
125
-			} else {
126
-				results = root.get_object ().get_array_member ("results");
127
-			}
128
-		}
129
-		return results;
88
+		return rpc_query (builder.str);
130 89
 	}
131 90
 }

+ 4
- 4
src/choose_dep_dialog.vala View File

@@ -32,17 +32,17 @@ namespace Pamac {
32 32
 		public ChooseDependenciesDialog (Gtk.ApplicationWindow? window) {
33 33
 			Object (transient_for: window, use_header_bar: 0);
34 34
 
35
-			deps_list = new Gtk.ListStore (3, typeof (bool), typeof (string), typeof (string));
35
+			deps_list = new Gtk.ListStore (2, typeof (bool), typeof (string));
36 36
 			treeview.set_model (deps_list);
37 37
 		}
38 38
 
39 39
 		[GtkCallback]
40 40
 		void on_renderertoggle_toggled (string path) {
41 41
 			Gtk.TreeIter iter;
42
-			GLib.Value selected;
42
+			bool selected;
43 43
 			if (deps_list.get_iter_from_string (out iter, path)) {;
44
-				deps_list.get_value (iter, 0, out selected);
45
-				deps_list.set_value (iter, 0, !((bool) selected));
44
+				deps_list.get (iter, 0, out selected);
45
+				deps_list.set (iter, 0, !selected);
46 46
 			}
47 47
 		}
48 48
 	}

+ 14
- 5
src/common.vala View File

@@ -18,17 +18,26 @@
18 18
  */
19 19
 
20 20
 namespace Pamac {
21
-	public struct PackageInfos {
21
+	public struct UpdateInfos {
22 22
 		public string name;
23
-		public string version;
24
-		public string db_name;
23
+		public string old_version;
24
+		public string new_version;
25
+		public string repo;
25 26
 		public uint64 download_size;
26 27
 	}
27 28
 
29
+	public struct TransactionSummary {
30
+		public UpdateInfos[] to_install;
31
+		public UpdateInfos[] to_upgrade;
32
+		public UpdateInfos[] to_downgrade;
33
+		public UpdateInfos[] to_reinstall;
34
+		public UpdateInfos[] to_remove;
35
+	}
36
+
28 37
 	public struct Updates {
29 38
 		public bool is_syncfirst;
30
-		public PackageInfos[] repos_updates;
31
-		public PackageInfos[] aur_updates;
39
+		public UpdateInfos[] repos_updates;
40
+		public UpdateInfos[] aur_updates;
32 41
 	}
33 42
 
34 43
 	public struct ErrorInfos {

+ 945
- 147
src/daemon.vala
File diff suppressed because it is too large
View File


+ 915
- 1150
src/manager_window.vala
File diff suppressed because it is too large
View File


+ 27
- 23
src/mirrors_config.vala View File

@@ -18,13 +18,32 @@
18 18
  */
19 19
 
20 20
 namespace Pamac {
21
-	[Compact]
22
-	public class MirrorsConfig {
23
-		public string conf_path;
24
-		public string mirrorlists_dir;
25
-		public string choosen_generation_method;
26
-		public string choosen_country;
27
-		public GLib.List<string> countrys;
21
+	class MirrorsConfig {
22
+		string conf_path;
23
+		GLib.List<string> _countrys ;
24
+
25
+
26
+		public string mirrorlists_dir { get; private set; }
27
+		public string choosen_generation_method { get; private set; }
28
+		public string choosen_country { get; private set; }
29
+		public unowned GLib.List<string> countrys {
30
+			get {
31
+				try {
32
+					var directory = GLib.File.new_for_path (mirrorlists_dir);
33
+					var enumerator = directory.enumerate_children (FileAttribute.STANDARD_NAME, 0);
34
+					FileInfo file_info;
35
+					_countrys = new GLib.List<string> ();
36
+					while ((file_info = enumerator.next_file ()) != null) {
37
+						_countrys.append(file_info.get_name ());
38
+					}
39
+					_countrys.sort (strcmp);
40
+				} catch (Error e) {
41
+					stderr.printf ("%s\n", e.message);
42
+				}
43
+				return _countrys;
44
+			}
45
+		}
46
+
28 47
 
29 48
 		public MirrorsConfig (string path) {
30 49
 			conf_path = path;
@@ -39,22 +58,7 @@ namespace Pamac {
39 58
 			parse_file (conf_path);
40 59
 		}
41 60
 
42
-		public void get_countrys () {
43
-			try {
44
-				var directory = GLib.File.new_for_path (mirrorlists_dir);
45
-				var enumerator = directory.enumerate_children (FileAttribute.STANDARD_NAME, 0);
46
-				FileInfo file_info;
47
-				countrys = new GLib.List<string> ();
48
-				while ((file_info = enumerator.next_file ()) != null) {
49
-					countrys.append(file_info.get_name ());
50
-				}
51
-				countrys.sort (strcmp);
52
-			} catch (Error e) {
53
-				stderr.printf ("%s\n", e.message);
54
-			}
55
-		}
56
-
57
-		public void parse_file (string path) {
61
+		void parse_file (string path) {
58 62
 			var file = GLib.File.new_for_path (path);
59 63
 			if (file.query_exists ()) {
60 64
 				try {

+ 82
- 0
src/package.vala View File

@@ -0,0 +1,82 @@
1
+/*
2
+ *  pamac-vala
3
+ *
4
+ *  Copyright (C) 2014-2016 Guillaume Benoit <guillaume@manjaro.org>
5
+ *
6
+ *  This program is free software; you can redistribute it and/or modify
7
+ *  it under the terms of the GNU General Public License as published by
8
+ *  the Free Software Foundation; either version 3 of the License, or
9
+ *  (at your option) any later version.
10
+ *
11
+ *  This program is distributed in the hope that it will be useful,
12
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
+ *  GNU General Public License for more details.
15
+ *
16
+ *  You should have received a get of the GNU General Public License
17
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
+ */
19
+
20
+namespace Pamac {
21
+	public struct AlpmPackage {
22
+		public string name;
23
+		public string version;
24
+		public string desc;
25
+		public string repo;
26
+		public uint64 size;
27
+		public uint origin;
28
+	}
29
+
30
+	public struct AlpmPackageDetails {
31
+		public string name;
32
+		public string version;
33
+		public string desc;
34
+		public string repo;
35
+		public string url;
36
+		public string packager;
37
+		public string builddate;
38
+		public string installdate;
39
+		public string reason;
40
+		public string has_signature;
41
+		public string[] licenses;
42
+		public string[] depends;
43
+		public string[] optdepends;
44
+		public string[] requiredby;
45
+		public string[] optionalfor;
46
+		public string[] provides;
47
+		public string[] replaces;
48
+		public string[] conflicts;
49
+		public string[] groups;
50
+		public string[] backups;
51
+		public string[] files;
52
+	}
53
+
54
+	public struct AURPackage {
55
+		public string name;
56
+		public string version;
57
+		public string desc;
58
+		public double popularity;
59
+	}
60
+
61
+	public struct AURPackageDetails {
62
+		public string name;
63
+		public string version;
64
+		public string desc;
65
+		public double popularity;
66
+		public string packagebase;
67
+		public string url;
68
+		public string maintainer;
69
+		public int64 firstsubmitted;
70
+		public int64 lastmodified;
71
+		public int64 outofdate;
72
+		public int64 numvotes;
73
+		public string[] licenses;
74
+		public string[] depends;
75
+		public string[] makedepends;
76
+		public string[] checkdepends;
77
+		public string[] optdepends;
78
+		public string[] provides;
79
+		public string[] replaces;
80
+		public string[] conflicts;
81
+	}
82
+}

+ 24
- 19
src/pamac_config.vala View File

@@ -18,43 +18,48 @@
18 18
  */
19 19
 
20 20
 namespace Pamac {
21
-	[Compact]
22
-	public class Config {
23
-		public string conf_path;
24
-		public bool recurse;
25
-		public uint64 refresh_period;
26
-		public bool no_update_hide_icon;
27
-		public bool enable_aur;
28
-		public bool search_aur;
29
-		public bool check_aur_updates;
30
-		public bool no_confirm_build;
31
-		public HashTable<string,string> environment_variables;
21
+	class Config {
22
+		string conf_path;
23
+		HashTable<string,string> _environment_variables;
24
+
25
+		public bool recurse { get; private set; }
26
+		public uint64 refresh_period { get; private set; }
27
+		public bool no_update_hide_icon { get; private set; }
28
+		public bool enable_aur { get; private set; }
29
+		public bool search_aur { get; private set; }
30
+		public bool check_aur_updates { get; private set; }
31
+		public bool no_confirm_build { get; private set; }
32
+		public unowned HashTable<string,string> environment_variables {
33
+			get {
34
+				return _environment_variables;
35
+			}
36
+		}
32 37
 
33 38
 		public Config (string path) {
34 39
 			conf_path = path;
35 40
 			//get environment variables
36
-			environment_variables = new HashTable<string,string> (str_hash, str_equal);
41
+			_environment_variables = new HashTable<string,string> (str_hash, str_equal);
37 42
 			var utsname = Posix.utsname();
38
-			environment_variables.insert ("HTTP_USER_AGENT", "pamac (%s %s)".printf (utsname.sysname, utsname.machine));
43
+			_environment_variables.insert ("HTTP_USER_AGENT", "pamac (%s %s)".printf (utsname.sysname, utsname.machine));
39 44
 			unowned string? variable = Environment.get_variable ("http_proxy");
40 45
 			if (variable != null) {
41
-				environment_variables.insert ("http_proxy", variable);
46
+				_environment_variables.insert ("http_proxy", variable);
42 47
 			}
43 48
 			variable = Environment.get_variable ("https_proxy");
44 49
 			if (variable != null) {
45
-				environment_variables.insert ("https_proxy", variable);
50
+				_environment_variables.insert ("https_proxy", variable);
46 51
 			}
47 52
 			variable = Environment.get_variable ("ftp_proxy");
48 53
 			if (variable != null) {
49
-				environment_variables.insert ("ftp_proxy", variable);
54
+				_environment_variables.insert ("ftp_proxy", variable);
50 55
 			}
51 56
 			variable = Environment.get_variable ("socks_proxy");
52 57
 			if (variable != null) {
53
-				environment_variables.insert ("socks_proxy", variable);
58
+				_environment_variables.insert ("socks_proxy", variable);
54 59
 			}
55 60
 			variable = Environment.get_variable ("no_proxy");
56 61
 			if (variable != null) {
57
-				environment_variables.insert ("no_proxy", variable);
62
+				_environment_variables.insert ("no_proxy", variable);
58 63
 			}
59 64
 			// set default option
60 65
 			refresh_period = 6;
@@ -72,7 +77,7 @@ namespace Pamac {
72 77
 			parse_file (conf_path);
73 78
 		}
74 79
 
75
-		public void parse_file (string path) {
80
+		void parse_file (string path) {
76 81
 			var file = GLib.File.new_for_path (path);
77 82
 			if (file.query_exists ()) {
78 83
 				try {

+ 59
- 56
src/preferences_dialog.vala View File

@@ -37,8 +37,6 @@ namespace Pamac {
37 37
 		[GtkChild]
38 38
 		Gtk.Box ignorepkgs_box;
39 39
 		[GtkChild]
40
-		Gtk.ListStore ignorepkgs_liststore;
41
-		[GtkChild]
42 40
 		Gtk.TreeView ignorepkgs_treeview;
43 41
 		[GtkChild]
44 42
 		Gtk.Box mirrors_config_box;
@@ -59,6 +57,7 @@ namespace Pamac {
59 57
 		[GtkChild]
60 58
 		Gtk.CheckButton no_confirm_build_checkbutton;
61 59
 
60
+		Gtk.ListStore ignorepkgs_liststore;
62 61
 		Transaction transaction;
63 62
 		uint64 previous_refresh_period;
64 63
 
@@ -67,9 +66,9 @@ namespace Pamac {
67 66
 
68 67
 			this.transaction = transaction;
69 68
 			refresh_period_label.set_markup (dgettext (null, "How often to check for updates, value in hours") +":");
70
-			remove_unrequired_deps_button.active = transaction.pamac_config.recurse;
71
-			check_space_button.active = (transaction.alpm_utils.get_checkspace () == 1);
72
-			if (transaction.pamac_config.refresh_period == 0) {
69
+			remove_unrequired_deps_button.active = transaction.recurse;
70
+			check_space_button.active = transaction.get_checkspace ();
71
+			if (transaction.refresh_period == 0) {
73 72
 				check_updates_button.active = false;
74 73
 				refresh_period_label.sensitive = false;
75 74
 				// set default value
@@ -80,15 +79,16 @@ namespace Pamac {
80 79
 				ignorepkgs_box.sensitive = false;
81 80
 			} else {
82 81
 				check_updates_button.active = true;
83
-				refresh_period_spin_button.value = transaction.pamac_config.refresh_period;
84
-				previous_refresh_period = transaction.pamac_config.refresh_period;
82
+				refresh_period_spin_button.value = transaction.refresh_period;
83
+				previous_refresh_period = transaction.refresh_period;
85 84
 			}
86
-			no_update_hide_icon_checkbutton.active = transaction.pamac_config.no_update_hide_icon;
85
+			no_update_hide_icon_checkbutton.active = transaction.no_update_hide_icon;
87 86
 
88 87
 			// populate ignorepkgs_liststore
89
-			Gtk.TreeIter iter;
90
-			foreach (unowned string ignorepkg in transaction.alpm_utils.get_ignorepkgs ()) {
91
-				ignorepkgs_liststore.insert_with_values (out iter, -1, 0, ignorepkg);
88
+			ignorepkgs_liststore = new Gtk.ListStore (1, typeof (string));
89
+			ignorepkgs_treeview.set_model (ignorepkgs_liststore);
90
+			foreach (unowned string ignorepkg in transaction.get_ignorepkgs ()) {
91
+				ignorepkgs_liststore.insert_with_values (null, -1, 0, ignorepkg);
92 92
 			}
93 93
 			remove_unrequired_deps_button.state_set.connect (on_remove_unrequired_deps_button_state_set);
94 94
 			check_space_button.state_set.connect (on_check_space_button_state_set);
@@ -98,15 +98,14 @@ namespace Pamac {
98 98
 			no_update_hide_icon_checkbutton.toggled.connect (on_no_update_hide_icon_checkbutton_toggled);
99 99
 			transaction.write_pamac_config_finished.connect (on_write_pamac_config_finished);
100 100
 
101
-			unowned Alpm.Package? pkg = Alpm.find_satisfier (transaction.alpm_utils.get_installed_pkgs (), "pacman-mirrorlist");
102
-			if (pkg == null) {
101
+			AlpmPackage pkg = transaction.find_installed_satisfier ("pacman-mirrorlist");
102
+			if (pkg.name == "") {
103 103
 				mirrors_config_box.visible = false;
104 104
 			} else {
105 105
 				var mirrors_config = new MirrorsConfig ("/etc/pacman-mirrors.conf");
106 106
 				mirrors_country_comboboxtext.append_text (dgettext (null, "Worldwide"));
107 107
 				mirrors_country_comboboxtext.active = 0;
108 108
 				int index = 1;
109
-				mirrors_config.get_countrys ();
110 109
 				foreach (unowned string country in mirrors_config.countrys) {
111 110
 					mirrors_country_comboboxtext.append_text (country);
112 111
 					if (country == mirrors_config.choosen_country) {