Commit Graph

496 Commits

Author SHA1 Message Date
Dan Winship
8e759d7f32 Initialize global->root_pixmap to the stage color
Fixes drawing of the overview in the case where there is no root pixmap
(eg, --xephyr mode).

(And the workaround for not drawing an unintialized ClutterTexture can
be removed now, since the texture will always have been initialized.)

https://bugzilla.gnome.org/show_bug.cgi?id=609339
2010-02-08 14:47:04 -05:00
Owen W. Taylor
dce4b2f325 Remove C99 use of non-constant initializers
To comply with C89, structure initializers should have
only constant values.

(Not a thorough check for this throughout the codebase, just
StWidget is fixed up in this commit.)

https://bugzilla.gnome.org/show_bug.cgi?id=608746
2010-02-08 14:04:45 -05:00
Florian Müllner
fb7ed1ee28 [ShellEmbeddedWindow] Set window type in g_object_new
As of 2a78adc5e3, gobject no longer allows for setting construct-only
properties via g_object_set() during object initialization; set the
properties in a custom constructor instead.

https://bugzilla.gnome.org/show_bug.cgi?id=608802
2010-02-08 18:50:05 +01:00
Adel Gadllah
c88d21d487 Use GL_MESA_pack_invert if available
Use GL_MESA_pack_invert if available to avoid doing flipping in software.

https://bugzilla.gnome.org/show_bug.cgi?id=609053
2010-02-05 22:25:40 +01:00
Colin Walters
ed129b40a3 [ShellWindowTracker] Add shell_window_tracker_app_from_pid
In some situations we might need to look up an application from
a process identifier, such as the notification system where we
will determine application from the message sender.
2010-02-03 19:07:22 -05:00
Florian Müllner
fd1ce40ee7 Improve handling of gradients
By calling clutter_actor_get_allocation() in st_widget_recompute_style()
to determine whether to redraw gradients, we triggered a complete
reallocation of the stage for each gradient.

As gradients are processed in st_widget_real_style_changed() anyway, the
additional checks in st_widget_recompute_style() are redundant and can
be removed altogether.

https://bugzilla.gnome.org/show_bug.cgi?id=608847
2010-02-03 23:38:42 +01:00
Florian Müllner
2b15f38730 Pick up change from gradient to solid background
On style changes from gradient to solid backgrounds, the new background
must be drawn unconditionally, not depending on whether old and new
background color differ.

https://bugzilla.gnome.org/show_bug.cgi?id=608914
2010-02-03 21:16:40 +01:00
Maxim Ermilov
86515f3943 show background when nautilus isn't drawing the desktop.
If window with type Meta.WindowType.DESKTOP doesn't exist, then draw
background.
https://bugzilla.gnome.org/show_bug.cgi?id=591912
2010-02-03 22:52:25 +03:00
Owen W. Taylor
ed36517615 [ShellGenericContainer] Simplify tracking of skip-paint children
The current way we keep track of skip-paint children is more
difficult than it needs to be, and can lead to subtle bugs.
(For one, the skip-paint state of a child is remembered
when it is removed then added back again, which is completely
unexpected.)

Instead of using weak references to track children, just remove
items from the skip-paint list by overriding the remove() virtual
function of the ClutterContainer interface.

The 'skip_paint' hash table is then destroyed in finalize rather than
dispose since it doesn't hold references to memory any more but just
passively tracks an attribute of the children that are currently in
the container.

https://bugzilla.gnome.org/show_bug.cgi?id=608848
2010-02-03 12:00:56 -05:00
Florian Müllner
3e19f41cba [StWidget] Limit gradient redraws to size changes
When moving a widget with a gradient, its allocation changes
continuously, resulting in constant redraws.
Checking for actual size changes before the operation avoids
unnecessary redraws.

https://bugzilla.gnome.org/show_bug.cgi?id=608715
2010-02-02 00:24:35 +01:00
Colin Walters
b1007ed811 Add shell_global_gc
Primarily useful for debugging.  This was originally a patch against
gjs: https://bugzilla.gnome.org/show_bug.cgi?id=595323

But rather than add a random toplevel module just for this function
effectively, we can easily enough define it here.  Adding toplevel
modules to GScript should have a bit more formal process to it.

https://bugzilla.gnome.org/show_bug.cgi?id=608095
2010-02-01 16:08:43 -05:00
William Jon McCann
e3be74a31a Fix invalid unreference of CoglTexture
cogl_texture_get_data doesn't increase the refcount, so don't try
to decrement it.

Signed-off-by: Colin Walters <walters@verbum.org>

https://bugzilla.gnome.org/show_bug.cgi?id=608512
2010-02-01 10:15:15 -05:00
Owen W. Taylor
8db212db99 ShellRecorder: Fix interaction of glReadPixels with Cogl
The screen recording wasn't working because of two bad interactions
with Cogl:

 - Buffered primitives weren't being flushed out
 - Cogl changes the pixel store values away from their default values

Thanks for Jon Nettleton for tracking down the source of the
problems with the recorder.

https://bugzilla.gnome.org/show_bug.cgi?id=598390
2010-01-28 13:54:58 -05:00
Colin Walters
d7e0051bc6 [StButton] Hold ref to self until animation completes
StButton has an internal animation for the border-image actor, then
it connects to the "completed" signal passing itself as data.  However,
if the button is destroyed, nothing prevents the animation's completed
signal from then causing a reference to freed memory.

Holding a reference to the button is the most straightforward fix here.

https://bugzilla.gnome.org/show_bug.cgi?id=607825
2010-01-26 14:28:57 -05:00
Colin Walters
2aa305b51d [StShadowTexture] Fix invalid unref of CoglHandle
This code appeared to treat the return value of clutter_texture_get_cogl_texture
as having a new reference, but in fact it doesn't.

https://bugzilla.gnome.org/show_bug.cgi?id=608119
2010-01-26 13:03:43 -05:00
Maxim Ermilov
d9008054cf Handle resolution changes
Added signal 'screen-size-changed' to ShellGlobal.
Connect to this signal in main.js and run the _relayout() method.
If Overview or calendar are visible when this signal emit, they will be hiding.
https://bugzilla.gnome.org/show_bug.cgi?id=584526
2010-01-19 21:32:36 +03:00
Florian Müllner
f8acd0f6f6 Match on executable names as well
Include matches on desktop entries' exec property in addition to the
name and comment ones.

https://bugzilla.gnome.org/show_bug.cgi?id=606743
2010-01-15 23:03:18 +01:00
Florian Müllner
ccc6a23f68 Fix missing translations for 'time ago' strings
Replace ngettext with dngettext and set the correct translation
domain, so gnome-shell's domain is searched for translations
rather than mutter's.

