[Sugar-devel] relating bug #610 and design
Frederick Grose
fgrose at gmail.com
Thu Apr 2 08:51:53 EDT 2009
http://dev.sugarlabs.org/ticket/610
2009/4/2 Vamsi Krishna Davuluri <vamsi.davuluri at gmail.com>
> Hello,
>
> So I was wondering, after right clicking on a journal item, the palette
> again shows the file name. Why is that? as on most of the standard operating
> systems, when ever we right click on an item, we are given options such as
> open, open with, print, copy etc. Never the file name.
>
> Couldn't the alternate be to highlight the clicked item instead.
>
>
> Also a fix to bug #610 would be
>
> def __init__(self, label=None, accel_path=None,
> menu_after_content=False,
> text_maxlen=0, **kwargs):
>
> screen = gtk.gdk.Screen()
> self.wwidth = screen.get_width()
>
> #window = gtk.Window()
> #self.wwidth, self.wheight = window.get_size()
>
> self.max_pixels = int((1.0/4)*(self.wwidth))
>
> --------------------------------
> if text_maxlen >= 0:
> self._label.set_max_width_chars(text_maxlen)
> self._label.set_ellipsize(pango.ELLIPSIZE_MIDDLE)
>
> labels_box.pack_start(self._label, expand=True)
>
> self._secondary_label = gtk.Label()
> self._secondary_label.set_alignment(0, 0.5)
>
> if text_maxlen >= 0:
> self._secondary_label.set_max_width_chars(text_maxlen)
> self._secondary_label.set_ellipsize(pango.ELLIPSIZE_END)
>
>
>
>
>
> -------------------------------------------------
>
> def do_size_request(self, requisition):
> gtk.Window.do_size_request(self, requisition)
>
> # gtk.AccelLabel request doesn't include the accelerator.
> #label_width = self._label_alignment.size_request()[0] + \
> #self._label.get_accel_width() + \
> #2 * self.get_border_width()
> label_width= self.max_pixels
>
> requisition.width = max(requisition.width,
> style.GRID_CELL_SIZE * 2,
> label_width,
> self._full_request[0])
>
>
>
>
>
> What this does is, It draws the screen proportional to the max_pixels
> specified(the ratio can be fine tuned by the design team), and ellipsizes
> which ever exceeds that limit.
>
>
>
> Thank you.
>
>
>
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sugarlabs.org/archive/sugar-devel/attachments/20090402/89939879/attachment.htm
More information about the Sugar-devel
mailing list