Commit 5640193c authored by Sébastien Blin's avatar Sébastien Blin

misc: change appname and window title to Jami

Gitlab: #923
Change-Id: I58a95e142362e40a217f9f61090bfdea63c51063
parent d4e5e228
......@@ -8,9 +8,10 @@
#define USE_LIBNM @USE_LIBNM@
#define USE_CANBERRA @USE_CANBERRA@
#define RING_CLIENT_APP_ID "net.jami.Jami"
#define JAMI_CLIENT_NAME "Jami"
#define JAMI_CLIENT_APP_ID "net.jami.Jami"
#define RING_CLIENT_INSTALL "@RING_INSTALL_PREFIX@"
#define JAMI_CLIENT_INSTALL "@RING_INSTALL_PREFIX@"
#define JAMI_DATA_DIR "/share/jami-gnome"
#define PACKAGE_NAME "@PROJECT_NAME@"
......
......@@ -34,5 +34,6 @@ main(int argc, char *argv[])
textdomain(PACKAGE_NAME);
RingClient *client = ring_client_new(argc, argv);
g_set_application_name(JAMI_CLIENT_NAME);
return g_application_run(G_APPLICATION(client), argc, argv);
}
......@@ -279,7 +279,7 @@ init_systray(RingClient *client)
#if HAVE_APPINDICATOR
auto indicator = app_indicator_new("jami", "jami", APP_INDICATOR_CATEGORY_COMMUNICATIONS);
app_indicator_set_status(indicator, APP_INDICATOR_STATUS_ACTIVE);
app_indicator_set_title(indicator, "Jami");
app_indicator_set_title(indicator, JAMI_CLIENT_NAME);
/* app indicator requires a menu */
app_indicator_set_menu(indicator, GTK_MENU(priv->icon_menu));
priv->systray_icon = indicator;
......@@ -395,14 +395,14 @@ ring_client_startup(GApplication *app)
if (locale_name != locale_lang) {
/* Install language first to have lowest priority */
priv->translator_lang.reset(new QTranslator);
if (priv->translator_lang->load(RING_CLIENT_INSTALL "/share/libringclient/translations/lrc_" + locale_lang)) {
if (priv->translator_lang->load(JAMI_CLIENT_INSTALL "/share/libringclient/translations/lrc_" + locale_lang)) {
g_debug("installed translations for %s", locale_lang.toUtf8().constData());
priv->qtapp->installTranslator(priv->translator_lang.get());
}
}
priv->translator_full.reset(new QTranslator);
if (priv->translator_full->load(RING_CLIENT_INSTALL "/share/libringclient/translations/lrc_" + locale_name)) {
if (priv->translator_full->load(JAMI_CLIENT_INSTALL "/share/libringclient/translations/lrc_" + locale_name)) {
g_debug("installed translations for %s", locale_name.toUtf8().constData());
}
......@@ -495,7 +495,7 @@ RingClient*
ring_client_new(int argc, char *argv[])
{
RingClient *client = (RingClient *)g_object_new(ring_client_get_type(),
"application-id", RING_CLIENT_APP_ID,
"application-id", JAMI_CLIENT_APP_ID,
"flags", G_APPLICATION_HANDLES_OPEN ,
NULL);
......
......@@ -25,7 +25,7 @@
G_BEGIN_DECLS
#define RING_GSETTINGS_SCHEMA RING_CLIENT_APP_ID
#define RING_GSETTINGS_SCHEMA JAMI_CLIENT_APP_ID
#define RING_CLIENT_TYPE (ring_client_get_type())
#define RING_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), RING_CLIENT_TYPE, RingClient))
......
......@@ -2377,5 +2377,6 @@ GtkWidget *
ring_main_window_new(GtkApplication *app)
{
gpointer win = g_object_new(RING_MAIN_WINDOW_TYPE, "application", app, NULL);
gtk_window_set_title(GTK_WINDOW(win), JAMI_CLIENT_NAME);
return (GtkWidget *)win;
}
......@@ -55,7 +55,7 @@ autostart_symlink(gboolean autostart)
gchar *desktop_paths[num_paths];
desktop_paths[0] = g_strconcat("/usr", JAMI_DATA_DIR, "/jami-gnome.desktop", NULL);
desktop_paths[1] = g_strconcat("/usr/local", JAMI_DATA_DIR, "/jami-gnome.desktop", NULL);
desktop_paths[2] = g_strconcat(RING_CLIENT_INSTALL, JAMI_DATA_DIR, "/jami-gnome.desktop", NULL);
desktop_paths[2] = g_strconcat(JAMI_CLIENT_INSTALL, JAMI_DATA_DIR, "/jami-gnome.desktop", NULL);
for (int i = 0; i < num_paths && !desktop_path; ++i) {
g_debug("checking %s", desktop_paths[i]);
......@@ -161,7 +161,7 @@ get_ring_schema()
if (!error) {
schema = g_settings_schema_source_lookup(schema_source_local,
RING_CLIENT_APP_ID,
JAMI_CLIENT_APP_ID,
TRUE);
g_settings_schema_source_unref(schema_source_local);
} else {
......@@ -173,7 +173,7 @@ get_ring_schema()
if (!schema) {
/* try install dir */
g_debug("looking for schema in insall dir");
gchar *schema_dir_install = g_strconcat(RING_CLIENT_INSTALL, "/share/glib-2.0/schemas", NULL);
gchar *schema_dir_install = g_strconcat(JAMI_CLIENT_INSTALL, "/share/glib-2.0/schemas", NULL);
GSettingsSchemaSource *schema_source_install = NULL;
schema_source_install = g_settings_schema_source_new_from_directory(
schema_dir_install,
......@@ -183,7 +183,7 @@ get_ring_schema()
if (!error) {
schema = g_settings_schema_source_lookup(schema_source_install,
RING_CLIENT_APP_ID,
JAMI_CLIENT_APP_ID,
TRUE);
g_settings_schema_source_unref(schema_source_install);
} else {
......@@ -198,7 +198,7 @@ get_ring_schema()
g_debug("looking for schema in default dir");
schema = g_settings_schema_source_lookup(g_settings_schema_source_get_default(),
RING_CLIENT_APP_ID,
JAMI_CLIENT_APP_ID,
TRUE);
}
ring_schema.reset(schema);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment