Added service window

pull/43/head
parent dc93c33ec0
commit 5c2408db5a

@ -8,6 +8,7 @@
<file>libublsettingsui-gtk3-debugger.glade</file>
<file>libublsettingsui-gtk3-filechooser.glade</file>
<file>libublsettingsui-gtk3-config-window.glade</file>
<file>libublsettingsui-gtk3-service-control.glade</file>
</gresource>
<gresource prefix="/com/ublinux/css">
<file>libublsettingsui-gtk3.css</file>

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 210 KiB

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 576 512"
version="1.1"
id="svg1"
sodipodi:docname="com.ublinux.ubl-settings-audit.active-symbolic.svg"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="0.80566406"
inkscape:cx="229.00364"
inkscape:cy="346.91879"
inkscape:window-width="1620"
inkscape:window-height="1047"
inkscape:window-x="2111"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg1" />
<!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc. -->
<path
id="path1"
style="fill:#4d4d4d;stroke-width:1.11292"
class="success"
d="m 285.83203,115.43164 c -20.97985,0.35248 -41.93032,5.214 -60.72818,14.59185 -22.98709,11.36021 -42.82569,29.07196 -56.51703,50.76807 -12.28111,19.31972 -19.75265,41.66899 -21.51509,64.49638 -2.04974,25.84772 3.23711,52.22358 15.0887,75.28541 10.31179,20.19834 25.62178,37.80256 44.16423,50.85494 17.28412,12.23765 37.39729,20.39965 58.2855,23.83616 21.90088,3.63332 44.65829,1.99 65.79402,-4.81381 19.92474,-6.36683 38.42919,-17.19327 53.62669,-31.57962 17.2128,-16.1913 30.28417,-36.76675 37.49332,-59.27981 7.34132,-22.66762 8.83746,-47.2132 4.16152,-70.58505 -4.35546,-22.05096 -14.03182,-43.04678 -28.08992,-60.59595 -16.78453,-21.08384 -39.76627,-37.16122 -65.33558,-45.67887 -14.92376,-5.00856 -30.69165,-7.44432 -46.42818,-7.2997 z" />
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 576 512"
version="1.1"
id="svg1"
sodipodi:docname="com.ublinux.ubl-settings-audit.inactive-symbolic.svg"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="0.80566406"
inkscape:cx="229.00364"
inkscape:cy="346.91879"
inkscape:window-width="1620"
inkscape:window-height="1047"
inkscape:window-x="2111"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg1" />
<!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc. -->
<path
id="path1"
style="fill:#4d4d4d;stroke-width:1.11289"
class="error"
d="m 285.78454,115.4333 c -20.50616,0.34863 -40.98349,4.99432 -59.44428,13.9827 -21.81718,10.5102 -40.87692,26.71625 -54.63122,46.65995 -12.77951,18.43398 -21.07713,39.95388 -23.90864,62.20924 -2.58359,19.80943 -0.83119,40.15536 5.02765,59.25072 7.10354,23.41244 20.49307,44.86688 38.36733,61.56887 15.11489,14.192 33.41083,24.97597 53.16938,31.26751 17.8805,5.75756 36.91348,7.89167 55.6246,6.22224 28.9618,-2.53102 57.05348,-14.30934 79.09446,-33.27919 17.35307,-14.86841 31.05534,-33.98856 39.40911,-55.26823 6.98779,-17.76501 10.40686,-36.94435 9.79867,-56.03331 -0.84718,-28.93013 -10.87202,-57.53143 -28.36881,-80.59726 -16.1544,-21.4654 -38.60123,-38.12318 -63.83798,-47.33977 -16.05862,-5.91434 -33.19271,-8.81647 -50.30027,-8.64347 z" />
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -0,0 +1,416 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface domain="libublsettingsui-gtk3">
<requires lib="gtk+" version="3.24"/>
<!-- interface-css-provider-path libublsettingsui-gtk3.css -->
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.play-symbolic</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.stop-symbolic</property>
</object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.reset-symbolic</property>
</object>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.important-symbolic</property>
</object>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.flag-empy-symbolic</property>
</object>
<object class="GtkImage" id="image6">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.flag-symbolic</property>
</object>
<object class="GtkImage" id="image7">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.sync-symbolic</property>
</object>
<object class="GtkApplicationWindow" id="MainWindow">
<property name="width-request">450</property>
<property name="height-request">225</property>
<property name="can-focus">False</property>
<property name="modal">True</property>
<property name="icon-name">com.ublinux.ubl-settings-video</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="StatusBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">25</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">20</property>
<property name="margin-right">20</property>
<property name="margin-start">20</property>
<property name="margin-end">20</property>
<property name="margin-top">20</property>
<property name="margin-bottom">20</property>
<property name="pixel-size">75</property>
<property name="icon-name">dialog-information-symbolic</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel" id="TitleLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">".service" service:</property>
<property name="xalign">0</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="UpdateButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image7</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkImage" id="ActiveImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ubl-settings-audit.inactive-symbolic</property>
</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">Active:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="ActiveLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Inactive</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="StatusButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image4</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</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>
<property name="spacing">5</property>
<child>
<object class="GtkImage" id="EnableImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ubl-settings-audit.active-symbolic</property>
</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">Enabled:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="EnableLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Disabled</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>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkButton" id="DisableButton">
<property name="label" translatable="yes">Disable</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image5</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="EnableButton">
<property name="label" translatable="yes">Enable</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image6</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkSeparator">
<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="pack-type">end</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="RestartButton">
<property name="label" translatable="yes">Restart</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image3</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="StopButton">
<property name="label" translatable="yes">Stop</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image2</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkButton" id="StartButton">
<property name="label" translatable="yes">Start</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">6</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">1</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="SettingsBar">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="show-close-button">True</property>
<child type="title">
<object class="GtkLabel" id="HeadLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">".service" service configuration</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
<child>
<object class="GtkImage" id="WindowIcon">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="pixel-size">32</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3</property>
</object>
</child>
</object>
</child>
</object>
</interface>

