Commit f680d74c authored by Sébastien Blin's avatar Sébastien Blin

misc: remove ring references

Change-Id: Icc9702adc6175eab4b4b3b0aceefa1004fedf11c
parent 03672b33
...@@ -26,13 +26,13 @@ ENDIF() ...@@ -26,13 +26,13 @@ ENDIF()
IF( NOT ("$ENV{SOURCE_DATE_EPOCH}" STREQUAL "")) IF( NOT ("$ENV{SOURCE_DATE_EPOCH}" STREQUAL ""))
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND date -u -d "1970-01-01 UTC $ENV{SOURCE_DATE_EPOCH} seconds" "+%Y-%m-%d %H:%M:%S UTC" COMMAND date -u -d "1970-01-01 UTC $ENV{SOURCE_DATE_EPOCH} seconds" "+%Y-%m-%d %H:%M:%S UTC"
OUTPUT_VARIABLE RING_CLIENT_BUILD_DATE OUTPUT_VARIABLE CLIENT_BUILD_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
ELSEIF( "${RING_CLIENT_BUILD_DATE}" STREQUAL "") ELSEIF( "${CLIENT_BUILD_DATE}" STREQUAL "")
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND date -u "+%Y-%m-%d %H:%M:%S UTC" COMMAND date -u "+%Y-%m-%d %H:%M:%S UTC"
OUTPUT_VARIABLE RING_CLIENT_BUILD_DATE OUTPUT_VARIABLE CLIENT_BUILD_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
ENDIF() ENDIF()
...@@ -54,9 +54,9 @@ SET(ENABLE_QT5 true) ...@@ -54,9 +54,9 @@ SET(ENABLE_QT5 true)
SET(CMAKE_BUILD_TYPE Debug) SET(CMAKE_BUILD_TYPE Debug)
# during packaging the CMAKE_INSTALL_PREFIX is used to specify where to install the files, but it # during packaging the CMAKE_INSTALL_PREFIX is used to specify where to install the files, but it
# may not be the same as where the package will put them, use RING_INSTALL_PREFIX to let the client # may not be the same as where the package will put them, use JAMI_INSTALL_PREFIX to let the client
# know at runtime where to expect installed files to be located # know at runtime where to expect installed files to be located
SET(RING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} SET(JAMI_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}
CACHE PATH "prefix where the package will be installed on the user's system (eg: /usr/local); defaults to the CMAKE_INSTALL_PREFIX" CACHE PATH "prefix where the package will be installed on the user's system (eg: /usr/local); defaults to the CMAKE_INSTALL_PREFIX"
) )
...@@ -235,7 +235,7 @@ ADD_CUSTOM_TARGET( ...@@ -235,7 +235,7 @@ ADD_CUSTOM_TARGET(
COMMAND ${CMAKE_COMMAND} COMMAND ${CMAKE_COMMAND}
-DGIT_REVISION_INPUT_FILE=${GIT_REVISION_INPUT_FILE} -DGIT_REVISION_INPUT_FILE=${GIT_REVISION_INPUT_FILE}
-DGIT_REVISION_OUTPUT_FILE=${GIT_REVISION_OUTPUT_FILE} -DGIT_REVISION_OUTPUT_FILE=${GIT_REVISION_OUTPUT_FILE}
-DRING_CLIENT_BUILD_DATE=${RING_CLIENT_BUILD_DATE} -DCLIENT_BUILD_DATE=${CLIENT_BUILD_DATE}
-P ${CMAKE_SOURCE_DIR}/cmake/GitRevision.cmake -P ${CMAKE_SOURCE_DIR}/cmake/GitRevision.cmake
COMMENT "generating ${GIT_REVISION_OUTPUT_FILE}" COMMENT "generating ${GIT_REVISION_OUTPUT_FILE}"
) )
...@@ -248,12 +248,12 @@ ADD_CUSTOM_COMMAND( ...@@ -248,12 +248,12 @@ ADD_CUSTOM_COMMAND(
# source files to compile # source files to compile
SET( SRC_FILES SET( SRC_FILES
src/main.cpp src/main.cpp
src/ring_client.h src/client.h
src/ring_client.cpp src/client.cpp
src/ring_client_options.h src/client_options.h
src/ring_client_options.c src/client_options.c
src/ringmainwindow.h src/mainwindow.h
src/ringmainwindow.cpp src/mainwindow.cpp
src/incomingcallview.h src/incomingcallview.h
src/incomingcallview.cpp src/incomingcallview.cpp
src/currentcallview.h src/currentcallview.h
...@@ -289,15 +289,15 @@ SET( SRC_FILES ...@@ -289,15 +289,15 @@ SET( SRC_FILES
src/native/pixbufmanipulator.cpp src/native/pixbufmanipulator.cpp
src/utils/models.h src/utils/models.h
src/utils/models.cpp src/utils/models.cpp
src/ringnotify.h src/notifier.h
src/ringnotify.cpp src/notifier.cpp
src/utils/files.h src/utils/files.h
src/utils/files.cpp src/utils/files.cpp
${GIT_REVISION_OUTPUT_FILE} ${GIT_REVISION_OUTPUT_FILE}
src/native/dbuserrorhandler.h src/native/dbuserrorhandler.h
src/native/dbuserrorhandler.cpp src/native/dbuserrorhandler.cpp
src/ringwelcomeview.h src/welcomeview.h
src/ringwelcomeview.cpp src/welcomeview.cpp
src/webkitchatcontainer.h src/webkitchatcontainer.h
src/webkitchatcontainer.cpp src/webkitchatcontainer.cpp
src/chatview.h src/chatview.h
......
...@@ -21,13 +21,13 @@ FIND_PACKAGE(Git) ...@@ -21,13 +21,13 @@ FIND_PACKAGE(Git)
IF(GIT_FOUND) IF(GIT_FOUND)
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND ${GIT_EXECUTABLE} rev-parse --verify HEAD COMMAND ${GIT_EXECUTABLE} rev-parse --verify HEAD
OUTPUT_VARIABLE RING_CLIENT_REVISION OUTPUT_VARIABLE CLIENT_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
ENDIF() ENDIF()
IF( "${RING_CLIENT_REVISION}" STREQUAL "") IF( "${CLIENT_REVISION}" STREQUAL "")
SET(RING_CLIENT_REVISION "unknown") SET(CLIENT_REVISION "unknown")
ENDIF() ENDIF()
MESSAGE( STATUS "GIT_REVISION_INPUT_FILE: " ${GIT_REVISION_INPUT_FILE} ) MESSAGE( STATUS "GIT_REVISION_INPUT_FILE: " ${GIT_REVISION_INPUT_FILE} )
......
...@@ -17,7 +17,7 @@ ui/avatarmanipulation.ui ...@@ -17,7 +17,7 @@ ui/avatarmanipulation.ui
src/conversationsview.cpp src/conversationsview.cpp
src/mediasettingsview.cpp src/mediasettingsview.cpp
src/ring_client.cpp src/ring_client.cpp
src/ringnotify.cpp src/notifier.cpp
src/marshals.cpp src/marshals.cpp
src/usernameregistrationbox.cpp src/usernameregistrationbox.cpp
src/generalsettingsview.cpp src/generalsettingsview.cpp
......
...@@ -378,7 +378,7 @@ msgstr "" ...@@ -378,7 +378,7 @@ msgstr ""
#: ui/accountcreationwizard.ui:561 #: ui/accountcreationwizard.ui:561
msgid "" msgid ""
"By checking this, you will register a unique username on the Jami network. " "By checking this, you will register a unique username on the Jami network. "
"People can use it to contact you instead of using your RingID, which is 40 " "People can use it to contact you instead of using your ID, which is 40 "
"characters long." "characters long."
msgstr "" msgstr ""
...@@ -946,22 +946,22 @@ msgstr "" ...@@ -946,22 +946,22 @@ msgstr ""
msgid "Quit" msgid "Quit"
msgstr "" msgstr ""
#: src/ringnotify.cpp:336 #: src/notifier.cpp:336
msgctxt "" msgctxt ""
msgid "Open conversation" msgid "Open conversation"
msgstr "" msgstr ""
#: src/ringnotify.cpp:344 src/ringnotify.cpp:360 #: src/notifier.cpp:344 src/notifier.cpp:360
msgctxt "" msgctxt ""
msgid "Accept" msgid "Accept"
msgstr "" msgstr ""
#: src/ringnotify.cpp:351 #: src/notifier.cpp:351
msgctxt "" msgctxt ""
msgid "Refuse" msgid "Refuse"
msgstr "" msgstr ""
#: src/ringnotify.cpp:367 #: src/notifier.cpp:367
msgctxt "" msgctxt ""
msgid "Decline" msgid "Decline"
msgstr "" msgstr ""
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
// LRC // LRC
#include "api/newaccountmodel.h" #include "api/newaccountmodel.h"
// Ring Client // Jami Client
#include "utils/models.h" #include "utils/models.h"
#include "avatarmanipulation.h" #include "avatarmanipulation.h"
#include "accountcreationwizard.h" #include "accountcreationwizard.h"
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
// LRC // LRC
#include <api/newaccountmodel.h> #include <api/newaccountmodel.h>
// Ring Client // Jami Client
#include "accountmigrationview.h" #include "accountmigrationview.h"
#include "native/pixbufmanipulator.h" #include "native/pixbufmanipulator.h"
......
...@@ -406,10 +406,10 @@ choose_picture(AvatarManipulation *self) ...@@ -406,10 +406,10 @@ choose_picture(AvatarManipulation *self)
auto preview = gtk_image_new(); auto preview = gtk_image_new();
GtkWidget *ring_main_window = gtk_widget_get_toplevel(GTK_WIDGET(self)); GtkWidget *main_window = gtk_widget_get_toplevel(GTK_WIDGET(self));
auto dialog = gtk_file_chooser_dialog_new (_("Open Avatar Image"), auto dialog = gtk_file_chooser_dialog_new (_("Open Avatar Image"),
GTK_WINDOW(ring_main_window), GTK_WINDOW(main_window),
action, action,
_("_Cancel"), _("_Cancel"),
GTK_RESPONSE_CANCEL, GTK_RESPONSE_CANCEL,
......
This diff is collapsed.
...@@ -17,37 +17,37 @@ ...@@ -17,37 +17,37 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef RING_CLIENT_H_ #ifndef CLIENT_H_
#define RING_CLIENT_H_ #define CLIENT_H_
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "config.h" #include "config.h"
G_BEGIN_DECLS G_BEGIN_DECLS
#define RING_GSETTINGS_SCHEMA JAMI_CLIENT_APP_ID #define GSETTINGS_SCHEMA JAMI_CLIENT_APP_ID
#define RING_CLIENT_TYPE (ring_client_get_type()) #define CLIENT_TYPE (client_get_type())
#define RING_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), RING_CLIENT_TYPE, RingClient)) #define CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CLIENT_TYPE, Client))
#define RING_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), RING_CLIENT_TYPE, RingClientClass)) #define CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), CLIENT_TYPE, ClientClass))
#define IS_RING_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), RING_CLIENT_TYPE)) #define IS_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), CLIENT_TYPE))
#define IS_RING_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), RING_CLIENT_TYPE)) #define IS_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), CLIENT_TYPE))
typedef struct _RingClientClass RingClientClass; typedef struct _ClientClass ClientClass;
typedef struct _RingClient RingClient; typedef struct _Client Client;
/* Public interface */ /* Public interface */
GType ring_client_get_type (void) G_GNUC_CONST; GType client_get_type (void) G_GNUC_CONST;
RingClient *ring_client_new (int argc, char *argv[]); Client *client_new (int argc, char *argv[]);
GtkWindow *ring_client_get_main_window(RingClient *client); GtkWindow *client_get_main_window(Client *client);
/** /**
* Sets if the client should attempt to restore the main window state (hidden or not) to what it was * Sets if the client should attempt to restore the main window state (hidden or not) to what it was
* when it was last quit (stored by the "show-main-window" gsetting). This function must be * when it was last quit (stored by the "show-main-window" gsetting). This function must be
* called before the main window is created for the first time for it to have an effect. * called before the main window is created for the first time for it to have an effect.
*/ */
void ring_client_set_restore_main_window_state(RingClient *client, gboolean restore); void client_set_restore_main_window_state(Client *client, gboolean restore);
G_END_DECLS G_END_DECLS
#endif /* RING_CLIENT_H_ */ #endif /* CLIENT_H_ */
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#include "ring_client_options.h" #include "client_options.h"
#include "config.h" #include "config.h"
#include "revision.h" #include "revision.h"
#include "ring_client.h" #include "client.h"
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -33,7 +33,7 @@ option_version_cb(G_GNUC_UNUSED const gchar *option_name, ...@@ -33,7 +33,7 @@ option_version_cb(G_GNUC_UNUSED const gchar *option_name,
G_GNUC_UNUSED gpointer data, G_GNUC_UNUSED gpointer data,
G_GNUC_UNUSED GError **error) G_GNUC_UNUSED GError **error)
{ {
g_print("%s - %s\n", RING_VERSION, RING_CLIENT_REVISION); g_print("%s - %s\n", VERSION, CLIENT_REVISION);
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }
...@@ -44,7 +44,7 @@ option_debug_cb(G_GNUC_UNUSED const gchar *option_name, ...@@ -44,7 +44,7 @@ option_debug_cb(G_GNUC_UNUSED const gchar *option_name,
G_GNUC_UNUSED GError **error) G_GNUC_UNUSED GError **error)
{ {
g_setenv("G_MESSAGES_DEBUG", "all", TRUE); g_setenv("G_MESSAGES_DEBUG", "all", TRUE);
g_setenv("RING_CHATVIEW_DEBUG", "true", TRUE); g_setenv("CHATVIEW_DEBUG", "true", TRUE);
g_debug("debug enabled"); g_debug("debug enabled");
return TRUE; return TRUE;
} }
...@@ -56,8 +56,8 @@ option_restore_cb(G_GNUC_UNUSED const gchar *option_name, ...@@ -56,8 +56,8 @@ option_restore_cb(G_GNUC_UNUSED const gchar *option_name,
G_GNUC_UNUSED GError **error) G_GNUC_UNUSED GError **error)
{ {
GApplication *client = g_application_get_default(); GApplication *client = g_application_get_default();
if (IS_RING_CLIENT(client)) if (IS_CLIENT(client))
ring_client_set_restore_main_window_state(RING_CLIENT(client), TRUE); client_set_restore_main_window_state(CLIENT(client), TRUE);
return TRUE; return TRUE;
} }
...@@ -71,7 +71,7 @@ static const GOptionEntry all_options[] = { ...@@ -71,7 +71,7 @@ static const GOptionEntry all_options[] = {
#if GLIB_CHECK_VERSION(2,40,0) #if GLIB_CHECK_VERSION(2,40,0)
void void
ring_client_add_options(GApplication *app) { client_add_options(GApplication *app) {
/* NOTE: using this function, the options do not get translated in glib versions <2.45 due to /* NOTE: using this function, the options do not get translated in glib versions <2.45 due to
* bug 750322: https://bugzilla.gnome.org/show_bug.cgi?id=750322 * bug 750322: https://bugzilla.gnome.org/show_bug.cgi?id=750322
*/ */
...@@ -80,7 +80,7 @@ ring_client_add_options(GApplication *app) { ...@@ -80,7 +80,7 @@ ring_client_add_options(GApplication *app) {
#else #else
GOptionContext * GOptionContext *
ring_client_options_get_context() client_options_get_context()
{ {
GOptionContext *context = g_option_context_new(_("- GNOME client for Jami")); GOptionContext *context = g_option_context_new(_("- GNOME client for Jami"));
g_option_context_set_ignore_unknown_options(context, TRUE); g_option_context_set_ignore_unknown_options(context, TRUE);
......
...@@ -17,19 +17,19 @@ ...@@ -17,19 +17,19 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef RING_CLIENT_OPTIONS_H_ #ifndef CLIENT_OPTIONS_H_
#define RING_CLIENT_OPTIONS_H_ #define CLIENT_OPTIONS_H_
#include <gio/gio.h> #include <gio/gio.h>
G_BEGIN_DECLS G_BEGIN_DECLS
#if GLIB_CHECK_VERSION(2,40,0) #if GLIB_CHECK_VERSION(2,40,0)
void ring_client_add_options(GApplication *app); void client_add_options(GApplication *app);
#else #else
GOptionContext *ring_client_options_get_context(void); GOptionContext *client_options_get_context(void);
#endif #endif
G_END_DECLS G_END_DECLS
#endif /* RING_CLIENT_OPTIONS_H_ */ #endif /* CLIENT_OPTIONS_H_ */
/* cmake will generate config.h with defines containing the values defined in cmake */ /* cmake will generate config.h with defines containing the values defined in cmake */
#define RING_VERSION "@PROJECT_VERSION@" #define VERSION "@PROJECT_VERSION@"
#define USE_LIBNOTIFY @USE_LIBNOTIFY@ #define USE_LIBNOTIFY @USE_LIBNOTIFY@
#define HAVE_APPINDICATOR @HAVE_APPINDICATOR@ #define HAVE_APPINDICATOR @HAVE_APPINDICATOR@
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
#define JAMI_CLIENT_NAME "Jami" #define JAMI_CLIENT_NAME "Jami"
#define JAMI_CLIENT_APP_ID "net.jami.Jami" #define JAMI_CLIENT_APP_ID "net.jami.Jami"
#define JAMI_CLIENT_INSTALL "@RING_INSTALL_PREFIX@" #define JAMI_CLIENT_INSTALL "@JAMI_INSTALL_PREFIX@"
#define JAMI_DATA_DIR "/share/jami-gnome" #define JAMI_DATA_DIR "/share/jami-gnome"
#define PACKAGE_NAME "@PROJECT_NAME@" #define PACKAGE_NAME "@PROJECT_NAME@"
#define LOCALEDIR "@RING_INSTALL_PREFIX@/share/locale" #define LOCALEDIR "@JAMI_INSTALL_PREFIX@/share/locale"
#define SOUNDSDIR "@RING_INSTALL_PREFIX@/share/sounds/jami-gnome" #define SOUNDSDIR "@JAMI_INSTALL_PREFIX@/share/sounds/jami-gnome"
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
// Client // Client
#include "chatview.h" #include "chatview.h"
#include "native/pixbufmanipulator.h" #include "native/pixbufmanipulator.h"
#include "ringnotify.h" #include "notifier.h"
#include "utils/drawing.h" #include "utils/drawing.h"
#include "utils/files.h" #include "utils/files.h"
#include "video/video_widget.h" #include "video/video_widget.h"
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "revision.h" #include "revision.h"
GtkWidget * GtkWidget *
ring_dialog_working(GtkWidget *parent, const gchar *msg) dialog_working(GtkWidget *parent, const gchar *msg)
{ {
GtkWidget *dialog = gtk_dialog_new(); GtkWidget *dialog = gtk_dialog_new();
gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE); gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE);
...@@ -66,7 +66,7 @@ ring_dialog_working(GtkWidget *parent, const gchar *msg) ...@@ -66,7 +66,7 @@ ring_dialog_working(GtkWidget *parent, const gchar *msg)
} }
void void
ring_about_dialog(GtkWidget *parent) about_dialog(GtkWidget *parent)
{ {
/* get parent window */ /* get parent window */
if (parent && GTK_IS_WIDGET(parent)) if (parent && GTK_IS_WIDGET(parent))
...@@ -82,7 +82,7 @@ ring_about_dialog(GtkWidget *parent) ...@@ -82,7 +82,7 @@ ring_about_dialog(GtkWidget *parent)
gchar *version = g_strdup_printf(C_("Do not translate the release name nor the status (beta, final, ...)", gchar *version = g_strdup_printf(C_("Do not translate the release name nor the status (beta, final, ...)",
"\"Free as in Freedom\"\nbuilt on %.25s"), "\"Free as in Freedom\"\nbuilt on %.25s"),
RING_CLIENT_BUILD_DATE); CLIENT_BUILD_DATE);
const gchar *authors[] = { const gchar *authors[] = {
"Adrien Béraud", "Adrien Béraud",
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
G_BEGIN_DECLS G_BEGIN_DECLS
GtkWidget *ring_dialog_working(GtkWidget *parent, const gchar *msg); GtkWidget *dialog_working(GtkWidget *parent, const gchar *msg);
void ring_about_dialog(GtkWidget *parent); void about_dialog(GtkWidget *parent);
G_END_DECLS G_END_DECLS
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
// LRC // LRC
#include <api/avmodel.h> #include <api/avmodel.h>
// Ring client // Jami Client
#include "utils/files.h" #include "utils/files.h"
#include "avatarmanipulation.h" #include "avatarmanipulation.h"
...@@ -37,7 +37,7 @@ class CppImpl; ...@@ -37,7 +37,7 @@ class CppImpl;
enum enum
{ {
PROP_RING_MAIN_WIN_PNT = 1, PROP_MAIN_WIN_PNT = 1,
}; };
struct _GeneralSettingsView struct _GeneralSettingsView
...@@ -78,7 +78,7 @@ struct _GeneralSettingsViewPrivate ...@@ -78,7 +78,7 @@ struct _GeneralSettingsViewPrivate
GtkWidget *filechooserbutton_record_path; GtkWidget *filechooserbutton_record_path;
/* ring main window pointer */ /* ring main window pointer */
GtkWidget* ring_main_window_pnt; GtkWidget* main_window_pnt;
details::CppImpl* cpp; ///< Non-UI and C++ only code details::CppImpl* cpp; ///< Non-UI and C++ only code
}; };
...@@ -213,13 +213,13 @@ choose_downloads_directory(GeneralSettingsView *self) ...@@ -213,13 +213,13 @@ choose_downloads_directory(GeneralSettingsView *self)
gint res; gint res;
gchar* filename = nullptr; gchar* filename = nullptr;
if (!priv->ring_main_window_pnt) { if (!priv->main_window_pnt) {
g_debug("Internal error: NULL main window pointer in GeneralSettingsView."); g_debug("Internal error: NULL main window pointer in GeneralSettingsView.");
return; return;
} }
GtkWidget *dialog = gtk_file_chooser_dialog_new (_("Choose download folder"), GtkWidget *dialog = gtk_file_chooser_dialog_new (_("Choose download folder"),
GTK_WINDOW(priv->ring_main_window_pnt), GTK_WINDOW(priv->main_window_pnt),
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
_("_Cancel"), _("_Cancel"),
GTK_RESPONSE_CANCEL, GTK_RESPONSE_CANCEL,
...@@ -363,15 +363,15 @@ general_settings_view_set_property (GObject *object, ...@@ -363,15 +363,15 @@ general_settings_view_set_property (GObject *object,
GeneralSettingsView *self = GENERAL_SETTINGS_VIEW (object); GeneralSettingsView *self = GENERAL_SETTINGS_VIEW (object);
GeneralSettingsViewPrivate *priv = GENERAL_SETTINGS_VIEW_GET_PRIVATE(self); GeneralSettingsViewPrivate *priv = GENERAL_SETTINGS_VIEW_GET_PRIVATE(self);
if (property_id == PROP_RING_MAIN_WIN_PNT) { if (property_id == PROP_MAIN_WIN_PNT) {
GtkWidget *ring_main_window_pnt = (GtkWidget*) g_value_get_pointer(value); GtkWidget *main_window_pnt = (GtkWidget*) g_value_get_pointer(value);
if (!ring_main_window_pnt) { if (!main_window_pnt) {
g_debug("Internal error: NULL main window pointer passed to set_property"); g_debug("Internal error: NULL main window pointer passed to set_property");
return; return;
} }
priv->ring_main_window_pnt = ring_main_window_pnt; priv->main_window_pnt = main_window_pnt;
} }
else { else {
// Invalid property id passed // Invalid property id passed
...@@ -388,8 +388,8 @@ general_settings_view_get_property (GObject *object, ...@@ -388,8 +388,8 @@ general_settings_view_get_property (GObject *object,
GeneralSettingsView *self = GENERAL_SETTINGS_VIEW (object); GeneralSettingsView *self = GENERAL_SETTINGS_VIEW (object);
GeneralSettingsViewPrivate *priv = GENERAL_SETTINGS_VIEW_GET_PRIVATE(self); GeneralSettingsViewPrivate *priv = GENERAL_SETTINGS_VIEW_GET_PRIVATE(self);
if (property_id == PROP_RING_MAIN_WIN_PNT) { if (property_id == PROP_MAIN_WIN_PNT) {
g_value_set_pointer(value, priv->ring_main_window_pnt); g_value_set_pointer(value, priv->main_window_pnt);
} }
else { else {
// Invalid property id passed // Invalid property id passed
...@@ -447,15 +447,15 @@ general_settings_view_class_init(GeneralSettingsViewClass *klass) ...@@ -447,15 +447,15 @@ general_settings_view_class_init(GeneralSettingsViewClass *klass)
object_class->get_property = general_settings_view_get_property; object_class->get_property = general_settings_view_get_property;
GParamFlags flags = (GParamFlags) (G_PARAM_READWRITE); GParamFlags flags = (GParamFlags) (G_PARAM_READWRITE);
g_object_class_install_property (object_class, PROP_RING_MAIN_WIN_PNT, g_object_class_install_property (object_class, PROP_MAIN_WIN_PNT,
g_param_spec_pointer ("ring_main_window_pnt", g_param_spec_pointer ("main_window_pnt",
"RingMainWindow pointer", "MainWindow pointer",
"Pointer to the Ring Main Window. This property is used by modal dialogs.", "Pointer to the Main Window. This property is used by modal dialogs.",
flags)); flags));
} }
GtkWidget * GtkWidget *
general_settings_view_new(GtkWidget* ring_main_window_pointer, lrc::api::AVModel& avModel) general_settings_view_new(GtkWidget* main_window_pointer, lrc::api::AVModel& avModel)
{ {
auto self = g_object_new(GENERAL_SETTINGS_VIEW_TYPE, NULL); auto self = g_object_new(GENERAL_SETTINGS_VIEW_TYPE, NULL);
auto* priv = GENERAL_SETTINGS_VIEW_GET_PRIVATE(GENERAL_SETTINGS_VIEW (self)); auto* priv = GENERAL_SETTINGS_VIEW_GET_PRIVATE(GENERAL_SETTINGS_VIEW (self));
...@@ -466,8 +466,8 @@ general_settings_view_new(GtkWidget* ring_main_window_pointer, lrc::api::AVModel ...@@ -466,8 +466,8 @@ general_settings_view_new(GtkWidget* ring_main_window_pointer, lrc::api::AVModel
// set_up ring main window pointer (needed by modal dialogs) // set_up ring main window pointer (needed by modal dialogs)
GValue val = G_VALUE_INIT; GValue val = G_VALUE_INIT;
g_value_init (&val, G_TYPE_POINTER); g_value_init (&val, G_TYPE_POINTER);
g_value_set_pointer (&val, ring_main_window_pointer); g_value_set_pointer (&val, main_window_pointer);
g_object_set_property (G_OBJECT (self), "ring_main_window_pnt", &val); g_object_set_property (G_OBJECT (self), "main_window_pnt", &val);
g_value_unset (&val); g_value_unset (&val);
g_signal_connect_swapped(priv->button_choose_downloads_directory, "clicked", G_CALLBACK(choose_downloads_directory), self); g_signal_connect_swapped(priv->button_choose_downloads_directory, "clicked", G_CALLBACK(choose_downloads_directory), self);
......
...@@ -38,7 +38,7 @@ typedef struct _GeneralSettingsView GeneralSettingsView; ...@@ -38,7 +38,7 @@ typedef struct _GeneralSettingsView GeneralSettingsView;
typedef struct _GeneralSettingsViewClass GeneralSettingsViewClass; typedef struct _GeneralSettingsViewClass GeneralSettingsViewClass;
GType general_settings_view_get_type (void) G_GNUC_CONST; GType general_settings_view_get_type (void) G_GNUC_CONST;
GtkWidget *general_settings_view_new (GtkWidget* ring_main_window_pnt, lrc::api::AVModel& avModel); GtkWidget *general_settings_view_new (GtkWidget* main_window_pnt, lrc::api::AVModel& avModel);
G_END_DECLS G_END_DECLS
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include <cstdlib> #include <cstdlib>
#include "config.h" #include "config.h"
#include "ring_client.h" #include "client.h"
int int
main(int argc, char *argv[]) main(int argc, char *argv[])
...@@ -33,7 +33,7 @@ main(int argc, char *argv[]) ...@@ -33,7 +33,7 @@ main(int argc, char *argv[])
bind_textdomain_codeset(PACKAGE_NAME, "UTF-8"); bind_textdomain_codeset(PACKAGE_NAME, "UTF-8");
textdomain(PACKAGE_NAME); textdomain(PACKAGE_NAME);
RingClient *client = ring_client_new(argc, argv); Client *client = client_new(argc, argv);
g_set_application_name(JAMI_CLIENT_NAME); g_set_application_name(JAMI_CLIENT_NAME);
return g_application_run(G_APPLICATION(client), argc, argv); return g_application_run(G_APPLICATION(client), argc, argv);
} }
...@@ -17,44 +17,41 @@ ...@@ -17,44 +17,41 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef _RINGMAINWINDOW_H #pragma once
#define _RINGMAINWINDOW_H
#include <gtk/gtk.h> #include <gtk/gtk.h>
G_BEGIN_DECLS G_BEGIN_DECLS
#define RING_MAIN_WINDOW_TYPE (ring_main_window_get_type ()) #define MAIN_WINDOW_TYPE (main_window_get_type ())
#define RING_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RING_MAIN_WINDOW_TYPE, RingMainWindow)) #define MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MAIN_WINDOW_TYPE, MainWindow))