Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > 5e4b7ba4a9e3b7b11e3c87c2a7fde56e > files > 1

clamtk-6.01-1.2.mga7.src.rpm

From 7aaa72de9e6d20f63fac3709c8c8050682314deb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jani=20V=C3=A4limaa?= <wally@mageia.org>
Date: Sat, 29 Jun 2019 10:36:23 +0300
Subject: [PATCH] Replace deprecated icons

---
 lib/GUI.pm | 40 +++++++++++++++++++++-------------------
 1 file changed, 21 insertions(+), 19 deletions(-)

diff --git a/lib/GUI.pm b/lib/GUI.pm
index a68207a..7298b27 100644
--- a/lib/GUI.pm
+++ b/lib/GUI.pm
@@ -35,9 +35,10 @@ sub start_gui {
     # because it's missing an icon :|
     # https://aur.archlinux.org/packages/clamtk/
     my $theme = Gtk3::IconTheme::get_default;
-    $theme->append_search_path( '/usr/share/icons/gnome/24x24/actions' );
-    $theme->append_search_path( '/usr/share/icons/gnome/24x24/places' );
-    $theme->append_search_path( '/usr/share/icons/gnome/24x24/mimetypes' );
+    $theme->append_search_path( '/usr/share/icons/Adwaita/24x24/actions' );
+    $theme->append_search_path( '/usr/share/icons/Adwaita/24x24/places' );
+    $theme->append_search_path( '/usr/share/icons/Adwaita/24x24/mimetypes' );
+    $theme->append_search_path( '/usr/share/icons/Adwaita/24x24/legacy' );
 
     $window = Gtk3::Window->new( 'toplevel' );
     $window->signal_connect(
@@ -86,7 +86,8 @@ sub start_gui {
     $separator->set_expand( TRUE );
     $hb->pack_end( $separator );
 
-    $button = Gtk3::ToolButton->new_from_stock( 'gtk-quit' );
+    my $icon = Gtk3::Image->new_from_icon_name('application-exit', '24');
+    $button = Gtk3::ToolButton->new( $icon, _( 'Quit') );
     $button->set_tooltip_text( _( 'Quit' ) );
     $button->signal_connect(
         clicked => sub {
@@ -97,7 +98,8 @@ sub start_gui {
 
     $hb->pack_end( Gtk3::SeparatorToolItem->new );
 
-    $button = Gtk3::ToolButton->new_from_stock( 'gtk-about' );
+    $icon = Gtk3::Image->new_from_icon_name('help-about', '24');
+    $button = Gtk3::ToolButton->new( $icon, _( 'About' ) );
     $button->set_tooltip_text( _( 'About' ) );
     $button->signal_connect( clicked => \&about );
     $hb->pack_end( $button );
@@ -247,17 +249,17 @@ sub add_config_panels {
         },
         {   link        => _( 'Whitelist' ),
             description => _( 'View or update scanning whitelist' ),
-            image       => 'gtk-new',
+            image       => 'document-new',
             button      => FALSE,
         },
         {   link        => _( 'Network' ),
             description => _( 'Edit proxy settings' ),
-            image       => 'gtk-network',
+            image       => 'network-workgroup',
             button      => FALSE,
         },
         {   link        => _( 'Scheduler' ),
             description => _( 'Schedule a scan or signature update' ),
-            image       => 'gtk-properties',
+            image       => 'document-properties',
             button      => FALSE,
         },
     );
@@ -319,12 +321,12 @@ sub add_update_panels {
     my @data = (
         {   link        => _( 'Update' ),
             description => _( 'Update antivirus signatures' ),
-            image       => 'gtk-goto-bottom',
+            image       => 'go-bottom',
             button      => FALSE,
         },
         {   link        => _( 'Update Assistant' ),
             description => _( 'Signature update preferences' ),
-            image       => 'gtk-color-picker',
+            image       => 'preferences-other',
             button      => FALSE,
         },
     );
@@ -385,12 +387,12 @@ sub add_history_panels {
     my @data = (
         {   link        => _( 'History' ),
             description => _( 'View previous scans' ),
-            image       => 'gtk-edit',
+            image       => 'gtk-edit',
             button      => FALSE,
         },
         {   link        => _( 'Quarantine' ),
             description => _( 'Manage quarantined files' ),
-            image       => 'gtk-refresh',
+            image       => 'view-refresh',
             button      => FALSE,
         },
     );
@@ -451,12 +453,12 @@ sub add_analysis_panels {
     my @scan_data = (
         {   link        => _( 'Scan a file' ),
             description => _( 'Scan a file' ),
-            image       => 'gtk-file',
+            image       => 'text-x-generic',
             button      => FALSE,
         },
         {   link        => _( 'Scan a directory' ),
             description => _( 'Scan a directory' ),
-            image       => 'gtk-directory',
+            image       => 'folder',
             button      => FALSE,
         },
     );
@@ -476,7 +478,7 @@ sub add_analysis_panels {
     my @data = (
         {   link        => _( 'Analysis' ),
             description => _( "View a file's reputation" ),
-            image       => 'gtk-find',
+            image       => 'edit-find',
             button      => FALSE,
         },
     );
-- 
2.21.0