@@ -321,16 +321,8 @@ namespace Gabut {
321
321
322
322
method_flow = new Gtk .FlowBox ();
323
323
var method_popover = new Gtk .Popover () {
324
- position = Gtk . PositionType . TOP ,
325
- width_request = 70 ,
326
324
child = method_flow
327
325
};
328
- method_popover.show.connect (() => {
329
- if (proxymethod != null ) {
330
- method_flow. select_child (proxymethod);
331
- proxymethod. grab_focus ();
332
- }
333
- });
334
326
prometh_button = new Gtk .MenuButton () {
335
327
popover = method_popover
336
328
};
@@ -339,23 +331,20 @@ namespace Gabut {
339
331
}
340
332
method_flow.show ();
341
333
method_flow.child_activated.connect ((method )=> {
334
+ ((Gtk . Label )((ProxyMethod ) proxymethod). get_last_child ()). attributes = set_attribute (Pango . Weight . BOLD );
342
335
proxymethod = method as ProxyMethod ;
336
+ ((Gtk . Label )proxymethod. get_last_child ()). attributes = color_attribute (0 , 60000 , 0 );
343
337
method_popover. hide ();
344
338
});
345
339
proxymethod = method_flow.get_child_at_index (0 ) as ProxyMethod;
346
-
340
+ ((Gtk . Label )proxymethod. get_last_child ()). attributes = color_attribute (0 , 60000 , 0 );
341
+ method_popover.show.connect (() => {
342
+ method_flow. unselect_all ();
343
+ });
347
344
type_flow = new Gtk .FlowBox ();
348
345
var type_popover = new Gtk .Popover () {
349
- position = Gtk . PositionType . TOP ,
350
- width_request = 70 ,
351
346
child = type_flow
352
347
};
353
- type_popover.show.connect (() => {
354
- if (proxytype != null ) {
355
- type_flow. select_child (proxytype);
356
- proxytype. grab_focus ();
357
- }
358
- });
359
348
type_button = new Gtk .MenuButton () {
360
349
popover = type_popover
361
350
};
@@ -364,11 +353,16 @@ namespace Gabut {
364
353
}
365
354
type_flow.show ();
366
355
type_flow.child_activated.connect ((typepr )=> {
356
+ ((Gtk . Label )((ProxyType ) proxytype). get_last_child ()). attributes = set_attribute (Pango . Weight . BOLD );
367
357
proxytype = typepr as ProxyType ;
358
+ ((Gtk . Label )proxytype. get_last_child ()). attributes = color_attribute (0 , 60000 , 0 );
368
359
type_popover. hide ();
369
360
});
370
361
proxytype = type_flow.get_child_at_index (0 ) as ProxyType;
371
-
362
+ ((Gtk . Label )proxytype. get_last_child ()). attributes = color_attribute (0 , 60000 , 0 );
363
+ type_popover.show.connect (() => {
364
+ type_flow. unselect_all ();
365
+ });
372
366
proxy_entry = new MediaEntry (" com.github.gabutakut.gabutdm.gohome" , " edit-paste" ) {
373
367
width_request = 250 ,
374
368
placeholder_text = _ ("Address ")
@@ -408,16 +402,8 @@ namespace Gabut {
408
402
409
403
login_flow = new Gtk .FlowBox ();
410
404
var login_popover = new Gtk .Popover () {
411
- position = Gtk . PositionType . TOP ,
412
- width_request = 70 ,
413
405
child = login_flow
414
406
};
415
- login_popover.show.connect (() => {
416
- if (loginuser != null ) {
417
- login_flow. select_child (loginuser);
418
- loginuser. grab_focus ();
419
- }
420
- });
421
407
login_button = new Gtk .MenuButton () {
422
408
tooltip_text = _ ("FTP /HTTP download with username and password "),
423
409
popover = login_popover
@@ -428,11 +414,16 @@ namespace Gabut {
428
414
login_flow.show ();
429
415
430
416
login_flow.child_activated.connect ((logn )=> {
417
+ ((Gtk . Label )((LoginUser ) loginuser). get_last_child ()). attributes = set_attribute (Pango . Weight . BOLD );
431
418
loginuser = logn as LoginUser ;
419
+ ((Gtk . Label )loginuser. get_last_child ()). attributes = color_attribute (0 , 60000 , 0 );
432
420
login_popover. hide ();
433
421
});
434
422
loginuser = login_flow.get_child_at_index (0 ) as LoginUser;
435
-
423
+ ((Gtk . Label )loginuser. get_last_child ()). attributes = color_attribute (0 , 60000 , 0 );
424
+ login_popover.show.connect (() => {
425
+ login_flow. unselect_all ();
426
+ });
436
427
loguser_entry = new MediaEntry (" avatar-default" , " edit-paste" ) {
437
428
width_request = 350 ,
438
429
placeholder_text = _ ("User ")
@@ -476,16 +467,8 @@ namespace Gabut {
476
467
477
468
checksums_flow = new Gtk .FlowBox ();
478
469
var checksums_popover = new Gtk .Popover () {
479
- position = Gtk . PositionType . TOP ,
480
- width_request = 70 ,
481
470
child = checksums_flow
482
471
};
483
- checksums_popover.show.connect (() => {
484
- if (checksumtype != null ) {
485
- checksums_flow. select_child (checksumtype);
486
- checksumtype. grab_focus ();
487
- }
488
- });
489
472
checksum_button = new Gtk .MenuButton () {
490
473
tooltip_text = _ ("TYPE is hash type "),
491
474
popover = checksums_popover
@@ -500,11 +483,17 @@ namespace Gabut {
500
483
placeholder_text = _ ("Hash ")
501
484
};
502
485
checksums_flow.child_activated.connect ((checksum )=> {
486
+ ((Gtk . Label )((ChecksumType ) checksumtype). get_last_child ()). attributes = set_attribute (Pango . Weight . BOLD );
503
487
checksumtype = checksum as ChecksumType ;
488
+ ((Gtk . Label )checksumtype. get_last_child ()). attributes = color_attribute (0 , 60000 , 0 );
504
489
checksums_popover. hide ();
505
490
});
506
491
checksumtype = checksums_flow.get_child_at_index (0 ) as ChecksumType;
492
+ ((Gtk . Label )checksumtype. get_last_child ()). attributes = color_attribute (0 , 60000 , 0 );
507
493
494
+ checksums_popover.show.connect (() => {
495
+ checksums_flow. unselect_all ();
496
+ });
508
497
var checksumgrid = new Gtk .Grid () {
509
498
height_request = 130 ,
510
499
halign = Gtk . Align . CENTER ,
@@ -528,17 +517,9 @@ namespace Gabut {
528
517
529
518
encrypt_flow = new Gtk .FlowBox ();
530
519
var encrypt_popover = new Gtk .Popover () {
531
- width_request = 70 ,
532
520
child = encrypt_flow
533
521
};
534
- encrypt_popover.show.connect (() => {
535
- if (btencrypt != null ) {
536
- encrypt_flow. select_child (btencrypt);
537
- btencrypt. grab_focus ();
538
- }
539
- });
540
522
encrypt_button = new Gtk .MenuButton () {
541
- direction = Gtk . ArrowType . UP ,
542
523
popover = encrypt_popover
543
524
};
544
525
foreach (var encrp in BTEncrypts .get_all ()) {
@@ -547,11 +528,17 @@ namespace Gabut {
547
528
encrypt_flow.show ();
548
529
549
530
encrypt_flow.child_activated.connect ((encrp )=> {
531
+ ((Gtk . Label )((BTEncrypt ) btencrypt). get_last_child ()). attributes = set_attribute (Pango . Weight . BOLD );
550
532
btencrypt = encrp as BTEncrypt ;
533
+ ((Gtk . Label )btencrypt. get_last_child ()). attributes = color_attribute (0 , 60000 , 0 );
551
534
encrypt_popover. hide ();
552
535
});
553
536
btencrypt = encrypt_flow.get_child_at_index (0 ) as BTEncrypt;
537
+ ((Gtk . Label )btencrypt. get_last_child ()). attributes = color_attribute (0 , 60000 , 0 );
554
538
539
+ encrypt_popover.show.connect (() => {
540
+ encrypt_flow. unselect_all ();
541
+ });
555
542
encrypt = new Gtk .CheckButton .with_label (_(" BT Require Crypto" )) {
556
543
tooltip_text = _ ("Aria2 doesn 't accept and establish connection with legacy BitTorrent handshake "),
557
544
width_request = 350,
0 commit comments