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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
round() is a C99 addition, so causes portability problems:
different C library versions require different #defines to
enable it. So simply avoid using it.
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
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
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
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
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=591245http://bugzilla.moblin.org/show_bug.cgi?id=6313
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
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=6311https://bugzilla.gnome.org/show_bug.cgi?id=595995
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=6307https://bugzilla.gnome.org/show_bug.cgi?id=595996
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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.
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.
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
When we have multiple windows for an application, implement the following
behavior:
* On click + immediate release, go to the most recently used
* On click, hold for 0.6s, pop up a menu with windows, filtering
the window list to just those windows.
Mouse over on the window list highlights the moused-over window.
Implement this by splitting well item into InactiveWellItem
and RunningWellItem, sharing a base class BaseWellItem.
The application menu code wants to do a popup after a given timeout
while holding. We can implement that by adding a function to
manually break the grab held by the button box.
Freeze+thaw around the hover and pressed property notification on leave
since handlers may want to depend on the pressed state on a hover
transition.
The windows we considered for both the app monitor and the overview
workspaces were the same, but the code was duplicated once in C, once
in Javascript.
On OpenSolaris /usr/bin/python is 2.4; use AM_PATH_PYTHON to find
a newer Python. (The PYTHON environment variable can also be set
before running configure to override the search.)
http://bugzilla.gnome.org/show_bug.cgi?id=578196
Add .AUTOPARALELL which is my GNU-make fix for projects to specify
that the build is parallel-safe, and to automatically parallelize.
Add a missing dependency on built sources, and specify --libtool
to be safe.
Only mouse button 1 is supposed to activate button controls; other
mouse buttons should do nothing unless there is a context menu.
Checking the click count is important, since double-clicks will
otherwise look like unpaired button presses.
http://bugzilla.gnome.org/show_bug.cgi?id=593504
There's seldom a good justification for connecting to signals on
yourself rather than using the default handler slots in the class.
But in particular using the default handler slots means that
an application can connect to ::button-press-event and get in
before the default handling, to implement a button that does
something on press.
http://bugzilla.gnome.org/show_bug.cgi?id=593503
Add an 'active' property to ShellButtonBox. This allows ShellButtonBox
to be used as a "toggle button". It's up the application to connect
it to the ::activate signal; there's no default handling of this.
(It's seldom that the only time you want to toggle a toggle button
through the user interface, so you need some connection to the backend
data store in any case. Removing the default handling all-together
prevents weird interactions.)
When we have built-in styling for ShellButtonBox the 'active' state
would be one of the elements that would be affect the styling.
http://bugzilla.gnome.org/show_bug.cgi?id=593502
shell-global.[ch]: Add shell_global_display_is_grabbed() that
uses the newly added meta_display_get_grab_op() to check
for existing grabs.
shell-status-menu.[ch]: Add shell_status_menu_is_active() to
check if the menu is popped up. Check for active grabs before
popping the menu up. Use gtk_menu_popdown() rather than
gtk_widget_hide(). Remove an excess gtk_widget_show() and
some excess casts.
panel.js: Check whether the status menu is popped up after button
release, and if it's not popped up, unhighlight the button.
Reported by Nuno Donato
http://bugzilla.gnome.org/show_bug.cgi?id=593362
gnome-shell.in: Remove the code to replace gnome-panel by attaching
to it with GDB; this was always problematical (required gdb, debug
symbols, finding the pid of gnome-panel, etc.)
gnome-shell-build-setup.sh: Require 2.26 to be in place before building
the shell; remove gdb from the list of required packages.
http://bugzilla.gnome.org/show_bug.cgi?id=593325
This is a Box subclass which adds several signals useful for implementing
"button like" behavior, such as hover and pressed states, as well as
click activation on release.
Instead of starting Xephyr automatically, require --xephyr to be
passed explicitly.
This makes the operation easier to understand and has the benefit
of allowing running in Xephyr mode when some other window manager
(like gnome-shell!) is running. We also want to emphasize that
Xephyr is a development tool, and not a good preview of the
user-interface.
http://bugzilla.gnome.org/show_bug.cgi?id=592881
In both, using our allocation directly for the child is wrong; we
should create a new allocation that's our width and height.
In ShellDrawingArea, also need to chain up to parent.
For Firefox/OpenOffice, right now we have a workaround in the
code where we look at their "title" property. However, we
weren't monitoring that property for changes, and I'm fairly
certain Firefox at least was mapping a window and then very
quickly changing its title after. So we need to handle
dynamic changes.
Split out the wm_class mapping from the title hack. It was
messy and weird to have the two mixed because they're not
at all related, and we're not trying to handle WM_CLASS changes
right now.
Explicitly connect to notify::title in the case where we had
a title fallback. When a title changes, just treat it as
an add+remove.
In the Application Menu area in the panel, hook up to app-added
and app-removed so we get notification of the active app changing.
Clean up the vendor prefix handling a bit, and add "mozilla" so that
we pick up "mozilla-firefox.desktop" from Firefox's (recent?) change
to have a WM_CLASS of "Firefox".
Separate the application monitor logic for "tracking" and "usage tracking".
The first means we associate an application with a window. The second
means we count focus time inside that window, and consider the window
interesting from a user point of view.
(Really, should probably split ShellAppMonitor into two classes along
this line, with the second consuming the first).
For the purposes of counting running applications and returning
the list of open windows for an application, skip not-usage-tracked
windows.
Together this allows us to associate the Nautilus desktop window
with the nautilus.desktop, but not show "File Manager" open all
of the time.
We now have functionality in Mutter to grab the keyboard on behalf
of a plugin. This avoids interactions with the key handling code
in Mutter that could leave the user with an inconsistent state
and no way to get out of it.
src/shell-global.[ch]: Change shell_global_grab_keyboard() and
shell_global_grab_keyboard() to shell_global_begin_modal()
shell_global_end_modal() and call mutter_plugin_begin_modal()
mutter_plugin_end_modal() rather than directly grabbing the
keyboard.
main.js: Call global.begin_modal/end_modal from Main.startModal()
and Main.endModal()
altTab.js; Remove call to Main.startModal() - we're letting Mutter
handle modality for Alt-Tab.
main.js lookingGlass.js overview.js runDialog.js: Rename
Main.startModal() to Main.beginModal() for consistency with
naming in mutter and ShellGlobal.
http://bugzilla.gnome.org/show_bug.cgi?id=590686
If Mutter exits with an exit status of 0, then that most likely
means that it was replaced by another window manager and we shoudln't
try to start the previous window manager and the panel.
(We don't actually know about the panel, but assume that if someone
is replacing us they know what they are doing.)
When Mutter exits with a signal, we know we want to restart.
When Mutter exits with a non-signal non-zero exit status, it's
ambiguous - we could be exiting because we lost the connection to
the X server, or because of a assertion failure in gnome-shell.
We assume the latter; if the X server is gone, all that will happen
is a bit of noise.
To know why Mutter exited accurately, we always wait() and
kill() the Mutter process, and then, if running in Xephyr, clean up
Xephyr afterwards. This has the nice side effect of exiting when
gnome-shell does and not forcing the user to close Xephyr manually.
http://bugzilla.gnome.org/show_bug.cgi?id=591171
The design has smaller icons in two columns. Add a new
custom display to docDisplay for it.
Clean up some of the texture cache handling for recent URIs so
it's not size-dependent, since the dash size is now different
from the default GenericDisplay size.
Use MetaGroup for a window when looking up applications. If
we know the application for a TYPE_NORMAL window in the group,
use that.
However, we aren't always going to know the application for a window. In
that case, create a fake one.
ShellAppInfo has a "transient" flag so we know not to write these
fake apps to the usage file.
Clean up the idle focus handler to better handle the case where
no window is focused, and where we don't want to track the
particular window.
Update track_window to create the fake window.
When a window goes away, we want to delete the usage.
Rewrite shell_app_monitor_get_running_apps to be based
on the window_to_app hash, because that's what has the pointer
to ShellAppInfo*. Before we were looking up all ids through
ShellAppSystem, but that shouldn't be holding a ref to transients.
Change the well display icon to be centered, since our icons for
window apps aren't 48 pixels.
We need to use the -lib variant which in turn uses the
GETTEXT_PACKAGE define, because the default translation
domain is actually mutter, not gnome-shell.
$(builddir) is not a standard automake variable. With autoconf < 2.64
it ends up getting set in every Makefile.in to '.' (because autoconf
defines it), but that is no longer the case for 2.64.
Since $(builddir) was always '.', just use that instead.
Infrastructure for localization; hook up intltool, create po/
and po/POTFILES.in. We need to call bindtextdomain/bind_textdomain_codeset.
Switch to gnome-autogen.sh to call intltool.
If we pass in -1 for both width and height, we'd attempt
to scale the image to 0x0. Don't do that; just avoid
scaling the pixbuf and let ClutterTexture do it for us.
Because of a history of cut and paste, the different enumeration
and marshal generation generation shell snippets were using the
same temporary file names. This caused problems for parallel
builds.
http://bugzilla.gnome.org/show_bug.cgi?id=591474
This is a start at the "Active Appliction Item" component of the
shell design. Currently we just show the currently focused
application. When launching a new application, we show that as well.
The implementation here is not complete; basically when launching
we de-focus the active one, and the application well shows the
most recent startup sequence.
This kind of fails in the case of multiple sequences, and we
also don't correctly de-focus the current window in other
launch paths.
Pass the error variable to g_key_file_load_from_data_dirs in
Shell.AppSystem.get_default().load_from_desktop_file again, and
use a try/catch in places.js.
This fixes Shell.TextureCache.get_default().load_thumbnail so
that it can be used to get thumbnails (with an icon matching
the mimetype or, in the worst case, gtk-file, as fallback) for
items which don't have a GtkRecentlyUsed object. This is needed
for the Zeitgeist integration.
- Avoid error '"iconname" may be used uninitialized in this function'
by initializing said variable to NULL.
- Define shell_util_get_file_description as static (like the other
similar functions) to avoid another compiler error.
- Don't save errors from g_key_file_load_from_data_dirs into the
variable "error" (ie. pass NULL to it instead). Without this,
gnome-shell crashes if the key file can't be found (with message
"Error invoking Shell.load_from_desktop_file: Valid key file could
not be found in search dirs").
- Check the result of the load_from_desktop_file() call in places.js,
as it may be null.
Previously, ShellAppSystem only loaded (and cached) the set of
.desktop files from applications.menu and settings.menu, using
the gnome-menus library. The ShellAppInfo structure was
a "hidden typedef" for GMenuTreeEntry.
But we need to support loading an arbitrary .desktop file. Thus,
refactor the ShellAppInfo into a real struct, with a refcount,
and allow it to point to either a GMenuTreeEntry or a GKeyFile.
Also, in the case where we fail to lookup an icon for an
application, ensure we return a 0 opacity texture.
Use ShellGenericContainer to implement a fully dynamic layout
for the application well. It's still fixed to 4 columns by default,
but no longer requires a fixed width to be passed in on start.
With another chunk of work, it could likely try to adjust to
the case where we can only fit fewer than 4 items in the well.
Remove the border highlighting on mouseover, since that caused
reallocations, and the grid layout isn't trivial.
Delete the unused shell_global_get_word_with function.
For both of these, because of optimizations a few patches ago, we
ended up relying on hash table ordering which caused instability
in the application well among other things. Define an ordering
for both.
The favorites is just the order of the GConf keys, and new items
get appended. In the future we should allow insertion at any
point which the grid could use.
For running applications order, define a new "initially_seen_sequence"
transient variable which is just an monotonically incrementing
integer assigned to an application for the first time we saw it
running in this session. When an application is closed, it's reset.
When exiting from --replace mode, we want to start the new
gnome-panel with a reasonable working directory so that if, you say,
open a terminal from it it doesn't start off in the gnome-shell
directory.
(gnome-shell itself is running in $HOME because mutter changes
directory itself at startup.)
Reported by Mathieu Bridon
http://bugzilla.gnome.org/show_bug.cgi?id=591145
Some C library versions have __attribute__((warn_unused_result)) on
fgets(). We really don't care since we are just throwing the data
away, but check the result anyways.
When AM_SILENT_RULES is available, use it to strip down the output
of make so we can see what's important rather than gigantic long
compile lines.
Use 'make V=1' to see everything again.
Fix a couple of places where we had 'cmp' rather than 'cmp' and were
getting standard-error spew about missing files when generating
enum-types.h files.
http://bugzilla.gnome.org/show_bug.cgi?id=591002
src/shell-global.c src/shell-process.c: Remove dead code
src/shell-texture-cache.c src/shell-status-menu.c: Remove
<foo>_new() functions that weren't in the header file and
not used anyways:
src/shell-texture-cache.[ch]: Fix a prototype that used ()
when (void) was intended.
http://bugzilla.gnome.org/show_bug.cgi?id=590998
Move the GStreamer initialization from the Javascript code into
shell_recorder_init(). This avoids a dependency on the GStreamer
introspection information and will make it easier to drop the
gir-repository module dependency.
Said function in genericDisplay.js was returning the index of the
actor based upon its position in the entire list, while everywhere
else indexes relative to the currently displayed page were used.
This made actions in the details pane break (bug #590949), so I
replace it with a new function in shell-overflow-list.c,
shell_overflow_list_get_actor_index, which is page based.
Subclass ClutterGroup (to avoid having to implement all of dispose,
raise, lower, add, etc.), and have it proxy the allocation requests
out into signals. We have to group up the two out parameters
into a struct unfortunately.
Included example code in the C file source for now.
The previous application monitoring code was originally designed
to be based on WM_CLASS, which was then resolved on a server.
We have that resolution code locally now, so instead
of saving WM_CLASS data, save application IDs.
Also, inside the WM we have a much better
infrastructure for tracking windows. In particular, rather
than polling, we can just watch for focus notification on
the display, and window add/remove.
Instead of polling XScreensaver, use DBus to watch org.gnome.Session
which already has an idle time watch.
Now there is no polling at all inside the monitor.
When we fail to load a texture, make sure we keep it 0 opacity to avoid
a white square. Also this is useful to avoid the square while loading
a texture asynchronously.
Corresponding with the design, if an application is in a running
state (has > 0 windows open), draw a glow behind the name.
To make the display look a bit nicer, set the width of each item
to be equal to the longest word among all the items.
Make sure that we calculate the next update time correctly.
Store timeout time instead of the timeout delta, so that it doesn't get outdated.
Create a new callback when the time update happens for the original callback.
Make sure last visited time is updated in the details pane by keeping track
of the description actors created for the detail actors.
Add comments to the new functions.
Avoid depending on gdb for replacing an existing panel, since it
requires debuginfo and gdb installed.
Instead we grab the org.gnome.Panel DBus name, using DBus name
replacement semantics.
Extend ShellTextureCache by adding the concept of a policy, which
we expose to the public API for loading URIs.
This lets us have the shell tell the cache to keep the information
icon texture around forever.
Secondly, fix the caching of recent info; we shouldn't always be
loading the backup pixbuf. Move recent info loading entirely
into ShellTextureCache.
GenericDisplay wasn't quite completely converted to the ShellOverflowList
model. Since the list now holds all actors, the indexing/wrapping
was incorrect.
Add a property which lets us keep track of how many items are displayed,
use this in genericDisplay.
Avoid setting selectedIndex to -2 when going up with no items.
If we're not displaying any results at all, don't attempt keynav (for now).
Make the ClutterText and ClutterTexture from the status menu
button available to JavaScript, and from there improve the
font definition of the user name.
shell-status-menu.[ch]: Add public get_name() and get_icon()
functions that return the user name label and icon
texture, remove the markup from update_name_text().
panel.js: Set the font for the button consistently with that
of the other panel labels.
Move thumbnail creation into ShellTextureCache. It's now asynchronous,
and we cache the result.
Create a DocManager class which keeps around the DocInfo objects between
invocations. This is also where we ensure we remove thumbnails for
recent items not known anymore.
Before, we looked up application data in several ways; the ShellAppSystem
exported just application ids (though it parsed the .desktop files internally),
and we'd create a Gio.DesktopAppInfo object (reparsing the desktop file again),
wrapping that inside a JavaScript AppInfo class, and finally the AppDisplay
would again parse the .desktop file to get the categories.
Also, to look up applications by id previously, we traversed the entire
menu structure each time.
Some qualities such as the NoDisplay flag were not easily exposed in the old
system. And if we wanted to expose them we'd have to change several different
application information wrapper classes.
All in all, it was quite suboptimal.
The theme of this new code is basically "just use libgnome-menus". We do
not call into Gio for app lookups anymore. The new Shell.AppInfo class
is a disguised pointer for the GMenuTreeEntry item.
To fix the caching, we keep a simple hash table of desktop id -> ShellAppInfo.
ShellDrawingArea is a size-independent wrapper for a ClutterCairoTexture.
Useful when drawing non-fixed size areas.
ShellStack is a simple container class which holds items
in a completely overlapping Z stack. The main difference
from ClutterGroup is that items will be constrained to
(and allocated) the size of the stack, not getting their
preferred size always.
Although methods like gconf_client_get/set_bool() and such are usable
from gjs, get_list/set_list is not, since there's only one method for
all list types. So ShellGConf wraps GConfClient and adds separate
typed list methods.
Also, add a detailed "changed" signal that can easily be connected to
from js, since we can't currently use gconf_client_notify_add()
directly.