Commit Graph

161 Commits

Author SHA1 Message Date
Gonzalo Odiard
50ac9f36d6 Revert "Use consistent ellipsis mode"
This reverts commit 0d428fc913.

This is not the right solution. We should ellipse at the end.
The change was not discussed or approved.
2014-12-04 18:19:05 -03:00
Ezequiel Pereira Lopez
0d428fc913 Use consistent ellipsis mode 2014-12-04 12:00:37 -02:00
Martin Abente Lahaye
85b173eb25 Remove Palette logic out of PaletteWindow
PaletteWindow is the parent class of two different subclases,
Palette and _ToolBarPalette. Palette uses state changes intensively
in order to display secondary content, but _ToolBarPalette does not.

Because of this, Palette overwrites PaletteWindow's popup and popdown
methods adding one extra param called "state". This param is not required
either in PaletteWindow and specially not in _ToolBarPalette.

Therefore, any piece of code inside PaletteWindow which is meant for
Palette subclassing, should be moved out of PaletteWindow and placed
in the Palette class, where it corresponds.

This patch fixes the cases where _ToolBarPalette breaks because of this
mismatch.

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
2014-06-24 16:27:05 -03:00
Martin Abente Lahaye
2f19a41432 Fix black palettes
Push the palette widget opening process to the latest
in order to avoid the race condition where the animation
takes of the place of the real palette.

Fixes #2184

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
2014-06-24 15:57:35 -03:00
Gonzalo Odiard
c70e5c678d Fix regression introduced by b9d6b628a9
When calculated the palette height based in the size of children,
forgoten add the border size. That moved the palette in the device icons
4 pixels to the bottom, then the gap was miscalcuated and the border
button border was not draw.

Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
2014-05-30 15:51:11 -04:00
Gonzalo Odiard
dfeba6184e Fix drawing of gap on palettes attached to widget - Fixes #4776
In Gtk 3.10, Gtk.Window is drawing a gray border around the palette.
This patch draw a black rectangle defore we draw Gtk.render_frame_gap
to draw the border but with a gap to connect to the attached widget.

Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
2014-05-30 15:50:37 -04:00
Martin Abente Lahaye
45e7ba5ed6 Fix and clean Palette secondary label
Removes unnecessary code ie., changing label color.

Refactor label settings, to put all in the same place.

Fix changes to label_alignment that does not honor
original vertical padding settings.

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
2014-05-28 17:26:45 -03:00
Gonzalo Odiard
b9d6b628a9 Show palettes at the screen bottom with the right size - Fixes #4673
On Gtk 3.10, Gtk.Menu at the bottom of the screen are resized
to avoid fall out of the screen, then report a wrong height.
We need calculate the size of the children and move the Menu up.

This problem is visible on the Clipboard icon palettes,
and in journal objects palettes at the bottom of the screen.

This patch also rename a variable 'rect' to 'req', because is
a Requisition (width, height) and not a Rectangle (x, y, width, height).

Finally, to avoid a error with the secondary text on the palette,
when copy text from the terminal, reove the '¬r' character.

Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
2014-05-28 14:35:20 -04:00
Martin Abente Lahaye
72994bd73c Add Icon.get_badge_size
Add get_badge_size method to Icon class, so it can be accessed
by other Icon sub-classes.

