Compare commits
8 Commits
3.22.0
...
wip/ptomat
Author | SHA1 | Date | |
---|---|---|---|
a1e41b6519 | |||
8c49267658 | |||
d0bab1f7ac | |||
f00826f3fb | |||
717c0ea19f | |||
3cd8dd0f32 | |||
aedd616346 | |||
b3de3ff00b |
@ -6,9 +6,7 @@
|
||||
const Lang = imports.lang;
|
||||
const Signals = imports.signals;
|
||||
|
||||
const GLib = imports.gi.GLib;
|
||||
const Gio = imports.gi.Gio;
|
||||
const ShellJS = imports.gi.ShellJS;
|
||||
|
||||
const Config = imports.misc.config;
|
||||
const FileUtils = imports.misc.fileUtils;
|
||||
@ -140,12 +138,11 @@ function createExtensionObject(uuid, dir, type) {
|
||||
return extension;
|
||||
}
|
||||
|
||||
var _extension = null;
|
||||
|
||||
function installImporter(extension) {
|
||||
_extension = extension;
|
||||
ShellJS.add_extension_importer('imports.misc.extensionUtils._extension', 'imports', extension.path);
|
||||
_extension = null;
|
||||
let oldSearchPath = imports.searchPath.slice(); // make a copy
|
||||
imports.searchPath = [extension.path];
|
||||
extension.imports = imports['.']; // "subdir" creates a new importer object
|
||||
imports.searchPath = oldSearchPath;
|
||||
}
|
||||
|
||||
const ExtensionFinder = new Lang.Class({
|
||||
|
@ -1632,6 +1632,8 @@ const NMApplet = new Lang.Class({
|
||||
this._readConnections();
|
||||
this._readDevices();
|
||||
this._syncNMState();
|
||||
this._syncMainConnection();
|
||||
this._syncVPNConnections();
|
||||
|
||||
this._client.connect('notify::manager-running', Lang.bind(this, this._syncNMState));
|
||||
this._client.connect('notify::networking-enabled', Lang.bind(this, this._syncNMState));
|
||||
|
15
po/ar.po
15
po/ar.po
@ -9,8 +9,8 @@ msgstr ""
|
||||
"Project-Id-Version: gnome-shell master\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
|
||||
"shell&keywords=I18N+L10N&component=general\n"
|
||||
"POT-Creation-Date: 2016-09-07 09:41+0000\n"
|
||||
"PO-Revision-Date: 2016-09-16 21:26+0200\n"
|
||||
"POT-Creation-Date: 2016-09-16 19:30+0000\n"
|
||||
"PO-Revision-Date: 2016-09-21 14:51+0200\n"
|
||||
"Last-Translator: Khaled Hosny <khaledhosny@eglug.org>\n"
|
||||
"Language-Team: Arabic <doc@arabeyes.org>\n"
|
||||
"Language: ar\n"
|
||||
@ -323,7 +323,7 @@ msgstr "غير مدرج؟"
|
||||
|
||||
#. Translators: this message is shown below the username entry field
|
||||
#. to clue the user in on how to login to the local network realm
|
||||
#: js/gdm/loginDialog.js:854
|
||||
#: js/gdm/loginDialog.js:859
|
||||
#, javascript-format
|
||||
msgid "(e.g., user or %s)"
|
||||
msgstr "(مثلا مستخدم أو %s)"
|
||||
@ -331,12 +331,12 @@ msgstr "(مثلا مستخدم أو %s)"
|
||||
#. TTLS and PEAP are actually much more complicated, but this complication
|
||||
#. is not visible here since we only care about phase2 authentication
|
||||
#. (and don't even care of which one)
|
||||
#: js/gdm/loginDialog.js:859 js/ui/components/networkAgent.js:271
|
||||
#: js/gdm/loginDialog.js:864 js/ui/components/networkAgent.js:271
|
||||
#: js/ui/components/networkAgent.js:289
|
||||
msgid "Username: "
|
||||
msgstr "اسم المستخدم: "
|
||||
|
||||
#: js/gdm/loginDialog.js:1196
|
||||
#: js/gdm/loginDialog.js:1201
|
||||
msgid "Login Window"
|
||||
msgstr "نافذة الولوج"
|
||||
|
||||
@ -749,7 +749,7 @@ msgstr "للأسف لم يُفلح هذا. أعِد المحاولة."
|
||||
|
||||
#. Translators: this is the other person changing their old IM name to their new
|
||||
#. IM name.
|
||||
#: js/ui/components/telepathyClient.js:760
|
||||
#: js/ui/components/telepathyClient.js:765
|
||||
#, javascript-format
|
||||
msgid "%s is now known as %s"
|
||||
msgstr "غيّر %s اسمه إلى %s"
|
||||
@ -914,8 +914,6 @@ msgid "Power off after updates are installed"
|
||||
msgstr "أطفئ بعد تثبيت التحديثات"
|
||||
|
||||
#: js/ui/endSessionDialog.js:137
|
||||
#| msgctxt "title"
|
||||
#| msgid "Restart & Install Updates"
|
||||
msgctxt "title"
|
||||
msgid "Restart & Install Upgrade"
|
||||
msgstr "أعد التشغيل و ثبّت الترقية"
|
||||
@ -1394,7 +1392,6 @@ msgid "%s Disabled"
|
||||
msgstr "%s معطّل"
|
||||
|
||||
#: js/ui/status/network.js:632
|
||||
#, fuzzy
|
||||
#| msgid "Connection error"
|
||||
msgid "Connect to Internet"
|
||||
msgstr "اتصل بالإنترنت"
|
||||
|
1981
po/uz@cyrillic.po
1981
po/uz@cyrillic.po
File diff suppressed because it is too large
Load Diff
@ -78,7 +78,7 @@ gnome_shell_cflags = \
|
||||
-DGNOME_SHELL_PKGLIBDIR=\"$(pkglibdir)\"
|
||||
|
||||
privlibdir = $(pkglibdir)
|
||||
privlib_LTLIBRARIES = libgnome-shell-js.la libgnome-shell-menu.la libgnome-shell.la
|
||||
privlib_LTLIBRARIES = libgnome-shell-menu.la libgnome-shell.la
|
||||
noinst_LTLIBRARIES += libgnome-shell-base.la
|
||||
|
||||
shell_built_sources = \
|
||||
@ -200,7 +200,7 @@ gnome_shell_CPPFLAGS = \
|
||||
|
||||
# Here, and after, we repeat mutter and bluetooth libraries just for the rpath
|
||||
# The dependency is already pulled in by libtool
|
||||
gnome_shell_LDADD = libgnome-shell.la libgnome-shell-js.la $(GNOME_SHELL_LIBS) $(MUTTER_LIBS)
|
||||
gnome_shell_LDADD = libgnome-shell.la $(GNOME_SHELL_LIBS) $(MUTTER_LIBS)
|
||||
gnome_shell_LDFLAGS = -rpath $(MUTTER_TYPELIB_DIR)
|
||||
gnome_shell_DEPENDENCIES = libgnome-shell.la
|
||||
|
||||
@ -212,7 +212,7 @@ nodist_gnome_shell_extension_prefs_SOURCES = \
|
||||
$(top_builddir)/js/js-resources.h \
|
||||
$(NULL)
|
||||
gnome_shell_extension_prefs_CPPFLAGS = $(gnome_shell_cflags)
|
||||
gnome_shell_extension_prefs_LDADD = libgnome-shell-js.la $(GNOME_SHELL_LIBS)
|
||||
gnome_shell_extension_prefs_LDADD = $(GNOME_SHELL_LIBS)
|
||||
gnome_shell_extension_prefs_LDFLAGS = -rpath $(MUTTER_TYPELIB_DIR)
|
||||
|
||||
if HAVE_NETWORKMANAGER
|
||||
@ -226,30 +226,13 @@ nodist_gnome_shell_portal_helper_SOURCES = \
|
||||
$(top_builddir)/js/js-resources.h \
|
||||
$(NULL)
|
||||
gnome_shell_portal_helper_CPPFLAGS = $(gnome_shell_cflags)
|
||||
gnome_shell_portal_helper_LDADD = libgnome-shell-js.la $(GNOME_SHELL_LIBS)
|
||||
gnome_shell_portal_helper_LDADD = $(GNOME_SHELL_LIBS)
|
||||
gnome_shell_portal_helper_LDFLAGS = -rpath $(MUTTER_TYPELIB_DIR)
|
||||
|
||||
endif
|
||||
|
||||
########################################
|
||||
|
||||
libgnome_shell_js_la_SOURCES = \
|
||||
shell-js.h \
|
||||
shell-js.cpp \
|
||||
$(NULL)
|
||||
|
||||
libgnome_shell_js_la_LIBADD = \
|
||||
$(GNOME_SHELL_JS_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
libgnome_shell_js_la_LDFLAGS = \
|
||||
-avoid-version
|
||||
|
||||
libgnome_shell_js_la_CPPFLAGS = \
|
||||
$(GNOME_SHELL_JS_CFLAGS)
|
||||
|
||||
########################################
|
||||
|
||||
shell_recorder_sources = \
|
||||
shell-recorder.c \
|
||||
shell-recorder.h
|
||||
@ -366,13 +349,6 @@ Shell_0_1_gir_SCANNERFLAGS = \
|
||||
INTROSPECTION_GIRS += Shell-0.1.gir
|
||||
CLEANFILES += Shell-0.1.gir
|
||||
|
||||
ShellJS-0.1.gir: libgnome-shell-js.la
|
||||
ShellJS_0_1_gir_CFLAGS = $(libgnome_shell_la_CPPFLAGS) -I $(srcdir)
|
||||
ShellJS_0_1_gir_LIBS = libgnome-shell-js.la
|
||||
ShellJS_0_1_gir_FILES = $(libgnome_shell_js_la_SOURCES)
|
||||
INTROSPECTION_GIRS += ShellJS-0.1.gir
|
||||
CLEANFILES += ShellJS-0.1.gir
|
||||
|
||||
St-1.0.gir: libst-1.0.la
|
||||
St_1_0_gir_INCLUDES = Clutter-1.0 Gtk-3.0
|
||||
St_1_0_gir_CFLAGS = $(st_cflags) -DST_COMPILATION
|
||||
|
@ -6,8 +6,6 @@
|
||||
#include <gjs/gjs.h>
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include "shell-js.h"
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
@ -51,18 +49,3 @@ main (int argc, char *argv[])
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* HACK:
|
||||
Add a dummy function that calls into libgnome-shell-js.so to ensure it's
|
||||
linked to /usr/bin/gnome-shell-extension-prefs even when linking with
|
||||
--as-needed. This function is never actually called.
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=670477
|
||||
*/
|
||||
void _shell_link_to_shell_js (void);
|
||||
|
||||
void
|
||||
_shell_link_to_shell_js (void)
|
||||
{
|
||||
shell_js_add_extension_importer (NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
15
src/main.c
15
src/main.c
@ -25,7 +25,6 @@
|
||||
|
||||
#include "shell-global.h"
|
||||
#include "shell-global-private.h"
|
||||
#include "shell-js.h"
|
||||
#include "shell-perf-log.h"
|
||||
#include "st.h"
|
||||
|
||||
@ -480,17 +479,3 @@ main (int argc, char **argv)
|
||||
|
||||
return ecode;
|
||||
}
|
||||
|
||||
/* HACK:
|
||||
Add a dummy function that calls into libgnome-shell-js.so to ensure it's
|
||||
linked to /usr/bin/gnome-shell even when linking with --as-needed.
|
||||
This function is never actually called.
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=670477
|
||||
*/
|
||||
void _shell_link_to_shell_js (void);
|
||||
|
||||
void
|
||||
_shell_link_to_shell_js (void)
|
||||
{
|
||||
shell_js_add_extension_importer (NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
@ -277,6 +277,7 @@ shell_global_init (ShellGlobal *global)
|
||||
XDisplayName (NULL));
|
||||
(void) g_mkdir_with_parents (path, 0700);
|
||||
global->runtime_state_path = g_file_new_for_path (path);
|
||||
g_free (path);
|
||||
|
||||
global->settings = g_settings_new ("org.gnome.shell");
|
||||
|
||||
|
@ -1,77 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "shell-js.h"
|
||||
|
||||
#include <gio/gio.h>
|
||||
#include <gjs/gjs.h>
|
||||
#include <gjs/gjs-module.h>
|
||||
|
||||
/**
|
||||
* shell_js_add_extension_importer:
|
||||
* @target_object_script: JavaScript code evaluating to a target object
|
||||
* @target_property: Name of property to use for importer
|
||||
* @directory: Source directory:
|
||||
* @error: A #GError
|
||||
*
|
||||
* This function sets a property named @target_property on the object
|
||||
* resulting from the evaluation of @target_object_script code, which
|
||||
* acts as a GJS importer for directory @directory.
|
||||
*
|
||||
* Returns: %TRUE on success
|
||||
*/
|
||||
gboolean
|
||||
shell_js_add_extension_importer (const char *target_object_script,
|
||||
const char *target_property,
|
||||
const char *directory,
|
||||
GError **error)
|
||||
{
|
||||
jsval target_object;
|
||||
GList *contexts;
|
||||
JSContext *context;
|
||||
char *search_path[2] = { 0, 0 };
|
||||
gboolean ret = FALSE;
|
||||
|
||||
/* Take the first GjsContext from all of them --
|
||||
* we should only ever have one context, so this
|
||||
* should be alright. */
|
||||
contexts = gjs_context_get_all ();
|
||||
context = (JSContext*) gjs_context_get_native_context ((GjsContext*)contexts->data);
|
||||
g_list_free_full (contexts, g_object_unref);
|
||||
|
||||
JS_BeginRequest (context);
|
||||
|
||||
/* This is a bit of a hack; ideally we'd be able to pass our target
|
||||
* object directly into this function, but introspection doesn't
|
||||
* support that at the moment. Instead evaluate a string to get it. */
|
||||
if (!JS_EvaluateScript(context,
|
||||
JS_GetGlobalObject(context),
|
||||
target_object_script,
|
||||
strlen (target_object_script),
|
||||
"<target_object_script>",
|
||||
0,
|
||||
&target_object))
|
||||
{
|
||||
gjs_log_exception(context);
|
||||
g_set_error(error,
|
||||
G_IO_ERROR,
|
||||
G_IO_ERROR_FAILED,
|
||||
"Unable to import %s", target_object_script);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!JSVAL_IS_OBJECT (target_object))
|
||||
{
|
||||
g_error ("shell_js_add_extension_importer: invalid target object");
|
||||
goto out;
|
||||
}
|
||||
|
||||
search_path[0] = (char*)directory;
|
||||
gjs_define_importer (context, JSVAL_TO_OBJECT (target_object), target_property, (const char **)search_path, FALSE);
|
||||
ret = TRUE;
|
||||
|
||||
out:
|
||||
JS_EndRequest (context);
|
||||
return ret;
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
#ifndef __SHELL_JS_H__
|
||||
#define __SHELL_JS_H__
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
gboolean shell_js_add_extension_importer (const char *target_object_script,
|
||||
const char *target_property,
|
||||
const char *directory,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __SHELL_JS_H__ */
|
Reference in New Issue
Block a user