@ -17,296 +17,358 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: source/libublsettingsui-gtk3.h:301
#: source/libublsettingsui-gtk3.h:340
msgid "Version:"
msgstr ""
#: source/libublsettingsui-gtk3.h:302
#: source/libublsettingsui-gtk3.h:341
msgid " version:"
msgstr ""
#: source/libublsettingsui-gtk3.h:303
#: source/libublsettingsui-gtk3.h:342
msgid "Usage:"
msgstr ""
#: source/libublsettingsui-gtk3.h:303
#: source/libublsettingsui-gtk3.h:342
msgid "[OPTIONS]"
msgstr ""
#: source/libublsettingsui-gtk3.h:304
#: source/libublsettingsui-gtk3.h:343
msgid "Options:"
msgstr ""
#: source/libublsettingsui-gtk3.h:305
#: source/libublsettingsui-gtk3.h:344
msgid "Show this help"
msgstr ""
#: source/libublsettingsui-gtk3.h:306
#: source/libublsettingsui-gtk3.h:345
msgid "Show package version"
msgstr ""
#: source/libublsettingsui-gtk3.h:307
#: source/libublsettingsui-gtk3.h:346
msgid "Lock this help menu"
msgstr ""
#: source/libublsettingsui-gtk3.h:308
#: source/libublsettingsui-gtk3.h:347
msgid "Lock configuration saving"
msgstr ""
#: source/libublsettingsui-gtk3.h:309
#: source/libublsettingsui-gtk3.h:348
msgid "Lock local configration saving"
msgstr ""
#: source/libublsettingsui-gtk3.h:310
#: source/libublsettingsui-gtk3.h:349
msgid "Lock global configration saving"
msgstr ""
#: source/libublsettingsui-gtk3.h:311
#: source/libublsettingsui-gtk3.h:350
msgid "Lock global configration loading"
msgstr ""
#: source/libublsettingsui-gtk3.h:312
#: source/libublsettingsui-gtk3.h:351
msgid "Reset application settings"
msgstr ""
#: source/libublsettingsui-gtk3.h:318 source/libublsettingsui-gtk3.h:326
#: source/libublsettingsui-gtk3.h:357 source/libublsettingsui-gtk3.h:365
msgid "About"
msgstr ""
#: source/libublsettingsui-gtk3.h:320
#: source/libublsettingsui-gtk3.h:359
msgid "Operation succeeded"
msgstr ""
#: source/libublsettingsui-gtk3.h:321
#: source/libublsettingsui-gtk3.h:360
msgid "Operation failed"
msgstr ""
#: source/libublsettingsui-gtk3.h:322
#: source/libublsettingsui-gtk3.h:361
msgid ""
"Warning! Application was launched without root - root-dependent actions are "
"locked"
msgstr ""
#: source/libublsettingsui-gtk3.h:324 source/libublsettingsui-gtk3.h:325
#: source/libublsettingsui-gtk3.h:363 source/libublsettingsui-gtk3.h:364
msgid "Default"
msgstr ""
#: source/libublsettingsui-gtk3.h:327
#: source/libublsettingsui-gtk3.h:366
msgid "Documentation"
msgstr ""
#: source/libublsettingsui-gtk3.h:329
#: source/libublsettingsui-gtk3.h:368
msgid "Save to specific file"
msgstr ""
#: source/libublsettingsui-gtk3.h:330
#: source/libublsettingsui-gtk3.h:369
msgid "Save to local configuration"
msgstr ""
#: source/libublsettingsui-gtk3.h:331
#: source/libublsettingsui-gtk3.h:370
msgid "Save to global configuration"
msgstr ""
#: source/libublsettingsui-gtk3.h:332
#: source/libublsettingsui-gtk3.h:371
msgid "Save configuration"
msgstr ""
#: source/libublsettingsui-gtk3.h:333
#: source/libublsettingsui-gtk3.h:372
msgid "Save"
msgstr ""
#: source/libublsettingsui-gtk3.h:334
#: source/libublsettingsui-gtk3.h:373
msgid "Saving..."
msgstr ""
#: source/libublsettingsui-gtk3.h:336
#: source/libublsettingsui-gtk3.h:375
msgid "Load from specific file"
msgstr ""
#: source/libublsettingsui-gtk3.h:337
#: source/libublsettingsui-gtk3.h:376
msgid "Load local configuration"
msgstr ""
#: source/libublsettingsui-gtk3.h:338
#: source/libublsettingsui-gtk3.h:377
msgid "Load global configuration"
msgstr ""
#: source/libublsettingsui-gtk3.h:339
#: source/libublsettingsui-gtk3.h:378
msgid "Load"
msgstr ""
#: source/libublsettingsui-gtk3.h:340
#: source/libublsettingsui-gtk3.h:379
msgid "Load file"
msgstr ""
#: source/libublsettingsui-gtk3.h:342
#: source/libublsettingsui-gtk3.h:381
msgid "Cancel"
msgstr ""
#: source/libublsettingsui-gtk3.h:343
#: source/libublsettingsui-gtk3.h:382
msgid "Accept"
msgstr ""
#: source/libublsettingsui-gtk3.h:344
#: source/libublsettingsui-gtk3.h:383
msgid "Open"
msgstr ""
#: source/libublsettingsui-gtk3.h:345
#: source/libublsettingsui-gtk3.h:384
msgid "Create directory"
msgstr ""
#: source/libublsettingsui-gtk3.h:346
#: source/libublsettingsui-gtk3.h:385
msgid "Select directory"
msgstr ""
#: source/libublsettingsui-gtk3.h:348
#: source/libublsettingsui-gtk3.h:387
msgid "Would you like to read documentation in the Web?"
msgstr ""
#: source/libublsettingsui-gtk3.h:349
#: source/libublsettingsui-gtk3.h:388
msgid ""
"You will be redirected to documentation website where documentation is\n"
"translated and supported by community."
msgstr ""
#: source/libublsettingsui-gtk3.h:350
#: source/libublsettingsui-gtk3.h:389
msgid "Always redirect to online documentation"
msgstr ""
#: source/libublsettingsui-gtk3.h:351
#: source/libublsettingsui-gtk3.h:390
msgid "Open documentation"
msgstr ""
#: source/libublsettingsui-gtk3.h:352
#: source/libublsettingsui-gtk3.h:391
msgid "Project Home Page"
msgstr ""
#: source/libublsettingsui-gtk3.h:353
#: source/libublsettingsui-gtk3.h:392
msgid "Nothing were chosen"
msgstr ""
#: source/libublsettingsui-gtk3.h:354
#: source/libublsettingsui-gtk3.h:393
msgid "Copyright © 2022 - 2023, UBSoft LLC"
msgstr ""
#: source/libublsettingsui-gtk3.h:357
#: source/libublsettingsui-gtk3.h:396
msgid "Global configuration loading succeeded."
msgstr ""
#: source/libublsettingsui-gtk3.h:358
#: source/libublsettingsui-gtk3.h:397
msgid "Local configuration loading succeeded."
msgstr ""
#: source/libublsettingsui-gtk3.h:359
#: source/libublsettingsui-gtk3.h:398
msgid "Config loading failed"
msgstr ""
#: source/libublsettingsui-gtk3.h:361
#: source/libublsettingsui-gtk3.h:400
msgid "Local and global configuration saving succeeded."
msgstr ""
#: source/libublsettingsui-gtk3.h:362
#: source/libublsettingsui-gtk3.h:401
msgid "Global configuration saving succeeded."
msgstr ""
#: source/libublsettingsui-gtk3.h:363
#: source/libublsettingsui-gtk3.h:402
msgid "Local configuration saving succeeded."
msgstr ""
#: source/libublsettingsui-gtk3.h:364
#: source/libublsettingsui-gtk3.h:403
msgid "Configuration saving succeeded."
msgstr ""
#: source/libublsettingsui-gtk3.h:366
#: source/libublsettingsui-gtk3.h:405
msgid "Parameter"
msgstr ""
#: source/libublsettingsui-gtk3.h:367
#: source/libublsettingsui-gtk3.h:406
msgid "Old value"
msgstr ""
#: source/libublsettingsui-gtk3.h:368
#: source/libublsettingsui-gtk3.h:407
msgid "New value"
msgstr ""
#: source/libublsettingsui-gtk3.h:369
#: source/libublsettingsui-gtk3.h:408
msgid ""
"Value\n"
"(Old/New)"
msgstr ""
#: source/libublsettingsui-gtk3.h:371
#: source/libublsettingsui-gtk3.h:410
msgid "Nothing to save"
msgstr ""
#: source/libublsettingsui-gtk3.h:372
#: source/libublsettingsui-gtk3.h:411
msgid "Saving into local configuration"
msgstr ""
#: source/libublsettingsui-gtk3.h:373
#: source/libublsettingsui-gtk3.h:412
msgid "Saving into global configuration"
msgstr ""
#: source/libublsettingsui-gtk3.h:374
#: source/libublsettingsui-gtk3.h:413
msgid "Saving into global and local configuration"
msgstr ""
#: source/libublsettingsui-gtk3.h:375
#: source/libublsettingsui-gtk3.h:414
msgid "Saving into custom configuration at"
msgstr ""
#: source/libublsettingsui-gtk3.h:380
#: source/libublsettingsui-gtk3.h:419
msgid "Full saving mode"
msgstr ""
#: source/libublsettingsui-gtk3.h:381
#: source/libublsettingsui-gtk3.h:420
msgid "Saving into module"
msgstr ""
#: source/libublsettingsui-gtk3.h:382
#: source/libublsettingsui-gtk3.h:421
msgid "Sandbox mode"
msgstr ""
#: source/libublsettingsui-gtk3.h:383
#: source/libublsettingsui-gtk3.h:422
msgid "Sandbox with profile saving"
msgstr ""
#: source/libublsettingsui-gtk3.h:384
#: source/libublsettingsui-gtk3.h:423
msgid "HDD sandbox"
msgstr ""
#: source/libublsettingsui-gtk3.h:385
#: source/libublsettingsui-gtk3.h:424
msgid "HDD sandbox with profile saving"
msgstr ""
#: source/libublsettingsui-gtk3.h:386
#: source/libublsettingsui-gtk3.h:425
msgid "New configuration file creation failed"
msgstr ""
#: source/libublsettingsui-gtk3.h:387
#: source/libublsettingsui-gtk3.h:426
msgid "Upgrade to root"
msgstr ""
#: source/libublsettingsui-gtk3.h:388
#: source/libublsettingsui-gtk3.h:427
msgid "Settings"
msgstr ""
#: source/libublsettingsui-gtk3.h:390
#: source/libublsettingsui-gtk3.h:429
msgid "Application settigs"
msgstr ""
#: source/libublsettingsui-gtk3.h:392
#: source/libublsettingsui-gtk3.h:431
msgid "Invalid email adress"
msgstr ""
#: source/libublsettingsui-gtk3.h:393
#: source/libublsettingsui-gtk3.h:432
msgid "Invalid path"
msgstr ""
#: source/libublsettingsui-gtk3.h:395
#: source/libublsettingsui-gtk3.h:434
msgid "Choose path"
msgstr ""
#: source/libublsettingsui-gtk3.h:398
#: source/libublsettingsui-gtk3.h:437
msgid "Choose directory instead of file"
msgstr ""
#: source/libublsettingsui-gtk3.h:439
msgid "Enabled"
msgstr ""
#: source/libublsettingsui-gtk3.h:440
msgid "Disabled"
msgstr ""
#: source/libublsettingsui-gtk3.h:441
msgid "Active"
msgstr ""
#: source/libublsettingsui-gtk3.h:442
msgid "Inactive"
msgstr ""
#: source/libublsettingsui-gtk3.h:444
msgid "Active:"
msgstr ""
#: source/libublsettingsui-gtk3.h:445
msgid "Enabled:"
msgstr ""
#: source/libublsettingsui-gtk3.h:446
msgid "Start"
msgstr ""
#: source/libublsettingsui-gtk3.h:447
msgid "Stop"
msgstr ""
#: source/libublsettingsui-gtk3.h:448
msgid "Restart"
msgstr ""
#: source/libublsettingsui-gtk3.h:449
msgid "Enable"
msgstr ""
#: source/libublsettingsui-gtk3.h:450
msgid "Disable"
msgstr ""
#: source/libublsettingsui-gtk3.h:452
#, c-format
msgid "\"%s\" service configuration"
msgstr ""
#: source/libublsettingsui-gtk3.h:453
#, c-format
msgid "\"%s\" service:"
msgstr ""
#: source/libublsettingsui-gtk3.h:454
msgid "service is active"
msgstr ""
#: source/libublsettingsui-gtk3.h:455
msgid "service is inactive"
msgstr ""

