Commit Graph

117 Commits

Author SHA1 Message Date
Florian Müllner
df5d5583eb lookingGlass: Fix position on multi-head
We currently assume that the primary monitor is located at (0, 0),
fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=707996
2013-09-13 00:03:24 +02:00
Jasper St. Pierre
9ba970b83d lookingGlass: Fix newline replacing
text.replace() returns the new string as strings in JS are immutable.
2013-09-11 15:02:32 -04:00
Adel Gadllah
d2709c681f lookingGlass: Avoid infinite animation time
Math.max(x / y, 0.5) will return infinite when y is 0. Fix that by using
Math.min() which was the actual intent of the patch.
2013-08-04 13:51:06 +02:00
Jasper St. Pierre
0e6625f719 lookingGlass: Ensure that we don't divide by zero
Cap the lower limit of the looking glass tween at 0.5.

https://bugzilla.gnome.org/show_bug.cgi?id=704448
2013-08-04 05:47:50 -04:00
Florian Müllner
11215374ff lookingGlass: Use uiGroup as parent instead of panelBox
Currently lookingGlass relies on some odd BoxLayout behavior, which
allows children to use fixed positioning without affecting the parent's
size request. As this behavior is scheduled for removal, add the
looking glass dialog directly to Main.uiGroup.

https://bugzilla.gnome.org/show_bug.cgi?id=703808
2013-07-09 23:19:20 +02:00
Jasper St. Pierre
938b1ff06a lookingGlass: Remove a useless container
https://bugzilla.gnome.org/show_bug.cgi?id=699975
2013-05-09 09:49:12 -04:00
Jasper St. Pierre
ecd838bf01 lookingGlass: Remove an unused separator between results
At one time, this may have had styling, but it's not there now,
and I don't see a reason to add it back.

https://bugzilla.gnome.org/show_bug.cgi?id=699975
2013-05-09 09:49:12 -04:00
Alban Crequy
a8a4a85dac lg: add a reference to lookingGlass in the Extensions tab.
When the user clicks on "View Source" or "Web Page" in the "Extensions" tab of
looking glass, the callback _onViewSource() or _onWebPage() is called and they
try to close looking glass: this._lookingGlass.close();

But it does not work and generate the exception "this._lookingGlass is
undefined". This patch fixes that.

https://bugzilla.gnome.org/show_bug.cgi?id=693814
2013-02-20 23:14:53 +00:00
Jasper St. Pierre
a43be186d3 lookingGlass: Remove old hack for static functions on interfaces
This has been fixed with the addition of interfaces in Gjs.
2013-02-08 14:31:08 -05:00
Florian Müllner
b682c8e052 main: Move KeybindingMode into Shell
Having the definition in C instead of Javascript allows sharing
the corresponding header with gnome-settings-daemon.

https://bugzilla.gnome.org/show_bug.cgi?id=643111
2013-02-04 16:48:40 +01:00
Jasper St. Pierre
fa1420b384 lookingGlass: Move to an inspect() function
Rather than add invalid results to the place where you enter JavaScript
commands when you use the eyedropped, add an inspect() function and add
a fake call to it.

https://bugzilla.gnome.org/show_bug.cgi?id=690726
2012-12-28 03:20:37 -05:00
Florian Müllner
b58f502dd6 main: Add optional keybindingMode parameter to pushModal()
For now we just use it to assign an identifier to modal modes in
which we want to allow some keybindings, but we don't use it for
any actual filtering; we'll start doing this shortly.

https://bugzilla.gnome.org/show_bug.cgi?id=688202
2012-11-17 01:44:22 +01:00
Jasper St. Pierre
0d62ec5b03 lookingGlass: Fix object inspector for multi-monitor scenarios
Otherwise the object inspector appears off-screen.

https://bugzilla.gnome.org/show_bug.cgi?id=683982
2012-09-16 17:38:18 -03:00
Jasper St. Pierre
e616877fd2 js: Fix up for Clutter.Color changes
Spotted by darkxst on IRC.

https://bugzilla.gnome.org/show_bug.cgi?id=683073
2012-08-31 16:43:51 -03:00
Jasper St. Pierre
c21b1e5fe0 st: Remove StIconType
GTK+ works by explicitly specifying a -symbolic suffix for all icons.
Do the same here.

https://bugzilla.gnome.org/show_bug.cgi?id=682540
2012-08-29 16:41:09 -03:00
Jasper St. Pierre
66197b18b6 lookingGlass: Don't pass too many arguments to Clutter.ungrab_*
https://bugzilla.gnome.org/show_bug.cgi?id=680426
2012-08-03 14:25:35 -03:00
Jasper St. Pierre
360e6e790a lookingGlass: Use one red border effect
This makes the code a bit cleaner, and reduces the chances of
having a border effect "leaking", or having two at the same time.

