Commit Graph

9 Commits

Author SHA1 Message Date
Colin Walters
c5de239e25 shell_util_normalize_and_casefold: New utility function
Merge the duplicated copies into shell-util.
2011-08-10 13:00:06 -04:00
Florian Müllner
7ed3facf8f calendar: Improve week start handling
Add a helper function (mostly copied from gtkcalendar.c) for getting
the first week day for the current locale, using nl_langinfo if
available and falling back to the GTK+ gettext fallback otherwise.

Use that function in the calendar, so that the LC_TIME setting is
used if possible.

https://bugzilla.gnome.org/show_bug.cgi?id=649078
2011-08-10 01:03:26 +02:00
Jasper St. Pierre
a6dfe20348 shell-util: Add a helper method for saving files from HTTP
Unfortunately, gjs cannot handle binary C strings directly from
gobject-introspection. Add a simple workaround method in C to help
us save random files from the web.

https://bugzilla.gnome.org/show_bug.cgi?id=653989
2011-07-06 12:46:18 -04:00
Dan Winship
8e4a5f1ac5 Shell: sort, align, clean up shell-global.h and shell-util.h
https://bugzilla.gnome.org/show_bug.cgi?id=648755
2011-05-16 14:51:35 -04:00
Dan Winship
61577e176e shell: move non-ShellGlobal functions from shell-global to shell-util
shell-global had become a dumping ground for functions that didn't
have anywhere else to be. Make shell-util the dumping ground instead,
and have shell-global only have methods that involve the ShellGlobal
object.

https://bugzilla.gnome.org/show_bug.cgi?id=648755
2011-05-16 14:51:35 -04:00
Owen W. Taylor
905c4bb4a5 Add shell_util_get_transformed_allocation()
Add a function that gets the current allocation of an actor
transformed into stage coordinates. This avoids a misfeature of
clutter_actor_get_transformed_size() where when a size request is
queued (even if it won't eventually change the size), the returned
value is the transformed size request rather than the last allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=645744
2011-03-28 15:27:10 -04:00
Owen W. Taylor
7ad89dc46b Work around Spidermonkey problem with Unicode date formats
Monkey-patch Date.prototype.toLocaleFormat() with a version that uses
g_date_time_format() since the Spidermonkey built-in can't handle
format strings with Unicode characters.

https://bugzilla.gnome.org/show_bug.cgi?id=643350
2011-03-14 15:33:44 -04:00
Florian Müllner
1c8955b34a shell-util: Add helper to hide actors from pick
At times it is desireable to hide actors from being picked even
with a mode of CLUTTER_PICK_ALL.

Currently we use a pattern of
    clutter_actor_hide();
    clutter_stage_get_actor_at_pos();
    clutter_actor_show();
in these cases, which gets hideous if the actor we want to exclude
from the pick is located in another module.

A more elegant solution is to connect a handler to the ::pick signal,
which stops further emission.

Credit for the idea goes to Owen Taylor.

https://bugzilla.gnome.org/show_bug.cgi?id=634560
2010-11-18 20:27:55 +01:00
Giovanni Campagna
21ac225981 StIcon: add support for GIcon
Add a "gicon" property so that a GIcon can be used instead of an
icon name, while still getting icon recoloring from the theme.
Also include a compatibility wrapper in libshell until GJS has
support for interface static methods.

https://bugzilla.gnome.org/show_bug.cgi?id=622451
2010-11-16 22:11:27 +01:00