@ -17,71 +17,71 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: source/libublsettingsui-gtk3.h:301
#: source/libublsettingsui-gtk3.h:340
msgid "Version:"
msgstr "Версия:"
#: source/libublsettingsui-gtk3.h:302
#: source/libublsettingsui-gtk3.h:341
msgid " version:"
msgstr " версия:"
#: source/libublsettingsui-gtk3.h:303
#: source/libublsettingsui-gtk3.h:342
msgid "Usage:"
msgstr "Использование:"
#: source/libublsettingsui-gtk3.h:303
#: source/libublsettingsui-gtk3.h:342
msgid "[OPTIONS]"
msgstr "[АРГУМЕНТЫ]"
#: source/libublsettingsui-gtk3.h:304
#: source/libublsettingsui-gtk3.h:343
msgid "Options:"
msgstr "Аргументы:"
#: source/libublsettingsui-gtk3.h:305
#: source/libublsettingsui-gtk3.h:344
msgid "Show this help"
msgstr "Показать эту подсказку"
#: source/libublsettingsui-gtk3.h:306
#: source/libublsettingsui-gtk3.h:345
msgid "Show package version"
msgstr "Показать версию пакета"
#: source/libublsettingsui-gtk3.h:307
#: source/libublsettingsui-gtk3.h:346
msgid "Lock this help menu"
msgstr "Заблокировать это меню помощи"
#: source/libublsettingsui-gtk3.h:308
#: source/libublsettingsui-gtk3.h:347
msgid "Lock configuration saving"
msgstr "Успешно записана локальная конфигурация"
#: source/libublsettingsui-gtk3.h:309
#: source/libublsettingsui-gtk3.h:348
msgid "Lock local configration saving"
msgstr "Заблокировать сохранение локальной конфигурации"
#: source/libublsettingsui-gtk3.h:310
#: source/libublsettingsui-gtk3.h:349
msgid "Lock global configration saving"
msgstr "Заблокировать сохранение глобальной конфигурации"
#: source/libublsettingsui-gtk3.h:311
#: source/libublsettingsui-gtk3.h:350
msgid "Lock global configration loading"
msgstr "Заблокировать загрузку глобальную конфигурацию"
#: source/libublsettingsui-gtk3.h:312
#: source/libublsettingsui-gtk3.h:351
msgid "Reset application settings"
msgstr "Сбросить настройки программы"
#: source/libublsettingsui-gtk3.h:318 source/libublsettingsui-gtk3.h:326
#: source/libublsettingsui-gtk3.h:357 source/libublsettingsui-gtk3.h:365
msgid "About"
msgstr "О программе"
#: source/libublsettingsui-gtk3.h:320
#: source/libublsettingsui-gtk3.h:359
msgid "Operation succeeded"
msgstr "Операция завершена"
#: source/libublsettingsui-gtk3.h:321
#: source/libublsettingsui-gtk3.h:360
msgid "Operation failed"
msgstr "Операция завершена с ошибкой"
#: source/libublsettingsui-gtk3.h:322
#: source/libublsettingsui-gtk3.h:361
msgid ""
"Warning! Application was launched without root - root-dependent actions are "
"locked"
@ -89,83 +89,83 @@ msgstr ""
"Внимание! Приложение было запущено без прав суперпользователя - действия, "
"требующие их наличия заблокированы"
#: source/libublsettingsui-gtk3.h:324 source/libublsettingsui-gtk3.h:325
#: source/libublsettingsui-gtk3.h:363 source/libublsettingsui-gtk3.h:364
msgid "Default"
msgstr "По умолчанию"
#: source/libublsettingsui-gtk3.h:327
#: source/libublsettingsui-gtk3.h:366
msgid "Documentation"
msgstr "Справка"
#: source/libublsettingsui-gtk3.h:329
#: source/libublsettingsui-gtk3.h:368
msgid "Save to specific file"
msgstr "Сохранить в файл"
#: source/libublsettingsui-gtk3.h:330
#: source/libublsettingsui-gtk3.h:369
msgid "Save to local configuration"
msgstr "Сохранить в локальную конфигурацию"
#: source/libublsettingsui-gtk3.h:331
#: source/libublsettingsui-gtk3.h:370
msgid "Save to global configuration"
msgstr "Сохранить в глобальную конфигурацию"
#: source/libublsettingsui-gtk3.h:332
#: source/libublsettingsui-gtk3.h:371
msgid "Save configuration"
msgstr "Сохранить конфигурацию"
#: source/libublsettingsui-gtk3.h:333
#: source/libublsettingsui-gtk3.h:372
msgid "Save"
msgstr "Сохранить"
#: source/libublsettingsui-gtk3.h:334
#: source/libublsettingsui-gtk3.h:373
msgid "Saving..."
msgstr "Сохранение..."
#: source/libublsettingsui-gtk3.h:336
#: source/libublsettingsui-gtk3.h:375
msgid "Load from specific file"
msgstr "Загрузить из файла"
#: source/libublsettingsui-gtk3.h:337
#: source/libublsettingsui-gtk3.h:376
msgid "Load local configuration"
msgstr "Загрузить локальную конфигурацию"
#: source/libublsettingsui-gtk3.h:338
#: source/libublsettingsui-gtk3.h:377
msgid "Load global configuration"
msgstr "Загрузить глобальную конфигурацию"
#: source/libublsettingsui-gtk3.h:339
#: source/libublsettingsui-gtk3.h:378
msgid "Load"
msgstr "Загрузить"
#: source/libublsettingsui-gtk3.h:340
#: source/libublsettingsui-gtk3.h:379
msgid "Load file"
msgstr "Загрузить файл"
#: source/libublsettingsui-gtk3.h:342
#: source/libublsettingsui-gtk3.h:381
msgid "Cancel"
msgstr "Отмена"
#: source/libublsettingsui-gtk3.h:343
#: source/libublsettingsui-gtk3.h:382
msgid "Accept"
msgstr "Принять"
#: source/libublsettingsui-gtk3.h:344
#: source/libublsettingsui-gtk3.h:383
msgid "Open"
msgstr "Открыть"
#: source/libublsettingsui-gtk3.h:345
#: source/libublsettingsui-gtk3.h:384
msgid "Create directory"
msgstr "Создать файл"
#: source/libublsettingsui-gtk3.h:346
#: source/libublsettingsui-gtk3.h:385
msgid "Select directory"
msgstr "Выбрать папку"
#: source/libublsettingsui-gtk3.h:348
#: source/libublsettingsui-gtk3.h:387
msgid "Would you like to read documentation in the Web?"
msgstr "Вы хотите прочитать справку в Сети?"
#: source/libublsettingsui-gtk3.h:349
#: source/libublsettingsui-gtk3.h:388
msgid ""
"You will be redirected to documentation website where documentation is\n"
"translated and supported by community."
@ -173,67 +173,67 @@ msgstr ""
"Вы будете перенаправлены на сайт с документацией, где страницы помощи\n"
"переводятся и поддерживаются сообществом."
#: source/libublsettingsui-gtk3.h:350
#: source/libublsettingsui-gtk3.h:389
msgid "Always redirect to online documentation"
msgstr "Всегда перенаправлять"
#: source/libublsettingsui-gtk3.h:351
#: source/libublsettingsui-gtk3.h:390
msgid "Open documentation"
msgstr "Прочитать справку"
#: source/libublsettingsui-gtk3.h:352
#: source/libublsettingsui-gtk3.h:391
msgid "Project Home Page"
msgstr "Домашняя страница проекта"
#: source/libublsettingsui-gtk3.h:353
#: source/libublsettingsui-gtk3.h:392
msgid "Nothing were chosen"
msgstr "Ничего не было выбрано"
#: source/libublsettingsui-gtk3.h:354
#: source/libublsettingsui-gtk3.h:393
msgid "Copyright © 2022 - 2023, UBSoft LLC"
msgstr "Copyright © 2022 - 2023, ООО «Юбисофт»"
#: source/libublsettingsui-gtk3.h:357
#: source/libublsettingsui-gtk3.h:396
msgid "Global configuration loading succeeded."
msgstr "Успешно загружена глобальная конфигурация"
#: source/libublsettingsui-gtk3.h:358
#: source/libublsettingsui-gtk3.h:397
msgid "Local configuration loading succeeded."
msgstr "Успешно загружена локальная конфигурация"
#: source/libublsettingsui-gtk3.h:359
#: source/libublsettingsui-gtk3.h:398
msgid "Config loading failed"
msgstr "Ошибка загрузки конфига"
#: source/libublsettingsui-gtk3.h:361
#: source/libublsettingsui-gtk3.h:400
msgid "Local and global configuration saving succeeded."
msgstr "Успешно записаны локальная и глобальная конфигурация"
#: source/libublsettingsui-gtk3.h:362
#: source/libublsettingsui-gtk3.h:401
msgid "Global configuration saving succeeded."
msgstr "Успешно записана глобальная конфигурация"
#: source/libublsettingsui-gtk3.h:363
#: source/libublsettingsui-gtk3.h:402
msgid "Local configuration saving succeeded."
msgstr "Успешно записана локальная конфигурация"
#: source/libublsettingsui-gtk3.h:364
#: source/libublsettingsui-gtk3.h:403
msgid "Configuration saving succeeded."
msgstr "Успешно записана конфигурация"
#: source/libublsettingsui-gtk3.h:366
#: source/libublsettingsui-gtk3.h:405
msgid "Parameter"
msgstr "Параметр"
#: source/libublsettingsui-gtk3.h:367
#: source/libublsettingsui-gtk3.h:406
msgid "Old value"
msgstr "Старое значение"
#: source/libublsettingsui-gtk3.h:368
#: source/libublsettingsui-gtk3.h:407
msgid "New value"
msgstr "Новое значение"
#: source/libublsettingsui-gtk3.h:369
#: source/libublsettingsui-gtk3.h:408
msgid ""
"Value\n"
"(Old/New)"
@ -241,78 +241,139 @@ msgstr ""
"Значение\n"
"(Старое/Новое)"
#: source/libublsettingsui-gtk3.h:371
#: source/libublsettingsui-gtk3.h:410
msgid "Nothing to save"
msgstr "Нечего сохранять"
#: source/libublsettingsui-gtk3.h:372
#: source/libublsettingsui-gtk3.h:411
msgid "Saving into local configuration"
msgstr "Сохранение в локальный конфигурационный файл"
#: source/libublsettingsui-gtk3.h:373
#: source/libublsettingsui-gtk3.h:412
msgid "Saving into global configuration"
msgstr "Сохранение в глобальный конфигурационный файл"
#: source/libublsettingsui-gtk3.h:374
#: source/libublsettingsui-gtk3.h:413
msgid "Saving into global and local configuration"
msgstr "Сохранение в глобальный и локальный конфигурационный файл"
#: source/libublsettingsui-gtk3.h:375
#: source/libublsettingsui-gtk3.h:414
msgid "Saving into custom configuration at"
msgstr "Сохранение в конфигурационный файл по пути"
#: source/libublsettingsui-gtk3.h:380
#: source/libublsettingsui-gtk3.h:419
msgid "Full saving mode"
msgstr "Полное сохранение"
#: source/libublsettingsui-gtk3.h:381
#: source/libublsettingsui-gtk3.h:420
msgid "Saving into module"
msgstr "Сохранение в модуль"
#: source/libublsettingsui-gtk3.h:382
#: source/libublsettingsui-gtk3.h:421
msgid "Sandbox mode"
msgstr "Полная песочница в ОЗУ"
#: source/libublsettingsui-gtk3.h:383
#: source/libublsettingsui-gtk3.h:422
msgid "Sandbox with profile saving"
msgstr "Песочница с сохранением профиля пользователя"
#: source/libublsettingsui-gtk3.h:384
#: source/libublsettingsui-gtk3.h:423
msgid "HDD sandbox"
msgstr "Полная песочница на HDD"
#: source/libublsettingsui-gtk3.h:385
#: source/libublsettingsui-gtk3.h:424
msgid "HDD sandbox with profile saving"
msgstr "Полная песочница на HDD с сохранением профиля пользователя"
#: source/libublsettingsui-gtk3.h:386
#: source/libublsettingsui-gtk3.h:425
msgid "New configuration file creation failed"
msgstr "Ошибка создания нового файла конфигурации"
#: source/libublsettingsui-gtk3.h:387
#: source/libublsettingsui-gtk3.h:426
msgid "Upgrade to root"
msgstr "Повысить права до root"
#: source/libublsettingsui-gtk3.h:388
#: source/libublsettingsui-gtk3.h:427
msgid "Settings"
msgstr ""
#: source/libublsettingsui-gtk3.h:390
#: source/libublsettingsui-gtk3.h:429
msgid "Application settigs"
msgstr "Настройки"
#: source/libublsettingsui-gtk3.h:392
#: source/libublsettingsui-gtk3.h:431
msgid "Invalid email adress"
msgstr "Неверный email-адрес"
#: source/libublsettingsui-gtk3.h:393
#: source/libublsettingsui-gtk3.h:432
msgid "Invalid path"
msgstr "Неправильный путь"
#: source/libublsettingsui-gtk3.h:395
#: source/libublsettingsui-gtk3.h:434
msgid "Choose path"
msgstr "Выбор пути"
#: source/libublsettingsui-gtk3.h:398
#: source/libublsettingsui-gtk3.h:437
msgid "Choose directory instead of file"
msgstr "Выбрать папку вместо вайла"
#: source/libublsettingsui-gtk3.h:439
msgid "Enabled"
msgstr "Включен"
#: source/libublsettingsui-gtk3.h:440
msgid "Disabled"
msgstr "Выключен"
#: source/libublsettingsui-gtk3.h:441
msgid "Active"
msgstr "Активен"
#: source/libublsettingsui-gtk3.h:442
msgid "Inactive"
msgstr "Неактивен"
#: source/libublsettingsui-gtk3.h:444
msgid "Active:"
msgstr "Активен:"
#: source/libublsettingsui-gtk3.h:445
msgid "Enabled:"
msgstr "Автозапуск:"
#: source/libublsettingsui-gtk3.h:446
msgid "Start"
msgstr "Запустить"
#: source/libublsettingsui-gtk3.h:447
msgid "Stop"
msgstr "Остановить"
#: source/libublsettingsui-gtk3.h:448
msgid "Restart"
msgstr "Перезапустить"
#: source/libublsettingsui-gtk3.h:449
msgid "Enable"
msgstr "Включить автозапуск"
#: source/libublsettingsui-gtk3.h:450
msgid "Disable"
msgstr "Выключить автозапуск"
#: source/libublsettingsui-gtk3.h:452
msgid "\"%s\" service configuration"
msgstr "Конфигурация сервиса \"%s\""
#: source/libublsettingsui-gtk3.h:453
#, fuzzy, c-format
msgid "\"%s\" service:"
msgstr "Cлужба \"%s\":"
#: source/libublsettingsui-gtk3.h:454
msgid "service is active"
msgstr "служба активна"
#: source/libublsettingsui-gtk3.h:455
msgid "service is inactive"
msgstr "служба неактивна"