https://bugzilla.gnome.org/show_bug.cgi?id=679944
2012-07-16 20:39:55 -04:00
Jasper St. Pierre
d0807c8276 lookingGlass: Don't use a global
As part of wanting to reuse some of the looking glass components,
don't use Main.lookingGlass, but instead pass the parent around.
Don't adjust the evaluator just yet, though. We'll split it into
a separate class soon.

https://bugzilla.gnome.org/show_bug.cgi?id=679944
2012-07-16 20:39:55 -04:00
Jasper St. Pierre
75d0362cd8 link: Remove
The looking glass is the only consumer of the Link, and it's such a
basic wrapper around a button that it's not worth it.

https://bugzilla.gnome.org/show_bug.cgi?id=679944
2012-07-16 20:39:55 -04:00
Jasper St. Pierre
4f7c554d8d lookingGlass: Remove old signal handler
This 'selected' signal is from the days of the "Heirarchy" tab, before
it was replaced by the "Windows" tab. Those were the days.

https://bugzilla.gnome.org/show_bug.cgi?id=679944
2012-07-16 20:39:55 -04:00
Jasper St. Pierre
8b81f23caf lookingGlass: Use a more standard chevron
'>>>' is used by the REPL history (as well as plenty of other REPLs).
Using 'js>>>' to enter things makes the history look unaligned and strange.

https://bugzilla.gnome.org/show_bug.cgi?id=679944
2012-07-16 20:39:55 -04:00
Cosimo Cecchi
e756c2dbce js: use System.gc() instead of shell_global_gc()
gjs now offers a gc() method in the System module, no need to use our
own.

https://bugzilla.gnome.org/show_bug.cgi?id=679832
2012-07-12 20:11:38 -04:00
Jasper St. Pierre
a1837dde68 lookingGlass: Don't use a signal callback on 'paint' to draw the border
Instead, use a ClutterEffect, the proper API that has existed for since 1.0.
The 'paint' signal will go away for Clutter 2.0.

https://bugzilla.gnome.org/show_bug.cgi?id=679464
2012-07-05 14:20:50 -04:00
Jasper St. Pierre
c9296191a8 js: Remove unnecessary versions of clutter_actor_get_children
clutter_actor_get_children requires making a temporary GSList from
a linked list structure, and then creating a JS Array from that GSList.
For simple cases like the number of children, use clutter_actor_get_n_children.

https://bugzilla.gnome.org/show_bug.cgi?id=677426
2012-06-11 13:10:25 -04:00
Jasper St. Pierre
78e894c6f2 lookingGlass: Remove the "Errors" tab
We already have one too many logging systems. Remove the errors tab
and make global.log/global.logError point to window.log/window.logError
instead.

https://bugzilla.gnome.org/show_bug.cgi?id=675104
2012-04-29 17:12:07 -04:00
Jasper St. Pierre
348044bc8a lookingGlass: Sort introspected property names
https://bugzilla.gnome.org/show_bug.cgi?id=673187
2012-03-30 11:57:45 -04:00
Rui Matos
aa5d352a06 Remove the shell_get_event_state() wrapper
The bug that this wrapper was working around has been fixed for quite some
time: https://bugzilla.gnome.org/show_bug.cgi?id=650329.
2012-02-28 18:11:36 +01:00
Jasper St. Pierre
a8b081661c st-box-layout: Remove insert_actor/insert_before
Now that 'insert_child_at_index' and 'insert_child_below' exist
on ClutterActor, these aren't necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-22 17:00:44 -05:00
Giovanni Campagna
6ca0d4a5ef Looking Glass: fix error line when there are no errors
The No error code path still used the old metadata object.

https://bugzilla.gnome.org/show_bug.cgi?id=669694
2012-02-08 23:29:44 +01:00
Jasper St. Pierre
a622aba7eb extensionUtils: Create and allow access to a new "extension" object
The "extension" object is what I previously called the "helper" object.
It contains the extension importer object as well as the metadata object.
Things that were previously added on to the metadata (state, path, dir, etc.)
are now part of this new "extension" object.

With the new importer changes brought on by the extension prefs tool,
extensions are left without a way to import submodules at the global scope,
which would make them rely on techniques like:

  var MySubModule;

  function init(meta) {
      MySubModule = meta.importer.mySubModule;
  }

That is, there's now a lot more meaningless boilerplate that nobody wants
to write and nobody wants to reivew.

Let's solve this with a few clever hacks.
Allow extensions to get their current extension object with:

  let extension = imports.misc.extensionUtils.getCurrentExtension();

As such, extensions can now get their own extension object before the
'init' method is called, so they can import submodules or do other things
at the module scope:

  const MySubModule = extension.imports.mySubModule;
  const dataPath = GLib.build_filenamev([extension.path, 'awesome-data.json']);

https://bugzilla.gnome.org/show_bug.cgi?id=668429
2012-02-07 16:00:37 -05:00
Giovanni Campagna
17c46c2452 Port everything to class framework
The last patch in the sequence. Every place that was previously
setting prototype has been ported to Lang.Class, to make code more
concise and allow for better toString().

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00
Giovanni Campagna
d6b6f814d3 Port all classes with inheritance to class framework
All classes that have at least one other derived class (and thus
benefit from the framework) have been now ported. These includes
NMDevice, SearchProvider, AltTab.SwitcherList, and some other
stuff around.

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00
Florian Müllner
c3528f5b6b lookingGlass: Fix global key press handler
No idea why connecting a key-press-event to a non-reactive actor
used to work, but some Clutter update broke it. Obvious fix is
to make the actor reactive.

https://bugzilla.gnome.org/show_bug.cgi?id=664582
2011-11-22 22:33:05 +01:00
Florian Müllner
a9ab8784c4 Adapt to mutter moving to GSettings
https://bugzilla.gnome.org/show_bug.cgi?id=663429
2011-11-11 20:32:43 +01:00
Jason Siefken
3941961f8b lookingGlass: Add tab-completion
https://bugzilla.gnome.org/show_bug.cgi?id=661054
2011-11-05 13:05:11 -04:00
Jasper St. Pierre
cc94076ffb extensionSystem: Fix deferred loading of extensions
We need to show the list of installed extensions on EGO, so we can't defer
loading by not creating the extension meta.

https://bugzilla.gnome.org/show_bug.cgi?id=662704
2011-10-27 17:21:49 -04:00
Jason Siefken
ff01ed5e4b lookingGlass: add Ctrl+PageUp/PageDown key shortcuts for switching tabs
The view selector in the overview does it too, so why not here?

https://bugzilla.gnome.org/show_bug.cgi?id=652223
2011-10-21 14:51:55 -04:00
Jasper St. Pierre
d23c374326 Revert "Add Ctrl+PageUp/PageDown key shortcuts for switching tabs"
This reverts commit a69ebc8a68.

This was accidentally the old change.
2011-10-21 14:50:49 -04:00
Jason Siefken
a69ebc8a68 Add Ctrl+PageUp/PageDown key shortcuts for switching tabs
https://bugzilla.gnome.org/show_bug.cgi?id=652223
2011-10-21 09:22:15 -04:00
Jasper St. Pierre
b07e45e214 lookingGlass: Add an easier way to see extension errors
Use the extensions tab to show errors belonging to each extension.

https://bugzilla.gnome.org/show_bug.cgi?id=660546
2011-10-18 13:13:48 -04:00
Florian Müllner
9439da81c4 Add context menus to some entries
Use ShellEntry.addContextMenu() to add context menus to most
existing entries, with the exception of:

 - the login dialog - it may act be used to enter either the
                      username (e.g. no password entry) or the
                      password, and copy/paste does not make sense
                      (nowhere to copy from, nowhere to paste to)
 - notifications    - while adding a context menu is useful here as
                      well, it will require changes to the tray's
                      focus grab handling, so leave those entries
                      out for now

https://bugzilla.gnome.org/show_bug.cgi?id=659275
2011-10-17 15:29:32 +02:00
Dan Winship
75b824d032 *.js: Make emacs modelines consistent
js2-mode is no longer developed and we recommend js-mode these days,
so switch the modelines to specify that, and make them consistent
across all files.

https://bugzilla.gnome.org/show_bug.cgi?id=660358
2011-10-11 08:05:12 -04:00
Jasper St. Pierre
4831d9c3a3 lookingGlass: Fix referencing undefined variables 2011-10-04 16:50:58 -04:00
Jasper St. Pierre
f13f5bc1bb Use '' for non-translated strings
Pay attention to the style guidelines.

https://bugzilla.gnome.org/show_bug.cgi?id=660600
2011-10-04 16:47:53 -04:00
Jasper St. Pierre
2407ec7b47 Revert "lookingGlass: Add an easier way to see extension errors"
This reverts commit 1e6b824ede.
2011-10-04 13:15:10 -04:00
Jasper St. Pierre
70eeb75716 lookingGlass: Show extension state in gnome-shell
We translate and create an actor to show the extension state, but we never
actually add it anywhere. Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=660494
2011-10-04 13:14:54 -04:00
Jasper St. Pierre
4eec7413c7 Revert "lookingGlass: Show extension state in gnome-shell"
This reverts commit 32dc24c59b, as it caused
a string break.

https://bugzilla.gnome.org/show_bug.cgi?id=660494
2011-10-02 12:05:21 -04:00
Jasper St. Pierre
1e6b824ede lookingGlass: Add an easier way to see extension errors
Use the extensions tab to show errors belonging to each extension.

https://bugzilla.gnome.org/show_bug.cgi?id=660546
2011-09-30 12:19:30 -04:00
Jasper St. Pierre
32dc24c59b lookingGlass: Show extension state in gnome-shell
We translate and create an actor to show the extension state, but we never
actually add it anywhere. Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=660494
2011-09-29 13:15:27 -04:00
Colin Walters
36bfe8c533 memory: Add display of elapsed seconds since a garbage collection
This is useful information for debugging.

https://bugzilla.gnome.org/show_bug.cgi?id=659254
2011-09-17 10:16:35 -04:00