29
29
def __init__(self, calling_app):
30
30
# Pointer to calling instance for signal connection
31
31
self.signal = calling_app
32
self.iconpath = icon_path()+os.sep
34
33
# Initialise window
35
34
gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
36
35
self.set_title(_i18n("Olive - Bazaar GUI"))
37
self.set_icon_list(gtk.gdk.pixbuf_new_from_file(self.iconpath+"oliveicon2.png"),
38
gtk.gdk.pixbuf_new_from_file(self.iconpath+"olive-gtk.png"),
36
self.set_icon_list(gtk.gdk.pixbuf_new_from_file(icon_path("oliveicon2.png")),
37
gtk.gdk.pixbuf_new_from_file(icon_path("olive-gtk.png")),
39
38
# Who has the svg version of the icon? Would be nice to include
40
#gtk.gdk.pixbuf_new_from_file(self.iconpath+"olive.svg")
39
#gtk.gdk.pixbuf_new_from_file(icon_path("olive.svg"))
42
41
self.set_property("width-request", 700)
43
42
self.set_property("height-request", 400)
179
178
self.mb_branch_pull = gtk.ImageMenuItem(_i18n("Pu_ll"))
180
179
pullimage = gtk.Image()
181
pullimage.set_from_file(self.iconpath+"pull16.png")
180
pullimage.set_from_file(icon_path("pull16.png"))
182
181
self.mb_branch_pull.set_image(pullimage)
183
182
self.mb_branch_pull.connect('activate', self.signal.on_menuitem_branch_pull_activate)
184
183
self.mb_branch_menu.append(self.mb_branch_pull)
186
185
self.mb_branch_push = gtk.ImageMenuItem(_i18n("Pu_sh"))
187
186
pushimage = gtk.Image()
188
pushimage.set_from_file(self.iconpath+"push16.png")
187
pushimage.set_from_file(icon_path("push16.png"))
189
188
self.mb_branch_push.set_image(pushimage)
190
189
self.mb_branch_push.connect('activate', self.signal.on_menuitem_branch_push_activate)
191
190
self.mb_branch_menu.append(self.mb_branch_push)
210
209
self.mb_branch_commit = gtk.ImageMenuItem(_i18n("_Commit"))
211
210
commitimage = gtk.Image()
212
commitimage.set_from_file(self.iconpath+"commit16.png")
211
commitimage.set_from_file(icon_path("commit16.png"))
213
212
self.mb_branch_commit.set_image(commitimage)
214
213
self.mb_branch_commit.connect('activate', self.signal.on_menuitem_branch_commit_activate)
215
214
self.mb_branch_menu.append(self.mb_branch_commit)
245
244
self.mb_statistics_differences = gtk.ImageMenuItem(_i18n("_Differences"))
246
245
diffimage = gtk.Image()
247
diffimage.set_from_file(self.iconpath+"diff16.png")
246
diffimage.set_from_file(icon_path("diff16.png"))
248
247
self.mb_statistics_differences.set_image(diffimage)
249
248
self.mb_statistics_differences.connect('activate', self.signal.on_menuitem_stats_diff_activate)
250
249
self.mb_statistics_menu.append(self.mb_statistics_differences)
252
251
self.mb_statistics_log = gtk.ImageMenuItem(_i18n("_Log"))
253
252
logimage = gtk.Image()
254
logimage.set_from_file(self.iconpath+"log16.png")
253
logimage.set_from_file(icon_path("log16.png"))
255
254
self.mb_statistics_log.set_image(logimage)
256
255
self.mb_statistics_log.connect('activate', self.signal.on_menuitem_stats_log_activate)
257
256
self.mb_statistics_menu.append(self.mb_statistics_log)
278
277
self.tb = gtk.Toolbar()
280
279
self.tb_refresh_icon = gtk.Image()
281
self.tb_refresh_icon.set_from_file(self.iconpath+"refresh.png")
280
self.tb_refresh_icon.set_from_file(icon_path("refresh.png"))
282
281
self.tb_refresh = gtk.ToolButton(self.tb_refresh_icon, _i18n("Refresh"))
283
282
self.tb_refresh.connect('clicked', self.signal.on_menuitem_view_refresh_activate)
284
283
self.tb.add(self.tb_refresh)
286
285
self.tb_diff_icon = gtk.Image()
287
self.tb_diff_icon.set_from_file(self.iconpath+"diff.png")
286
self.tb_diff_icon.set_from_file(icon_path("diff.png"))
288
287
self.tb_diff = gtk.ToolButton(self.tb_diff_icon, _i18n("Diff"))
289
288
self.tb_diff.connect('clicked', self.signal.on_menuitem_stats_diff_activate)
290
289
self.tb.add(self.tb_diff)
292
291
self.tb_log_icon = gtk.Image()
293
self.tb_log_icon.set_from_file(self.iconpath+"log.png")
292
self.tb_log_icon.set_from_file(icon_path("log.png"))
294
293
self.tb_log = gtk.ToolButton(self.tb_log_icon, _i18n("Log"))
295
294
self.tb_log.connect('clicked', self.signal.on_menuitem_stats_log_activate)
296
295
self.tb.add(self.tb_log)
297
self.tb.add(gtk.SeparatorToolItem())
298
299
self.tb_commit_icon = gtk.Image()
299
self.tb_commit_icon.set_from_file(self.iconpath+"commit.png")
300
self.tb_commit_icon.set_from_file(icon_path("commit.png"))
300
301
self.tb_commit = gtk.ToolButton(self.tb_commit_icon, _i18n("Commit"))
301
302
self.tb_commit.connect('clicked', self.signal.on_menuitem_branch_commit_activate)
302
303
self.tb.add(self.tb_commit)
305
self.tb.add(gtk.SeparatorToolItem())
304
307
self.tb_pull_icon = gtk.Image()
305
self.tb_pull_icon.set_from_file(self.iconpath+"pull.png")
308
self.tb_pull_icon.set_from_file(icon_path("pull.png"))
306
309
self.tb_pull = gtk.ToolButton(self.tb_pull_icon, _i18n("Pull"))
307
310
self.tb_pull.connect('clicked', self.signal.on_menuitem_branch_pull_activate)
308
311
self.tb.add(self.tb_pull)
310
313
self.tb_push_icon = gtk.Image()
311
self.tb_push_icon.set_from_file(self.iconpath+"push.png")
314
self.tb_push_icon.set_from_file(icon_path("push.png"))
312
315
self.tb_push = gtk.ToolButton(self.tb_push_icon, _i18n("Push"))
313
316
self.tb_push.connect('clicked', self.signal.on_menuitem_branch_push_activate)
314
317
self.tb.add(self.tb_push)
316
319
self.tb_update_icon = gtk.Image()
317
self.tb_update_icon.set_from_file(self.iconpath+"pull.png")
320
self.tb_update_icon.set_from_file(icon_path("pull.png"))
318
321
self.tb_update = gtk.ToolButton(self.tb_update_icon, _i18n("Update"))
319
322
self.tb_update.connect('clicked', self.signal.on_menuitem_branch_update_activate)
320
323
self.tb.add(self.tb_update)