Ah, I see. Thanks for clearing that up!<br><br><div class="gmail_quote">On Fri, Apr 3, 2009 at 9:53 PM, Eben Eliason <span dir="ltr"><<a href="mailto:eben@laptop.org">eben@laptop.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2009/4/2 Vamsi Krishna Davuluri <<a href="mailto:vamsi.davuluri@gmail.com">vamsi.davuluri@gmail.com</a>>:<br>
<div class="im">> Hello,<br>
><br>
> So I was wondering, after right clicking on a journal item, the palette<br>
> again shows the file name. Why is that? as on most of the standard operating<br>
> systems, when ever we right click on an item, we are given options such as<br>
> open, open with, print, copy etc. Never the file name.<br>
><br>
> Couldn't the alternate be to highlight the clicked item instead.<br>
<br>
</div>This is because Sugar has "palettes", which can serve the purpose of<br>
the normal contextual menu, but are also much more extensible. It's<br>
possible to embed images, descriptions, and other controls into these<br>
palettes, in addition to the usual menu of actions.<br>
<br>
It's true that in the list view of the Journal, the name of the entry<br>
is redundant, but that's often not the case (consider the Neighborhood<br>
view, or Home, etc.). The idea behind the palette is to a) provide<br>
more info about the object it relates to (in this case, entry name,<br>
and activity type), as well as provide the list of actions/options for<br>
that object. We keep the redundancy here for consistency across the<br>
UI, and also because the palette itself can cover the name of the<br>
entry in the list.<br>
<font color="#888888"><br>
Eben<br>
</font><div><div></div><div class="h5"><br>
><br>
> Also a fix to bug #610 would be<br>
><br>
> def __init__(self, label=None, accel_path=None,<br>
> menu_after_content=False,<br>
> text_maxlen=0, **kwargs):<br>
><br>
> screen = gtk.gdk.Screen()<br>
> self.wwidth = screen.get_width()<br>
><br>
> #window = gtk.Window()<br>
> #self.wwidth, self.wheight = window.get_size()<br>
><br>
> self.max_pixels = int((1.0/4)*(self.wwidth))<br>
><br>
> --------------------------------<br>
> if text_maxlen >= 0:<br>
> self._label.set_max_width_chars(text_maxlen)<br>
> self._label.set_ellipsize(pango.ELLIPSIZE_MIDDLE)<br>
><br>
> labels_box.pack_start(self._label, expand=True)<br>
><br>
> self._secondary_label = gtk.Label()<br>
> self._secondary_label.set_alignment(0, 0.5)<br>
><br>
> if text_maxlen >= 0:<br>
> self._secondary_label.set_max_width_chars(text_maxlen)<br>
> self._secondary_label.set_ellipsize(pango.ELLIPSIZE_END)<br>
><br>
><br>
><br>
><br>
><br>
> -------------------------------------------------<br>
><br>
> def do_size_request(self, requisition):<br>
> gtk.Window.do_size_request(self, requisition)<br>
><br>
> # gtk.AccelLabel request doesn't include the accelerator.<br>
> #label_width = self._label_alignment.size_request()[0] + \<br>
> #self._label.get_accel_width() + \<br>
> #2 * self.get_border_width()<br>
> label_width= self.max_pixels<br>
><br>
> requisition.width = max(requisition.width,<br>
> style.GRID_CELL_SIZE * 2,<br>
> label_width,<br>
> self._full_request[0])<br>
><br>
><br>
><br>
><br>
><br>
> What this does is, It draws the screen proportional to the max_pixels<br>
> specified(the ratio can be fine tuned by the design team), and ellipsizes<br>
> which ever exceeds that limit.<br>
><br>
><br>
><br>
> Thank you.<br>
><br>
><br>
><br>
><br>
</div></div><div><div></div><div class="h5">> _______________________________________________<br>
> Sugar-devel mailing list<br>
> <a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
> <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
><br>
><br>
</div></div></blockquote></div><br>