Commit Graph

205 Commits

Author SHA1 Message Date
Simon Schampijer
3f0822ab1a Toolbox: replace the hippo based separator with a gtk.HSeparator
This makes the old-style Toolbar hippo free.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Reviewed-by: Benjamin Berg <benzea@sugarlabs.org>
2011-08-13 09:45:14 +02:00
Simon Schampijer
17ec110798 Replace the hippo-based TimeoutIcon with one based on a gtk.Label and gtk.Alignment
This patch depends on the addition of the SugarTimeoutIcon
to the artwork where we set the font and background color.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Reviewed-by: Benjamin Berg <benzea@sugarlabs.org>
2011-08-12 10:39:38 +02:00
Simon Schampijer
4018265f6c Replace our custom entry widget with one based on gtk.Entry
Our custom entry widget, which was based on sexyicon, did
support placing an icon in the entry (e.g. the magnifier icon
for the search entry) and displaying progress in the case of
the url entry in Browse. Both is supported since GTK+ 2.16 in the
gtk.Entry.

The patch does keep the old API, that is why we can land it in
0.94 no change in the shell needed only a small change in Browse,
in a second step I would like to use the upstream API e.g.
's/set_icon_from_name/set_icon_from_icon_name'.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Reviewed-by: Benjamin Berg <benzea@sugarlabs.org>
2011-08-12 10:38:11 +02:00
Gonzalo Odiard
880e60bdda Sugar-toolkit: Pack page in ToolbarButton when is connected to the window - OLPC #10930
To add the accelerator to the ToolButton the activity must have set
the 'sugar-accel-group' before. The patch does make the ToolbarButton
listen to the 'hierarchy-changed' signal and repack itself accordingly.
Since the ToolButtons of the subtoolbar do listen to 'hierarchy-changed'
as well to set the accelerator they will set it accordingly.

This fixes the accelerators for new-style-toolbar activities
like Terminal, TurtleArt and Paint, more info in #10930.

Signed-by-off: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
2011-07-15 18:54:29 +02:00
Sascha Silbe
3553fbd2f0 remove obsolete comment
GTK bug #502871 [1] has been fixed in 2007.

