http://dev.sugarlabs.org/ticket/610
2009/4/2 Vamsi Krishna Davuluri <[email protected]> > 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 > [email protected] > http://lists.sugarlabs.org/listinfo/sugar-devel > >
_______________________________________________ Sugar-devel mailing list [email protected] http://lists.sugarlabs.org/listinfo/sugar-devel