ie., jarabe.frame.notification.NotificationPulsingIcon.

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
2014-04-25 15:46:20 -03:00
Prasoon Shukla
9e253b5965 Add description in journal object palette - Fixes #4686 2014-04-07 10:20:46 -03:00
Daniel Narvaez
01ed63ee4b Fixes for pep8 1.5 2014-03-29 19:25:34 +00:00
Daniel Narvaez
f92f0efe06 Fix pep8 2014-03-24 09:43:20 +00:00
Sebastian Silva
2a7d4da38a Implementation of pixbufs for use with X11 window icons. 2014-03-23 22:23:02 -05:00
Gonzalo Odiard
e762fa938c Add accelerator to PaletteMenuItem - Fixes #4716
With the port to Gtk3, we lost the display of the keybord shortcut
available in MenuItem.

Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
2014-01-31 18:56:42 -03:00
Martin Abente Lahaye
6c64a7d020 Revert "Keep updated CellRendererInvoker self.path updated - Fixes #4717"
This reverts commit 353e05a086.
2014-01-23 00:57:27 -03:00
Gonzalo Odiard
353e05a086 Keep updated CellRendererInvoker self.path updated - Fixes #4717
Since CellRendererInvoker can set the path at None if a mouse event
is out of the area of the renderer, can break the use of touch,
if happen after the mouse movement. This patch set the path,
in the point_in_cell_renderer test, for the positive case,
solving the issue.

Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
2014-01-17 17:41:46 -03:00
Manuel Quiñones
5802d67ee1 Icon: deprecate icon_size
pixel_size should be always used now.

Change SMALL_ICON_SIZE to cover the other sizes at settings.ini.

Adds a transformation to keep backwards compatibility for some
time. This will be removed in the future.
2014-01-13 22:58:58 -03:00
Ignacio Rodriguez
1ced93e14b pep8 fixes for 'Add menu width chars' 2014-01-08 11:51:10 -02:00
Ignacio Rodriguez
463101b19d Add menu width chars to sugar3 2014-01-08 11:35:16 -02:00
Emil Dudev
c0319389e8 Touch UI: esc fullscreen
This patch moves sugar3.graphics.Window key-press-event handling.
It will now be after any other event handling from deived classes.
Fixes #475
2014-01-01 22:01:45 -02:00
Emil Dudev
db2ba3e579 GConf to GSettings port 2013-12-27 17:39:02 +00:00
akskumarnot
81b388c554 Use proper formatting syntax, fixes #2170 2013-12-26 15:57:33 +01:00
Gonzalo Odiard
dee29c0e75 Be able to click in a tooltip - Fixes #991
This issue was reported many times, when new users see a tooltip
try to click, and are confused when there are no action.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
2013-12-18 22:49:21 +01:00
Diego Naula
ddd566c847 Fixes #3665: add is_fullscreen() method to Window class
Signed-off-by: Diego Naula <dnaula1997@gmail.com>
2013-11-19 22:38:14 -06:00
Daniel Narvaez
d12a1d5131 Fix translations domains to point to new toolkit 2013-09-11 16:02:47 +02:00
Daniel Narvaez
b83ddaefaf Revert "Fix translations domains to point to new toolkit"
This reverts commit abe0de3ef8.
2013-09-11 15:59:34 +02:00
Daniel Narvaez
abe0de3ef8 Fix translations domains to point to new toolkit 2013-09-11 15:27:46 +02:00
Walter Bender
ec5f064c10 Ensure entity value is type str
There are times when the entity value passed in for substitution
is of type unicode. This causes Rsvg to fail when processing the
SVG. This patch checks for unicode and converts it to utf-8.

Fixes #4621
2013-09-08 22:51:00 +02:00
Manuel Quiñones
0b47dd37b1 Merge branch 'objectchooser_preview-try2' of https://github.com/godiard/sugar-toolkit-gtk3 into godiard-objectchooser_preview-try2 2013-07-08 17:17:22 -03:00
Gonzalo Odiard
3e6507af6e Add a option to the objectchooser to show the object preview
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
2013-07-08 15:52:18 -03:00
Gonzalo Odiard
8e975bd5c9 Add a method to create a Pixbuf with the preview in the metadata
This code was moved from sugar expandedentry.py to be available to use
in other places. Some activities like Portfolio or JournalShare
have this code copied.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
2013-07-08 15:51:27 -03:00
Daniel Drake
670fc44b1a Icon: handle image loading errors
If the icon can't be found, fall back on showing a generic icon.