https://bugzilla.gnome.org/show_bug.cgi?id=597882
2010-01-15 17:14:03 +01:00
Dan Winship
11276a3505 Initial implementation of the message tray and notification daemon
From the message-tray branch. Most of the UI parts were written by
Marina, and most of the D-Bus parts by me.
2010-01-13 15:13:20 -05:00
Dan Winship
c90371d9d5 [ShellTextureCache] add methods for caching raw image data
shell_texture_cache_load_from_data() takes the contents of an image
file, while shell_texture_cache_load_from_raw() takes the actual pixel
data.
2010-01-13 15:13:20 -05:00
Marina Zhurakhinskaya
038a32330f [St] Add st_box_layout_move_child and st_box_layout_insert_actor 2010-01-13 15:13:20 -05:00
Florian Müllner
59d6029f47 Implement radial gradients for StWidget
Some theme authors have stated interest in radial gradient backgrounds.
The w3c has some draft:

http://dev.w3.org/csswg/css3-images/#radial-gradients

As this is rather complex, we add only some very basic support, which
extends our syntax for linear gradients:

background-gradient-direction: [vertical|horizontal|radial]

Gradients are centered circles, whose size is determined by the closest
side.

https://bugzilla.gnome.org/show_bug.cgi?id=604945
2010-01-11 23:38:34 +01:00
Florian Müllner
7486c09fbb Change handling of gradients
Some changes to the way we handle CSS gradients:

 * draw without padding, thus interpreting gradients as part of the
   background rather than as content

 * clip to (rounded) border area

 * draw the border along the gradient instead of trying to align the
   gradient layer with the background/border layer

 * use the border_image actor instead of the background_image one

https://bugzilla.gnome.org/show_bug.cgi?id=606257
2010-01-11 23:38:34 +01:00
Colin Walters
c17e1249d5 [panel] Scale up, center and fade application icon in app menu
Per 20091114 design.

https://bugzilla.gnome.org/show_bug.cgi?id=605491
2010-01-07 18:33:01 -05:00
Colin Walters
262f92e0be [ShellSlicer] New class to display center of child
A #StBin that has 0 minimum size, and will clip its child
in the middle.

https://bugzilla.gnome.org/show_bug.cgi?id=605491
2010-01-07 18:33:00 -05:00
Colin Walters
da797dff35 [Makefile-st.am] Generate st/st.h
All of the st-$foo.h files say to include st.h, but we didn't have
one.  Therefore, generate it.

https://bugzilla.gnome.org/show_bug.cgi?id=605491
2010-01-07 18:33:00 -05:00
Colin Walters
98a8dd682d [ShellAppUsage] Fix use-after-free
We were holding on to UsageData structure pointers in previously_running,
but those can be purged by the unused app cleanup.  Instead just hold
onto dup'd copies of the application id strings.
2010-01-06 13:34:11 -05:00
Florian Müllner
2dfe113a42 Implement -st-shadow for StWidget
Add support for a new -st-shadow property, which is based loosely
on the CSS3 box-shadow property:
http://www.css3.info/preview/box-shadow/

It defers from the specification as follows:

 * no multiple shadows
 * the optional color argument may be placed anywhere
 * the shape is not determined by the widget's bounding box,
   but by the background-image property

https://bugzilla.gnome.org/show_bug.cgi?id=603691
2010-01-05 21:48:09 +01:00
Carlos Martín Nieto
767fe0ebc2 [St] Don't leak the font family name
A copy of the string is made by pango_font_description_set_family()
and we don't need the string anymore, so we should free it

https://bugzilla.gnome.org/show_bug.cgi?id=605035
2010-01-04 13:49:47 -05:00
Siegfried-Angel Gevatter Pujals
e326202477 Use the preferred text editor when opening an extension's .js file
Change "./src/gnome-shell --create-extension" to use "gnome-open"
when opening the newly created .js file, so that it is launched
with the user's preferred text editor, instead of hardcoding gedit.
2009-12-18 20:26:41 +01:00
Siegfried-Angel Gevatter Pujals
45f4292259 Make "gnome-shell --create-extension" compatible with Python 2.5
Fallback to using the json-py module on systems with a Python
version older than 2.6 (which introduced native JSON support).
2009-12-18 20:22:51 +01:00
Colin Walters
288eae91e2 [ShellAppSystem] Initialize collation keys for info on-demand
In case of duplicate infos structures with the same id, the
info structures we get from looking up the id in app_id_to_info
aren't necessarily the same as those we used to match, so we
can't rely on matching to implicitly initialize info->casefolded_name.

Since the name collation key isn't used in matching results,
just in sorting, init it on-demand in the sorting which is also more
efficient.
2009-12-18 12:36:16 -05:00
Colin Walters
2cb4dfb4a4 [lookingGlass] Add primitive extensions list
In the future this should be more like the Firefox Addons UI
probably with enable/disable/update checking, but stub it out
here for now.

https://bugzilla.gnome.org/show_bug.cgi?id=599661
2009-12-18 11:20:05 -05:00
Colin Walters
55fbb9d0af [St] Implement text-decoration: [underline|strikethrough]
Move CSS handling of StLabel and StButton for their underlying
ClutterText objects into st_private, and implement support for
the underline and strikethrough St text-decoration properties.

Overline isn't implemented for lack of a corresponding Pango
attribute, and blink, well...

https://bugzilla.gnome.org/show_bug.cgi?id=599661
2009-12-18 11:20:05 -05:00
Colin Walters
aa9d3515a1 Add extensionSystem
Consumer documentation will live at http://live.gnome.org/GnomeShell/Extensions

In terms of implementation; basically we load extensions from the well-known
directories.  Add a GConf key to disable extensions by uuid.  There is a new
option --create-extension for the gnome-shell script which takes a bit of
interactive input, sets up some sample files, and launches gedit.

No extensions UI in this patch; that will come later.

https://bugzilla.gnome.org/show_bug.cgi?id=599661
2009-12-18 11:19:59 -05:00
Colin Walters
b7646d18ae Add search.js, rebase search system on top
The high level goal is to separate the concern of searching for
things with display of those things; for example in newer mockups,
applications are displayed exactly the same as they look in the
AppWell.

Another goal was optimizing for speed; for example,
application search was pushed mostly down into C, and we avoid
lowercasing and normalizing every item over and over.

https://bugzilla.gnome.org/show_bug.cgi?id=603523
2009-12-18 10:07:22 -05:00
Colin Walters
14df7cd62c [StOverflowBox] Vertical box which skips painting underallocated children
https://bugzilla.gnome.org/show_bug.cgi?id=603523
2009-12-18 10:01:36 -05:00
Colin Walters
5a3c3efbeb [ShellDocSystem] Check GTK+ version for constness of argument 2009-12-15 16:29:21 -05:00
Colin Walters
a442dfea14 Add class for handling recent docs
Push some of the JS docInfo down into C; crucially, this lets us
use the GIO async API.

