diff options
author | 2023-10-02 09:42:29 +0600 | |
---|---|---|
committer | 2023-10-02 09:42:29 +0600 | |
commit | ee71f34db54722e5d4be44870ed9148536487a27 (patch) | |
tree | e69adfe3a94114ada03d44da3f26b9c2d6821979 | |
download | jadupc-remote-support-console-ee71f34db54722e5d4be44870ed9148536487a27.tar.gz jadupc-remote-support-console-ee71f34db54722e5d4be44870ed9148536487a27.zip |
Initial Commit
Signed-off-by: Mubashshir <ahm@jadupc.com>
-rw-r--r-- | data/com.jadupc.support.appdata.xml.in.in | 9 | ||||
-rw-r--r-- | data/com.jadupc.support.desktop.in.in | 8 | ||||
-rw-r--r-- | data/com.jadupc.support.gschema.xml.in.in | 5 | ||||
-rw-r--r-- | data/icons/meson.build | 13 | ||||
-rw-r--r-- | data/meson.build | 83 | ||||
-rw-r--r-- | data/support.gresource.xml | 6 | ||||
-rw-r--r-- | data/ui/meson.build | 3 | ||||
-rw-r--r-- | data/ui/window.ui | 324 | ||||
-rw-r--r-- | po/LINGUAS | 0 | ||||
-rw-r--r-- | po/POTFILES.in | 1 | ||||
-rw-r--r-- | po/meson.build | 15 |
11 files changed, 467 insertions, 0 deletions
diff --git a/data/com.jadupc.support.appdata.xml.in.in b/data/com.jadupc.support.appdata.xml.in.in new file mode 100644 index 0000000..bafc901 --- /dev/null +++ b/data/com.jadupc.support.appdata.xml.in.in @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<component type="desktop"> + <id>@APPLICATION_ID@.desktop</id> + <metadata_license>CC0-1.0</metadata_license> + <project_license>@LICENSE@</project_license> + <description> + <p>@PROJECT_INFO@</p> + </description> +</component> diff --git a/data/com.jadupc.support.desktop.in.in b/data/com.jadupc.support.desktop.in.in new file mode 100644 index 0000000..1bfad53 --- /dev/null +++ b/data/com.jadupc.support.desktop.in.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=@DESKTOP_NAME@ +Exec=@EXEC@ +Icon=@APPLICATION_ID@ +Terminal=false +Type=Application +Categories=GTK; +StartupNotify=true diff --git a/data/com.jadupc.support.gschema.xml.in.in b/data/com.jadupc.support.gschema.xml.in.in new file mode 100644 index 0000000..19f799b --- /dev/null +++ b/data/com.jadupc.support.gschema.xml.in.in @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<schemalist gettext-domain="@EXEC@"> + <schema id="@APPLICATION_ID@" path="@APPLICATION_PATH@"> + </schema> +</schemalist> diff --git a/data/icons/meson.build b/data/icons/meson.build new file mode 100644 index 0000000..9d44022 --- /dev/null +++ b/data/icons/meson.build @@ -0,0 +1,13 @@ +application_id = 'com.jadupc.support' + +scalable_dir = join_paths('hicolor', 'scalable', 'apps') +install_data( + join_paths(scalable_dir, ('@0@.svg').format(application_id)), + install_dir: join_paths(get_option('datadir'), 'icons', scalable_dir) +) + +symbolic_dir = join_paths('hicolor', 'symbolic', 'apps') +install_data( + join_paths(symbolic_dir, ('@0@-symbolic.svg').format(application_id)), + install_dir: join_paths(get_option('datadir'), 'icons', symbolic_dir) +) diff --git a/data/meson.build b/data/meson.build new file mode 100644 index 0000000..65ddc4b --- /dev/null +++ b/data/meson.build @@ -0,0 +1,83 @@ +data_config = configuration_data({ + 'PROJECT_NAME': project_name, + 'APPLICATION_ID': application_id, + 'EXEC': application_name, + 'APPLICATION_PATH': application_path, + 'LICENSE': ', '.join(meson.project_license()), + 'PROJECT_INFO': description, + 'DESKTOP_NAME': desktop_name, +}) + +i18n_data += configure_file( + input: '@0@.desktop.in.in'.format(application_id), + output: '@BASENAME@', + configuration: data_config, +) + +desktop_file = i18n.merge_file( + input: i18n_data[-1], + output: '@BASENAME@', + type: 'desktop', + po_dir: '../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'applications') +) + +desktop_utils = find_program('desktop-file-validate', required: false) +if desktop_utils.found() + test('Validate desktop file', desktop_utils, + args: [desktop_file] + ) +endif + +i18n_data += configure_file( + input: '@0@.appdata.xml.in.in'.format(application_id), + output: '@BASENAME@', + configuration: data_config, +) + +appstream_file = i18n.merge_file( + input: i18n_data[-1], + output: '@BASENAME@', + po_dir: '../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'appdata') +) + +appstream_util = find_program('appstream-util', required: false) +if appstream_util.found() + test('Validate appstream file', appstream_util, + args: ['validate', appstream_file] + ) +endif + +i18n_data += configure_file( + input: '@0@.gschema.xml.in.in'.format(application_id), + output: '@BASENAME@', + configuration: data_config, +) + +gscheme_file = i18n.merge_file( + input: i18n_data[-1], + output: '@BASENAME@', + po_dir: '../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas') +) + +compile_schemas = find_program('glib-compile-schemas', required: false) +if compile_schemas.found() + test('Validate schema file', compile_schemas, + args: ['--strict', '--dry-run', meson.current_source_dir()] + ) +endif + +subdir('icons') +subdir('ui') + +resources = gnome.compile_resources('@0@-resources'.format(project_name), + '@0@.gresource.xml'.format(project_name), + source_dir: meson.current_source_dir(), + c_name: project_name, + dependencies: ui_defs +) diff --git a/data/support.gresource.xml b/data/support.gresource.xml new file mode 100644 index 0000000..8875d59 --- /dev/null +++ b/data/support.gresource.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<gresources> + <gresource prefix="/com/jadupc/support"> + <file>ui/window.ui</file> + </gresource> +</gresources> diff --git a/data/ui/meson.build b/data/ui/meson.build new file mode 100644 index 0000000..b4c5fec --- /dev/null +++ b/data/ui/meson.build @@ -0,0 +1,3 @@ +ui_defs = files( + 'window.ui' +) diff --git a/data/ui/window.ui b/data/ui/window.ui new file mode 100644 index 0000000..14f9138 --- /dev/null +++ b/data/ui/window.ui @@ -0,0 +1,324 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.40.0 --> +<interface> + <requires lib="gtk+" version="3.24"/> + <requires lib="vte-2.91" version="0.74"/> + <object class="GtkAdjustment" id="vadj"> + <property name="upper">100</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> + </object> + <template class="JadupcSupportWindow" parent="GtkApplicationWindow"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="default-width">600</property> + <property name="default-height">400</property> + <property name="show-menubar">False</property> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkInfoBar" id="infobar"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="homogeneous">True</property> + <property name="message-type">warning</property> + <property name="show-close-button">True</property> + <property name="revealed">False</property> + <child internal-child="action_area"> + <object class="GtkButtonBox"> + <property name="can-focus">False</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child internal-child="content_area"> + <object class="GtkBox"> + <property name="can-focus">False</property> + <child> + <object class="GtkImage" id="infobarIcon"> + <property name="visible">True</property> + <property name="can-focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="infobarText"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="use-markup">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkStack" id="view"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="transition-type">slide-left-right</property> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkSeparator"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can-focus">False</property> + <property name="opacity">0</property> + <property name="vexpand">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <child> + <object class="GtkSeparator"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can-focus">False</property> + <property name="opacity">0</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="sessionbutton"> + <property name="label" translatable="yes">Initiate Support Session</property> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="focus-on-click">False</property> + <property name="receives-default">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkSeparator"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can-focus">False</property> + <property name="opacity">0</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkSeparator"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can-focus">False</property> + <property name="opacity">0</property> + <property name="vexpand">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + </object> + <packing> + <property name="name">session</property> + </packing> + </child> + <child> + <object class="GtkSpinner" id="spinner"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="active">True</property> + </object> + <packing> + <property name="name">inprogress</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkScrolledWindow"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="vadjustment">vadj</property> + <child> + <object class="VteTerminal" id="terminal"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="has-focus">True</property> + <property name="hscroll-policy">natural</property> + <property name="vadjustment">vadj</property> + <property name="vscroll-policy">natural</property> + <property name="allow-hyperlink">True</property> + <property name="bold-is-bright">True</property> + <property name="encoding">UTF-8</property> + <property name="pointer-autohide">True</property> + <property name="scroll-on-keystroke">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="terminal-atkobject"> + <property name="AtkObject::accessible-role">terminal</property> + </object> + </child> + </object> + </child> + <child internal-child="accessible"> + <object class="AtkObject"> + <property name="AtkObject::accessible-role">scroll-pane</property> + </object> + </child> + </object> + <packing> + <property name="name">terminal</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <child type="titlebar"> + <object class="GtkHeaderBar" id="header_bar"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="show-close-button">True</property> + <child type="title"> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="session"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes">Disconnected...</property> + <property name="use-markup">True</property> + <property name="single-line-mode">True</property> + <property name="track-visited-links">False</property> + <child internal-child="accessible"> + <object class="AtkObject" id="session-atkobject"> + <property name="AtkObject::accessible-role">label</property> + </object> + </child> + <style> + <class name="title"/> + </style> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes">JaduPc Remote Support Console</property> + <child internal-child="accessible"> + <object class="AtkObject"> + <property name="AtkObject::accessible-role">heading</property> + </object> + </child> + <style> + <class name="subtitle"/> + </style> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child internal-child="accessible"> + <object class="AtkObject"> + <property name="AtkObject::accessible-role">heading</property> + </object> + </child> + </object> + </child> + <child> + <object class="GtkButton"> + <property name="use-action-appearance">True</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="action-name">app.about</property> + <child> + <object class="GtkImage"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="icon-name">dialog-information</property> + </object> + </child> + </object> + </child> + <child internal-child="accessible"> + <object class="AtkObject" id="header_bar-atkobject"> + <property name="AtkObject::accessible-role">title-bar</property> + </object> + </child> + </object> + </child> + <child internal-child="accessible"> + <object class="AtkObject" id="JadupcSupportWindow-atkobject"> + <property name="AtkObject::accessible-role">application</property> + </object> + </child> + </template> +</interface> diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/po/LINGUAS diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..657ea12 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1 @@ +@SOURCES@ diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 0000000..cf61bee --- /dev/null +++ b/po/meson.build @@ -0,0 +1,15 @@ +i18n.gettext(project_name, preset: 'glib') + +i18n_sources = [] + +foreach file : srcs + ui_defs + i18n_data + i18n_sources += '@0@'.format(file) +endforeach + +potfiles = configure_file( + input: 'POTFILES.in', + output: '@BASENAME@', + configuration: configuration_data({ + 'SOURCES': '\n'.join(i18n_sources) + }), +) |