[balsa/wip/gtk4] Use GResource instead of installed files



commit 4b7f7cfd5cba07ae99f7d6c6a79643d590cf0f86
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Thu May 10 20:20:40 2018 -0400

    Use GResource instead of installed files
    
    Current Balsa uses installed ui/*.ui files to define the user interfaces
    for the main window, the message window, the compose window, and the
    view-source window. Those files can be replaced by GResource objects,
    which are part of the binary file, so that accessing them requires no
    additional file system access.
    
    This commit:
    • changes the C code to use GResources instead of installed files;
    • changes various meson.build files to generate the necessary C files
      instead of installing XML ui files (not difficult);
    • changes configure.ac and various Makefile.am files for the same
      purpose (far more difficult, for me!).

 libbalsa/source-viewer.c | 2 +-
 src/message-window.c     | 2 +-
 ui/balsa.gresource.xml   | 4 ++++
 3 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/libbalsa/source-viewer.c b/libbalsa/source-viewer.c
index c4b3f2cbe..469f1b412 100644
--- a/libbalsa/source-viewer.c
+++ b/libbalsa/source-viewer.c
@@ -269,7 +269,7 @@ libbalsa_show_message_source(GtkApplication  * application,
     gtk_window_set_title(window, _("Message Source"));
     gtk_window_set_default_size(window, *width, *height);
 
-    menu_bar = libbalsa_window_get_menu_bar(GTK_APPLICATION_WINDOW(source_viewer),
+    menu_bar = libbalsa_window_get_menu_bar(GTK_APPLICATION_WINDOW(window),
                                             win_entries,
                                             G_N_ELEMENTS(win_entries),
                                             resource_path, &err, window);
diff --git a/src/message-window.c b/src/message-window.c
index ebb588534..9674b5d42 100644
--- a/src/message-window.c
+++ b/src/message-window.c
@@ -875,7 +875,7 @@ message_window_new(LibBalsaMailbox * mailbox, guint msgno)
     gtk_container_add(GTK_CONTAINER(window), vbox);
 
     /* Set up the GMenu structures */
-    menubar = libbalsa_window_get_menu_bar(GTK_APPLICATION_WINDOW(mw),
+    menubar = libbalsa_window_get_menu_bar(GTK_APPLICATION_WINDOW(window),
                                            win_entries,
                                            G_N_ELEMENTS(win_entries),
                                            resource_path, &error, mw);
diff --git a/ui/balsa.gresource.xml b/ui/balsa.gresource.xml
index b8d6c7158..31a9eb45f 100644
--- a/ui/balsa.gresource.xml
+++ b/ui/balsa.gresource.xml
@@ -3,7 +3,11 @@
   <gresource prefix="/org/desktop/Balsa">
     <file compressed="true">main-window.ui</file>
     <file compressed="true">message-window.ui</file>
+<<<<<<< HEAD
     <file compressed="true">compose-window.ui</file>
+=======
+    <file compressed="true">sendmsg-window.ui</file>
+>>>>>>> 3daecc95d... Use GResource instead of installed files
     <file compressed="true">source-viewer.ui</file>
   </gresource>
 </gresources>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]