From 7e230ad67b6cbe99939026ea48ee6aa2728eb316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Fri, 3 Mar 2017 21:05:55 +0100 Subject: Fix the mgaaplet status icon (mga#17592) --- mgaapplet | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/mgaapplet b/mgaapplet index 02b66b26..f979b61d 100755 --- a/mgaapplet +++ b/mgaapplet @@ -40,6 +40,14 @@ use mgaapplet_gui; use Gtk3::Notify '-init', 'mgaapplet'; use Net::DBus qw(:typing); use Rpmdrake::open_db; +use Glib::Object::Introspection; + +use constant IMAGE_FOLDER => '/usr/share/mgaonline/pixmaps/'; + +Glib::Object::Introspection->setup( + basename => 'StatusNotifier', + version => '0.1', + package => 'StatusNotifier'); POSIX::sigprocmask(SIG_BLOCK, POSIX::SigSet->new(SIGCHLD)); @@ -169,11 +177,12 @@ my %actions = ( 'upgrade_distro' => { name => N("Upgrade the system"), launch => \&upgrade }, ); -my $icon = Gtk3::StatusIcon->new; -#$icon->shape_combine_mask($img, 0, 0); -$icon->signal_connect(popup_menu => sub { - my ($_icon, $button, $time) = @_; - $menu and $menu->popup(undef, undef, undef, undef, $button, $time); +my $icon = StatusNotifier::Notifier->new_from_icon_name('mgaapplet', 'STATUS_NOTIFIER_CATEGORY_APPLICATION_STATUS', '/usr/share/icons/mgaonline.png'); +$icon->set_title('mgaapplet'); +$icon->set_status('STATUS_NOTIFIER_STATUS_ACTIVE'); +$icon->register; +$icon->signal_connect(context_menu => sub { + $menu->popup(undef, undef, undef, undef, 0, Gtk3::get_current_event_time()) if $menu; }); $icon->signal_connect(activate => sub { my %click_actions = ( @@ -231,6 +240,12 @@ Gtk3->main; ugtk3::exit(0); +sub img { + my $file = IMAGE_FOLDER . $_[0] . '.png'; + warn "File $file not found.\n" unless -f $file; + return $file; +} + sub gnome_shell_exit_overview() { eval { Net::DBus->session->get_service('org.gnome.Shell')->get_object('/org/gnome/Shell', 'org.freedesktop.DBus.Properties')->Set('org.gnome.Shell', 'OverviewActive', dbus_boolean(0)) }; eval { Net::DBus->session->get_service('org.gnome.Shell')->get_object('/org/gnome/Shell', 'org.gnome.Shell')->Eval('Main.messageTray._trayState==2 && Main.messageTray.toggle();') }; @@ -484,7 +499,7 @@ sub no_more_supported() { if ($choice eq 'upgrade') { really_confirm_upgrade() and real_upgrade(); } elsif ($choice eq 'nothing') { - $icon->set_visible(0); + $icon->set_status('STATUS_NOTIFIER_STATUS_PASSIVE'); } undef $no_more_supported_wip; } @@ -656,20 +671,25 @@ sub setState { my $checkme; state $previous_state; my @arr = @{$state{$state}{menu}}; - my $tmp = eval { gtkcreate_pixbuf($state{$state}{colour}[0]) }; - $icon->set_from_pixbuf($tmp) if $tmp; - $icon->set_tooltip_text(formatAlaTeX(translate($state{$state}{tt}[0]))); + my $icon_name = img($state{$state}{colour}[0]); + $icon->set_from_icon_name('STATUS_NOTIFIER_ICON', $icon_name) if $icon_name; + $icon->set_tooltip($icon_name, 'mgaapplet', formatAlaTeX(translate($state{$state}{tt}[0]))); my @invisible_states = qw(delayed okay disconnected locked); - $icon->set_visible(!member($state, @invisible_states)); # do not show icon while checking if previously hidden: - $icon->set_visible(0) if $state eq 'busy' && member($previous_state, @invisible_states); + if (member($state, @invisible_states) + or $state eq 'busy' && member($previous_state, @invisible_states)) { + $icon->set_status('STATUS_NOTIFIER_STATUS_PASSIVE'); + } + else { + $icon->set_status('STATUS_NOTIFIER_STATUS_ACTIVE'); + } $previous_state = $state; gtkflush(); # so that bubbles are displayed on right icon - if ($state{$state}{tt}[0] && $icon->isa('Gtk3::StatusIcon') && !$state{$state}{do_not_use_bubble}) { + if ($state{$state}{tt}[0] && !$state{$state}{do_not_use_bubble}) { $bubble->clear_actions; $bubble->update(N("Warning"), formatAlaTeX(translate($state{$state}{tt}[0])) . "\n", '/usr/share/icons/mgaonline.png'); -- cgit v1.2.1 From 3832dd93cc03991cb403d27c65cc9f1f95b75faa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 3 Mar 2017 22:05:04 +0100 Subject: Log previous change --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index c8eb37ac..8a0c745d 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +- mgaapplet: Fix the systray applet not working in Plasma + o it now uses the SNI specification via the statusnotifier lib + Version 3.17 - 10 Aug 2016, Anne Nicolas - mgaapplet: -- cgit v1.2.1 From 2f4ecf3b6acad46a30c0fa73e58b34291f3e7322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 3 Mar 2017 22:46:28 +0100 Subject: Install and use SVG icons by default Move the mgaonline icon in the hicolor theme with the proper SVG variant installed too. Also fixed a typo in a rpmdrake icon and updated copyright year. --- Makefile | 15 ++- NEWS | 1 + data/icons/bugfix.svg | 260 +++++++++++++++++++++++++++++++++++++++++++ data/icons/bundle.svg | 264 +++++++++++++++++++++++++++++++++++++++++++ data/icons/busy.svg | 219 ++++++++++++++++++++++++++++++++++++ data/icons/disabled.svg | 216 ++++++++++++++++++++++++++++++++++++ data/icons/disconnect.svg | 216 ++++++++++++++++++++++++++++++++++++ data/icons/noconf.svg | 235 +++++++++++++++++++++++++++++++++++++++ data/icons/okay.svg | 220 ++++++++++++++++++++++++++++++++++++ data/icons/updates.svg | 271 +++++++++++++++++++++++++++++++++++++++++++++ mgaapplet | 12 +- mgaapplet-upgrade-helper | 2 +- mgaapplet_gui.pm | 2 +- mgaonline.pm | 2 +- pixmaps/bugfix.png | Bin 1072 -> 0 bytes pixmaps/bundle.png | Bin 1072 -> 0 bytes pixmaps/busy.png | Bin 1020 -> 0 bytes pixmaps/disabled.png | Bin 723 -> 0 bytes pixmaps/disconnect.png | Bin 696 -> 0 bytes pixmaps/enhancement.png | Bin 1094 -> 0 bytes pixmaps/noconf.png | Bin 930 -> 0 bytes pixmaps/okay.png | Bin 978 -> 0 bytes pixmaps/svg/bugfix.svg | 260 ------------------------------------------- pixmaps/svg/bundle.svg | 264 ------------------------------------------- pixmaps/svg/busy.svg | 219 ------------------------------------ pixmaps/svg/disabled.svg | 216 ------------------------------------ pixmaps/svg/disconnect.svg | 216 ------------------------------------ pixmaps/svg/noconf.svg | 235 --------------------------------------- pixmaps/svg/okay.svg | 220 ------------------------------------ pixmaps/svg/updates.svg | 271 --------------------------------------------- pixmaps/updates.png | Bin 861 -> 0 bytes 31 files changed, 1920 insertions(+), 1916 deletions(-) create mode 100644 data/icons/bugfix.svg create mode 100644 data/icons/bundle.svg create mode 100644 data/icons/busy.svg create mode 100644 data/icons/disabled.svg create mode 100644 data/icons/disconnect.svg create mode 100644 data/icons/noconf.svg create mode 100644 data/icons/okay.svg create mode 100644 data/icons/updates.svg delete mode 100644 pixmaps/bugfix.png delete mode 100644 pixmaps/bundle.png delete mode 100644 pixmaps/busy.png delete mode 100644 pixmaps/disabled.png delete mode 100644 pixmaps/disconnect.png delete mode 100644 pixmaps/enhancement.png delete mode 100644 pixmaps/noconf.png delete mode 100644 pixmaps/okay.png delete mode 100644 pixmaps/svg/bugfix.svg delete mode 100644 pixmaps/svg/bundle.svg delete mode 100644 pixmaps/svg/busy.svg delete mode 100644 pixmaps/svg/disabled.svg delete mode 100644 pixmaps/svg/disconnect.svg delete mode 100644 pixmaps/svg/noconf.svg delete mode 100644 pixmaps/svg/okay.svg delete mode 100644 pixmaps/svg/updates.svg delete mode 100644 pixmaps/updates.png diff --git a/Makefile b/Makefile index d0b19192..c7ead352 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,8 @@ SUBDIRS = po polkit PREFIX = / DATADIR = $(PREFIX)/usr/share +PKGDATADIR = $(DATADIR)/$(NAME) ICONSDIR = $(DATADIR)/icons -PIXDIR = $(DATADIR)/$(NAME) LIBEXECDIR = $(PREFIX)/usr/libexec BINDIR = $(PREFIX)/usr/bin FBLIBDIR = $(PREFIX)/usr/lib/libDrakX/drakfirsttime @@ -30,15 +30,18 @@ clean: find . -name '*~' | xargs rm -f install: all - install -d $(PREFIX)/usr/{bin,libexec,share/{mime/packages,$(NAME)/pixmaps,autostart,gnome/autostart,icons/{mini,large}},lib/libDrakX/drakfirsttime} + install -d $(PREFIX)/usr/{bin,libexec,share/{mime/packages,$(NAME)/icons,autostart,gnome/autostart,icons},lib/libDrakX/drakfirsttime} install -m755 $(MGAUPDATE) $(MGAAPPLET)-config $(MGAAPPLET)-upgrade-helper $(LIBEXECDIR) install -m755 $(MGAAPPLET) $(MGAAPPLET)-update-checker $(BINDIR) install -d $(SYSCONFDIR) install -m644 mgaapplet.conf $(SYSCONFDIR)/mgaapplet - install -m644 icons/$(NAME)16.png $(ICONSDIR)/mini/$(NAME).png - install -m644 icons/$(NAME)32.png $(ICONSDIR)/$(NAME).png - install -m644 icons/$(NAME)48.png $(ICONSDIR)/large/$(NAME).png - install -m644 pixmaps/*.png $(PIXDIR)/pixmaps + install -D -m644 icons/$(NAME)16.png $(ICONSDIR)/hicolor/16x16/apps/$(NAME).png + install -D -m644 icons/$(NAME)32.png $(ICONSDIR)/hicolor/32x32/apps/$(NAME).png + install -D -m644 icons/$(NAME)48.png $(ICONSDIR)/hicolor/48x48/apps/$(NAME).png + install -D -m644 icons/$(NAME).svg $(ICONSDIR)/hicolor/scalable/apps/$(NAME).png + # Compat symlink, to be sure we don't break external apps relying on this icon + ln -s $(ICONSDIR)/hicolor/32x32/apps/$(NAME).png $(ICONSDIR)/$(NAME).png + install -m644 data/icons/*.svg $(PKGDATADIR)/icons perl -pi -e "s/version = 1/version = '$(VERSION)'/" mgaonline.pm install -m644 mgaonline.pm $(FBLIBDIR) install -m644 mgaapplet.pm $(FBLIBDIR) diff --git a/NEWS b/NEWS index 8a0c745d..a607b843 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ +- install and use SVG icons by default - mgaapplet: Fix the systray applet not working in Plasma o it now uses the SNI specification via the statusnotifier lib diff --git a/data/icons/bugfix.svg b/data/icons/bugfix.svg new file mode 100644 index 00000000..760d3e8c --- /dev/null +++ b/data/icons/bugfix.svg @@ -0,0 +1,260 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/data/icons/bundle.svg b/data/icons/bundle.svg new file mode 100644 index 00000000..55c703df --- /dev/null +++ b/data/icons/bundle.svg @@ -0,0 +1,264 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/data/icons/busy.svg b/data/icons/busy.svg new file mode 100644 index 00000000..02591187 --- /dev/null +++ b/data/icons/busy.svg @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/data/icons/disabled.svg b/data/icons/disabled.svg new file mode 100644 index 00000000..8453f8fb --- /dev/null +++ b/data/icons/disabled.svg @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/data/icons/disconnect.svg b/data/icons/disconnect.svg new file mode 100644 index 00000000..a904ea83 --- /dev/null +++ b/data/icons/disconnect.svg @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/data/icons/noconf.svg b/data/icons/noconf.svg new file mode 100644 index 00000000..e0209c03 --- /dev/null +++ b/data/icons/noconf.svg @@ -0,0 +1,235 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/data/icons/okay.svg b/data/icons/okay.svg new file mode 100644 index 00000000..9a16755d --- /dev/null +++ b/data/icons/okay.svg @@ -0,0 +1,220 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/data/icons/updates.svg b/data/icons/updates.svg new file mode 100644 index 00000000..519c2aaa --- /dev/null +++ b/data/icons/updates.svg @@ -0,0 +1,271 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/mgaapplet b/mgaapplet index f979b61d..4b7d3a47 100755 --- a/mgaapplet +++ b/mgaapplet @@ -42,7 +42,7 @@ use Net::DBus qw(:typing); use Rpmdrake::open_db; use Glib::Object::Introspection; -use constant IMAGE_FOLDER => '/usr/share/mgaonline/pixmaps/'; +use constant IMAGE_FOLDER => '/usr/share/mgaonline/icons/'; Glib::Object::Introspection->setup( basename => 'StatusNotifier', @@ -177,7 +177,7 @@ my %actions = ( 'upgrade_distro' => { name => N("Upgrade the system"), launch => \&upgrade }, ); -my $icon = StatusNotifier::Notifier->new_from_icon_name('mgaapplet', 'STATUS_NOTIFIER_CATEGORY_APPLICATION_STATUS', '/usr/share/icons/mgaonline.png'); +my $icon = StatusNotifier::Notifier->new_from_icon_name('mgaapplet', 'STATUS_NOTIFIER_CATEGORY_APPLICATION_STATUS', '/usr/share/icons/hicolor/scalable/apps/mgaonline.svg'); $icon->set_title('mgaapplet'); $icon->set_status('STATUS_NOTIFIER_STATUS_ACTIVE'); $icon->register; @@ -241,7 +241,7 @@ Gtk3->main; ugtk3::exit(0); sub img { - my $file = IMAGE_FOLDER . $_[0] . '.png'; + my $file = IMAGE_FOLDER . $_[0] . '.svg'; warn "File $file not found.\n" unless -f $file; return $file; } @@ -648,9 +648,9 @@ sub about_dialog() { $url =~ s/^https:/http:/; my $w = gtknew('AboutDialog', name => N("Mageia Online %s", $ver), copyright => N("Copyright (C) %s by %s", 'Mandriva', '2001-2010') . "\n" . - N("Copyright (C) %s by %s", 'Mageia', '2010-2016'), + N("Copyright (C) %s by %s", 'Mageia', '2010-2017'), license => join('', cat_('/usr/share/common-licenses/GPL')), - icon => '/usr/share/icons/mini/mgaonline.png', + icon => '/usr/share/icons/hicolor/48x48/apps/mgaonline.png', comments => N("Mageia Online gives access to Mageia web services."), website => $url, website_label => N("Online WebSite"), @@ -692,7 +692,7 @@ sub setState { if ($state{$state}{tt}[0] && !$state{$state}{do_not_use_bubble}) { $bubble->clear_actions; $bubble->update(N("Warning"), formatAlaTeX(translate($state{$state}{tt}[0])) . "\n", - '/usr/share/icons/mgaonline.png'); + '/usr/share/icons/hicolor/scalable/apps/mgaonline.svg'); if ($state eq 'new_distribution') { $bubble->add_action('upgrade', N("More Information"), sub { upgrade() }); if ($sub_state eq 'updates') { diff --git a/mgaapplet-upgrade-helper b/mgaapplet-upgrade-helper index aff62818..24d35104 100755 --- a/mgaapplet-upgrade-helper +++ b/mgaapplet-upgrade-helper @@ -41,7 +41,7 @@ use Rpmdrake::open_db; use lang; use mgaapplet_gui qw(run_ask_credentials_dialog); -ugtk3::add_icon_path("/usr/share/mgaonline/pixmaps/"); +ugtk3::add_icon_path("/usr/share/mgaonline/icons/"); my ($log_file); my ($new_distro_version, $download_dir); diff --git a/mgaapplet_gui.pm b/mgaapplet_gui.pm index 247bd1f1..11190453 100644 --- a/mgaapplet_gui.pm +++ b/mgaapplet_gui.pm @@ -53,7 +53,7 @@ use interactive; use interactive::gtk; use lib qw(/usr/lib/libDrakX/drakfirsttime); -ugtk3::add_icon_path("/usr/share/mgaonline/pixmaps/"); +ugtk3::add_icon_path("/usr/share/mgaonline/icons/"); our $localdir = "$ENV{HOME}/.MgaOnline"; our $localfile = "$localdir/mgaonline"; diff --git a/mgaonline.pm b/mgaonline.pm index 99fcd56f..7659431f 100644 --- a/mgaonline.pm +++ b/mgaonline.pm @@ -139,7 +139,7 @@ sub fork_exec { sub get_banner_icon() { find { -e $_ } - qw(/usr/share/mcc/themes/default/rpmdrake-mga.png /usr/share/icons/large/mgaonline.png); + qw(/usr/share/mcc/themes/default/rpmdrake-mdk.png /usr/share/icons/hicolor/48x48/apps/mgaonline.png); } sub get_banner { diff --git a/pixmaps/bugfix.png b/pixmaps/bugfix.png deleted file mode 100644 index 6fa2f737..00000000 Binary files a/pixmaps/bugfix.png and /dev/null differ diff --git a/pixmaps/bundle.png b/pixmaps/bundle.png deleted file mode 100644 index b57e4f2f..00000000 Binary files a/pixmaps/bundle.png and /dev/null differ diff --git a/pixmaps/busy.png b/pixmaps/busy.png deleted file mode 100644 index 2361f464..00000000 Binary files a/pixmaps/busy.png and /dev/null differ diff --git a/pixmaps/disabled.png b/pixmaps/disabled.png deleted file mode 100644 index 5bc469c6..00000000 Binary files a/pixmaps/disabled.png and /dev/null differ diff --git a/pixmaps/disconnect.png b/pixmaps/disconnect.png deleted file mode 100644 index 0a12fae9..00000000 Binary files a/pixmaps/disconnect.png and /dev/null differ diff --git a/pixmaps/enhancement.png b/pixmaps/enhancement.png deleted file mode 100644 index a1792116..00000000 Binary files a/pixmaps/enhancement.png and /dev/null differ diff --git a/pixmaps/noconf.png b/pixmaps/noconf.png deleted file mode 100644 index ce7b65d1..00000000 Binary files a/pixmaps/noconf.png and /dev/null differ diff --git a/pixmaps/okay.png b/pixmaps/okay.png deleted file mode 100644 index 8a284dba..00000000 Binary files a/pixmaps/okay.png and /dev/null differ diff --git a/pixmaps/svg/bugfix.svg b/pixmaps/svg/bugfix.svg deleted file mode 100644 index 760d3e8c..00000000 --- a/pixmaps/svg/bugfix.svg +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/pixmaps/svg/bundle.svg b/pixmaps/svg/bundle.svg deleted file mode 100644 index 55c703df..00000000 --- a/pixmaps/svg/bundle.svg +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - diff --git a/pixmaps/svg/busy.svg b/pixmaps/svg/busy.svg deleted file mode 100644 index 02591187..00000000 --- a/pixmaps/svg/busy.svg +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/pixmaps/svg/disabled.svg b/pixmaps/svg/disabled.svg deleted file mode 100644 index 8453f8fb..00000000 --- a/pixmaps/svg/disabled.svg +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/pixmaps/svg/disconnect.svg b/pixmaps/svg/disconnect.svg deleted file mode 100644 index a904ea83..00000000 --- a/pixmaps/svg/disconnect.svg +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/pixmaps/svg/noconf.svg b/pixmaps/svg/noconf.svg deleted file mode 100644 index e0209c03..00000000 --- a/pixmaps/svg/noconf.svg +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff --git a/pixmaps/svg/okay.svg b/pixmaps/svg/okay.svg deleted file mode 100644 index 9a16755d..00000000 --- a/pixmaps/svg/okay.svg +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/pixmaps/svg/updates.svg b/pixmaps/svg/updates.svg deleted file mode 100644 index 519c2aaa..00000000 --- a/pixmaps/svg/updates.svg +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/pixmaps/updates.png b/pixmaps/updates.png deleted file mode 100644 index 85376e71..00000000 Binary files a/pixmaps/updates.png and /dev/null differ -- cgit v1.2.1 From 0faef1449d6718b06b5dc1c2d43de86e91e867a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 4 Mar 2017 13:21:28 +0100 Subject: Move icons to hicolor theme (WIP) The transition is not complete, mgaapplet still needs fixed to lookup the icons in the theme paths and no in a hardcoded /usr/share/mgaonline --- Makefile | 9 +- data/icons/bugfix.svg | 260 --------------- data/icons/bundle.svg | 264 --------------- data/icons/busy.svg | 219 ------------- data/icons/disabled.svg | 216 ------------ data/icons/disconnect.svg | 216 ------------ data/icons/noconf.svg | 235 ------------- data/icons/okay.svg | 220 ------------- data/icons/updates.svg | 271 --------------- icons/hicolor/16x16/apps/mgaonline.png | Bin 0 -> 625 bytes icons/hicolor/32x32/apps/mgaonline.png | Bin 0 -> 1327 bytes icons/hicolor/48x48/apps/mgaonline.png | Bin 0 -> 2099 bytes .../hicolor/scalable/actions/mgaonline-bugfix.svg | 260 +++++++++++++++ .../hicolor/scalable/actions/mgaonline-bundle.svg | 264 +++++++++++++++ icons/hicolor/scalable/actions/mgaonline-busy.svg | 219 +++++++++++++ .../scalable/actions/mgaonline-disabled.svg | 216 ++++++++++++ .../scalable/actions/mgaonline-disconnect.svg | 216 ++++++++++++ .../hicolor/scalable/actions/mgaonline-noconf.svg | 235 +++++++++++++ icons/hicolor/scalable/actions/mgaonline-okay.svg | 220 +++++++++++++ .../hicolor/scalable/actions/mgaonline-updates.svg | 271 +++++++++++++++ icons/hicolor/scalable/apps/mgaonline.svg | 362 +++++++++++++++++++++ icons/mgaonline.svg | 362 --------------------- icons/mgaonline16.png | Bin 625 -> 0 bytes icons/mgaonline32.png | Bin 1327 -> 0 bytes icons/mgaonline48.png | Bin 2099 -> 0 bytes mgaapplet | 1 + mgaapplet-upgrade-helper | 1 - mgaapplet_gui.pm | 2 - 28 files changed, 2266 insertions(+), 2273 deletions(-) delete mode 100644 data/icons/bugfix.svg delete mode 100644 data/icons/bundle.svg delete mode 100644 data/icons/busy.svg delete mode 100644 data/icons/disabled.svg delete mode 100644 data/icons/disconnect.svg delete mode 100644 data/icons/noconf.svg delete mode 100644 data/icons/okay.svg delete mode 100644 data/icons/updates.svg create mode 100644 icons/hicolor/16x16/apps/mgaonline.png create mode 100644 icons/hicolor/32x32/apps/mgaonline.png create mode 100644 icons/hicolor/48x48/apps/mgaonline.png create mode 100644 icons/hicolor/scalable/actions/mgaonline-bugfix.svg create mode 100644 icons/hicolor/scalable/actions/mgaonline-bundle.svg create mode 100644 icons/hicolor/scalable/actions/mgaonline-busy.svg create mode 100644 icons/hicolor/scalable/actions/mgaonline-disabled.svg create mode 100644 icons/hicolor/scalable/actions/mgaonline-disconnect.svg create mode 100644 icons/hicolor/scalable/actions/mgaonline-noconf.svg create mode 100644 icons/hicolor/scalable/actions/mgaonline-okay.svg create mode 100644 icons/hicolor/scalable/actions/mgaonline-updates.svg create mode 100644 icons/hicolor/scalable/apps/mgaonline.svg delete mode 100644 icons/mgaonline.svg delete mode 100644 icons/mgaonline16.png delete mode 100644 icons/mgaonline32.png delete mode 100644 icons/mgaonline48.png diff --git a/Makefile b/Makefile index c7ead352..d5cdc508 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,6 @@ SUBDIRS = po polkit PREFIX = / DATADIR = $(PREFIX)/usr/share -PKGDATADIR = $(DATADIR)/$(NAME) ICONSDIR = $(DATADIR)/icons LIBEXECDIR = $(PREFIX)/usr/libexec BINDIR = $(PREFIX)/usr/bin @@ -30,18 +29,14 @@ clean: find . -name '*~' | xargs rm -f install: all - install -d $(PREFIX)/usr/{bin,libexec,share/{mime/packages,$(NAME)/icons,autostart,gnome/autostart,icons},lib/libDrakX/drakfirsttime} + install -d $(PREFIX)/usr/{bin,libexec,share/{mime/packages,autostart,gnome/autostart,icons},lib/libDrakX/drakfirsttime} install -m755 $(MGAUPDATE) $(MGAAPPLET)-config $(MGAAPPLET)-upgrade-helper $(LIBEXECDIR) install -m755 $(MGAAPPLET) $(MGAAPPLET)-update-checker $(BINDIR) install -d $(SYSCONFDIR) install -m644 mgaapplet.conf $(SYSCONFDIR)/mgaapplet - install -D -m644 icons/$(NAME)16.png $(ICONSDIR)/hicolor/16x16/apps/$(NAME).png - install -D -m644 icons/$(NAME)32.png $(ICONSDIR)/hicolor/32x32/apps/$(NAME).png - install -D -m644 icons/$(NAME)48.png $(ICONSDIR)/hicolor/48x48/apps/$(NAME).png - install -D -m644 icons/$(NAME).svg $(ICONSDIR)/hicolor/scalable/apps/$(NAME).png + cp -a icons/hicolor $(ICONSDIR) # Compat symlink, to be sure we don't break external apps relying on this icon ln -s $(ICONSDIR)/hicolor/32x32/apps/$(NAME).png $(ICONSDIR)/$(NAME).png - install -m644 data/icons/*.svg $(PKGDATADIR)/icons perl -pi -e "s/version = 1/version = '$(VERSION)'/" mgaonline.pm install -m644 mgaonline.pm $(FBLIBDIR) install -m644 mgaapplet.pm $(FBLIBDIR) diff --git a/data/icons/bugfix.svg b/data/icons/bugfix.svg deleted file mode 100644 index 760d3e8c..00000000 --- a/data/icons/bugfix.svg +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/data/icons/bundle.svg b/data/icons/bundle.svg deleted file mode 100644 index 55c703df..00000000 --- a/data/icons/bundle.svg +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - diff --git a/data/icons/busy.svg b/data/icons/busy.svg deleted file mode 100644 index 02591187..00000000 --- a/data/icons/busy.svg +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/data/icons/disabled.svg b/data/icons/disabled.svg deleted file mode 100644 index 8453f8fb..00000000 --- a/data/icons/disabled.svg +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/data/icons/disconnect.svg b/data/icons/disconnect.svg deleted file mode 100644 index a904ea83..00000000 --- a/data/icons/disconnect.svg +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/data/icons/noconf.svg b/data/icons/noconf.svg deleted file mode 100644 index e0209c03..00000000 --- a/data/icons/noconf.svg +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff --git a/data/icons/okay.svg b/data/icons/okay.svg deleted file mode 100644 index 9a16755d..00000000 --- a/data/icons/okay.svg +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/data/icons/updates.svg b/data/icons/updates.svg deleted file mode 100644 index 519c2aaa..00000000 --- a/data/icons/updates.svg +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/icons/hicolor/16x16/apps/mgaonline.png b/icons/hicolor/16x16/apps/mgaonline.png new file mode 100644 index 00000000..1e376758 Binary files /dev/null and b/icons/hicolor/16x16/apps/mgaonline.png differ diff --git a/icons/hicolor/32x32/apps/mgaonline.png b/icons/hicolor/32x32/apps/mgaonline.png new file mode 100644 index 00000000..5dabbcab Binary files /dev/null and b/icons/hicolor/32x32/apps/mgaonline.png differ diff --git a/icons/hicolor/48x48/apps/mgaonline.png b/icons/hicolor/48x48/apps/mgaonline.png new file mode 100644 index 00000000..bb9df771 Binary files /dev/null and b/icons/hicolor/48x48/apps/mgaonline.png differ diff --git a/icons/hicolor/scalable/actions/mgaonline-bugfix.svg b/icons/hicolor/scalable/actions/mgaonline-bugfix.svg new file mode 100644 index 00000000..760d3e8c --- /dev/null +++ b/icons/hicolor/scalable/actions/mgaonline-bugfix.svg @@ -0,0 +1,260 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/icons/hicolor/scalable/actions/mgaonline-bundle.svg b/icons/hicolor/scalable/actions/mgaonline-bundle.svg new file mode 100644 index 00000000..55c703df --- /dev/null +++ b/icons/hicolor/scalable/actions/mgaonline-bundle.svg @@ -0,0 +1,264 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/icons/hicolor/scalable/actions/mgaonline-busy.svg b/icons/hicolor/scalable/actions/mgaonline-busy.svg new file mode 100644 index 00000000..02591187 --- /dev/null +++ b/icons/hicolor/scalable/actions/mgaonline-busy.svg @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/icons/hicolor/scalable/actions/mgaonline-disabled.svg b/icons/hicolor/scalable/actions/mgaonline-disabled.svg new file mode 100644 index 00000000..8453f8fb --- /dev/null +++ b/icons/hicolor/scalable/actions/mgaonline-disabled.svg @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/icons/hicolor/scalable/actions/mgaonline-disconnect.svg b/icons/hicolor/scalable/actions/mgaonline-disconnect.svg new file mode 100644 index 00000000..a904ea83 --- /dev/null +++ b/icons/hicolor/scalable/actions/mgaonline-disconnect.svg @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/icons/hicolor/scalable/actions/mgaonline-noconf.svg b/icons/hicolor/scalable/actions/mgaonline-noconf.svg new file mode 100644 index 00000000..e0209c03 --- /dev/null +++ b/icons/hicolor/scalable/actions/mgaonline-noconf.svg @@ -0,0 +1,235 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/icons/hicolor/scalable/actions/mgaonline-okay.svg b/icons/hicolor/scalable/actions/mgaonline-okay.svg new file mode 100644 index 00000000..9a16755d --- /dev/null +++ b/icons/hicolor/scalable/actions/mgaonline-okay.svg @@ -0,0 +1,220 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/icons/hicolor/scalable/actions/mgaonline-updates.svg b/icons/hicolor/scalable/actions/mgaonline-updates.svg new file mode 100644 index 00000000..519c2aaa --- /dev/null +++ b/icons/hicolor/scalable/actions/mgaonline-updates.svg @@ -0,0 +1,271 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/icons/hicolor/scalable/apps/mgaonline.svg b/icons/hicolor/scalable/apps/mgaonline.svg new file mode 100644 index 00000000..71ec37ae --- /dev/null +++ b/icons/hicolor/scalable/apps/mgaonline.svg @@ -0,0 +1,362 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icons/mgaonline.svg b/icons/mgaonline.svg deleted file mode 100644 index 71ec37ae..00000000 --- a/icons/mgaonline.svg +++ /dev/null @@ -1,362 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - diff --git a/icons/mgaonline16.png b/icons/mgaonline16.png deleted file mode 100644 index 1e376758..00000000 Binary files a/icons/mgaonline16.png and /dev/null differ diff --git a/icons/mgaonline32.png b/icons/mgaonline32.png deleted file mode 100644 index 5dabbcab..00000000 Binary files a/icons/mgaonline32.png and /dev/null differ diff --git a/icons/mgaonline48.png b/icons/mgaonline48.png deleted file mode 100644 index bb9df771..00000000 Binary files a/icons/mgaonline48.png and /dev/null differ diff --git a/mgaapplet b/mgaapplet index 4b7d3a47..db76ba17 100755 --- a/mgaapplet +++ b/mgaapplet @@ -42,6 +42,7 @@ use Net::DBus qw(:typing); use Rpmdrake::open_db; use Glib::Object::Introspection; +# FIXME: Icon lookup should be done in hicolor theme use constant IMAGE_FOLDER => '/usr/share/mgaonline/icons/'; Glib::Object::Introspection->setup( diff --git a/mgaapplet-upgrade-helper b/mgaapplet-upgrade-helper index 24d35104..9a6d516a 100755 --- a/mgaapplet-upgrade-helper +++ b/mgaapplet-upgrade-helper @@ -41,7 +41,6 @@ use Rpmdrake::open_db; use lang; use mgaapplet_gui qw(run_ask_credentials_dialog); -ugtk3::add_icon_path("/usr/share/mgaonline/icons/"); my ($log_file); my ($new_distro_version, $download_dir); diff --git a/mgaapplet_gui.pm b/mgaapplet_gui.pm index 11190453..75e09fca 100644 --- a/mgaapplet_gui.pm +++ b/mgaapplet_gui.pm @@ -53,8 +53,6 @@ use interactive; use interactive::gtk; use lib qw(/usr/lib/libDrakX/drakfirsttime); -ugtk3::add_icon_path("/usr/share/mgaonline/icons/"); - our $localdir = "$ENV{HOME}/.MgaOnline"; our $localfile = "$localdir/mgaonline"; -- cgit v1.2.1 From 2f868df9f35ab4658451bd6eadac5682f796b21f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Sat, 4 Mar 2017 16:15:02 +0100 Subject: Follow more closely the spec about filenames and their location --- mgaapplet | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/mgaapplet b/mgaapplet index db76ba17..991ac77f 100755 --- a/mgaapplet +++ b/mgaapplet @@ -42,9 +42,6 @@ use Net::DBus qw(:typing); use Rpmdrake::open_db; use Glib::Object::Introspection; -# FIXME: Icon lookup should be done in hicolor theme -use constant IMAGE_FOLDER => '/usr/share/mgaonline/icons/'; - Glib::Object::Introspection->setup( basename => 'StatusNotifier', version => '0.1', @@ -178,7 +175,7 @@ my %actions = ( 'upgrade_distro' => { name => N("Upgrade the system"), launch => \&upgrade }, ); -my $icon = StatusNotifier::Notifier->new_from_icon_name('mgaapplet', 'STATUS_NOTIFIER_CATEGORY_APPLICATION_STATUS', '/usr/share/icons/hicolor/scalable/apps/mgaonline.svg'); +my $icon = StatusNotifier::Notifier->new_from_icon_name('mgaapplet', 'STATUS_NOTIFIER_CATEGORY_APPLICATION_STATUS', 'mgaonline'); $icon->set_title('mgaapplet'); $icon->set_status('STATUS_NOTIFIER_STATUS_ACTIVE'); $icon->register; @@ -241,12 +238,6 @@ Gtk3->main; ugtk3::exit(0); -sub img { - my $file = IMAGE_FOLDER . $_[0] . '.svg'; - warn "File $file not found.\n" unless -f $file; - return $file; -} - sub gnome_shell_exit_overview() { eval { Net::DBus->session->get_service('org.gnome.Shell')->get_object('/org/gnome/Shell', 'org.freedesktop.DBus.Properties')->Set('org.gnome.Shell', 'OverviewActive', dbus_boolean(0)) }; eval { Net::DBus->session->get_service('org.gnome.Shell')->get_object('/org/gnome/Shell', 'org.gnome.Shell')->Eval('Main.messageTray._trayState==2 && Main.messageTray.toggle();') }; @@ -672,8 +663,8 @@ sub setState { my $checkme; state $previous_state; my @arr = @{$state{$state}{menu}}; - my $icon_name = img($state{$state}{colour}[0]); - $icon->set_from_icon_name('STATUS_NOTIFIER_ICON', $icon_name) if $icon_name; + my $icon_name = 'mgaonline-' . $state{$state}{colour}[0]; + $icon->set_from_icon_name('STATUS_NOTIFIER_ICON', $icon_name); $icon->set_tooltip($icon_name, 'mgaapplet', formatAlaTeX(translate($state{$state}{tt}[0]))); my @invisible_states = qw(delayed okay disconnected locked); -- cgit v1.2.1 From c6bf85bfde585dc1226f9daaa3748939dd40d1b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Sat, 4 Mar 2017 17:37:16 +0100 Subject: Hybrid support for both SNI (for Plasma) and GtkStatusIcon --- mgaapplet | 52 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/mgaapplet b/mgaapplet index 991ac77f..cfd44340 100755 --- a/mgaapplet +++ b/mgaapplet @@ -175,13 +175,27 @@ my %actions = ( 'upgrade_distro' => { name => N("Upgrade the system"), launch => \&upgrade }, ); -my $icon = StatusNotifier::Notifier->new_from_icon_name('mgaapplet', 'STATUS_NOTIFIER_CATEGORY_APPLICATION_STATUS', 'mgaonline'); -$icon->set_title('mgaapplet'); -$icon->set_status('STATUS_NOTIFIER_STATUS_ACTIVE'); -$icon->register; -$icon->signal_connect(context_menu => sub { - $menu->popup(undef, undef, undef, undef, 0, Gtk3::get_current_event_time()) if $menu; - }); +my ($icon, $is_plasma); +# Plasma supports SNI natively. Other DE do not. In that case, we fall back to +# the deprecated GtkStatusIcon. +if ($ENV{DESKTOP_SESSION} =~ /plasma$/i) { + $is_plasma = 1; + $icon = StatusNotifier::Notifier->new_from_icon_name('mgaapplet', 'STATUS_NOTIFIER_CATEGORY_APPLICATION_STATUS', 'mgaonline'); + $icon->set_title('mgaapplet'); + $icon->set_status('STATUS_NOTIFIER_STATUS_ACTIVE'); + $icon->register; + $icon->signal_connect(context_menu => sub { + $menu->popup(undef, undef, undef, undef, 0, Gtk3::get_current_event_time()) if $menu; + }); +} +else { + $icon = Gtk3::StatusIcon->new; + $icon->signal_connect(popup_menu => sub { + my ($_icon, $button, $time) = @_; + $menu->popup(undef, undef, undef, undef, $button, $time) if $menu; + }); +} + $icon->signal_connect(activate => sub { my %click_actions = ( no_update_medium => \&add_media, @@ -197,7 +211,7 @@ $icon->signal_connect(activate => sub { } $click_actions{$action}->() if ref $click_actions{$action}; - }); + }); foreach my $opt (@ARGV) { if (member($opt, qw(--force -f))) { setAutoStart('TRUE') } if ($opt =~ /--(rpm-root|urpmi-root)=(.*)/) { @@ -491,7 +505,7 @@ sub no_more_supported() { if ($choice eq 'upgrade') { really_confirm_upgrade() and real_upgrade(); } elsif ($choice eq 'nothing') { - $icon->set_status('STATUS_NOTIFIER_STATUS_PASSIVE'); + $is_plasma ? $icon->set_status('STATUS_NOTIFIER_STATUS_PASSIVE') : $icon->set_visible(0); } undef $no_more_supported_wip; } @@ -664,17 +678,25 @@ sub setState { state $previous_state; my @arr = @{$state{$state}{menu}}; my $icon_name = 'mgaonline-' . $state{$state}{colour}[0]; - $icon->set_from_icon_name('STATUS_NOTIFIER_ICON', $icon_name); - $icon->set_tooltip($icon_name, 'mgaapplet', formatAlaTeX(translate($state{$state}{tt}[0]))); - my @invisible_states = qw(delayed okay disconnected locked); + if ($is_plasma) { + $icon->set_from_icon_name('STATUS_NOTIFIER_ICON', $icon_name); + $icon->set_tooltip($icon_name, 'mgaapplet', formatAlaTeX(translate($state{$state}{tt}[0]))); + } + else { + $icon_name = "/usr/share/icons/hicolor/scalable/actions/${icon_name}.svg"; + $icon->set_from_pixbuf(gtkcreate_pixbuf($icon_name)); + $icon->set_tooltip_text(formatAlaTeX(translate($state{$state}{tt}[0]))); + } + my @invisible_states = qw(delayed okay disconnected locked); # do not show icon while checking if previously hidden: if (member($state, @invisible_states) - or $state eq 'busy' && member($previous_state, @invisible_states)) { - $icon->set_status('STATUS_NOTIFIER_STATUS_PASSIVE'); + or $state eq 'busy' && member($previous_state, @invisible_states)) + { + $is_plasma ? $icon->set_status('STATUS_NOTIFIER_STATUS_PASSIVE') : $icon->set_visible(0); } else { - $icon->set_status('STATUS_NOTIFIER_STATUS_ACTIVE'); + $is_plasma ? $icon->set_status('STATUS_NOTIFIER_STATUS_ACTIVE') : $icon->set_visible(1); } $previous_state = $state; -- cgit v1.2.1 From 6ea9e1d86cffb729775aa429310302b93cace2a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Sat, 4 Mar 2017 19:34:21 +0100 Subject: When --testing is passed to mgaapplet, always show the status icon --- mgaapplet | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mgaapplet b/mgaapplet index cfd44340..b4e9cec3 100755 --- a/mgaapplet +++ b/mgaapplet @@ -690,9 +690,7 @@ sub setState { my @invisible_states = qw(delayed okay disconnected locked); # do not show icon while checking if previously hidden: - if (member($state, @invisible_states) - or $state eq 'busy' && member($previous_state, @invisible_states)) - { + if (!$::testing && (member($state, @invisible_states) or $state eq 'busy' && member($previous_state, @invisible_states))) { $is_plasma ? $icon->set_status('STATUS_NOTIFIER_STATUS_PASSIVE') : $icon->set_visible(0); } else { -- cgit v1.2.1 From f271da656cf19b917c28e8b04e031be55f8bc22d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 5 Mar 2017 12:32:52 +0100 Subject: Document previous commits --- NEWS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NEWS b/NEWS index a607b843..10343294 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,11 @@ - install and use SVG icons by default + o they are now installed in the standard hicolor theme, so that they + can be used without hardcoding paths - mgaapplet: Fix the systray applet not working in Plasma o it now uses the SNI specification via the statusnotifier lib + for Plasma only; other DEs keep using the previous code with + GtkStatusIcon (which is not supported in Plasma) + o always show the status icon when passing --testing Version 3.17 - 10 Aug 2016, Anne Nicolas -- cgit v1.2.1