Merge lp:~deejay1/acire/launchpad-integration into lp:acire

Proposed by Łukasz Jernaś
Status: Needs review
Proposed branch: lp:~deejay1/acire/launchpad-integration
Merge into: lp:acire
Diff against target: 76 lines (+29/-11)
2 files modified
bin/acire (+18/-0)
data/ui/AcireWindow.ui (+11/-11)
To merge this branch: bzr merge lp:~deejay1/acire/launchpad-integration
Reviewer Review Type Date Requested Status
Jono Bacon Needs Information
Review via email: mp+23151@code.launchpad.net

Description of the change

If you haven't started your rework of acire (as I can't see anything on Launchpad) you probably can merge this is.

To post a comment you must log in.
Revision history for this message
Jono Bacon (jonobacon) wrote :

Thanks for the patch, deejay! I tried it but the translate menu item takes me to a non-exist Lucid source package: can you change it so it goes straight to the upstream project?

review: Needs Information
Revision history for this message
Łukasz Jernaś (deejay1) wrote :

Hmm, looks like there's no way to specify that for the launchpad-integration script. But I think such functionality could be added to its fromDesktopFile() function which currently isn't implemented. I will write a blueprint for it as the functionality I'm currently thinking of could be even useful for fdo...

Unmerged revisions

53. By Łukasz Jernaś

Add Launchpad integration with a small help menu reorder.
(Borrowed from PyJunior)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/acire'
2--- bin/acire 2010-03-26 19:41:43 +0000
3+++ bin/acire 2010-04-10 10:40:35 +0000
4@@ -34,6 +34,14 @@
5 print "PyGtk ver. 2.3.90 or later required for FileChooserDialog, to save snippets."
6 ###/Needed to check for GTK version
7
8+# optional Launchpad integration
9+# this shouldn't crash if not found as it is simply used for bug reporting
10+try:
11+ import LaunchpadIntegration
12+ launchpad_available = True
13+except:
14+ launchpad_available = False
15+
16
17 # Check if we are working in the source tree or from the installed
18 # package and mangle the python path accordingly
19@@ -85,6 +93,16 @@
20 #self.preferences = dlg.get_preferences()
21
22 #code for other initialization actions should be added here
23+ global launchpad_available
24+ if launchpad_available:
25+ # see https://wiki.ubuntu.com/UbuntuDevelopment/Internationalisation/Coding for more information
26+ # about LaunchpadIntegration
27+ helpmenu = self.builder.get_object('helpMenu')
28+ if helpmenu:
29+ LaunchpadIntegration.set_sourcepackagename('acire')
30+ LaunchpadIntegration.add_items(helpmenu, 1, False, True)
31+ else:
32+ launchpad_available = False
33
34 # browser for grabbing docs titles
35 self.browser = Browser()
36
37=== modified file 'data/ui/AcireWindow.ui'
38--- data/ui/AcireWindow.ui 2010-03-20 22:57:40 +0000
39+++ data/ui/AcireWindow.ui 2010-04-10 10:40:35 +0000
40@@ -45,18 +45,9 @@
41 <property name="label" translatable="yes">_Help</property>
42 <property name="use_underline">True</property>
43 <child type="submenu">
44- <object class="GtkMenu" id="menu3">
45+ <object class="GtkMenu" id="helpMenu">
46 <property name="visible">True</property>
47- <child>
48- <object class="GtkImageMenuItem" id="imagemenuitem10">
49- <property name="label">gtk-about</property>
50- <property name="visible">True</property>
51- <property name="use_underline">True</property>
52- <property name="use_stock">True</property>
53- <signal name="activate" handler="about"/>
54- </object>
55- </child>
56- <child>
57+ <child>
58 <object class="GtkImageMenuItem" id="imagemenuitem1">
59 <property name="label" translatable="yes">Contribute Snippet...</property>
60 <property name="visible">True</property>
61@@ -65,6 +56,15 @@
62 <signal name="activate" handler="contribute_snippet_info"/>
63 </object>
64 </child>
65+ <child>
66+ <object class="GtkImageMenuItem" id="imagemenuitem10">
67+ <property name="label">gtk-about</property>
68+ <property name="visible">True</property>
69+ <property name="use_underline">True</property>
70+ <property name="use_stock">True</property>
71+ <signal name="activate" handler="about"/>
72+ </object>
73+ </child>
74 </object>
75 </child>
76 </object>

Subscribers

People subscribed via source and target branches