[Sugar-devel] relating bug #610 and design

Vamsi Krishna Davuluri vamsi.davuluri at gmail.com
Sat Apr 4 02:07:42 EDT 2009


Ah, I see. Thanks for clearing that up!

On Fri, Apr 3, 2009 at 9:53 PM, Eben Eliason <eben at laptop.org> wrote:

> 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.
>
> This is because Sugar has "palettes", which can serve the purpose of
> the normal contextual menu, but are also much more extensible. It's
> possible to embed images, descriptions, and other controls into these
> palettes, in addition to the usual menu of actions.
>
> It's true that in the list view of the Journal, the name of the entry
> is redundant, but that's often not the case (consider the Neighborhood
> view, or Home, etc.). The idea behind the palette is to a) provide
> more info about the object it relates to (in this case, entry name,
> and activity type), as well as provide the list of actions/options for
> that object. We keep the redundancy here for consistency across the
> UI, and also because the palette itself can cover the name of the
> entry in the list.
>
> Eben
>
> >
> > 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/20090404/c87dc78c/attachment.htm 


More information about the Sugar-devel mailing list