[sugar] [PATCH] Clipboard - disable frame popup - enable notification icon

Marco Pesenti Gritti mpgritti
Sun Apr 20 14:40:42 EDT 2008


General comments:

* Please make sure to not exceed 80 cols.

+import view.frame.frame

Please use "from view.frame import frame".

+            self._notif_icon = NotificationIcon()
+            self._notif_icon.props.icon_name = self._icon.props.icon_name
+            self._notif_icon.props.xo_color = profile.get_color()

I'd pass in the properties to the constructor.

+        # Disable the Frame from popping up when a clipping is added
+        # cb_service = clipboardservice.get_instance()
+        # cb_service.connect_after('object-added',
self._clipboard_object_added_cb)

Just get rid of this. self._clipboard_object_added_cb is still used?

+        elif corner == 'top-right':
+            window.move(screen.get_width() - style.GRID_CELL_SIZE, 0)
+        elif corner == 'bottom-left':
+            window.move(0, screen.get_height() - style.GRID_CELL_SIZE)
+        elif corner == 'bottom-right':
+            window.move(screen.get_width() - style.GRID_CELL_SIZE,
screen.get_height() - style.GRID_CELL_SIZE)

I'd call size_request() on the window to calculate the size, rather
than "hardcoding" to cell size.

Marco


On Sat, Apr 19, 2008 at 8:24 PM, Eric Burns <ericjosephburns at gmail.com> wrote:
> This patch disables the frame from popping up when you copy an object to the
> clipboard and instead pops up a notification icon in the bottom left hand
> corner. It also adds the ability to add_notification() for future use to
> place icons in any of the four corners.
> _______________________________________________
>  Sugar mailing list
>  Sugar at lists.laptop.org
>  http://lists.laptop.org/listinfo/sugar
>
>



More information about the Sugar-devel mailing list