https://bugzilla.gnome.org/show_bug.cgi?id=603522
2009-12-15 15:54:42 -05:00
Colin Walters
42757a0c87 Move Main.currentTime() and Main.createAppLaunchContext() into ShellGlobal
Primarily motivated by wanting these functions accessible from C.

https://bugzilla.gnome.org/show_bug.cgi?id=603522
2009-12-15 15:54:38 -05:00
Colin Walters
81b7c0170d Add set_skip_paint method
Ideally we'd be able to override _paint, but given that we can't
at the moment, this method gives a way to implement containers
which don't happen to paint all of their children.

https://bugzilla.gnome.org/show_bug.cgi?id=603522
2009-12-15 15:53:08 -05:00
Colin Walters
b6cc9c7ff6 Add functions to dynamically load/unload stylesheets
For implementing extensions, we want the ability to add a stylesheet
dynamically, and unload it as well.

https://bugzilla.gnome.org/show_bug.cgi?id=599661
2009-12-01 15:00:56 -05:00
Florian Müllner
6b816fa7dc Replace includes of glib/gi18n.h with glib/gi18n-lib.h
https://bugzilla.gnome.org/show_bug.cgi?id=602802
2009-11-24 15:26:09 -05:00
Colin Walters
e2ac769fd1 Bump save timeout to 5 minutes, close output asynchronously
The synchronous close causes us to block in fsync() which has extremely
poor interactivity implications on ext3.

Also, the 5 second timeout was an accidental commit from debugging, 5
minutes is fine.

https://bugzilla.gnome.org/show_bug.cgi?id=602456
2009-11-24 13:22:32 -05:00
Dan Winship
dd8f05c81d include "config.h" in all .c files
Also, fix shell-global.c to actually compile with config.h included.

Was supposed to fix bug 602802, but doesn't...
2009-11-24 09:15:35 -05:00
Colin Walters
2f1ca7bf28 Remove ShellButtonBox, button.js; Use St.Clickable in panel.js
StClickable replaces ShellButtonBox.  Reduce the number of
button-like things by deleting button.js.

To do so, add CSS style for the actitivies button.

https://bugzilla.gnome.org/show_bug.cgi?id=602131
2009-11-23 14:33:49 -05:00
Colin Walters
93f3412f70 Import ShellButtonBox as StClickable
Now a StBin, and add hover/active style properties.  Also, add the
event to the CLICKED signal.  Otherwise a straightforward namespace
transformation.

https://bugzilla.gnome.org/show_bug.cgi?id=602131
2009-11-23 14:33:48 -05:00
Colin Walters
f815844eb4 Move ShellDrawingArea to StDrawingArea
It's nicer to have ShellDrawingArea as a St widget so it can
participate more cleanly in CSS styling, such as queuing a redraw
automatically on style changes, and allowing subclasses to use
CSS styling.

https://bugzilla.gnome.org/show_bug.cgi?id=602131
2009-11-23 14:33:48 -05:00
Colin Walters
7b9f5b7643 Implement gradients for StWidget
Rather than having gradients be individually implemented by higher
level JS widgets, move basic gradient functionality into StWidget.
There is prior art in WebKit for CSS gradients:

http://webkit.org/blog/175/introducing-css-gradients/

However, implementing this would be quite a lot of work; all we
need in the Shell design at the moment is basic horizontal/vertical
linear gradients.  So, the syntax now supported is:

background-gradient-type: [vertical|horizontal]
background-gradient-start: color;
background-gradient-end: color;

https://bugzilla.gnome.org/show_bug.cgi?id=602131
2009-11-20 19:51:41 -05:00
Colin Walters
8ac97fe1a0 [StThemeNode] Re-add erroneously deleted (out) annotations
An earlier commit was overzealous in removing (out) annotations;
introspection supports (out) for integral types just fine, we
only need to remove them for (out) types where the caller needs
to allocate a boxed type.

https://bugzilla.gnome.org/show_bug.cgi?id=602131
2009-11-17 18:43:34 -05:00
Abderrahim Kitouni
3529b8c915 [StTable] now RTL aware
https://bugzilla.gnome.org/show_bug.cgi?id=584662
2009-11-16 11:46:29 -05:00
Abderrahim Kitouni
4e8206d60e [StBoxLayout] now RTL aware
https://bugzilla.gnome.org/show_bug.cgi?id=584662
2009-11-16 11:46:22 -05:00
Abderrahim Kitouni
a5edc78fac [StWidget] add API support for right-to-left UI
https://bugzilla.gnome.org/show_bug.cgi?id=584662
2009-11-16 11:46:09 -05:00
Dan Winship
8334b063f1 Deal with title-less windows
https://bugzilla.gnome.org/show_bug.cgi?id=601290
2009-11-13 16:04:17 -05:00
Dan Winship
050e710770 Use gnome-terminal rather than xterm+xeyes+xlogo in --xephyr mode
https://bugzilla.gnome.org/show_bug.cgi?id=588056
2009-11-13 14:43:10 -05:00
Dan Winship
985d707788 Port ShellStatusMenu to javascript
https://bugzilla.gnome.org/show_bug.cgi?id=601458
2009-11-13 14:21:31 -05:00
Dan Winship
9ddebf0480 Introspect src/gdmuser
In addition to the Makefile changes, we also change uid_t to gulong in
the public API (which matches how it was already represented in the
gobject properties).

https://bugzilla.gnome.org/show_bug.cgi?id=601458
2009-11-13 14:20:45 -05:00
Colin Walters
8c05003acf Add gnome-shell --eval-file
Convenience utility function for evaluating an arbitrary
JavaScript file.
2009-11-13 12:45:46 -05:00
Colin Walters
263d738ef6 [StTooltip] Fix _get_preferred_width
It was ignoring the label width.

https://bugzilla.gnome.org/show_bug.cgi?id=600734
2009-11-12 11:42:00 -05:00
Colin Walters
8040ad61c6 [StBoxLayout] Add missing _queue_relayout in _add_actor
https://bugzilla.gnome.org/show_bug.cgi?id=600734
2009-11-12 11:42:00 -05:00
Colin Walters
057f0effed [StBoxLayout] Add st_box_layout_get_n_children
https://bugzilla.gnome.org/show_bug.cgi?id=600734
2009-11-12 11:42:00 -05:00
Colin Walters
bf7b166237 [StBoxLayout] Add st_box_layout_remove_all, st_box_layout_destroy_children
In a variety of places we're using boxes as data-modeling displays,
and in doing so we often want to either remove the children or
explictly destroy them.

Now ideally Gjs would support callbacks, and this would make using
the for_each functions possible, but even then these functions
are more efficient and shorter to type, at least.

https://bugzilla.gnome.org/show_bug.cgi?id=600734
2009-11-12 11:42:00 -05:00
Colin Walters
dcd7762253 [StThemeNode] Don't give negative width/height for content boxes
If the space we're allocated is too small for our border + padding
constraints, don't give negative allocations to callers.  Squash
to zero.

It isn't really useful for callers to get negative content sizes,
and certainly breaks most allocation code.

https://bugzilla.gnome.org/show_bug.cgi?id=600734
2009-11-05 15:28:56 -05:00
Colin Walters
4f456b9689 Implement non-uniform borders (when not using corner_radius)
StTheme CSS supports different border widths for different sides.  Implement
it for StWidget by drawing the border internally.  However, we don't support
a nonzero corner-radius with nonuniform borders.

https://bugzilla.gnome.org/show_bug.cgi?id=599442
2009-11-04 16:47:17 -05:00
Colin Walters
e2e513ff08 Remove (out) "caller-allocates" annotations
GObject Introspection+gjs doesn't presently support (out) for caller-allocates
scenarios.

https://bugzilla.gnome.org/show_bug.cgi?id=599442
2009-11-04 16:47:17 -05:00
Colin Walters
37a948e4eb Add missing allow-none for set_style_pseudo_class
https://bugzilla.gnome.org/show_bug.cgi?id=599442
2009-11-04 16:47:17 -05:00
Colin Walters
b8d9319c32 Add missing allow-none for st_bin_set_child
https://bugzilla.gnome.org/show_bug.cgi?id=599442
2009-11-04 16:47:17 -05:00
Colin Walters
f549269934 [StBoxLayout] Implement raise and lower
Code copied from ClutterGroup.

