Merge lp:~david4dev/dmedia/fix-672256 into lp:dmedia

Proposed by David Green
Status: Merged
Merged at revision: 115
Proposed branch: lp:~david4dev/dmedia/fix-672256
Merge into: lp:dmedia
Diff against target: 198 lines (+164/-1)
4 files modified
dmedia-import (+78/-0)
dmedia-import.desktop (+9/-0)
dmedia.svg (+69/-0)
setup.py (+8/-1)
To merge this branch: bzr merge lp:~david4dev/dmedia/fix-672256
Reviewer Review Type Date Requested Status
Jason Gerard DeRose Approve
Review via email: mp+41804@code.launchpad.net

Description of the change

Fixes bug #672256.

I have added a placeholder icon for dmedia so that I can use it in the .desktop file. It is intended that someone good at icon design will replace this with a proper icon.

Once installed (using setup.py), `sudo update-desktop-database` needs to be run for Nautilus to see dmedia-import as a media handler.

To post a comment you must log in.
Revision history for this message
Jason Gerard DeRose (jderose) wrote :

Thanks, David, you're a machine! I'm pretty sure update-desktop-database will run automatically when the .deb is installed, but I'll make sure that works.

review: Approve
Revision history for this message
Jason Gerard DeRose (jderose) wrote :

Okay, confirmed that update-desktop-database does indeed run automatically when the .deb is installed, so your place holder should be up and running in the next daily build (I just requested a build). Package version will be 0.2.0~bzr116~maverick1 (or ~lucid1).

By the way, are you developing under Lucid, Maverick, or Natty? The Natty dailies currently aren't working (Launchpad issue), but hopefully they will be soon.

Thanks again!

Revision history for this message
David Green (david4dev) wrote :

