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