https://bugzilla.gnome.org/show_bug.cgi?id=599442
2009-11-04 16:47:11 -05:00
Owen W. Taylor
2103a4da24 Add shell-global-private.h to Makefile.am
Distribute shell-global-private.h (as a non_gir_sources, since it
includes gjs.h and isn't scannable by gobject-introspection.)
2009-10-28 15:46:46 -04:00
Owen W. Taylor
627f86a9dc shell-global-private.h fixes:
- Include private header so shell-global.c compiles
- Move _shell_global_set_plugin to private header
2009-10-28 12:59:01 -04:00
Colin Walters
baf823c466 Store GjsContext pointer in ShellGlobal
Future functionality in ShellGlobal needs access to the GjsContext.

https://bugzilla.gnome.org/show_bug.cgi?id=599561
2009-10-28 12:31:58 -04:00
Dan Winship
6d9aadfa4d Add emacs modelines to all .c and .h files that were missing them 2009-10-27 11:27:45 -04:00
Colin Walters
d9ff1f2ec1 [ShellApp] Ignore removal of windows we're not interested in
Previously shell_app_remove_window assumed that it was being
passed a window in its list; rather than having callers check
whether a window is interesting and only if so removing it
from the app, just ignore removal of windows we aren't interested
in, like how we ignore addition of windows we already have.

https://bugzilla.gnome.org/show_bug.cgi?id=598502
2009-10-23 13:19:29 -04:00
Colin Walters
10991d363d [ShellWindowTracker] Create fallback apps again
Creating window-based apps got lost in the code refactoring.
2009-10-23 12:26:05 -04:00
Colin Walters
369e0c2c6f [ShellApp] Signal windows-changed when removing a window
https://bugzilla.gnome.org/show_bug.cgi?id=599412
2009-10-23 10:59:04 -04:00
Steve Frécinaux
7239eb2f90 [StThemeNode] Add support for 'width' and 'height' CSS properties.
The behavior in respect to borders matches CSS - the properties set the size of
the content exclusive of the borders (CSS3 box-sizing property - not implemented
here - changes this).

min-width/min-height correspond very closely to the CSS meanings.

width/height are a little different from the CSS meanings - the CSS meaning is
"exactly this size unless overridden by min/max-width/height" - but within the
realm of our layout algorithm, making them control natural size is pretty
close.

This way we can force elements to have a fixed natural or minimum size.

https://bugzilla.gnome.org/show_bug.cgi?id=598651
2009-10-21 20:18:32 +02:00
Steve Frécinaux
5b769138b6 [StThemeNode] round padding values intead of truncating them.
This way, 49.9999 will end up as 50 instead of 49.

https://bugzilla.gnome.org/show_bug.cgi?id=598651
2009-10-21 20:17:28 +02:00
Colin Walters
81d579aca0 Disconnect from window signal handlers when removing a window
We need to remove all of our signal handlers attached to a window
when being disposed.

https://bugzilla.gnome.org/show_bug.cgi?id=598502
2009-10-21 11:44:07 -04:00
Colin Walters
7548f2d71e [ShellWindowTracker] Don't skip "uninteresting" windows for focus
For the purposes of determining which application is focused, don't
skip "uninteresting" windows.  The old get_focused_window code
was used for usage tracking, but here we want reliable application
association.

Also convert a .text= to .set_text that was missed with the last
patch.

https://bugzilla.gnome.org/show_bug.cgi?id=599206
2009-10-21 11:30:13 -04:00
Colin Walters
e941e8088b Split ShellAppMonitor into ShellWindowTracker, ShellAppUsage
The two parts were mapping windows to applications, and
recording application usage statistics.  The latter part
(now called ShellAppUsage) is much more naturally built on top of
the former (now called ShellWindowTracker).

ShellWindowTracker retains the startup-notification handling.

ShellWindowTracker also gains a focus-app property, which is
what most things in the shell UI are interested in (instead of
window focus).

ShellAppSystem moves to exporting ShellApp from more of its
public API, rather than ShellAppInfo.  ShellAppSystem also
ensures that ShellApp instances are unique by holding
a hash on the ids.

ShellApp's private API is split off into a shell-app-private.h,
so shell-app.h can be included in shell-app-system.h.

Favorites handling is removed from ShellAppSystem, now inside
appFavorites.js.

Port all of the JavaScript for these changes.

https://bugzilla.gnome.org/show_bug.cgi?id=598646
2009-10-20 12:55:07 -04:00
Colin Walters
7f5c600133 Use a fixed ordering for well-known icons
Define the ordering for well-known icons; see
the page http://live.gnome.org/Features/StandardIconOrdering

https://bugzilla.gnome.org/show_bug.cgi?id=598313
2009-10-19 14:57:02 -04:00
Colin Walters
cd33dc7f22 Annotate list setters
Without these bindings don't know the type of list elements.

https://bugzilla.gnome.org/show_bug.cgi?id=598691
2009-10-16 16:04:46 -04:00
Dan Winship
79a614240b [ShellApp] fix app/window sort order
The window lists were not being resorted when user-time changed, and
the app list was mistakenly "penalizing" apps for having *any*
minimized windows, rather than for having *only* minimized windows.

https://bugzilla.gnome.org/show_bug.cgi?id=598389
2009-10-16 11:15:21 -04:00
Colin Walters
7c954898a2 Support fixed position children
When doing layout, check for whether x/y have been explicitly
specified, and if so honor those positions.

https://bugzilla.gnome.org/show_bug.cgi?id=598462
2009-10-15 17:40:58 -04:00
Colin Walters
497c74f4d8 Minor code cleanup: use child variable consistently
Preparation for a subsequent patch.

https://bugzilla.gnome.org/show_bug.cgi?id=598462
2009-10-15 17:40:58 -04:00
Colin Walters
d705c1bb52 [ShellApp] Fix handler signature for workspace switch
This was causing crashes or undefined behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=598227
2009-10-15 14:05:19 -04:00
Colin Walters
d9df7c1b1e [AppWell] Fix D&D for ShellApp
The drag and drop case needed to be updated to use ShellApp
correctly.  Export _is_transient for better compatibility.

https://bugzilla.gnome.org/show_bug.cgi?id=598227
2009-10-15 13:24:19 -04:00
Colin Walters
38c06ca837 Create ShellApp, rebase things on it
Previously, we had ShellAppInfo, which contains fundamental
information about an application, and methods on ShellAppMonitor
to retrieve "live" information like the window list.

AppIcon ended up being used as the "App" class which was painful
for various reasons; among them that we need to handle window
list changes, and some consumers weren't ready for that.

Clean things up a bit by introducing a new ShellApp class in C,
which currently wraps a ShellAppInfo.

AppIcon then is more like the display actor for a ShellApp.  Notably,
the ".windows" property moves out of it.  The altTab code which
won't handle dynamic changes instead is changed to maintain a
cached version.

ShellAppMonitor gains some more methods related to ShellApp now.

In the future, we might consider changing ShellApp to be a GInterface,
which could be implemented by ShellDesktopFileApp, ShellWindowApp.

Then we could axe ShellAppInfo from the "public" API and it would
return to being an internal loss mitigation layer for GMenu.

https://bugzilla.gnome.org/show_bug.cgi?id=598227
2009-10-14 14:37:34 -04:00
Colin Walters
ab0460ad59 Use clutter_actor_destroy in dispose, add _dispose where needed
ClutterGroup calls _destroy, but most of St was just calling _unparent.
This caused problems because the DESTROY signal was not emitted
for child elements after destroying a toplevel.  Also, in a GC'd
binding it would cause unpredictable lifetime of children.

Some St widgets simply didn't have _dispose at all; implement it.

Note because of the usage of the background_image in StButton,
we can't cleanly destroy it inside the StWidget.

https://bugzilla.gnome.org/show_bug.cgi?id=597845
2009-10-09 16:19:33 -04:00
Owen W. Taylor
a26b0b60d1 Fix srcdir != builddir build of St.gir
We need to use st_cflags which has -I$(srcdir) not ST_CFLAGS
when building St.gir.
2009-10-07 19:32:00 -04:00
Owen W. Taylor
60dbb19c2d Reference Meta-2.28.gir
Now that Mutter has been bumped to 2.28.0, we need to reference
Meta-2.28.gir not Meta-2.27.gir.
2009-10-07 19:27:17 -04:00
Owen W. Taylor
ff39edd1ee Deal with unknown flags from ClutterEvent.get_state()
When we get a ClutterModifierType from Clutter, it might contain
bits not in the enumeration. See bug 59771 for a similar problem
with GdkModifierType.

Add a wrapper Shell.get_event_state() around clutter_event_get_state()
to mask these bits out and only return approved bits.

https://bugzilla.gnome.org/show_bug.cgi?id=597735
2009-10-07 17:22:37 -04:00
Owen W. Taylor
400326e549 Add docs and (transfer none) to st_widget_get_theme_node()
st_widget_get_theme_node() was missing the (transfer none)
GObject Introspection causing crashes. Add that and document the
function.
2009-10-07 14:26:14 -04:00
Dan Winship
439daf828f [AppSwitcher] add a workaround for a gjs problem with GdkModifierType
gdk_display_get_pointer() sometimes returns values for the mask that
aren't part of the GdkModifierType enumeration, which gjs doesn't like
(bug 597292). Work around that by adding a C wrapper that strips out
the extra flags.

https://bugzilla.gnome.org/show_bug.cgi?id=597559
2009-10-06 16:07:37 -04:00
Owen W. Taylor
53fbabe2ca Use GtkIMContext instead of ClutterIMContext
Add StIMText, which is a drop-in replacement for ClutterIMText but
uses GtkIMContext instead of ClutterIMContext.

StIMText doesn't have preedit support (would need ClutterText
changes), so isn't going to be useful for complicated input methods,
but is good enough to get dead keys and similar working.

entry.js: Simple test case of StEntry
gnome-shell.modules: Remove clutter-imcontext module

https://bugzilla.gnome.org/show_bug.cgi?id=597471
2009-10-06 14:48:32 -04:00
Dan Winship
ff4ac0d02e [AppIcon] Improve shell_draw_box_pointer()
Add a new enum type for the pointer direction, rather than abusing
ClutterGravity, and implement the missing directions.

https://bugzilla.gnome.org/show_bug.cgi?id=597498
2009-10-06 09:53:47 -04:00
Owen W. Taylor
4ddc1118bb Work around libcroco < 0.6.2 parsing bug for 'rgba'
To work around a problem where libcroco < 0.6.2 can't handle
functions starting with 'r' or 'u', preconvert 'rgba' to 'RGBA'
when parsing stylesheets and then check for rgba()
case-insensitively.

(libcroco is uniformly case-sensitive, though the CSS spec requires
that ASCII should be handled case-insensitively.)

https://bugzilla.gnome.org/show_bug.cgi?id=597054
2009-10-05 16:25:38 -04:00
Colin Walters
2f2df61093 Cache applications for a menu
Rather than recomputing this each time someone asks, have a
cache of the apps for a given menu.

https://bugzilla.gnome.org/show_bug.cgi?id=597167
2009-10-02 19:30:42 -04:00
Colin Walters
c5ce405859 Ignore releases of buttons other than the activating button
Before we hardcoded popdowns to only button 1 before. But we need
to actually pop down on the release of the activating button.
(Once the button is released, if the we don't pop-down the menu,
then subsequently we let the user use any button.)