Useful when activity/content bundles specify a bad icon, which is
unfortunately true for most content bundles in current existance
(because the icon field was previously unused).
2013-07-05 01:13:52 +02:00
Daniel Narvaez
6d2b97daec Fix pep8 errors
pep8 1.6.4 detects more issues
2013-07-04 19:00:57 +02:00
Gonzalo Odiard
ad3c163023 Fix ObjectChooser backwards compatibility
The last change brak compatibility with the use in activities
without set the filter_type parameter, because None is not
a allowed value in the dbus call.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
2013-06-24 02:14:57 -03:00
Gonzalo Odiard
da3786d2fb Add filter_type optative parameter to objectchooser
Constants are defined to select the different filter_type
values. A comment was added to document the use.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
2013-06-20 17:42:19 -03:00
William Orr
edbc8f53b3 pep8'd sugar3.graphics 2013-06-11 15:18:15 +02:00
William Orr
e649070aa2 Replaced deprecated GObject methods with GLib methods 2013-06-10 15:46:53 +02:00
William Orr
3a8760c9e4 Fixed crash in journal when mousing over activity icons 2013-06-10 15:46:53 +02:00
Simon Schampijer
ba1abd4a33 Palettes: remove comment about deprecated API
We make use of this API in the shell and in the toolkit itself
and never removed those deprecated calls. Let's leave it like
this for now and remove the comment.
2013-06-10 15:46:53 +02:00
Daniel Narvaez
55a072470f Silence pyflake 2013-05-05 01:46:13 +02:00
Daniel Narvaez
9f71aa864f Remove various unused bits 2013-05-05 01:44:03 +02:00
Daniel Narvaez
6cbc3d1a48 Improve XOColor fallback logic
We was failing if the value in gconf was None. Also parsing
the string once just to see if it's valid was pretty dumb.
2013-05-02 18:52:59 +02:00
Manuel Quiñones
7156e67aa2 Color Palette: get back horizontal padding - SL #4325
The PaletteWindow lost the horizontal padding when it started to be
used as replacement of palette menus.  So now each implementation has
to add the padding.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
2013-04-17 17:09:45 -03:00
Daniel Narvaez
7cb4a1d72d Handle invalid /desktop/sugar/user/color
This is currently breaking the activity list unit test where
the profile has not been initialized. But, more in general,
it seems like we should not be crashing if our settings has
unexpected values.
2013-04-09 18:13:18 +02:00
Daniel Narvaez
db448c4eea Remove a lot of unused imports
Signed-off-by: Daniel Narvaez <dwnarvaez@gmail.com>
2013-04-03 22:01:55 +02:00
Manuel Quiñones
a3cda7c49f Revert "icon.py: move all imports to the top"
We have circular imports if we do this.

This reverts commit 355ca09a8c.
2013-03-20 12:34:13 -03:00
Manuel Quiñones
355ca09a8c icon.py: move all imports to the top
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
2013-03-20 12:24:21 -03:00
Simon Schampijer
b3048112d6 Palette: handle the case where setting the transient window does fail, SL #4221
The expected parent window did likely change, for example
this can happen when we switch the Home Views while a Palette
of a canvas icon is popping up (SL #4221). In that case
send the 'popdown' signal so that for example the hovering
state feedback can be cleared.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
2013-03-14 16:14:55 +01:00
Simon Schampijer
63b8e87b1a ToggleToolbutton: do hide the tooltip when clicked or touched
This is the same behaviour as for the RadioToolButton and the
ToolButton. See 5a1b380dd6 where
we did the same for the RadioToolbutton.

Updated the toolbuttons.py test to be able to test that code
path.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
2013-02-15 15:41:03 +01:00
Manuel Quiñones
d32523655c Fix subtoolbars height - SL #4019
Remove the vertical padding from the box that contain the toolbar, and
change the order of drawings in the container widget so that the
outline looks right.  This has been tested with screenshots, see the
gif animation attached to the ticket.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
2013-01-23 10:48:06 -03:00