@ -44,6 +44,7 @@ set(DEPENDFILES
../libublsettingsui-gtk3-filechooser.glade
../libublsettingsui-gtk3-debugger.glade
../libublsettingsui-gtk3-config-window.glade
../libublsettingsui-gtk3-service-control.glade
../gresource.xml
../libublsettingsui-gtk3-banner.png
../libublsettingsui-gtk3.css
@ -81,6 +82,7 @@ add_library(${PROJECT_NAME} SHARED
libublsettingsui-gtk3-save.c
libublsettingsui-gtk3-config-window.c
libublsettingsui-gtk3-filechooser.c
libublsettingsui-gtk3-service.c
libublsettingsui-gtk3.h
${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C})

@ -0,0 +1,182 @@
#include "libublsettingsui-gtk3.h"
#define service_start_icon_name "com.ublinux.libublsettingsui-gtk3.play-symbolic"
#define service_stop_icon_name "com.ublinux.libublsettingsui-gtk3.stop-symbolic"
#define service_start_status_icon_name "com.ublinux.libublsettingsui-gtk3.active-symbolic"
#define service_stop_status_icon_name "com.ublinux.libublsettingsui-gtk3.inactive-symbolic"
void __on_closed(GtkWidget *, service_window *window){
free(window->name);
free(window->start_command);
free(window->stop_command);
free(window->enable_command);
free(window->disable_command);
free(window->info_command);
free(window->check_active_command);
free(window->check_enable_command);
free(window);
gtk_main_quit();
}
void __on_service_update_clicked(GtkWidget *, service_window *window);
void __on_service_start_clicked(GtkWidget *, service_window *window){
if (system(window->start_command)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),yon_char_get_localised_from_lib(FAIL_LABEL),5,BACKGROUND_IMAGE_SUCCESS_TYPE);
return;
};
__on_service_update_clicked(NULL,window);
}
void __on_service_stop_clicked(GtkWidget *, service_window *window){
if (system(window->stop_command)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),yon_char_get_localised_from_lib(FAIL_LABEL),5,BACKGROUND_IMAGE_SUCCESS_TYPE);
return;
};
__on_service_update_clicked(NULL,window);
}
void __on_service_enable_clicked(GtkWidget *, service_window *window){
if (system(window->enable_command)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),yon_char_get_localised_from_lib(FAIL_LABEL),5,BACKGROUND_IMAGE_SUCCESS_TYPE);
return;
};
__on_service_update_clicked(NULL,window);
}
void __on_service_disable_clicked(GtkWidget *, service_window *window){
if (system(window->disable_command)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),yon_char_get_localised_from_lib(FAIL_LABEL),5,BACKGROUND_IMAGE_SUCCESS_TYPE);
return;
};
__on_service_update_clicked(NULL,window);
}
void __on_service_restart_clicked(GtkWidget *, service_window *window){
if (system(window->stop_command)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),yon_char_get_localised_from_lib(FAIL_LABEL),5,BACKGROUND_IMAGE_SUCCESS_TYPE);
return;
};
if (system(window->start_command)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),yon_char_get_localised_from_lib(FAIL_LABEL),5,BACKGROUND_IMAGE_SUCCESS_TYPE);
return;
};
__on_service_update_clicked(NULL,window);
}
void __on_service_status_clicked(GtkWidget *, service_window *window){
char *success_string = _SERVICE_ACTIVE_STATUS_LABEL(window->name);
char *fail_string = _SERVICE_INACTIVE_STATUS_LABEL(window->name);
yon_terminal_window_update_button_launch(GTK_WINDOW(window->MainWindow),window->info_command,success_string,fail_string);
}
void __on_service_update_clicked(GtkWidget *, service_window *window){
if (!system(window->check_enable_command)){
gtk_label_set_text(GTK_LABEL(window->EnableLabel),yon_char_get_localised_from_lib(_SERVICE_ENABLE_LABEL));
gtk_image_set_from_icon_name(GTK_IMAGE(window->EnableImage),service_start_status_icon_name,GTK_ICON_SIZE_BUTTON);
} else {
gtk_label_set_text(GTK_LABEL(window->EnableLabel),yon_char_get_localised_from_lib(_SERVICE_DISABLE_LABEL));
gtk_image_set_from_icon_name(GTK_IMAGE(window->EnableImage),service_stop_status_icon_name,GTK_ICON_SIZE_BUTTON);
}
if (!system(window->check_active_command)){
gtk_label_set_text(GTK_LABEL(window->ActiveLabel),yon_char_get_localised_from_lib(_SERVICE_ACTIVE_LABEL));
gtk_image_set_from_icon_name(GTK_IMAGE(window->ActiveImage),service_start_status_icon_name,GTK_ICON_SIZE_BUTTON);
} else {
gtk_label_set_text(GTK_LABEL(window->ActiveLabel),yon_char_get_localised_from_lib(_SERVICE_INACTIVE_LABEL));
gtk_image_set_from_icon_name(GTK_IMAGE(window->ActiveImage),service_stop_status_icon_name,GTK_ICON_SIZE_BUTTON);
}
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),yon_char_get_localised_from_lib(SUCCESS_LABEL),5,BACKGROUND_IMAGE_SUCCESS_TYPE);
}
service_window *yon_service_window_new(char *name, char *start_command,
char *stop_command, char *enable_command,
char *disable_command, char *info_command,
char *check_active_command, char *check_enable_command){
service_window *window = new(service_window);
GtkBuilder *builder = gtk_builder_new_from_resource(ui_glade_path_service);
window->MainWindow = yon_gtk_builder_get_widget(builder,"MainWindow");
window->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox");
window->HeadLabel = yon_gtk_builder_get_widget(builder,"HeadLabel");
window->TitleLabel = yon_gtk_builder_get_widget(builder,"TitleLabel");
window->UpdateButton = yon_gtk_builder_get_widget(builder,"UpdateButton");
window->StatusButton = yon_gtk_builder_get_widget(builder,"StatusButton");
window->ActiveLabel = yon_gtk_builder_get_widget(builder,"ActiveLabel");
window->ActiveImage = yon_gtk_builder_get_widget(builder,"ActiveImage");
window->EnableLabel = yon_gtk_builder_get_widget(builder,"EnableLabel");
window->EnableImage = yon_gtk_builder_get_widget(builder,"EnableImage");
window->RestartButton = yon_gtk_builder_get_widget(builder,"RestartButton");
window->StartButton = yon_gtk_builder_get_widget(builder,"StartButton");
window->StopButton = yon_gtk_builder_get_widget(builder,"StopButton");
window->EnableButton = yon_gtk_builder_get_widget(builder,"EnableButton");
window->DisableButton = yon_gtk_builder_get_widget(builder,"DisableButton");
window->name = yon_char_new(name);
window->start_command = yon_char_new(start_command);
window->stop_command = yon_char_new(stop_command);
window->enable_command = yon_char_new(enable_command);
window->disable_command = yon_char_new(disable_command);
window->info_command = yon_char_new(info_command);
window->check_active_command = yon_char_new(check_active_command);
window->check_enable_command = yon_char_new(check_enable_command);
char *head_label = (_SERVICE_HEAD_LABEL(window->name));
char *title_label = (_SERVICE_TITLE_LABEL(window->name));
gtk_label_set_text(GTK_LABEL(window->HeadLabel),head_label);
gtk_label_set_text(GTK_LABEL(window->TitleLabel),title_label);
yon_gtk_window_setup(GTK_WINDOW(window->MainWindow),NULL,_SERVICE_HEAD_LABEL(window->name),yon_dull_icon_path,NULL);
g_signal_connect(G_OBJECT(window->MainWindow),"destroy",G_CALLBACK(__on_closed),window);
g_signal_connect(G_OBJECT(window->StartButton),"clicked",G_CALLBACK(__on_service_start_clicked),window);
g_signal_connect(G_OBJECT(window->StopButton),"clicked",G_CALLBACK(__on_service_stop_clicked),window);
g_signal_connect(G_OBJECT(window->RestartButton),"clicked",G_CALLBACK(__on_service_restart_clicked),window);
g_signal_connect(G_OBJECT(window->StatusButton),"clicked",G_CALLBACK(__on_service_status_clicked),window);
g_signal_connect(G_OBJECT(window->UpdateButton),"clicked",G_CALLBACK(__on_service_update_clicked),window);
g_signal_connect(G_OBJECT(window->EnableButton),"clicked",G_CALLBACK(__on_service_enable_clicked),window);
g_signal_connect(G_OBJECT(window->DisableButton),"clicked",G_CALLBACK(__on_service_disable_clicked),window);
if (!system(window->check_enable_command)){
gtk_label_set_text(GTK_LABEL(window->EnableLabel),yon_char_get_localised_from_lib(_SERVICE_ENABLE_LABEL));
gtk_image_set_from_icon_name(GTK_IMAGE(window->EnableImage),service_start_status_icon_name,GTK_ICON_SIZE_BUTTON);
} else {
gtk_label_set_text(GTK_LABEL(window->EnableLabel),yon_char_get_localised_from_lib(_SERVICE_DISABLE_LABEL));
gtk_image_set_from_icon_name(GTK_IMAGE(window->EnableImage),service_stop_status_icon_name,GTK_ICON_SIZE_BUTTON);
}
if (!system(window->check_active_command)){
gtk_label_set_text(GTK_LABEL(window->ActiveLabel),yon_char_get_localised_from_lib(_SERVICE_ACTIVE_LABEL));
gtk_image_set_from_icon_name(GTK_IMAGE(window->ActiveImage),service_start_status_icon_name,GTK_ICON_SIZE_BUTTON);
} else {
gtk_label_set_text(GTK_LABEL(window->ActiveLabel),yon_char_get_localised_from_lib(_SERVICE_INACTIVE_LABEL));
gtk_image_set_from_icon_name(GTK_IMAGE(window->ActiveImage),service_stop_status_icon_name,GTK_ICON_SIZE_BUTTON);
}
return window;
}
void yon_service_window_run(service_window *window){
if (window){
gtk_widget_show(window->MainWindow);
gtk_main();
}
}