https://bugzilla.gnome.org/show_bug.cgi?id=596371
2009-10-02 19:28:25 -04:00
Richard Hughes
cbb3a3aec8 Fix make dist by including all the private files and the tests in the tarball 2009-10-02 17:02:25 +01:00
Siegfried-Angel Gevatter Pujals
243824ab80 Replace "round(x)" with "(int)(0.5 + x)"
round() is a C99 addition, so causes portability problems:
different C library versions require different #defines to
enable it. So simply avoid using it.
2009-10-01 22:39:04 +02:00
Owen W. Taylor
2cc41c6726 StButton: Fix property enumeration names
Property enumeration names should correspond exactly to the property names;
in particular the ACTIVE vs :checked disparity was confusing reading the
code.

http://bugzilla.moblin.org/show_bug.cgi?id=6504
2009-10-01 14:46:33 -04:00
Owen W. Taylor
5a42179a96 Port StTable to StThemeNode
Convert the StTable code from StStylable to StThemeNode. The
:row-spacing and :col-spacing GObject properties are converted
into spacing-rows and spacing-columns style properties.

A new interactive test is added for StTable.

https://bugzilla.gnome.org/show_bug.cgi?id=596811
2009-10-01 14:46:33 -04:00
Owen W. Taylor
af3ec56ca1 Handle adding children to StTable from Javascript
Remove the StTable specific methods to add actors:

 st_table_add_actor()
 st_table_add_actor_with_properties()

Since they shadow the generic ClutterContainer add_actor() method,
and patch in our add() convenience function as we do for
StBoxLayout.

https://bugzilla.gnome.org/show_bug.cgi?id=596811
2009-10-01 14:46:33 -04:00
Owen W. Taylor
289b19aa31 Import MxTable as StTable
Import table code from Mx library

https://bugzilla.gnome.org/show_bug.cgi?id=596811
2009-10-01 14:46:33 -04:00
Owen W. Taylor
91eb613d69 Turn StBoxLayout:spacing into a style property
Remove the StBoxLayout:spacing GObject property, and instead make
BoxLayout look up the spacing from the CSS style. This makes it
consistent with padding and will allow the use of units. (The
removal of the GObject property entirely instead of making it an
override is consistent with how we handle color, font, padding, etc.)

https://bugzilla.gnome.org/show_bug.cgi?id=596803
2009-10-01 14:46:32 -04:00
Owen W. Taylor
b77b205d37 Add clutter-text properties to StEntry and StLabel
Add clutter-text properties to allow getting access to the underlying
ClutterText actor. This corresponds to the get_clutter_text() methods.

The PROP_LABEL and PROP_ENTRY enum values are renamed to PROP_TEXT to
match the names of the properties that they correspond to, and the
properties of StEntry are reordered into alphabetical order.

