[pitivi] Update desktop file, use icon theme
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi] Update desktop file, use icon theme
- Date: Sun, 6 Sep 2009 07:20:21 +0000 (UTC)
commit eba58f8abbb61f9bd38eeb3b05adac9c55fe72b9
Author: Michael Terry <michael terry canonical com>
Date: Mon Jul 20 20:11:15 2009 -0400
Update desktop file, use icon theme
http://bugzilla.gnome.org/show_bug.cgi?id=520653
Makefile.am | 31 ++++++++++++++++++++++++++-----
configure.ac | 2 +-
pitivi.desktop.in.in | 14 ++++++++++++++
pitivi.spec.in | 2 +-
pitivi/ui/mainwindow.py | 6 +++---
po/POTFILES.in | 1 +
6 files changed, 46 insertions(+), 10 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 2b5b577..de5919b 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,9 +3,11 @@ AUTOMAKE_OPTIONS = dist-bzip2
SUBDIRS = bin pitivi common po tests icons
desktopdir = $(datadir)/applications
-desktop_DATA = pitivi.desktop
+desktop_in_files = pitivi.desktop.in
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+ INTLTOOL_DESKTOP_RULE@
-icondir = $(datadir)/pixmaps
+icondir = $(datadir)/icons/hicolor/48x48/apps
icon_DATA = pitivi.png
mimedir = $(datadir)/mime/packages
@@ -20,7 +22,7 @@ EXTRA_DIST = \
AUTHORS \
RELEASE \
ABOUT-NLS \
- pitivi.png \
+ $(ICON_DATA) \
pitivi.xml
@@ -30,10 +32,29 @@ DISTCLEANFILES = \
intltool-update
-EXTRA_DIST += \
+CLEANFILES = \
+ $(desktop_DATA)
+
+
+EXTRA_DIST += \
intltool-extract.in \
intltool-merge.in \
- intltool-update.in
+ intltool-update.in \
+ $(desktop_in_files)
+
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
+install-data-hook: update-icon-cache
+uinstall-hook: update-icon-cache
+update-icon-cache:
+ @-if test -z "$(DESTDIR)"; then \
+ echo "Updating Gtk icon cache."; \
+ $(gtk_update_icon_cache); \
+ else \
+ echo "*** Icon cache not updated. After (un)install, run this:"; \
+ echo "*** $(gtk_update_icon_cache)"; \
+ fi
+
locale-uninstalled:
if test -d po; then \
diff --git a/configure.ac b/configure.ac
index ae05640..71f50c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,7 +83,7 @@ pitivi/formatters/Makefile
pitivi/pixmaps/Makefile
pitivi/timeline/Makefile
pitivi.spec
-pitivi.desktop
+pitivi.desktop.in
po/Makefile.in
tests/Makefile
icons/Makefile
diff --git a/pitivi.desktop.in.in b/pitivi.desktop.in.in
new file mode 100644
index 0000000..58b3f00
--- /dev/null
+++ b/pitivi.desktop.in.in
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Encoding=UTF-8
+_Name=Pitivi Video Editor
+_Comment=Create and edit your own movies
+Exec=pitivi
+Terminal=false
+Type=Application
+Icon=pitivi
+Categories=GNOME;GTK;AudioVideo;AudioVideoEditing;
+StartupNotify=true
+X-GNOME-Bugzilla-Bugzilla=GNOME
+X-GNOME-Bugzilla-Product=pitivi
+X-GNOME-Bugzilla-Component=general
+X-GNOME-Bugzilla-Version= VERSION@
diff --git a/pitivi.spec.in b/pitivi.spec.in
index bb22325..d7706ac 100644
--- a/pitivi.spec.in
+++ b/pitivi.spec.in
@@ -43,7 +43,7 @@ PiTiVi non-linear video editor
%{_bindir}/pitivi
%{_libdir}/pitivi
%{_datadir}/pitivi/pixmaps/*
-%{_datadir}/pixmaps/pitivi.png
+%{_datadir}/icons/hicolor/48x48/apps/pitivi.png
%{_datadir}/applications/pitivi.desktop
%{_datadir}/locale
diff --git a/pitivi/ui/mainwindow.py b/pitivi/ui/mainwindow.py
index 6723432..94fa57e 100644
--- a/pitivi/ui/mainwindow.py
+++ b/pitivi/ui/mainwindow.py
@@ -435,8 +435,7 @@ class PitiviMainWindow(gtk.Window, Loggable):
ttb.props.visible = False
#application icon
- self.set_icon_from_file(get_global_pixmap_dir()
- + "/pitivi.png")
+ self.set_icon_name("pitivi")
def _connectToSourceList(self):
# FIXME: projecttabs creates the "components" but then has no API to get
@@ -617,7 +616,8 @@ class PitiviMainWindow(gtk.Window, Loggable):
abt.set_authors(authors)
abt.set_license(_("GNU Lesser General Public License\n"
"See http://www.gnu.org/copyleft/lesser.html for more details"))
- abt.set_icon_from_file(get_global_pixmap_dir() + "/pitivi.png")
+ abt.set_icon_name("pitivi")
+ abt.set_logo_icon_name("pitivi")
abt.connect("response", self._aboutResponseCb)
abt.show()
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 48bf912..ab653f8 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,7 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
# [encoding: UTF-8]
+pitivi.desktop.in.in
pitivi/check.py
pitivi/discoverer.py
pitivi/application.py
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]