summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-03-03 22:46:28 +0100
committerRémi Verschelde <rverschelde@gmail.com>2017-03-03 22:52:03 +0100
commit2f4ecf3b6acad46a30c0fa73e58b34291f3e7322 (patch)
tree5daa232282a24a2446f3f03e4e5ce08b5adb9a36
parent3832dd93cc03991cb403d27c65cc9f1f95b75faa (diff)
downloadmgaonline-2f4ecf3b6acad46a30c0fa73e58b34291f3e7322.tar
mgaonline-2f4ecf3b6acad46a30c0fa73e58b34291f3e7322.tar.gz
mgaonline-2f4ecf3b6acad46a30c0fa73e58b34291f3e7322.tar.bz2
mgaonline-2f4ecf3b6acad46a30c0fa73e58b34291f3e7322.tar.xz
mgaonline-2f4ecf3b6acad46a30c0fa73e58b34291f3e7322.zip
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.
-rw-r--r--Makefile15
-rw-r--r--NEWS1
-rw-r--r--data/icons/bugfix.svg (renamed from pixmaps/svg/bugfix.svg)0
-rw-r--r--data/icons/bundle.svg (renamed from pixmaps/svg/bundle.svg)0
-rw-r--r--data/icons/busy.svg (renamed from pixmaps/svg/busy.svg)0
-rw-r--r--data/icons/disabled.svg (renamed from pixmaps/svg/disabled.svg)0
-rw-r--r--data/icons/disconnect.svg (renamed from pixmaps/svg/disconnect.svg)0
-rw-r--r--data/icons/noconf.svg (renamed from pixmaps/svg/noconf.svg)0
-rw-r--r--data/icons/okay.svg (renamed from pixmaps/svg/okay.svg)0
-rw-r--r--data/icons/updates.svg (renamed from pixmaps/svg/updates.svg)0
-rwxr-xr-xmgaapplet12
-rwxr-xr-xmgaapplet-upgrade-helper2
-rw-r--r--mgaapplet_gui.pm2
-rw-r--r--mgaonline.pm2
-rw-r--r--pixmaps/bugfix.pngbin1072 -> 0 bytes
-rw-r--r--pixmaps/bundle.pngbin1072 -> 0 bytes
-rw-r--r--pixmaps/busy.pngbin1020 -> 0 bytes
-rw-r--r--pixmaps/disabled.pngbin723 -> 0 bytes
-rw-r--r--pixmaps/disconnect.pngbin696 -> 0 bytes
-rw-r--r--pixmaps/enhancement.pngbin1094 -> 0 bytes
-rw-r--r--pixmaps/noconf.pngbin930 -> 0 bytes
-rw-r--r--pixmaps/okay.pngbin978 -> 0 bytes
-rw-r--r--pixmaps/updates.pngbin861 -> 0 bytes
23 files changed, 19 insertions, 15 deletions
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/pixmaps/svg/bugfix.svg b/data/icons/bugfix.svg
index 760d3e8c..760d3e8c 100644
--- a/pixmaps/svg/bugfix.svg
+++ b/data/icons/bugfix.svg
diff --git a/pixmaps/svg/bundle.svg b/data/icons/bundle.svg
index 55c703df..55c703df 100644
--- a/pixmaps/svg/bundle.svg
+++ b/data/icons/bundle.svg
diff --git a/pixmaps/svg/busy.svg b/data/icons/busy.svg
index 02591187..02591187 100644
--- a/pixmaps/svg/busy.svg
+++ b/data/icons/busy.svg
diff --git a/pixmaps/svg/disabled.svg b/data/icons/disabled.svg
index 8453f8fb..8453f8fb 100644
--- a/pixmaps/svg/disabled.svg
+++ b/data/icons/disabled.svg
diff --git a/pixmaps/svg/disconnect.svg b/data/icons/disconnect.svg
index a904ea83..a904ea83 100644
--- a/pixmaps/svg/disconnect.svg
+++ b/data/icons/disconnect.svg
diff --git a/pixmaps/svg/noconf.svg b/data/icons/noconf.svg
index e0209c03..e0209c03 100644
--- a/pixmaps/svg/noconf.svg
+++ b/data/icons/noconf.svg
diff --git a/pixmaps/svg/okay.svg b/data/icons/okay.svg
index 9a16755d..9a16755d 100644
--- a/pixmaps/svg/okay.svg
+++ b/data/icons/okay.svg
diff --git a/pixmaps/svg/updates.svg b/data/icons/updates.svg
index 519c2aaa..519c2aaa 100644
--- a/pixmaps/svg/updates.svg
+++ b/data/icons/updates.svg
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
--- a/pixmaps/bugfix.png
+++ /dev/null
Binary files differ
diff --git a/pixmaps/bundle.png b/pixmaps/bundle.png
deleted file mode 100644
index b57e4f2f..00000000
--- a/pixmaps/bundle.png
+++ /dev/null
Binary files differ
diff --git a/pixmaps/busy.png b/pixmaps/busy.png
deleted file mode 100644
index 2361f464..00000000
--- a/pixmaps/busy.png
+++ /dev/null
Binary files differ
diff --git a/pixmaps/disabled.png b/pixmaps/disabled.png
deleted file mode 100644
index 5bc469c6..00000000
--- a/pixmaps/disabled.png
+++ /dev/null
Binary files differ
diff --git a/pixmaps/disconnect.png b/pixmaps/disconnect.png
deleted file mode 100644
index 0a12fae9..00000000
--- a/pixmaps/disconnect.png
+++ /dev/null
Binary files differ
diff --git a/pixmaps/enhancement.png b/pixmaps/enhancement.png
deleted file mode 100644
index a1792116..00000000
--- a/pixmaps/enhancement.png
+++ /dev/null
Binary files differ
diff --git a/pixmaps/noconf.png b/pixmaps/noconf.png
deleted file mode 100644
index ce7b65d1..00000000
--- a/pixmaps/noconf.png
+++ /dev/null
Binary files differ
diff --git a/pixmaps/okay.png b/pixmaps/okay.png
deleted file mode 100644
index 8a284dba..00000000
--- a/pixmaps/okay.png
+++ /dev/null
Binary files differ
diff --git a/pixmaps/updates.png b/pixmaps/updates.png
deleted file mode 100644
index 85376e71..00000000
--- a/pixmaps/updates.png
+++ /dev/null
Binary files differ