Based on a patch from Colin Walters
https://bugzilla.gnome.org/show_bug.cgi?id=591245
http://bugzilla.moblin.org/show_bug.cgi?id=6313
2009-10-01 14:41:20 -04:00
Owen W. Taylor
a15205e6c4 Fix interaction of borders/background and scrolling
StBoxLayout: Make consistent that the area scrolled and clipped
to is the content area (excluding borders and padding.) Translate
back appropriately when chaining up so that the parent background
is drawn at the right place and picking on the box (if it's reactive)
picks at the right place on the screen.

clip-to-allocation is removed from StScrollView since it's just
not right - if the child has any non-moving elements, like headers or
borders, it will need to set a narrower clip. And even if the entire
child scrolls, we want to clip to an arrow that excludes the scrollbars.

https://bugzilla.gnome.org/show_bug.cgi?id=595997
2009-10-01 14:41:19 -04:00
Owen W. Taylor
28dbf7a06e Allocate children as wide as the scrolled area
When we are scrolling a vertical box horizontally , children should be
allocated horizontally as wide as the full horizontal scrolled area,
not just to the size of the "viewport". Similarly for a horizontal box.

http://bugzilla.moblin.org/show_bug.cgi?id=6312
https://bugzilla.gnome.org/show_bug.cgi?id=595996
2009-10-01 14:41:19 -04:00
Owen W. Taylor
1ec8e9eb6b Allow StBoxLayout to shrink down to its minimum size
When a StBoxLayout is allocated a size less than its natural size,
think "shrink" needs to be divided among the children that have
a smaller minimum size than natural size.

This is done by preferentially shrinking the children that are most
expanded from their minimum size and then increasing that set of
children until we've found enough total shrink.

A new method is used of allocating children at integral sizes - instead
of rounding the per-child extra amount to an integer (which causes
cumulative round-off errors), compute the position as we go along in
floats and round individually for each child widget.

Extend the box-layout test to include of a test of a box being set
to various widths, starting quite narrow.

http://bugzilla.moblin.org/show_bug.cgi?id=6311
https://bugzilla.gnome.org/show_bug.cgi?id=595995
2009-10-01 14:41:19 -04:00
Owen W. Taylor
fa09f7a6da Don't count not-visible children among expand children
When counting how many children we should divide extra space among,
don't count not-visible children.

http://bugzilla.moblin.org/show_bug.cgi?id=6310
https://bugzilla.gnome.org/show_bug.cgi?id=595995
2009-10-01 14:41:19 -04:00
Owen W. Taylor
d67e54d3ee Don't use the default stage when setting up adjustments
If the actor isn't in a stage, then setting up the adjustment
based on the actor's size (which we can't compute) and the
size of the default stage (which isn't relevant), doesn't make
sense. Just use arbitrary default values.

The adjustments will be updated to reasonable values when first
the box is first allocated.

It's not entirely clear to me why we ever want to compute the
adjustment settings this way; perhaps we should always use
default values.

http://bugzilla.moblin.org/show_bug.cgi?id=6307
https://bugzilla.gnome.org/show_bug.cgi?id=595996
2009-10-01 14:41:19 -04:00
Owen W. Taylor
d263c12e2e Match CSS for background extents
The CSS specification says that the background extends to the
edge of the border (settable in CSS3 with border-clip), make
BigRectangle match this by computing an "effective border color"
as 'border OVER background'.

(If we don't want this behavior - e.g., to be able to use the
transparent borders as margins, then alternatively transparent
border handling would have to be fixed in st-widget.c, since
prior to this transparent and translucent borders were handled
differently.)

https://bugzilla.gnome.org/show_bug.cgi?id=595993
2009-10-01 14:41:19 -04:00
Owen W. Taylor
4d55ccff39 Rename StThemeImage to StBorderImage
The current CSS3 border-image is close to a superset of what we were
doing for -hippo-background-image. Woot! rename StThemeImage to
StBorderImage and change parsing to look for:

 border-image: <url> <number>...

Rather than

 -st-background-image: <url> <length>...

percentanges for the border sizes are not currently supported, neither
are the keywords for handling of the middle part. We always do 'stretch'
for now.

https://bugzilla.gnome.org/show_bug.cgi?id=595990
2009-10-01 14:41:19 -04:00
Owen W. Taylor
2a0adc0fc8 Add support for colored borders
Use BigRectangle to draw the border and background if there's
a border width or border radius and no border image. (Only
uniform borders are supported for now with some deviations
from the CSS model noted in the comments.)

The background color and image parameters are removed from
StWidget's draw_background() method since they were not used
for StButton (the only current user) and the encapsulation
break that they presented caused some minor problems.

Add a test case for borders, and also use borders to style
the buttons in the 'inline-style' test case.

https://bugzilla.gnome.org/show_bug.cgi?id=595993
2009-10-01 14:41:19 -04:00
Owen W. Taylor
076e902b2c Centralize computations of border and padding into StThemeNode
Rather than repeating the computation of borders in many different
widget subclasses, add helper functions:

 st_theme_node_adjust_for_height()
 st_theme_node_adjust_preferred_width()
 st_theme_node_adjust_for_width()
 st_theme_node_adjust_preferred_height()
 st_theme_node_get_content_box()

That are used in get_preferred_width()/get_preferred_height() and
allocate() methods to consistently apply the necessary adjustments.
This allows removing the StPadding type.

Queueing a relayout when the borders/padding change is moved from
st_widget_real_style_changed() to the invoking code to allow access
to the old StThemeNode for comparison. (Should this be added as
a parameter to the signal?)

Borders are included in the geometry adjustments, but borders
are not yet drawn.

https://bugzilla.gnome.org/show_bug.cgi?id=595993
2009-10-01 14:41:19 -04:00
Owen W. Taylor
8c72623da3 StThemeNode: Add border-radius support
Add support for parsing and caching the border-radius property.
Different radii for the 4 corners are supported; elliptical corners
are not supported.

https://bugzilla.gnome.org/show_bug.cgi?id=595993
2009-10-01 14:41:18 -04:00
Owen W. Taylor
1fd25573e5 Fix problems with 4-sided padding: specifiers
The test for identifying such a specifier was wrong, and the last
value was assigned to the wrong sides.

https://bugzilla.gnome.org/show_bug.cgi?id=595990
2009-10-01 14:41:18 -04:00
Owen W. Taylor
6527dbc8b7 Add support for inline styles
Add support for passing an inline-style string when creating a
StThemeNode.

Hook this up to a new 'style' property of StWidget.

Add a test case that demonstrates using this to update font sizes
on the fly.

https://bugzilla.gnome.org/show_bug.cgi?id=595991
2009-10-01 14:41:18 -04:00
Owen W. Taylor
a9fd350396 Port our imported parts of Mx to ShellTheme
ShellTheme replaces both StStyle and ccss_stylesheet_t.

The interface StStylable is replaced by usage of ShellThemeNode.
A concrete node class allows some significant optimizations of property
inheritance that would have been much more difficult to achieve with
the highly abstract pair of StStylable and ccss_node_t.

Some operations that were previously on StStylable (like the
::style-changed signal) are directly on NtkWidget.

Custom properties are no longer registered as param-specs; instead you
call directly into shell theme node to look up a length or color:

shell_theme_node_get_length (theme_node, "border-spacing", FALSE, &spacing);

The dependency on libccss is dropped, while preserving all existing
functionality and adding proper parsing and inheritance of font properties
and proper inheritance for the 'color' property.

Some more javascript tests for CSS functionality are added; workarounds for
a CSS bug where *.some-class was needed instead of .some-class are removed.

https://bugzilla.gnome.org/show_bug.cgi?id=595990
2009-10-01 14:41:18 -04:00
Owen W. Taylor
e91e8e993d Add emacs mode-lines to ST sources
To each .c and .h file, add:

 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */

'gnu' is the default anyways for Emacs, but indent-tabs-mode is not,
so this sets things up to correspond to the policy of no-tabs.

http://bugzilla.moblin.org/show_bug.cgi?id=6467
2009-10-01 14:41:18 -04:00
Owen W. Taylor
276d9a9302 Import stylesheet code from hippo-canvas
Import:

  HippoCanvasTheme      => StTheme
  HippoCanvasThemeImage => StThemeImage
  HippoCanvasStyle      => StThemeNode

StThemeContext is a new class managing the theme for a stage and
global properties like resolution.

test-theme.c is a newly written test program to do verification of the
style matching and property handling rules.

Various changes are made in the import:

 - Comprehensive reindentation
 - guint32 pixels replaced with ClutterColor
 - General pseudo-class support added
 - Old-fashioned (non-bordered) background image support added, though
   with no support for repeat, etc.
 - Bug fixes for problems revealed by test program

https://bugzilla.gnome.org/show_bug.cgi?id=595990
2009-10-01 14:41:18 -04:00
Owen W. Taylor
d4c577a299 Remove stale C files
Remove several stale C files that we are no longer using; now
that we have a distcheck hook to catch non-distributed files, these
would otherwise prevent distchecking.

https://bugzilla.gnome.org/show_bug.cgi?id=595988
2009-10-01 14:41:17 -04:00
Owen W. Taylor
83402957bb Add GObject Introspection annotations
Add GObject Introspection annotations to methods where needed, in
particular adding (transfer none) to return values that don't transfer
ownership.

st_texture_cache_get_actor() and st_texture_cache_get_texture()
are annotated as (transfer none) since they return a newly
created *floating* texture.

https://bugzilla.gnome.org/show_bug.cgi?id=591245
2009-10-01 14:41:17 -04:00
Owen W. Taylor
58325fca76 Import MxEntry, MxLabel, MxClipboard
For now this commit introduces an external dependency on clutter-imcontext.

https://bugzilla.gnome.org/show_bug.cgi?id=591245
2009-10-01 14:41:17 -04:00
Owen W. Taylor
8b6962f3bf Import MxBoxLayout, MxBoxLayoutChild
https://bugzilla.gnome.org/show_bug.cgi?id=591245
2009-10-01 14:41:17 -04:00
Colin Walters
459a3b18f2 Add a "datadir" property
Will be used to load stylesheets from main.js.

https://bugzilla.gnome.org/show_bug.cgi?id=591245
2009-10-01 14:41:16 -04:00
Colin Walters
ac2be7f0d1 Remove hardcoded '28' from StScrollView
https://bugzilla.gnome.org/show_bug.cgi?id=591245
2009-10-01 14:41:16 -04:00
Owen W. Taylor
f6b80d5ed4 Import MxScrollView and dependencies
https://bugzilla.gnome.org/show_bug.cgi?id=591245
2009-10-01 14:41:16 -04:00
Owen W. Taylor
d291e568fd Import Mx core as ST
Import the core MxWidget/MxBin and their dependencies; we use the
namespace "St" (Shell Toolkit) because it is the same length as Mx
so enabling easy sharing of code, but makes it clear that this is
a friendly fork and not a literal import.

Based on a patch by Colin Walters <walters@verbum.org>

https://bugzilla.gnome.org/show_bug.cgi?id=591245
2009-10-01 14:41:16 -04:00
Dan Winship
2b78d5bd5d Improve support for multihead setups
Fix panel, app switcher, and looking glass to limit themselves to the
primary monitor, and run dialog to limit itself to the monitor
containing the currently-focused window.

The overview is also limited to the primary monitor now (with the
other monitors being blacked out), although the workspaces within the
overview are shaped like the full "screen" (the bounding box of all
monitors). To be fixed later.

https://bugzilla.gnome.org/show_bug.cgi?id=593060
2009-10-01 13:46:03 -04:00
Colin Walters
ec92bfba14 Compress multiple load requests
Before, if the texture cache received a request to load say
the themed icon for an application multiple times (as could happen
since we have multiple application displays), it would often create
a thread for each one and in fact, load the pixbuf multiple times.

Avoid this by keeping track of outstanding requests.

https://bugzilla.gnome.org/show_bug.cgi?id=596121
2009-09-25 13:41:52 -04:00
Colin Walters
0f63ae1869 Only use visible actors for paging/allocation
It's expected that containers skip not-visible actors when
allocating, etc.

https://bugzilla.gnome.org/show_bug.cgi?id=596119
2009-09-25 12:08:29 -04:00
Colin Walters
3564d78d30 Use shellwm.takeover_keybinding for Alt-F1 and Alt-F2
This fixes a regression where we weren't using the correct event
timestamps, because for both of these we were sending an XClientMessage
to ourself.

https://bugzilla.gnome.org/show_bug.cgi?id=596262
2009-09-25 11:28:13 -04:00
Dan Winship
11d884d724 [AppSwitcher] Port Alt-Tab switcher to custom_handler interface
https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-09-24 16:13:42 -04:00
Colin Walters
0143512e00 Don't leak when loading an already-cached item
A previous patch fixed a leak when loading items which shouldn't
be cached, but we also had a leak if two requests for the same
item were outstanding.  In that case we load the pixbuf twice,
but should discard subsequent loads when we notice we've already
cached it.

https://bugzilla.gnome.org/show_bug.cgi?id=595321
2009-09-23 17:06:44 -04:00
Dan Winship
0e4a86f2e6 [AppIcon] move well menu code from appDisplay.js to appIcon.js
The menu is needed by the app switcher as well as the overview, so
make it slightly more generic and move the code to appIcon. Also add
support for drawing the menu either to the right of or below the icon.

https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-09-23 10:02:04 -04:00
Colin Walters
90e6769638 Fix memory leak in getting applications from menu
https://bugzilla.gnome.org/show_bug.cgi?id=595321
2009-09-22 18:13:09 -04:00
Colin Walters
3ba6ff4ca9 Fix shell_hook_paint_red_border
In overriding _paint we're already offset to our allocation
coordinates, don't re-add them.

https://bugzilla.gnome.org/show_bug.cgi?id=595514
2009-09-21 18:34:57 -04:00
Colin Walters
19fa0b5d5b Unref GIcon we use internally
https://bugzilla.gnome.org/show_bug.cgi?id=595321
2009-09-21 18:22:40 -04:00
Colin Walters
79db50500d Squash small memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=595321
2009-09-21 18:21:04 -04:00
Colin Walters
f26c9ab245 Fix memory leaks
Need to free the returned thumbnail path, and in the CachePolicy.NONE
case we also need to unref the cogl handle.

https://bugzilla.gnome.org/show_bug.cgi?id=595321
2009-09-21 18:21:02 -04:00
Colin Walters
2812c21322 Allow popup menu to be persistent, and support direct window selection
When the user click+hold+release over the icon, the effect we want
is for the menu to stick around.

Also, allow the user to mouse over the actual windows and select
them directly.  If the user mouses over a window, reflect that in
the menu.

https://bugzilla.gnome.org/show_bug.cgi?id=594699
2009-09-14 15:37:29 -04:00
Colin Walters
7ac9fb2dd0 Make popdown,popup methods idempotent; remove 'popdown' for 'cancelled'
Callers will generally expect _popup and _popdown to be a no-op if
the menu is already in that state; make it so.

Also change the 'popdown' signal to be 'cancelled'; this is
clearer and allows us to avoid having activate also call popdown.

https://bugzilla.gnome.org/show_bug.cgi?id=594699
2009-09-14 15:37:26 -04:00
Colin Walters
dfe16f4af6 Revert "[AppWell] Allow popup menu to be persistent, and support direct window selection"
This reverts commit 6e31e59b57.
2009-09-11 18:58:30 -04:00
Colin Walters
e52cb3c213 [ShellAppMonitor] Handle Iceweasel tripping Firefox window title detection
We have compatibility code which detects from the window title what
an application is.  However, the code didn't handle the case where
we discovered by title, but didn't have the expected .desktop file
installed.
2009-09-11 18:57:44 -04:00
Colin Walters
6e31e59b57 [AppWell] Allow popup menu to be persistent, and support direct window selection
When the user click+hold+release over the icon, the effect we want
is for the menu to stick around.

Also, allow the user to mouse over the actual windows and select
them directly.  If the user mouses over a window, reflect that in
the menu.
2009-09-11 18:57:44 -04:00
Colin Walters
42e3a93c20 More gracefully handle a situation where starting shell failed
If start_shell() threw an exception before, we'd overwrite it with
an exception in the finally() clause.  Handle this and just print a message
and let the exception propagate.
2009-09-09 15:49:31 -04:00
Colin Walters
37ee16b34d Use clutter_event_get_* instead of ShellGlobal
Before Clutter gained accessors for event information, we had
shell_global_ functions.  Now that Clutter has them, use them and
delete the ShellGlobal code.

http://bugzilla.gnome.org/show_bug.cgi?id=594561
2009-09-08 17:58:13 -04:00
Colin Walters
5880b3b0ed [ShellButtonBox] Add event to activate signal
This allows access to things such as keyboard modifier state and
event time cleanly.

http://bugzilla.gnome.org/show_bug.cgi?id=594565
2009-09-08 17:58:13 -04:00