[1] http://bugzilla.gnome.org/show_bug.cgi?id=502871

Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
Acked-by: Simon Schampijer <simon@laptop.org>
2011-05-20 23:13:10 +02:00
Sascha Silbe
567bd961a5 Avoid showing decorated windows during start-up (OLPC#10713)
As a side effect, activity start-up is now subjectively faster, maybe even
objectively (due to avoiding a resize).

Tested on XO-1 running Debian Squeeze.

Acked-By: Simon Schampijer <simon@laptop.org>
2011-04-11 18:00:29 +02:00
Sascha Silbe
85e714ecb1 fix regressions introduced by 29582de6 (fix for SL#1742)
GTK pops down the palette before it invokes the actions on the
menu item. We need to postpone destruction of the palette until
after all signals have propagated from the menu item to the
palette owner.

Symptoms included the "View Details" palette menu item in the Journal list
view not working.

Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
Acked-by: Simon Schampijer <simon@laptop.org>
2011-03-27 16:39:04 +02:00
Sascha Silbe
17537c7710 Window: allow removing the toolbar_box
Allow the toolbar_box to be removed by setting it to None, like is supported
for canvas.

Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
Acked-by: Simon Schampijer <simon@laptop.org>
2011-02-17 23:23:33 +01:00
Sascha Silbe
3b0e761f4a XoColor: don't choke if passed the wrong type (SL#1408)
Color data is stored in the Journal as a JSON dump, so we can get back
arbitrary types. XoColor already checks the color string for validity and
handles invalid strings gracefully, so it makes sense to enhance this to
invalid types as well.

Acked-by: Simon Schampijer <simon@schampijer.de>
2010-11-30 11:48:31 +00:00
Sascha Silbe
0521234fec CellRendererInvoker._redraw_path(): assure column is defined
We know that our code is correct and column should always be assigned, but it
never hurts to act defensively and guard against bugs in other pieces of the
code (or other components like GTK).

Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
2010-11-23 17:14:36 +01:00
Sascha Silbe
05fd5fe2d7 ToolInvoker._get_alignments: fix missing self parameter
Caught by pylint. I wonder if we need this piece of code as nobody every
triggered it.

Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
2010-11-23 17:14:36 +01:00
Sascha Silbe
7983242f7a pylint cleanup: initialise all attributes in __init__()
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
2010-11-23 17:14:36 +01:00
Sascha Silbe
3d227102c4 pylint cleanup: remove unused imports
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
2010-11-23 17:14:35 +01:00
Sascha Silbe
7acfbd070f style cleanup: prefer ' for strings
Tomeu prefers ' for strings, so let's use it wherever we don't have a good
reason to use ".

Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
2010-11-23 17:14:34 +01:00
Sascha Silbe
5f8ec81023 PEP8 cleanup: fix deprecated raise syntax
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
2010-11-23 17:14:34 +01:00
Sascha Silbe
73de340d27 PEP8 cleanup: fix spaces around keyword parameters
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
2010-11-23 17:14:33 +01:00
Sascha Silbe
72ed58cbca PEP8 cleanup: fix inline comment spacing
pep8 wants inline comments to be prefixed by at least two spaces. Let's just
move them to a separate line as that's easier to read anyway.

Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
2010-11-23 17:14:33 +01:00
Sascha Silbe
60707443ea PEP8 cleanup: fix whitespace around operator
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
2010-11-23 17:14:33 +01:00
Sascha Silbe
814ab2ddf9 PEP8 cleanup: don't use has_key()
has_key() has been deprecated for quite some time now.

Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
2010-11-23 17:14:32 +01:00
Sascha Silbe
e2231d5620 PEP8 cleanup: fix number of blank lines
Caught by pep8.

Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
2010-11-23 17:14:32 +01:00
Tomeu Vizoso
29582de67f Add 'cache-palette' property to Invoker #1742
Meaning that the palette will be cached after it's created.
2010-10-14 19:06:31 +02:00
Tomeu Vizoso
7dedaeb7bb Cast floats to ints before calling cairo.ImageSurface() #2291
Otherwise Python 2.7 will raise an exception.
2010-10-04 16:56:26 +02:00
anishmangal2002
3f68813dd6 Add ErrorAlert inherited from Alert
Adds the ErrorAlert class which is an alert inherited from
the base Alert class. This is very similar to the
ConfirmationAlert class with the difference being that it
only displays an 'Ok' button in the Alert popup.

Signed-off-by: anishmangal2002 <anishmangal2002@gmail.com>
2010-08-10 17:46:38 +00:00
Simon Schampijer
abda2edc04 Remove unneeded debug logs #1861 2010-07-07 11:08:59 +02:00
Aleksey Lim
4a4ea538ca Supplement #1687 by docstring 2010-01-31 16:41:34 +00:00
Aleksey Lim
6f3ecbdb1f New color to highlight items while hovering over #1693 2010-01-31 16:10:00 +00:00
Aleksey Lim
fea8acec84 Get pure icon surface w/o creating any widgets #1687 2010-01-25 17:40:58 +00:00
Daniel Drake
618df4e177 Fix bold font style
Small error in my last commit.
2009-12-01 17:43:37 +00:00
Daniel Drake
634b2fcee0 Apply font configuration from GConf (#1584)
Sugar font settings are now stored in GConf. This patch applies them
to all users of sugar.style and all standard activities.
2009-12-01 16:51:14 +00:00
Aleksey Lim
8c2fe54ea7 Do not stop processing motion-notify-event #1507 2009-10-18 11:46:23 +00:00
Aleksey Lim
a4a2b33dac Do no use random color if metadata color is not valid #1435 2009-10-01 18:04:06 +00:00
Aleksey Lim
8f52b0a8f4 Present windows in non-active process #1423 2009-09-29 18:33:13 +00:00
Aleksey Lim
93d65bcb2f Circular dependecy in ToolbarBox #1389 2009-09-18 13:18:46 +00:00
Aleksey Lim
ac586e5a85 Circular dependecy in ToolbarBox #1389 2009-09-18 12:24:48 +00:00
Aleksey Lim
33ea5bdee4 Circular dependecy in ToolbarBox #1389 2009-09-18 11:25:32 +00:00
Aleksey Lim
927c576e31 After using CP, the XO home palette is incorrectly scrolled (blank lines + missing item) #231 2009-09-18 08:09:14 +00:00
Aleksey Lim
2e3061dc10 When in fullscreen mode in an activity, frame doesnt pop-up(forgotten changes) #1335 2009-09-16 18:48:38 +00:00
Aleksey Lim
ecee594190 Invoke WindowPalette.popdown when menu property is None #1323 2009-09-16 17:09:30 +00:00
Aleksey Lim
76542527cd When in fullscreen mode in an activity, frame doesnt pop-up #1335 2009-09-16 16:55:05 +00:00
Tomeu Vizoso
850a78c59a Only try to pop down the submenus if we still have a _Menu #1338 2009-09-13 18:02:40 +02:00
Tomeu Vizoso
0159bc7b52 Warn when the XoColor string is invalid. 2009-09-11 13:47:40 +02:00
Benjamin Berg
c684950ecf Do not emit the row-changed signal, but redraw the row for prelight.
This basically undos commit 4bb221349c
and fixes the code that was there before. Emitting the row-changed
signal causes any editing to be canceled.
2009-09-10 17:34:56 +02:00
Aleksey Lim
d57320b985 Hide only submenus #1301 2009-09-10 10:14:52 +00:00
Simon Schampijer
b087809ec5 focus the canvas
make the boxes private using the python mangling
algorithm (see pep8)
2009-09-10 11:46:37 +02:00
Aleksey Lim
cdd4ba3a3d Palette will fail to open if you have just 'scrubbed' over some number of icons quickly #1312 2009-09-10 09:07:25 +00:00
Aleksey Lim
86ba52eadd Secondary toolbar widget should set a minimum height #1304 2009-09-10 09:07:25 +00:00
Aleksey Lim
b41e4a51d7 Popdown menu on palette popdown #1301 2009-09-10 09:07:24 +00:00
Tomeu Vizoso
fdb00469c1 Remove prelit invert effect for icons (garycmartin) #1313 2009-09-10 11:00:31 +02:00
Aleksey Lim
868c9293ac Hide palette group before immediate popup #1291 2009-09-10 07:48:20 +00:00
Aleksey Lim
c69bbe3341 Simple scheme for hidding ToolbarBox subpalettes #1300 2009-09-09 17:11:58 +00:00