This creates a chicken-egg problem at startup. Creating the menu
tries to initialize the toggles before the body frames have been
created.
File "/home/steve/tools/tortoisehg-dev/hggtk/commit.py", line 359,
in toggle_view
self.parents_frame.show()
AttributeError: 'GCommit' object has no attribute 'parents_frame'
Traceback (most recent call last):
File "/home/steve/tools/tortoisehg-dev/hggtk/commit.py", line 365,
in toggle_view
self.advanced_frame.show()
AttributeError: 'GCommit' object has no attribute 'advanced_frame'
On Sun, Sep 6, 2009 at 11:40 PM, Yuki KODAMA<[email protected]> wrote:
> # HG changeset patch
> # User Yuki KODAMA <[email protected]>
> # Date 1252298022 -32400
> # Node ID 2441249893bc0b56f537fc1f83c91cde2c051176
> # Parent 855b279c9103a53ed33260e23cd7e81e9df30cd0
> commit: move the view menu to toolbar
>
> Same layout style with history tool.
> and removed blank space at the side of menu button.
>
> diff --git a/hggtk/commit.py b/hggtk/commit.py
> --- a/hggtk/commit.py
> +++ b/hggtk/commit.py
> @@ -182,6 +182,7 @@
>
>
> def get_tbbuttons(self):
> + # insert to head of toolbar
> tbbuttons = GStatus.get_tbbuttons(self)
> tbbuttons.insert(0, gtk.SeparatorToolItem())
> self.undo_button = self.make_toolbutton(gtk.STOCK_UNDO, _('_Undo'),
> @@ -191,10 +192,22 @@
> tbbuttons.insert(0, self.undo_button)
> tbbuttons.insert(0, self.commit_button)
>
> + # append to end of left align area
> self.changelog_button = self.make_toolbutton(gtk.STOCK_INDEX,
> _('Changelog'),
> self.changelog_clicked, tip=_('view changelog'))
> tbbuttons.append(self.changelog_button)
> - tbbuttons.append(gtk.SeparatorToolItem())
> +
> + # append to align right
> + sep = gtk.SeparatorToolItem()
> + sep.set_expand(True)
> + sep.set_draw(False)
> + tbbuttons.append(sep)
> +
> + vmenu = gtk.MenuToolButton('')
> + # hide the Button widget; we want to see only Menu button
> + gobject.idle_add(lambda: vmenu.child.get_children()[0].hide())
> + vmenu.set_menu(self.view_menu())
> + tbbuttons.append(vmenu)
>
> return tbbuttons
>
> @@ -273,14 +286,6 @@
> vbox.pack_start(mbox, False, False)
> self._mru_messages = self.settings.mrul('recent_messages')
>
> - vmenu = gtk.MenuToolButton('')
> - # A MenuToolButton has two parts; a Button and a ToggleButton
> - # we want to see the togglebutton, but not the button
> - b = vmenu.child.get_children()[0]
> - b.unmap()
> - b.set_sensitive(False)
> - mbox.pack_start(vmenu, False, False, 2)
> -
> frame = gtk.Frame()
> frame.set_shadow_type(gtk.SHADOW_ETCHED_IN)
> scroller = gtk.ScrolledWindow()
> @@ -321,8 +326,6 @@
> self.advanced_frame.add(adv_hbox)
> vbox.pack_start(self.advanced_frame, False, False, 2)
>
> - vmenu.set_menu(self.view_menu())
> -
> self.vpaned = gtk.VPaned()
> self.vpaned.pack1(vbox, shrink=False)
> self.vpaned.pack2(status_body, shrink=False)
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Tortoisehg-develop mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop
>
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop