diff options
author | Antenore Gatta <antenore@simbiosi.org> | 2021-02-12 18:13:06 +0300 |
---|---|---|
committer | Antenore Gatta <antenore@simbiosi.org> | 2021-02-12 18:13:06 +0300 |
commit | 044a38c9920d5f09d83a0499680436361cf87ac5 (patch) | |
tree | c21e988bb20e580b2ea7e38b4e11feb020491220 | |
parent | 0ab8dd852e71adb74e82e815c33181ecca06b343 (diff) |
Switching to resources for UI elements
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | cmake/FindGLib.cmake | 5 | ||||
-rw-r--r-- | data/CMakeLists.txt | 1 | ||||
-rw-r--r-- | data/ui/CMakeLists.txt | 45 | ||||
-rw-r--r-- | plugins/CMakeLists.txt | 2 | ||||
-rw-r--r-- | plugins/secret/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/CMakeLists.txt | 214 | ||||
-rw-r--r-- | src/remmina_about.c | 2 | ||||
-rw-r--r-- | src/remmina_ext_exec.c | 2 | ||||
-rw-r--r-- | src/remmina_key_chooser.c | 2 | ||||
-rw-r--r-- | src/remmina_main.c | 5 | ||||
-rw-r--r-- | src/remmina_mpchange.c | 2 | ||||
-rw-r--r-- | src/remmina_pref_dialog.c | 2 | ||||
-rw-r--r-- | src/remmina_public.c | 1 | ||||
-rw-r--r-- | src/remmina_ssh_plugin.c | 2 | ||||
-rw-r--r-- | src/remmina_string_list.c | 2 | ||||
-rw-r--r-- | src/remmina_unlock.c | 2 | ||||
-rw-r--r-- | src/rmnews.c | 2 |
18 files changed, 139 insertions, 157 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c942c0edc..10cba018e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -357,13 +357,14 @@ if(NOT GLib_FOUND) message(FATAL_ERROR "GLIB2 library not found") endif(NOT GLib_FOUND) include_directories(${GLib_INCLUDE_DIRS}) +include_directories(${GMODULE_INCLUDE_DIR}) find_package(GTK3 3.14.0 REQUIRED) if(NOT GTK3_FOUND) message(FATAL_ERROR "GTK3 library not found") endif(NOT GTK3_FOUND) include_directories(${GTK3_INCLUDE_DIRS}) -set(GTK_LIBRARIES ${GTK3_LIBRARY} ${GDK3_LIBRARY} ${GDKPixbuf_LIBRARY} ${Pango_LIBRARY} ${Cairo_LIBRARY} ${GObject_LIBRARY} ${GLib_LIBRARY} ${GIO_LIBRARY} ${Gmodule_LIBRARIES}) +set(GTK_LIBRARIES ${GTK3_LIBRARY} ${GDK3_LIBRARY} ${GDKPixbuf_LIBRARY} ${Pango_LIBRARY} ${Cairo_LIBRARY} ${GObject_LIBRARY} ${GLib_LIBRARY} ${GIO_LIBRARY} ${Gmodule_LIBRARIES} ${GMODULE_LIBRARY}) set(CMAKE_THREAD_PREFER_PTHREAD TRUE) diff --git a/cmake/FindGLib.cmake b/cmake/FindGLib.cmake index 050b9eb79..fec8e64a8 100644 --- a/cmake/FindGLib.cmake +++ b/cmake/FindGLib.cmake @@ -79,12 +79,13 @@ if(GLib_LIBRARY AND NOT GLib_FOUND) unset(GLib_MINOR_VERSION) unset(GLib_MICRO_VERSION) - list(APPEND GLib_INCLUDE_DIRS ${GMODULE_INCLUDE_DIR} ${GLib_CONFIG_INCLUDE_DIR}) + #list(APPEND GLib_INCLUDE_DIRS ${GMODULE_INCLUDE_DIR} ${GLib_CONFIG_INCLUDE_DIR}) + list(APPEND GLib_INCLUDE_DIRS ${GLib_CONFIG_INCLUDE_DIR}) set_property(TARGET ${GLib} PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${GLib_INCLUDE_DIRS}") endif() endif() -list (APPEND GLib_LIBRARY ${GMODULE_LIBRARY}) +##list (APPEND GLib_LIBRARY ${GMODULE_LIBRARY}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(GLib diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index ec3ec9183..7a60715a1 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -30,7 +30,6 @@ # version. If you delete this exception statement from all source # files in the program, then also delete it here. -add_subdirectory(ui) add_subdirectory(theme) add_subdirectory(desktop) add_subdirectory(icons) diff --git a/data/ui/CMakeLists.txt b/data/ui/CMakeLists.txt deleted file mode 100644 index 65df09f9c..000000000 --- a/data/ui/CMakeLists.txt +++ /dev/null @@ -1,45 +0,0 @@ -# desktop/remmina - The GTK+ Remote Desktop Client -# -# Copyright (C) 2015 Antenore Gatta, Fabio Castelli, Giovanni Panozzo -# Copyright (C) 2016-2021 Antenore Gatta, Giovanni Panozzo -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# In addition, as a special exception, the copyright holders give -# permission to link the code of portions of this program with the -# OpenSSL library under certain conditions as described in each -# individual source file, and distribute linked combinations -# including the two. -# You must obey the GNU General Public License in all respects -# for all of the code used other than OpenSSL. If you modify -# file(s) with this exception, you may extend this exception to your -# version of the file(s), but you are not obligated to do so. If you -# do not wish to do so, delete this exception statement from your -# version. If you delete this exception statement from all source -# files in the program, then also delete it here. - - -install(FILES remmina_about.glade DESTINATION "${REMMINA_UIDIR}") -install(FILES remmina_key_chooser.glade DESTINATION "${REMMINA_UIDIR}") -install(FILES remmina_main.glade DESTINATION "${REMMINA_UIDIR}") -install(FILES remmina_mpc.glade DESTINATION "${REMMINA_UIDIR}") -install(FILES remmina_news.glade DESTINATION "${REMMINA_UIDIR}") -install(FILES remmina_preferences.glade DESTINATION "${REMMINA_UIDIR}") -install(FILES remmina_search.glade DESTINATION "${REMMINA_UIDIR}") -install(FILES remmina_snap_info_dialog.glade DESTINATION "${REMMINA_UIDIR}") -install(FILES remmina_spinner.glade DESTINATION "${REMMINA_UIDIR}") -install(FILES remmina_string_list.glade DESTINATION "${REMMINA_UIDIR}") -install(FILES remmina_unlock.glade DESTINATION "${REMMINA_UIDIR}") diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 0b1665316..9a5aa1cfc 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -40,7 +40,7 @@ include_directories(${CMAKE_SOURCE_DIR}/plugins) set(APPICONSCALE_EMBLEMS_DIR "${REMMINA_DATADIR}/icons/hicolor/scalable/emblems") set(REMMINA_COMMON_INCLUDE_DIRS ${GTK3_INCLUDE_DIRS}) -set(REMMINA_COMMON_LIBRARIES ${GTK3_LIBRARY} ${GDK3_LIBRARY} ${GDKPixbuf_LIBRARY} ${Pango_LIBRARY} ${Cairo_LIBRARY} ${GObject_LIBRARY} ${GLib_LIBRARY} ${GIO_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) +set(REMMINA_COMMON_LIBRARIES ${GTK_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) find_suggested_package(LIBSSH) if(LIBSSH_FOUND) diff --git a/plugins/secret/CMakeLists.txt b/plugins/secret/CMakeLists.txt index bb1e6ebd1..5f8e0a62a 100644 --- a/plugins/secret/CMakeLists.txt +++ b/plugins/secret/CMakeLists.txt @@ -41,7 +41,7 @@ if(LIBSECRET_FOUND) set_target_properties(remmina-plugin-secret PROPERTIES NO_SONAME 1) include_directories(${GTK3_INCLUDE_DIRS}) - target_link_libraries(remmina-plugin-secret ${GTK3_LIBRARY} ${GDK3_LIBRARY} ${GDKPixbuf_LIBRARY} ${Pango_LIBRARY} ${Cairo_LIBRARY} ${GObject_LIBRARY} ${GLib_LIBRARY} ${GIO_LIBRARY}) + target_link_libraries(remmina-plugin-secret ${GTK_LIBRARIES}) include_directories(SYSTEM ${LIBSECRET_INCLUDE_DIRS}) target_link_libraries(remmina-plugin-secret ${LIBSECRET_LIBRARIES} ${GLIB_LIBRARY}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 294a8edbe..08e540435 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -36,98 +36,114 @@ cmake_minimum_required(VERSION 3.0.0) list(APPEND REMMINA_SRCS - "remmina_about.c" - "remmina_about.h" - "remmina_applet_menu.c" - "remmina_applet_menu.h" - "remmina_applet_menu_item.c" - "remmina_applet_menu_item.h" - "remmina_avahi.c" - "remmina_avahi.h" - "remmina.c" - "remmina.h" - "remmina_chat_window.c" - "remmina_chat_window.h" - "remmina_crypt.c" - "remmina_crypt.h" - "remmina_exec.c" - "remmina_exec.h" - "remmina_file.c" - "remmina_file_editor.c" - "remmina_file_editor.h" - "remmina_file.h" - "remmina_file_manager.c" - "remmina_file_manager.h" - "remmina_ftp_client.c" - "remmina_ftp_client.h" - "remmina_icon.c" - "remmina_icon.h" - "remmina_key_chooser.c" - "remmina_key_chooser.h" - "remmina_log.c" - "remmina_log.h" - "remmina_main.c" - "remmina_main.h" - "remmina_marshals.c" - "remmina_marshals.h" - "remmina_marshals.list" - "remmina_masterthread_exec.c" - "remmina_masterthread_exec.h" - "remmina_message_panel.c" - "remmina_message_panel.h" - "remmina_plugin_manager.c" - "remmina_plugin_manager.h" - "remmina_plugin_native.c" - "remmina_plugin_native.h" - "remmina_ext_exec.c" - "remmina_ext_exec.h" - "remmina_pref.c" - "remmina_pref_dialog.c" - "remmina_pref_dialog.h" - "remmina_pref.h" - "remmina_protocol_widget.c" - "remmina_protocol_widget.h" - "remmina_public.c" - "remmina_public.h" - "remmina_scrolled_viewport.c" - "remmina_scrolled_viewport.h" - "remmina_sftp_client.c" - "remmina_sftp_client.h" - "remmina_sftp_plugin.c" - "remmina_sftp_plugin.h" - "remmina_sodium.c" - "remmina_sodium.h" - "remmina_ssh.c" - "remmina_ssh.h" - "remmina_ssh_plugin.c" - "remmina_ssh_plugin.h" - "remmina_string_array.c" - "remmina_string_array.h" - "remmina_string_list.c" - "remmina_string_list.h" - "remmina_unlock.c" - "remmina_unlock.h" - "remmina_utils.c" - "remmina_utils.h" - "remmina_widget_pool.c" - "remmina_widget_pool.h" - "remmina_external_tools.c" - "remmina_external_tools.h" - "remmina_sysinfo.h" - "remmina_sysinfo.c" - "rcw.c" - "rcw.h" - "rmnews.c" - "rmnews.h" - "remmina_mpchange.c" - "remmina_mpchange.h" - "remmina_scheduler.c" - "remmina_scheduler.h" - "remmina_stats.c" - "remmina_stats.h" - "remmina_stats_sender.c" - "remmina_stats_sender.h" - ) + "remmina_about.c" + "remmina_about.h" + "remmina_applet_menu.c" + "remmina_applet_menu.h" + "remmina_applet_menu_item.c" + "remmina_applet_menu_item.h" + "remmina_avahi.c" + "remmina_avahi.h" + "remmina.c" + "remmina.h" + "remmina_chat_window.c" + "remmina_chat_window.h" + "remmina_crypt.c" + "remmina_crypt.h" + "remmina_exec.c" + "remmina_exec.h" + "remmina_file.c" + "remmina_file_editor.c" + "remmina_file_editor.h" + "remmina_file.h" + "remmina_file_manager.c" + "remmina_file_manager.h" + "remmina_ftp_client.c" + "remmina_ftp_client.h" + "remmina_icon.c" + "remmina_icon.h" + "remmina_key_chooser.c" + "remmina_key_chooser.h" + "remmina_log.c" + "remmina_log.h" + "remmina_main.c" + "remmina_main.h" + "remmina_marshals.c" + "remmina_marshals.h" + "remmina_marshals.list" + "remmina_masterthread_exec.c" + "remmina_masterthread_exec.h" + "remmina_message_panel.c" + "remmina_message_panel.h" + "remmina_plugin_manager.c" + "remmina_plugin_manager.h" + "remmina_plugin_native.c" + "remmina_plugin_native.h" + "remmina_ext_exec.c" + "remmina_ext_exec.h" + "remmina_pref.c" + "remmina_pref_dialog.c" + "remmina_pref_dialog.h" + "remmina_pref.h" + "remmina_protocol_widget.c" + "remmina_protocol_widget.h" + "remmina_public.c" + "remmina_public.h" + "remmina_scrolled_viewport.c" + "remmina_scrolled_viewport.h" + "remmina_sftp_client.c" + "remmina_sftp_client.h" + "remmina_sftp_plugin.c" + "remmina_sftp_plugin.h" + "remmina_sodium.c" + "remmina_sodium.h" + "remmina_ssh.c" + "remmina_ssh.h" + "remmina_ssh_plugin.c" + "remmina_ssh_plugin.h" + "remmina_string_array.c" + "remmina_string_array.h" + "remmina_string_list.c" + "remmina_string_list.h" + "remmina_unlock.c" + "remmina_unlock.h" + "remmina_utils.c" + "remmina_utils.h" + "remmina_widget_pool.c" + "remmina_widget_pool.h" + "remmina_external_tools.c" + "remmina_external_tools.h" + "remmina_sysinfo.h" + "remmina_sysinfo.c" + "rcw.c" + "rcw.h" + "rmnews.c" + "rmnews.h" + "remmina_mpchange.c" + "remmina_mpchange.h" + "remmina_scheduler.c" + "remmina_scheduler.h" + "remmina_stats.c" + "remmina_stats.h" + "remmina_stats_sender.c" + "remmina_stats_sender.h" + "resources.c" + ) + +set(RESOURCE_LIST + ${CMAKE_CURRENT_SOURCE_DIR}/../data/ui/remmina_about.glade + ${CMAKE_CURRENT_SOURCE_DIR}/../data/ui/remmina_key_chooser.glade + ${CMAKE_CURRENT_SOURCE_DIR}/../data/ui/remmina_main.glade + ${CMAKE_CURRENT_SOURCE_DIR}/../data/ui/remmina_mpc.glade + ${CMAKE_CURRENT_SOURCE_DIR}/../data/ui/remmina_news.glade + ${CMAKE_CURRENT_SOURCE_DIR}/../data/ui/remmina_preferences.glade + ${CMAKE_CURRENT_SOURCE_DIR}/../data/ui/remmina_search.glade + ${CMAKE_CURRENT_SOURCE_DIR}/../data/ui/remmina_search_popover.glade + ${CMAKE_CURRENT_SOURCE_DIR}/../data/ui/remmina_snap_info_dialog.glade + ${CMAKE_CURRENT_SOURCE_DIR}/../data/ui/remmina_spinner.glade + ${CMAKE_CURRENT_SOURCE_DIR}/../data/ui/remmina_string_list.glade + ${CMAKE_CURRENT_SOURCE_DIR}/../data/ui/remmina_unlock.glade + ) option(WITH_PYTHONLIBS "Enable Python plugins support" OFF) if(WITH_PYTHONLIBS) @@ -160,8 +176,18 @@ endif() message(DEBUG "Source list set to: " ${REMMINA_SRCS}) -add_executable(remmina ${REMMINA_SRCS}) -#include_directories(${GTK_INCLUDE_DIRS} ${gio_INCLUDE_DIRS} ${gio-unix_INCLUDE_DIRS}) + +compile_gresources(RESOURCE_FILE + XML_OUT + TYPE EMBED_C + PREFIX /org/remmina/Remmina/src + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} + RESOURCES ${RESOURCE_LIST}) + + +add_custom_target(resource DEPENDS ${RESOURCE_FILE}) +add_executable(remmina ${REMMINA_SRCS} ${RESOURCE_FILE}) +add_dependencies(remmina resource) target_link_libraries(remmina ${GTK_LIBRARIES}) if(WITH_PYTHONLIBS) diff --git a/src/remmina_about.c b/src/remmina_about.c index c9e5bcfc7..f1ae46a74 100644 --- a/src/remmina_about.c +++ b/src/remmina_about.c @@ -46,7 +46,7 @@ void remmina_about_open(GtkWindow *parent) { TRACE_CALL(__func__); - GtkBuilder *builder = remmina_public_gtk_builder_new_from_file("remmina_about.glade"); + GtkBuilder *builder = remmina_public_gtk_builder_new_from_resource ("/org/remmina/Remmina/src/../data/ui/remmina_about.glade"); GtkDialog *dialog = GTK_DIALOG(gtk_builder_get_object(builder, "dialog_remmina_about")); gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), VERSION " (git " REMMINA_GIT_REVISION ")"); diff --git a/src/remmina_ext_exec.c b/src/remmina_ext_exec.c index 5f7987f01..bc63ec8d0 100644 --- a/src/remmina_ext_exec.c +++ b/src/remmina_ext_exec.c @@ -91,7 +91,7 @@ GtkDialog* remmina_ext_exec_new(RemminaFile* remminafile, const char *remmina_ex if (*cmd != 0) { pcspinner = g_new(PCon_Spinner, 1); - builder = remmina_public_gtk_builder_new_from_file("remmina_spinner.glade"); + builder = remmina_public_gtk_builder_new_from_resource("/org/remmina/Remmina/src/../data/ui/remmina_spinner.glade"); pcspinner->dialog = GTK_DIALOG(gtk_builder_get_object(builder, "DialogSpinner")); pcspinner->label_pleasewait = GTK_LABEL(GET_OBJECT("label_pleasewait")); pcspinner->spinner = GTK_WIDGET(GET_OBJECT("spinner")); diff --git a/src/remmina_key_chooser.c b/src/remmina_key_chooser.c index f8a3b76c6..9113189db 100644 --- a/src/remmina_key_chooser.c +++ b/src/remmina_key_chooser.c @@ -57,7 +57,7 @@ static gboolean remmina_key_chooser_dialog_on_key_press(GtkWidget *widget, GdkEv RemminaKeyChooserArguments* remmina_key_chooser_new(GtkWindow *parent_window, gboolean use_modifiers) { TRACE_CALL(__func__); - GtkBuilder *builder = remmina_public_gtk_builder_new_from_file("remmina_key_chooser.glade"); + GtkBuilder *builder = remmina_public_gtk_builder_new_from_resource ("/org/remmina/Remmina/src/../data/ui/remmina_key_chooser.glade"); GtkDialog *dialog; RemminaKeyChooserArguments *arguments; arguments = g_new0(RemminaKeyChooserArguments, 1); diff --git a/src/remmina_main.c b/src/remmina_main.c index aa833d78a..04e8a3432 100644 --- a/src/remmina_main.c +++ b/src/remmina_main.c @@ -293,7 +293,7 @@ static void remmina_main_show_snap_welcome() } if (need_snap_interface_connections && !remmina_pref.prevent_snap_welcome_message) { - dlgbuilder = remmina_public_gtk_builder_new_from_file("remmina_snap_info_dialog.glade"); + dlgbuilder = remmina_public_gtk_builder_new_from_resource ("/org/remmina/Remmina/src/../data/ui/remmina_snap_info_dialog.glade"); dsa = GTK_WIDGET(gtk_builder_get_object(dlgbuilder, "dontshowagain")); if (dlgbuilder) { parent = remmina_main_get_window(); @@ -1384,8 +1384,7 @@ GtkWidget *remmina_main_new(void) remminamain = g_new0(RemminaMain, 1); remminamain->priv = g_new0(RemminaMainPriv, 1); /* Assign UI widgets to the private members */ - remminamain->builder = remmina_public_gtk_builder_new_from_file("remmina_main.glade"); - //remminamain->builder = remmina_public_gtk_builder_new_from_resource ("/org.remmina.Remmina/data/ui/remmina_main.glade"); + remminamain->builder = remmina_public_gtk_builder_new_from_resource ("/org/remmina/Remmina/src/../data/ui/remmina_main.glade"); remminamain->window = GTK_WINDOW(RM_GET_OBJECT("RemminaMain")); if (kioskmode && kioskmode == TRUE) { gtk_window_set_position(remminamain->window, GTK_WIN_POS_CENTER_ALWAYS); diff --git a/src/remmina_mpchange.c b/src/remmina_mpchange.c index 1e0db74a0..1ce3609fb 100644 --- a/src/remmina_mpchange.c +++ b/src/remmina_mpchange.c @@ -340,7 +340,7 @@ static gboolean remmina_file_multipasswd_changer_mt(gpointer d) } - bu = remmina_public_gtk_builder_new_from_file("remmina_mpc.glade"); + bu = remmina_public_gtk_builder_new_from_resource("/org/remmina/Remmina/src/../data/ui/remmina_mpc.glade"); if (!bu) { REMMINA_DEBUG("Unable to load the multiple password changer Glade file interface\n"); return FALSE; diff --git a/src/remmina_pref_dialog.c b/src/remmina_pref_dialog.c index f83e6f0c7..30722a182 100644 --- a/src/remmina_pref_dialog.c +++ b/src/remmina_pref_dialog.c @@ -673,7 +673,7 @@ GtkDialog* remmina_pref_dialog_new(gint default_tab, GtkWindow *parent) remmina_pref_dialog = g_new0(RemminaPrefDialog, 1); remmina_pref_dialog->priv = g_new0(RemminaPrefDialogPriv, 1); - remmina_pref_dialog->builder = remmina_public_gtk_builder_new_from_file("remmina_preferences.glade"); + remmina_pref_dialog->builder = remmina_public_gtk_builder_new_from_resource("/org/remmina/Remmina/src/../data/ui/remmina_preferences.glade"); remmina_pref_dialog->dialog = GTK_DIALOG(gtk_builder_get_object(remmina_pref_dialog->builder, "RemminaPrefDialog")); if (parent) gtk_window_set_transient_for(GTK_WINDOW(remmina_pref_dialog->dialog), parent); diff --git a/src/remmina_public.c b/src/remmina_public.c index bb29f9837..7073e1f3b 100644 --- a/src/remmina_public.c +++ b/src/remmina_public.c @@ -580,6 +580,7 @@ GtkBuilder* remmina_public_gtk_builder_new_from_resource(gchar *resource) GError *err = NULL; GtkBuilder *builder = gtk_builder_new(); gtk_builder_add_from_resource (builder, resource, &err); + //GtkBuilder *builder = gtk_builder_new_from_resource (resource); if (err != NULL) { g_print("Error adding build from resource. Error: %s", err->message); g_error_free(err); diff --git a/src/remmina_ssh_plugin.c b/src/remmina_ssh_plugin.c index 48ae0cbfe..901d5e973 100644 --- a/src/remmina_ssh_plugin.c +++ b/src/remmina_ssh_plugin.c @@ -701,7 +701,7 @@ GtkWidget * remmina_plugin_pop_search_new (GtkWidget *relative_to, RemminaProtoc search_widget->has_regex = FALSE; search_widget->regex_pattern = NULL; - search_widget->builder = remmina_public_gtk_builder_new_from_file("remmina_search.glade"); + search_widget->builder = remmina_public_gtk_builder_new_from_resource("/org/remmina/Remmina/src/../data/ui/remmina_search.glade"); search_widget->window = GTK_WIDGET(GET_OBJECT("RemminaSearchWidget")); search_widget->search_entry = GTK_WIDGET(GET_OBJECT("search_entry")); search_widget->search_prev_button = GTK_WIDGET(GET_OBJECT("search_prev_button")); diff --git a/src/remmina_string_list.c b/src/remmina_string_list.c index 2feb0eeda..bd92956ab 100644 --- a/src/remmina_string_list.c +++ b/src/remmina_string_list.c @@ -284,7 +284,7 @@ GtkDialog* remmina_string_list_new(gboolean two_columns, const gchar *fields_sep string_list = g_new0(RemminaStringList, 1); string_list->priv = g_new0(RemminaStringListPriv, 1); - string_list->builder = remmina_public_gtk_builder_new_from_file("remmina_string_list.glade"); + string_list->builder = remmina_public_gtk_builder_new_from_resource("/org/remmina/Remmina/src/../data/ui/remmina_string_list.glade"); string_list->dialog = GTK_DIALOG(gtk_builder_get_object(string_list->builder, "DialogStringList")); string_list->liststore_items = GTK_LIST_STORE(GET_OBJECT("liststore_items")); diff --git a/src/remmina_unlock.c b/src/remmina_unlock.c index d793ee329..30e60ba79 100644 --- a/src/remmina_unlock.c +++ b/src/remmina_unlock.c @@ -142,7 +142,7 @@ gint remmina_unlock_new(GtkWindow *parent) } g_info("Based on settings and current status, the unlock dialog is set to %d", lock); - remmina_unlock_dialog->builder = remmina_public_gtk_builder_new_from_file("remmina_unlock.glade"); + remmina_unlock_dialog->builder = remmina_public_gtk_builder_new_from_resource("/org/remmina/Remmina/src/../data/ui/remmina_unlock.glade"); remmina_unlock_dialog->dialog = GTK_DIALOG(gtk_builder_get_object(remmina_unlock_dialog->builder, "RemminaUnlockDialog")); if (parent) gtk_window_set_transient_for(GTK_WINDOW(remmina_unlock_dialog->dialog), parent); diff --git a/src/rmnews.c b/src/rmnews.c index e05e6c18f..05393478d 100644 --- a/src/rmnews.c +++ b/src/rmnews.c @@ -198,7 +198,7 @@ void rmnews_show_news(GtkWindow *parent) rmnews_news_dialog = g_new0(RemminaNewsDialog, 1); rmnews_news_dialog->retval = 1; - rmnews_news_dialog->builder = remmina_public_gtk_builder_new_from_file("remmina_news.glade"); + rmnews_news_dialog->builder = remmina_public_gtk_builder_new_from_resource("/org/remmina/Remmina/src/../data/ui/remmina_news.glade"); rmnews_news_dialog->dialog = GTK_DIALOG(gtk_builder_get_object(rmnews_news_dialog->builder, "RemminaNewsDialog")); rmnews_news_dialog->rmnews_text_view = GTK_TEXT_VIEW(GET_OBJ("rmnews_text_view")); |