Merge lp:~mblayman/entertainer/packaging-fixes into lp:entertainer

Proposed by Matt Layman
Status: Merged
Merge reported by: Paul Hummer
Merged at revision: not available
Proposed branch: lp:~mblayman/entertainer/packaging-fixes
Merge into: lp:entertainer
To merge this branch: bzr merge lp:~mblayman/entertainer/packaging-fixes
Reviewer Review Type Date Requested Status
Samuel Buffet (community) Approve
Joshua Scotton Approve
Paul Hummer Pending
Review via email: mp+1408@code.launchpad.net
To post a comment you must log in.
292. By Matt Layman

This should be a fix for the package icons not being in the correct path. Hopefully this will fix the menu icon problem.

Revision history for this message
Joshua Scotton (joshuascotton) wrote :
Download full text (5.8 KiB)

=== removed directory 'cfg/data'
=== modified file 'entertainerlib/utils/configuration.py'
--- entertainerlib/utils/configuration.py 2008-09-17 18:27:37 +0000
+++ entertainerlib/utils/configuration.py 2008-10-25 13:12:21 +0000
@@ -16,9 +16,11 @@

 from entertainerlib.utils.theme import Theme

-SOURCE_CONFIG = os.path.abspath(
- os.path.dirname(__file__) + '/../../cfg'
- )
+SOURCE_CONFIG = {
+ 'branch' : os.path.abspath(os.path.dirname(__file__) + '/../../cfg'),
+ # Hardcoded path for a package install
+ 'package' : "/usr/share/entertainer/cfg"
+ }

 class Configuration(MessageHandler):
     """
@@ -97,7 +99,15 @@
         '''
         config_dir = self.get_cfg_dir()
         try:
- shutil.copytree(SOURCE_CONFIG, config_dir)
+ # Copy configuration data from a dev branch if we can
+ if os.path.exists(SOURCE_CONFIG['branch']):
+ shutil.copytree(SOURCE_CONFIG['branch'], config_dir)
+ # Install configuration data from the hardcoded package path
+ elif os.path.exists(SOURCE_CONFIG['package']):
+ shutil.copytree(SOURCE_CONFIG['package'], config_dir)
+ else:
+ print "Couldn't find configuration data. Execution aborted."
+ sys.exit(1)
         except OSError:
             print "Couldn't copy configuration data to %s. Execution aborted." \
                 % config_dir

=== renamed directory 'cfg/data/icons' => 'icons'
=== added directory 'icons/hicolor'
=== added directory 'icons/hicolor/16x16'
=== added file 'icons/hicolor/16x16/entertainer.png'
Binary files icons/hicolor/16x16/entertainer.png 1970-01-01 00:00:00 +0000 and icons/hicolor/16x16/entertainer.png 2008-10-25 13:12:22 +0000 differ
=== renamed directory 'cfg/data/icons/24x24' => 'icons/hicolor/24x24'
=== added directory 'icons/hicolor/48x48'
=== added file 'icons/hicolor/48x48/entertainer.png'
Binary files icons/hicolor/48x48/entertainer.png 1970-01-01 00:00:00 +0000 and icons/hicolor/48x48/entertainer.png 2008-10-25 13:12:21 +0000 differ
=== renamed directory 'cfg/data/icons/scalable' => 'icons/hicolor/scalable'
=== modified file 'icons/hicolor/scalable/entertainer.svg'
--- cfg/data/icons/scalable/entertainer.svg 2008-06-06 22:54:48 +0000
+++ icons/hicolor/scalable/entertainer.svg 2008-10-25 13:12:22 +0000
@@ -15,11 +15,11 @@
    sodipodi:version="0.32"
    inkscape:version="0.46"
    version="1.0"
- sodipodi:docname="entertainer_icon.svg"
+ sodipodi:docname="entertainer.svg"
    inkscape:output_extension="org.inkscape.output.svg.inkscape"
- inkscape:export-filename="/home/matt/Desktop/magicianhat.png"
- inkscape:export-xdpi="11.675675"
- inkscape:export-ydpi="11.675675"
+ inkscape:export-filename="/home/matt/repo/config-package-fix/icons/hicolor/48x48/entertainer.png"
+ inkscape:export-xdpi="23.549999"
+ inkscape:export-ydpi="23.549999"
    style="display:inline">
   <defs
      id="defs4">
@@ -75,13 +75,6 @@
          offset="1"
          id="stop3308" />
     </linearGradient>
- <inkscape:perspective
- sodipodi:type="inkscape:persp3d"
- inkscape:vp_x="0 : 526.18109 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- ...

Read more...

Revision history for this message
Joshua Scotton (joshuascotton) wrote :

Looks good, tests and lint checks work

review: Approve
293. By Matt Layman

Fixed translations so that locale will work for a package. Needs testing though.

Revision history for this message
Matt Layman (mblayman) wrote :

Dang, you were one step ahead of me. I'm guessing you didn't see the translation stuff that I just pushed when you approved this.

294. By Matt Layman

Translation setup happens in the frontend __init__ before this sys tray class is called so I'm pretty sure that we don't need to do redundant gettext stuff here (which would require more pathing changes if we had to keep it).

Revision history for this message
Joshua Scotton (joshuascotton) wrote :

Alright, the translation changes look ok but I want sbuffet to confirm that everything is still being translated correctly in the development version before we merge this into the trunk. (as I still can't find an easy way to change locale!!)

Revision history for this message
Matt Layman (mblayman) wrote :

On Sat, Oct 25, 2008 at 12:36 PM, Joshua Scotton <email address hidden>wrote:

> Alright, the translation changes look ok but I want sbuffet to confirm that
> everything is still being translated correctly in the development version
> before we merge this into the trunk. (as I still can't find an easy way to
> change locale!!)

Samuel suggested the following on IRC, but I haven't tried it.

<sbuffet> laymansterms, maybe you can try to add import locale
locale.setlocale(locale.LC_ALL, 'FR') if you want to test

Revision history for this message
Joshua Scotton (joshuascotton) wrote :

Just tried that, it still doesn't work!

:(

Revision history for this message
Matt Layman (mblayman) wrote :

Okay, I'll send him a review request.

Revision history for this message
Samuel Buffet (samuel-buffet) wrote :

Matt,

First of all thanks to ask me for this review (first one).

Basicaly, you've fixed the config folder's creation bug and the translation bug.

@Josh I can confirm you that dev branches are still translated locally.

But the icon bug is not fixed because I've forgot the folder /apps/ on your icon tree.

You have :

... icons/hicolor/16x16/entertainer.png

and it should be

...icons/hicolor/16x16/apps/entertainer.png

same for 24x24, 48x48 ...

I'll definitly vote Approve after that small change.

Thanks a lot Matt.

Samuel,

295. By Matt Layman

Icons are moved into the correct apps directory.

296. By Matt Layman

Moved files to be under /usr/local/share instead of /usr/share because it was preventing icons from being found.

297. By Matt Layman

Fixed package_data so that the glade files will actually be created in the package.

298. By Matt Layman

Fixed all python files that use glade find their glade files a bit more dynamically so that glade files can be located after a package install.

299. By Matt Layman

Tray icon wasn't displaying because it couldn't find the icon path (since the icons were moved out of cfg data). Now it displays whether it's in a branch or installed in a package.

Revision history for this message
Matt Layman (mblayman) wrote :

Okay, gentlemen. I believe I have fixed all major blocking packaging bugs for 0.2. I've tested everything in virtualbox (just using `sudo python setup.py install`) and I believe that everything is working correctly. I'm hoping that this branch is totally done now and that you can all give the tires a good kick (Samuel, if you can test if the installed package works with translations, that would be awesome).

So, please let me know how all this looks. Maybe if we all like it and agree with it, Paul can roll it into his Debian branch, we can build a PPA, and do an official release of 0.2!

Barring some fixes that you guys might want from this branch, my activity on Entertainer will probably subside while I'm studying for the GRE test (because I need to do well enough to get into a University masters program). I'm taking the test on the 14th so my hacking on Entertainer will be fairly small until then.

Revision history for this message
Joshua Scotton (joshuascotton) wrote :

Sounds good. Good luck with the exams!

Revision history for this message
Samuel Buffet (samuel-buffet) wrote :

Thanks Matt.

*Appove*

review: Approve
Revision history for this message
Samuel Buffet (samuel-buffet) wrote :

I've just try it this evening and everything works well : icon + translations + conf folder creation.

let's go for 0.2 :)

Good luck with the GRE tes Matt.

Samuel,

Subscribers

People subscribed via source and target branches