I'm developing on Maverick.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'dmedia-import'
2--- dmedia-import 1970-01-01 00:00:00 +0000
3+++ dmedia-import 2010-11-24 22:55:15 +0000
4@@ -0,0 +1,78 @@
5+#!/usr/bin/env python
6+
7+# Authors:
8+# David Green <david4dev@gmail.com>
9+#
10+# dmedia: distributed media library
11+# Copyright (C) 2010 Jason Gerard DeRose <jderose@novacut.com>
12+#
13+# This file is part of `dmedia`.
14+#
15+# `dmedia` is free software: you can redistribute it and/or modify it under the
16+# terms of the GNU Affero General Public License as published by the Free
17+# Software Foundation, either version 3 of the License, or (at your option) any
18+# later version.
19+#
20+# `dmedia` is distributed in the hope that it will be useful, but WITHOUT ANY
21+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
22+# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
23+# details.
24+#
25+# You should have received a copy of the GNU Affero General Public License along
26+# with `dmedia`. If not, see <http://www.gnu.org/licenses/>.
27+
28+#This is a placeholder file for the dmedia importer.
29+
30+import gtk
31+import gettext
32+_ = gettext.gettext
33+import sys
34+
35+
36+class ImporterGUI(gtk.Window):
37+ def __init__(self):
38+ super(ImporterGUI, self).__init__()
39+
40+ self.set_title(_('dmedia Media Importer'))
41+ self.resize(500, 500)
42+
43+ self.add_content()
44+
45+ self.connect_signals()
46+
47+
48+ def add_content(self):
49+ self.container = gtk.HBox()
50+
51+ self.label = gtk.Label(_('This will become the dmedia importer.'))
52+ self.label.show()
53+
54+ self.container.add(self.label)
55+ self.label.show()
56+ self.container.show()
57+ self.add(self.container)
58+
59+
60+ def connect_signals(self):
61+ self.connect("delete_event", self.delete_event)
62+ self.connect("destroy", self.destroy)
63+
64+
65+ def destroy(self, widget, data=None):
66+ gtk.main_quit()
67+
68+
69+ def delete_event(self, widget, event, data=None):
70+ return False
71+
72+
73+ def go(self, args=[]):
74+ self.label.set_text(self.label.get_text() + "\n\n" + ', '.join(args))
75+ self.show_all()
76+ gtk.main()
77+
78+
79+
80+if __name__ == '__main__':
81+ app = ImporterGUI()
82+ app.go(args=sys.argv)
83
84=== added file 'dmedia-import.desktop'
85--- dmedia-import.desktop 1970-01-01 00:00:00 +0000
86+++ dmedia-import.desktop 2010-11-24 22:55:15 +0000
87@@ -0,0 +1,9 @@
88+[Desktop Entry]
89+Name=Dmedia Media Importer
90+GenericName=Media Importer
91+Comment=Import media files into the dmedia library
92+Exec=dmedia-import %U
93+Icon=dmedia
94+Terminal=false
95+Type=Application
96+MimeType=x-content/image-dcf;x-content/audio-player;x-content/video-dvd;x-content/image-picturecd
97
98=== added file 'dmedia.svg'
99--- dmedia.svg 1970-01-01 00:00:00 +0000
100+++ dmedia.svg 2010-11-24 22:55:15 +0000
101@@ -0,0 +1,69 @@
102+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
103+<!-- Created with Inkscape (http://www.inkscape.org/) -->
104+
105+<svg
106+ xmlns:dc="http://purl.org/dc/elements/1.1/"
107+ xmlns:cc="http://creativecommons.org/ns#"
108+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
109+ xmlns:svg="http://www.w3.org/2000/svg"
110+ xmlns="http://www.w3.org/2000/svg"
111+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
112+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
113+ width="48px"
114+ height="48px"
115+ id="svg2985"
116+ version="1.1"
117+ inkscape:version="0.48.0 r9654"
118+ sodipodi:docname="New document 2">
119+ <defs
120+ id="defs2987" />
121+ <sodipodi:namedview
122+ id="base"
123+ pagecolor="#ffffff"
124+ bordercolor="#666666"
125+ borderopacity="1.0"
126+ inkscape:pageopacity="0.0"
127+ inkscape:pageshadow="2"
128+ inkscape:zoom="7"
129+ inkscape:cx="75.747768"
130+ inkscape:cy="24"
131+ inkscape:current-layer="layer1"
132+ showgrid="true"
133+ inkscape:grid-bbox="true"
134+ inkscape:document-units="px"
135+ inkscape:window-width="1280"
136+ inkscape:window-height="776"
137+ inkscape:window-x="0"
138+ inkscape:window-y="24"
139+ inkscape:window-maximized="1" />
140+ <metadata
141+ id="metadata2990">
142+ <rdf:RDF>
143+ <cc:Work
144+ rdf:about="">
145+ <dc:format>image/svg+xml</dc:format>
146+ <dc:type
147+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
148+ <dc:title></dc:title>
149+ </cc:Work>
150+ </rdf:RDF>
151+ </metadata>
152+ <g
153+ id="layer1"
154+ inkscape:label="Layer 1"
155+ inkscape:groupmode="layer">
156+ <text
157+ xml:space="preserve"
158+ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
159+ x="-24.896765"
160+ y="38.196884"
161+ id="text3348"
162+ sodipodi:linespacing="125%"
163+ transform="matrix(0.75159621,-0.65962348,0.65962348,0.75159621,0,0)"><tspan
164+ sodipodi:role="line"
165+ id="tspan3350"
166+ x="-24.896765"
167+ y="38.196884"
168+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">Dmedia</tspan></text>
169+ </g>
170+</svg>
171
172=== modified file 'setup.py'
173--- setup.py 2010-11-24 03:50:51 +0000
174+++ setup.py 2010-11-24 22:55:15 +0000
175@@ -2,6 +2,7 @@
176
177 # Authors:
178 # Jason Gerard DeRose <jderose@novacut.com>
179+# David Green <david4dev@gmail.com>
180 #
181 # dmedia: distributed media library
182 # Copyright (C) 2010 Jason Gerard DeRose <jderose@novacut.com>
183@@ -100,8 +101,14 @@
184 package_data=dict(
185 dmedialib=['data/*'],
186 ),
187- scripts=['dmedia'],
188+ scripts=['dmedia', 'dmedia-import'],
189 data_files=[
190 ('share/man/man1', ['dmedia.1']),
191+ ('share/applications', ['dmedia-import.desktop']),
192+ #^ this enables Nautilus to use dmedia-import as a handler for
193+ #media devices such as cameras. `sudo update-desktop-database`
194+ #may need to run for this to show up in the Nautilus
195+ #media handling preferences.
196+ ('share/pixmaps', ['dmedia.svg']) #installs the icon
197 ],
198 )

Subscribers

People subscribed via source and target branches

to all changes: