format: move shell_format_int_alternative_output() to ShellJS

gnome-shell-extension-prefs uses format(), but can't pull in Shell
(which is a dependency for the module), since that in turn would pull in
Meta. Fix this by moving the introspected int format function to ShellJS
instead.

https://bugzilla.gnome.org/show_bug.cgi?id=673106
This commit is contained in:
Cosimo Cecchi
2012-04-10 11:21:19 -04:00
parent 8089f24c81
commit 49d8e6da40
5 changed files with 16 additions and 16 deletions

View File

@ -79,3 +79,15 @@ shell_js_add_extension_importer (const char *target_object_script,
JS_EndRequest (context);
return ret;
}
/**
* shell_js_format_int_alternative_output:
* @intval:
*
* Returns: (transfer full):
*/
gchar *
shell_js_format_int_alternative_output (gint intval)
{
return g_strdup_printf ("%Id", intval);
}

View File

@ -11,6 +11,8 @@ gboolean shell_js_add_extension_importer (const char *target_object_script,
const char *directory,
GError **error);
gchar *shell_js_format_int_alternative_output (gint intval);
G_BEGIN_DECLS
#endif /* __SHELL_JS_H__ */

View File

@ -868,15 +868,3 @@ shell_util_wifexited (int status,
return ret;
}
/**
* shell_format_int_alternative_output:
* @intval:
*
* Returns: (transfer full):
*/
gchar *
shell_format_int_alternative_output (gint intval)
{
return g_strdup_printf ("%Id", intval);
}

View File

@ -52,8 +52,6 @@ gboolean shell_session_is_active_for_systemd (void);
gboolean shell_util_wifexited (int status,
int *exit);
gchar *shell_format_int_alternative_output (gint intval);
G_END_DECLS