@ -19,12 +19,14 @@
#define _(String) gettext(String)
#define yon_dull_icon_path "com.ublinux.libublsettingsui-gtk3"
#define ui_glade_path "/com/ublinux/ui/libublsettingsui-gtk3.glade"
#define ui_glade_path_documentation "/com/ublinux/ui/libublsettingsui-gtk3-documentation.glade"
#define ui_glade_path_about "/com/ublinux/ui/libublsettingsui-gtk3-about.glade"
#define ui_glade_path_saving "/com/ublinux/ui/libublsettingsui-gtk3-saving.glade"
#define ui_glade_path_filechooser "/com/ublinux/ui/libublsettingsui-gtk3-filechooser.glade"
#define ui_glade_path_debug "/com/ublinux/ui/libublsettingsui-gtk3-debugger.glade"
#define ui_glade_path_service "/com/ublinux/ui/libublsettingsui-gtk3-service-control.glade"
#define ui_banner_path "/com/ublinux/images/libublsettingsui-gtk3-banner.png"
#define ui_CssPath "/com/ublinux/css/libublsettingsui-gtk3.css"
#define ui_config_path yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",template_app_information.app_tech_name,"/",template_app_information.app_tech_name,".conf",NULL)
@ -127,6 +129,7 @@ extern _template_config *template_config;
\
GtkWidget *InterfaceBox;\
//}
typedef struct {
template_window_fields
} template_main_window;
@ -298,6 +301,42 @@ typedef struct {
char *yon_settings_configuration_get(char *id);
char *yon_custom_config_init();
typedef struct {
GtkWidget *MainWindow;
GtkWidget *StatusBox;
GtkWidget *HeadLabel;
GtkWidget *TitleLabel;
GtkWidget *UpdateButton;
GtkWidget *StatusButton;
GtkWidget *ActiveLabel;
GtkWidget *EnableLabel;
GtkWidget *ActiveImage;
GtkWidget *EnableImage;
GtkWidget *RestartButton;
GtkWidget *StartButton;
GtkWidget *StopButton;
GtkWidget *EnableButton;
GtkWidget *DisableButton;
char *name;
char *start_command;
char *stop_command;
char *enable_command;
char *disable_command;
char *info_command;
char *check_active_command;
char *check_enable_command;
} service_window;
service_window *yon_service_window_new(char *name, char *start_command,
char *stop_command, char *enable_command,
char *disable_command, char *info_command,
char *check_active_command, char *check_enable_command);
void yon_service_window_run(service_window *window);
#define VERSION_LABEL yon_char_unite(_("Version:")," ",!yon_char_is_empty(template_app_information.app_version)?template_app_information.app_version:"","\n",NULL)
#define HELP_LABEL(rest) yon_char_unite(template_app_information.app_tech_name,_(" version:")," ", !yon_char_is_empty(template_app_information.app_version)?template_app_information.app_version:"","\n",\
template_app_information.app_title,"\n",_("Usage:"), " ",template_app_information.app_tech_name," ",_("[OPTIONS]"),"\n",\
@ -397,4 +436,22 @@ char *yon_custom_config_init();
#define FILE_CHOOSER_CHOOSE_FILDER_LABEL _("Choose directory instead of file")
#define _SERVICE_ENABLE_LABEL _("Enabled")
#define _SERVICE_DISABLE_LABEL _("Disabled")
#define _SERVICE_ACTIVE_LABEL _("Active")
#define _SERVICE_INACTIVE_LABEL _("Inactive")
#define _SERVICE_ACTIVE_TEXT_LABEL _("Active:")
#define _SERVICE_ENABLED_TEXT_LABEL _("Enabled:")
#define _SERVICE_START_BUTTON_LABEL _("Start")
#define _SERVICE_STOP_BUTTON_LABEL _("Stop")
#define _SERVICE_RESTART_BUTTON_LABEL _("Restart")
#define _SERVICE_ENABLE_BUTTON_LABEL _("Enable")
#define _SERVICE_DISABLE_BUTTON_LABEL _("Disable")
#define _SERVICE_HEAD_LABEL(target) g_strdup_printf(yon_char_get_localised_from_lib(_("\"%s\" service configuration")), target)
#define _SERVICE_TITLE_LABEL(target) g_strdup_printf(yon_char_get_localised_from_lib(_("\"%s\" service:")), target)
#define _SERVICE_ACTIVE_STATUS_LABEL(target) yon_char_unite("\"",target,"\" ", yon_char_get_localised_from_lib(_("service is active")),NULL)
#define _SERVICE_INACTIVE_STATUS_LABEL(target) yon_char_unite("\"",target,"\" ",yon_char_get_localised_from_lib(_("service is inactive")),NULL)
#endif
Loading…
Cancel
Save