~fabrixxm/oliver

4a09454ee308c5afbe60a154a26bb98661be662b — fabrixxm 6 months ago bed7af2
Add menubar
4 files changed, 46 insertions(+), 3 deletions(-)

A src/gtk/menus.blp
A src/gtk/meson.build
M src/meson.build
M src/oliver.gresource.xml
A src/gtk/menus.blp => src/gtk/menus.blp +26 -0
@@ 0,0 1,26 @@
using Gtk 4.0;



menu menubar {
    submenu {
        label: _("_File");

        section {
            item {
                label: _("_Open Project...");
                action: "app.open";
            }
        }
    }

    submenu {
        label: _("_Help");
        section {
            item {
                label: _("_Keyboard Shortcuts");
                action: "win.show-help-overlay";
            }
        }
    }
}
\ No newline at end of file

A src/gtk/meson.build => src/gtk/meson.build +14 -0
@@ 0,0 1,14 @@
gtk_blueprints_src	 = [
    'menus.blp',
]

gtk_blueprints_ui = []
foreach b : blueprints_src
  gtk_blueprints_ui += b.replace('.blp', '.ui')
endforeach

gtk_blueprints = custom_target('gtk_blueprints',
  input: gtk_blueprints_src,
  output: gtk_blueprints_ui,
  command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTDIR@', '@CURRENT_SOURCE_DIR@', '@INPUT@'],
)
\ No newline at end of file

M src/meson.build => src/meson.build +5 -3
@@ 23,17 23,19 @@ blueprints_src	 = [
]

blueprints_ui = []
blueprints_vala = []
foreach b : blueprints_src
  blueprints_ui += b.replace('.blp', '.ui')
  blueprints_vala += b + '.vala'
endforeach

blueprints = custom_target('blueprints',
src_blueprints = custom_target('blueprints',
  input: blueprints_src,
  output: blueprints_ui,
  command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTDIR@', '@CURRENT_SOURCE_DIR@', '@INPUT@'],
)

subdir('gtk')
blueprints = [src_blueprints, gtk_blueprints]

## /blueprint

oliver_sources += gnome.compile_resources('oliver-resources',

M src/oliver.gresource.xml => src/oliver.gresource.xml +1 -0
@@ 5,6 5,7 @@
    <file preprocess="xml-stripblanks">dialog.ui</file>
    <file preprocess="xml-stripblanks">preferences.ui</file>
    <file preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
    <file preprocess="xml-stripblanks">gtk/menus.ui</file>
  </gresource>

  <gresource prefix="/net/kirgroup/Oliver/icons">