Use g types for consistency

This commit is contained in:
Matthias Clasen 2010-06-07 17:48:09 -04:00
parent 6427e93757
commit c2a539eff0
4 changed files with 31 additions and 31 deletions

View File

@ -168,14 +168,14 @@ enum
static guint application_signals[LAST_SIGNAL] = { 0 }; static guint application_signals[LAST_SIGNAL] = { 0 };
typedef struct { typedef struct {
char *name; gchar *name;
char *description; gchar *description;
guint enabled : 1; guint enabled : 1;
} GApplicationAction; } GApplicationAction;
struct _GApplicationPrivate struct _GApplicationPrivate
{ {
char *appid; gchar *appid;
GHashTable *actions; /* name -> GApplicationAction */ GHashTable *actions; /* name -> GApplicationAction */
GMainLoop *mainloop; GMainLoop *mainloop;
@ -185,7 +185,7 @@ struct _GApplicationPrivate
guint actions_changed_id; guint actions_changed_id;
#ifdef G_OS_UNIX #ifdef G_OS_UNIX
char *dbus_path; gchar *dbus_path;
GDBusConnection *session_bus; GDBusConnection *session_bus;
#endif #endif
}; };
@ -197,7 +197,7 @@ static void _g_application_platform_init (GApplication *
static gboolean _g_application_platform_acquire_single_instance (GApplication *app, static gboolean _g_application_platform_acquire_single_instance (GApplication *app,
GError **error); GError **error);
static void _g_application_platform_remote_invoke_action (GApplication *app, static void _g_application_platform_remote_invoke_action (GApplication *app,
const char *action, const gchar *action,
guint timestamp); guint timestamp);
static void _g_application_platform_remote_quit (GApplication *app, static void _g_application_platform_remote_quit (GApplication *app,
guint timestamp); guint timestamp);
@ -366,7 +366,7 @@ g_application_action_free (gpointer data)
* Since: 2.26 * Since: 2.26
*/ */
GApplication * GApplication *
g_application_new (const char *appid) g_application_new (const gchar *appid)
{ {
g_type_init (); g_type_init ();
@ -395,8 +395,8 @@ g_application_new (const char *appid)
*/ */
void void
g_application_register_with_data (GApplication *application, g_application_register_with_data (GApplication *application,
int argc, gint argc,
char **argv, gchar **argv,
GVariant *platform_data) GVariant *platform_data)
{ {
g_return_if_fail (application->priv->appid != NULL); g_return_if_fail (application->priv->appid != NULL);
@ -427,9 +427,9 @@ g_application_register_with_data (GApplication *application,
* with g_application_register_with_data(). * with g_application_register_with_data().
*/ */
GApplication * GApplication *
g_application_new_and_register (const char *appid, g_application_new_and_register (const gchar *appid,
int argc, gint argc,
char **argv) gchar **argv)
{ {
GApplication *app = g_application_new (appid); GApplication *app = g_application_new (appid);
g_application_register_with_data (app, argc, argv, NULL); g_application_register_with_data (app, argc, argv, NULL);
@ -534,7 +534,7 @@ g_application_remove_action (GApplication *application,
*/ */
void void
g_application_invoke_action (GApplication *application, g_application_invoke_action (GApplication *application,
const char *name, const gchar *name,
guint timestamp) guint timestamp)
{ {
GApplicationPrivate *priv; GApplicationPrivate *priv;
@ -797,7 +797,7 @@ g_application_get_instance (void)
* *
* Since: 2.26 * Since: 2.26
*/ */
G_CONST_RETURN char * G_CONST_RETURN gchar *
g_application_get_id (GApplication *application) g_application_get_id (GApplication *application)
{ {
g_return_val_if_fail (G_IS_APPLICATION (application), NULL); g_return_val_if_fail (G_IS_APPLICATION (application), NULL);

View File

@ -105,35 +105,35 @@ struct _GApplicationClass
}; };
GType g_application_get_type (void) G_GNUC_CONST; GType g_application_get_type (void) G_GNUC_CONST;
GApplication * g_application_new (const char *appid); GApplication * g_application_new (const gchar *appid);
void g_application_register_with_data (GApplication *application, void g_application_register_with_data (GApplication *application,
int argc, gint argc,
char **argv, gchar **argv,
GVariant *platform_data); GVariant *platform_data);
GApplication * g_application_new_and_register (const char *appid, GApplication * g_application_new_and_register (const gchar *appid,
int argc, gint argc,
char **argv); gchar **argv);
GApplication * g_application_get_instance (void); GApplication * g_application_get_instance (void);
G_CONST_RETURN gchar * g_application_get_id (GApplication *application); G_CONST_RETURN gchar * g_application_get_id (GApplication *application);
void g_application_add_action (GApplication *application, void g_application_add_action (GApplication *application,
const char *name, const gchar *name,
const char *description); const gchar *description);
void g_application_remove_action (GApplication *application, void g_application_remove_action (GApplication *application,
const char *name); const gchar *name);
gchar ** g_application_list_actions (GApplication *application); gchar ** g_application_list_actions (GApplication *application);
void g_application_set_action_enabled (GApplication *application, void g_application_set_action_enabled (GApplication *application,
const char *name, const gchar *name,
gboolean enabled); gboolean enabled);
gboolean g_application_get_action_enabled (GApplication *application, gboolean g_application_get_action_enabled (GApplication *application,
const char *name); const gchar *name);
G_CONST_RETURN gchar * g_application_get_action_description (GApplication *application, G_CONST_RETURN gchar * g_application_get_action_description (GApplication *application,
const char *name); const gchar *name);
void g_application_invoke_action (GApplication *application, void g_application_invoke_action (GApplication *application,
const char *name, const gchar *name,
guint timestamp); guint timestamp);
void g_application_run (GApplication *application); void g_application_run (GApplication *application);

View File

@ -256,10 +256,10 @@ static GDBusInterfaceVTable application_dbus_vtable =
NULL NULL
}; };
static char * static gchar *
application_path_from_appid (const char *appid) application_path_from_appid (const gchar *appid)
{ {
char *appid_path, *iter; gchar *appid_path, *iter;
appid_path = g_strconcat ("/", appid, NULL); appid_path = g_strconcat ("/", appid, NULL);
@ -363,7 +363,7 @@ _g_application_platform_on_actions_changed (GApplication *app)
static void static void
_g_application_platform_remote_invoke_action (GApplication *app, _g_application_platform_remote_invoke_action (GApplication *app,
const char *action, const gchar *action,
guint timestamp) guint timestamp)
{ {
GVariant *result; GVariant *result;

View File

@ -44,7 +44,7 @@ _g_application_platform_on_actions_changed (GApplication *app)
static void static void
_g_application_platform_remote_invoke_action (GApplication *app, _g_application_platform_remote_invoke_action (GApplication *app,
const char *action, const gchar *action,
guint timestamp) guint timestamp)
{ {
} }