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
=== added file 'dmedia-import'
--- dmedia-import 1970-01-01 00:00:00 +0000
+++ dmedia-import 2010-11-24 22:55:15 +0000
@@ -0,0 +1,78 @@
1#!/usr/bin/env python
2
3# Authors:
4# David Green <david4dev@gmail.com>
5#
6# dmedia: distributed media library
7# Copyright (C) 2010 Jason Gerard DeRose <jderose@novacut.com>
8#
9# This file is part of `dmedia`.
10#
11# `dmedia` is free software: you can redistribute it and/or modify it under the
12# terms of the GNU Affero General Public License as published by the Free
13# Software Foundation, either version 3 of the License, or (at your option) any
14# later version.
15#
16# `dmedia` is distributed in the hope that it will be useful, but WITHOUT ANY
17# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
18# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
19# details.
20#
21# You should have received a copy of the GNU Affero General Public License along
22# with `dmedia`. If not, see <http://www.gnu.org/licenses/>.
23
24#This is a placeholder file for the dmedia importer.
25
26import gtk
27import gettext
28_ = gettext.gettext
29import sys
30
31
32class ImporterGUI(gtk.Window):
33 def __init__(self):
34 super(ImporterGUI, self).__init__()
35
36 self.set_title(_('dmedia Media Importer'))
37 self.resize(500, 500)
38
39 self.add_content()
40
41 self.connect_signals()
42
43
44 def add_content(self):
45 self.container = gtk.HBox()
46
47 self.label = gtk.Label(_('This will become the dmedia importer.'))
48 self.label.show()
49
50 self.container.add(self.label)
51 self.label.show()
52 self.container.show()
53 self.add(self.container)
54
55
56 def connect_signals(self):
57 self.connect("delete_event", self.delete_event)
58 self.connect("destroy", self.destroy)
59
60
61 def destroy(self, widget, data=None):
62 gtk.main_quit()
63
64
65 def delete_event(self, widget, event, data=None):
66 return False
67
68
69 def go(self, args=[]):
70 self.label.set_text(self.label.get_text() + "\n\n" + ', '.join(args))
71 self.show_all()
72 gtk.main()
73
74
75
76if __name__ == '__main__':
77 app = ImporterGUI()
78 app.go(args=sys.argv)
079
=== added file 'dmedia-import.desktop'
--- dmedia-import.desktop 1970-01-01 00:00:00 +0000
+++ dmedia-import.desktop 2010-11-24 22:55:15 +0000
@@ -0,0 +1,9 @@
1[Desktop Entry]
2Name=Dmedia Media Importer
3GenericName=Media Importer
4Comment=Import media files into the dmedia library
5Exec=dmedia-import %U
6Icon=dmedia
7Terminal=false
8Type=Application
9MimeType=x-content/image-dcf;x-content/audio-player;x-content/video-dvd;x-content/image-picturecd
010
=== added file 'dmedia.svg'
--- dmedia.svg 1970-01-01 00:00:00 +0000
+++ dmedia.svg 2010-11-24 22:55:15 +0000
@@ -0,0 +1,69 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="48px"
13 height="48px"
14 id="svg2985"
15 version="1.1"
16 inkscape:version="0.48.0 r9654"
17 sodipodi:docname="New document 2">
18 <defs
19 id="defs2987" />
20 <sodipodi:namedview
21 id="base"
22 pagecolor="#ffffff"
23 bordercolor="#666666"
24 borderopacity="1.0"
25 inkscape:pageopacity="0.0"
26 inkscape:pageshadow="2"
27 inkscape:zoom="7"
28 inkscape:cx="75.747768"
29 inkscape:cy="24"
30 inkscape:current-layer="layer1"
31 showgrid="true"
32 inkscape:grid-bbox="true"
33 inkscape:document-units="px"
34 inkscape:window-width="1280"
35 inkscape:window-height="776"
36 inkscape:window-x="0"
37 inkscape:window-y="24"
38 inkscape:window-maximized="1" />
39 <metadata
40 id="metadata2990">
41 <rdf:RDF>
42 <cc:Work
43 rdf:about="">
44 <dc:format>image/svg+xml</dc:format>
45 <dc:type
46 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
47 <dc:title></dc:title>
48 </cc:Work>
49 </rdf:RDF>
50 </metadata>
51 <g
52 id="layer1"
53 inkscape:label="Layer 1"
54 inkscape:groupmode="layer">
55 <text
56 xml:space="preserve"
57 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"
58 x="-24.896765"
59 y="38.196884"
60 id="text3348"
61 sodipodi:linespacing="125%"
62 transform="matrix(0.75159621,-0.65962348,0.65962348,0.75159621,0,0)"><tspan
63 sodipodi:role="line"
64 id="tspan3350"
65 x="-24.896765"
66 y="38.196884"
67 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>
68 </g>
69</svg>
070
=== modified file 'setup.py'
--- setup.py 2010-11-24 03:50:51 +0000
+++ setup.py 2010-11-24 22:55:15 +0000
@@ -2,6 +2,7 @@
22
3# Authors:3# Authors:
4# Jason Gerard DeRose <jderose@novacut.com>4# Jason Gerard DeRose <jderose@novacut.com>
5# David Green <david4dev@gmail.com>
5#6#
6# dmedia: distributed media library7# dmedia: distributed media library
7# Copyright (C) 2010 Jason Gerard DeRose <jderose@novacut.com>8# Copyright (C) 2010 Jason Gerard DeRose <jderose@novacut.com>
@@ -100,8 +101,14 @@
100 package_data=dict(101 package_data=dict(
101 dmedialib=['data/*'],102 dmedialib=['data/*'],
102 ),103 ),
103 scripts=['dmedia'],104 scripts=['dmedia', 'dmedia-import'],
104 data_files=[105 data_files=[
105 ('share/man/man1', ['dmedia.1']),106 ('share/man/man1', ['dmedia.1']),
107 ('share/applications', ['dmedia-import.desktop']),
108 #^ this enables Nautilus to use dmedia-import as a handler for
109 #media devices such as cameras. `sudo update-desktop-database`
110 #may need to run for this to show up in the Nautilus
111 #media handling preferences.
112 ('share/pixmaps', ['dmedia.svg']) #installs the icon
106 ],113 ],
107)114)

Subscribers

People subscribed via source and target branches

to all changes: