Merge lp:~pshchelo/olive/bugfix_lp632336 into lp:olive

Proposed by Pavlo Shchelokovskyy
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 696
Merged at revision: 696
Proposed branch: lp:~pshchelo/olive/bugfix_lp632336
Merge into: lp:olive
Diff against target: 158 lines (+40/-29)
5 files modified
olive/__init__.py (+4/-3)
olive/guifiles.py (+27/-21)
olive/info.py (+3/-2)
olive/window.py (+3/-2)
setup.py (+3/-1)
To merge this branch: bzr merge lp:~pshchelo/olive/bugfix_lp632336
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) code Approve
Olive Team Pending
Review via email: mp+46272@code.launchpad.net

Description of the change

added olive-specific icons and functions for handling them

To post a comment you must log in.
lp:~pshchelo/olive/bugfix_lp632336 updated
696. By Pavlo Shchelokovskyy

removed one forgotten debug line

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Thanks! Please merge.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'olive/__init__.py'
--- olive/__init__.py 2010-06-17 20:27:53 +0000
+++ olive/__init__.py 2011-02-07 09:51:34 +0000
@@ -58,7 +58,8 @@
5858
59def about():59def about():
60 """ Display the AboutDialog. """60 """ Display the AboutDialog. """
61 from bzrlib.plugins.gtk import __version__, icon_path61 from bzrlib.plugins.gtk import __version__
62 from guifiles import olive_icon_path
62 63
63 dialog = gtk.AboutDialog()64 dialog = gtk.AboutDialog()
64 dialog.set_name("Olive")65 dialog.set_name("Olive")
@@ -66,8 +67,8 @@
66 dialog.set_copyright("Copyright (C) 2006-2008 Szilveszter Farkas (Phanatic)")67 dialog.set_copyright("Copyright (C) 2006-2008 Szilveszter Farkas (Phanatic)")
67 dialog.set_website("https://launchpad.net/bzr-gtk")68 dialog.set_website("https://launchpad.net/bzr-gtk")
68 dialog.set_website_label("https://launchpad.net/bzr-gtk")69 dialog.set_website_label("https://launchpad.net/bzr-gtk")
69 dialog.set_icon_from_file(icon_path("oliveicon2.png"))70 dialog.set_icon_from_file(olive_icon_path("oliveicon2.png"))
70 dialog.set_logo(gtk.gdk.pixbuf_new_from_file(icon_path("oliveicon2.png")))71 dialog.set_logo(gtk.gdk.pixbuf_new_from_file(olive_icon_path("oliveicon2.png")))
71 dialog.set_authors([ _i18n("Lead Developer:"),72 dialog.set_authors([ _i18n("Lead Developer:"),
72 "Szilveszter Farkas <szilveszter.farkas@gmail.com>",73 "Szilveszter Farkas <szilveszter.farkas@gmail.com>",
73 _i18n("Contributors:"),74 _i18n("Contributors:"),
7475
=== modified file 'olive/guifiles.py'
--- olive/guifiles.py 2010-05-25 17:10:52 +0000
+++ olive/guifiles.py 2011-02-07 09:51:34 +0000
@@ -12,36 +12,42 @@
12# along with this program; if not, write to the Free Software12# along with this program; if not, write to the Free Software
13# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA13# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1414
15"""cmenu.ui path"""15"""cmenu.ui and icons path"""
1616
17import os17import os
18import sys18import sys
1919
20from bzrlib.plugins.gtk import _i18n20from bzrlib.plugins.gtk import _i18n
2121
22UIFILENAMES = ["/usr/share/olive/cmenu.ui",22def olive_data_basedirs():
23 "/usr/local/share/olive/cmenu.ui",23 _dir=os.path.dirname(__file__)
24 "/opt/share/olive/cmenu.ui",24 return [_dir,
25 "/opt/local/share/olive/cmenu.ui",25 os.path.dirname(_dir),
26 "~/share/olive/cmenu.ui",26 os.path.expanduser("~/share/olive"),
27 ]27 "/usr/share/olive",
28 "/usr/local/share/olive",
29 "/opt/share/olive",
30 "/opt/local/share/olive",
31 ]
32
33def olive_data_path(*args):
34 for basedir in olive_data_basedirs():
35 path = os.path.join(basedir, *args)
36 if os.path.exists(path):
37 return path
38 return None
39
40def olive_icon_path(*args):
41 return olive_data_path(os.path.join('icons', *args))
2842
29# Get the glade file name43# Get the glade file name
44UIFILENAME = olive_data_path('cmenu.ui')
45
30if sys.platform == 'win32':46if sys.platform == 'win32':
31 UIFILENAMES = [os.path.join(os.path.dirname(sys.executable),47 UIFILENAME = os.path.join(os.path.dirname(sys.executable),
32 "share/olive/cmenu.ui")]48 "share/olive/cmenu.ui")
3349 if not os.path.exists(path):
34dir_ = os.path.split(os.path.dirname(__file__))[0]50 UIFILENAME=None
35# Check first if we are running from source
36UIFILENAMES.insert(0, os.path.join(dir_, "cmenu.ui"))
37
38UIFILENAME = None
39
40for path in UIFILENAMES:
41 path = os.path.expanduser(path)
42 if os.path.isfile(path):
43 UIFILENAME = path
44 break
4551
46if UIFILENAME is None:52if UIFILENAME is None:
47 # Fail53 # Fail
4854
=== added directory 'olive/icons'
=== added file 'olive/icons/olive-gtk.png'
49Binary files olive/icons/olive-gtk.png 1970-01-01 00:00:00 +0000 and olive/icons/olive-gtk.png 2011-02-07 09:51:34 +0000 differ55Binary files olive/icons/olive-gtk.png 1970-01-01 00:00:00 +0000 and olive/icons/olive-gtk.png 2011-02-07 09:51:34 +0000 differ
=== added file 'olive/icons/oliveicon2.png'
50Binary files olive/icons/oliveicon2.png 1970-01-01 00:00:00 +0000 and olive/icons/oliveicon2.png 2011-02-07 09:51:34 +0000 differ56Binary files olive/icons/oliveicon2.png 1970-01-01 00:00:00 +0000 and olive/icons/oliveicon2.png 2011-02-07 09:51:34 +0000 differ
=== modified file 'olive/info.py'
--- olive/info.py 2010-05-25 17:10:52 +0000
+++ olive/info.py 2011-02-07 09:51:34 +0000
@@ -29,6 +29,7 @@
29from bzrlib.plugins.gtk import _i18n, icon_path29from bzrlib.plugins.gtk import _i18n, icon_path
30from bzrlib.plugins.gtk.dialog import error_dialog30from bzrlib.plugins.gtk.dialog import error_dialog
3131
32from guifiles import olive_icon_path
3233
33def info(location):34def info(location):
34 """ Get info about branch, working tree, and repository35 """ Get info about branch, working tree, and repository
@@ -160,8 +161,8 @@
160 parent = None,161 parent = None,
161 flags=0,162 flags=0,
162 buttons=None)163 buttons=None)
163 self.window.set_icon_list(gtk.gdk.pixbuf_new_from_file(icon_path("oliveicon2.png")),164 self.window.set_icon_list(gtk.gdk.pixbuf_new_from_file(olive_icon_path("oliveicon2.png")),
164 gtk.gdk.pixbuf_new_from_file(icon_path("olive-gtk.png")))165 gtk.gdk.pixbuf_new_from_file(olive_icon_path("olive-gtk.png")))
165 self.window.vbox.set_spacing(3)166 self.window.vbox.set_spacing(3)
166 self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_NORMAL)167 self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_NORMAL)
167 168
168169
=== modified file 'olive/window.py'
--- olive/window.py 2010-05-25 17:10:52 +0000
+++ olive/window.py 2011-02-07 09:51:34 +0000
@@ -23,6 +23,7 @@
2323
24from bzrlib.plugins.gtk import _i18n, icon_path24from bzrlib.plugins.gtk import _i18n, icon_path
2525
26from guifiles import olive_icon_path
2627
27class OliveGui(gtk.Window):28class OliveGui(gtk.Window):
28 """ Olive main window """29 """ Olive main window """
@@ -34,8 +35,8 @@
34 # Initialise window35 # Initialise window
35 gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)36 gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
36 self.set_title(_i18n("Olive - Bazaar GUI"))37 self.set_title(_i18n("Olive - Bazaar GUI"))
37 self.set_icon_list(gtk.gdk.pixbuf_new_from_file(icon_path("oliveicon2.png")),38 self.set_icon_list(gtk.gdk.pixbuf_new_from_file(olive_icon_path("oliveicon2.png")),
38 gtk.gdk.pixbuf_new_from_file(icon_path("olive-gtk.png")),39 gtk.gdk.pixbuf_new_from_file(olive_icon_path("olive-gtk.png")),
39 # Who has the svg version of the icon? Would be nice to include40 # Who has the svg version of the icon? Would be nice to include
40 #gtk.gdk.pixbuf_new_from_file(icon_path("olive.svg"))41 #gtk.gdk.pixbuf_new_from_file(icon_path("olive.svg"))
41 )42 )
4243
=== modified file 'setup.py'
--- setup.py 2010-05-25 17:09:02 +0000
+++ setup.py 2011-02-07 09:51:34 +0000
@@ -67,7 +67,9 @@
67 ],67 ],
68 data_files=[('share/olive', ['cmenu.ui',]),68 data_files=[('share/olive', ['cmenu.ui',]),
69 ('share/applications', ['olive-gtk.desktop', ]),69 ('share/applications', ['olive-gtk.desktop', ]),
70 ('share/pixmaps', ['icons/olive-gtk.png']),70 ('share/olive/icons', ['olive/icons/olive-gtk.png',
71 'olive/icons/oliveicon2.png']),
72 ('share/pixmaps', ['olive/icons/olive-gtk.png',]),
71 ],73 ],
72 cmdclass={'install_data': InstallData}74 cmdclass={'install_data': InstallData}
73 )75 )

Subscribers

People subscribed via source and target branches