diff options
author | rbuj <[email protected]> | 2020-08-01 13:50:38 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-08-11 16:45:02 +0200 |
commit | 1ee4ea5cc7e554b481da4e052e1c7b46d03b6b5b (patch) | |
tree | 8c3879b070337e1b2691a41dc7c277048a15f173 /command/data | |
parent | 480394cdee90346d4fba01e113c007cd5771fa80 (diff) | |
download | mate-applets-1ee4ea5cc7e554b481da4e052e1c7b46d03b6b5b.tar.bz2 mate-applets-1ee4ea5cc7e554b481da4e052e1c7b46d03b6b5b.tar.xz |
command: Use common subdirs - src, data
Diffstat (limited to 'command/data')
-rw-r--r-- | command/data/Makefile.am | 42 | ||||
-rw-r--r-- | command/data/command-preferences.ui | 191 | ||||
-rw-r--r-- | command/data/command-resources.gresource.xml | 6 | ||||
-rw-r--r-- | command/data/org.mate.applets.CommandApplet.mate-panel-applet.desktop.in.in | 11 | ||||
-rw-r--r-- | command/data/org.mate.panel.applet.CommandAppletFactory.service.in | 3 | ||||
-rw-r--r-- | command/data/org.mate.panel.applet.command.gschema.xml.in | 24 |
6 files changed, 277 insertions, 0 deletions
diff --git a/command/data/Makefile.am b/command/data/Makefile.am new file mode 100644 index 00000000..b94e9523 --- /dev/null +++ b/command/data/Makefile.am @@ -0,0 +1,42 @@ +APPLET_LOCATION = $(libexecdir)/command-applet + +appletsdir = $(datadir)/mate-panel/applets +applets_in_files = org.mate.applets.CommandApplet.mate-panel-applet.desktop.in +applets_DATA = $(applets_in_files:.mate-panel-applet.desktop.in=.mate-panel-applet) + +$(applets_in_files): $(applets_in_files).in Makefile + $(AM_V_GEN)sed \ + -e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \ + $< > $@ + +$(applets_DATA): $(applets_in_files) Makefile + $(AM_V_GEN) $(MSGFMT) --desktop --keyword=Name --keyword=Description --template $< -d $(top_srcdir)/po -o $@ + +servicedir = $(datadir)/dbus-1/services +service_in_files = org.mate.panel.applet.CommandAppletFactory.service.in +service_DATA = $(service_in_files:.service.in=.service) + +org.mate.panel.applet.CommandAppletFactory.service: $(service_in_files) + $(AM_V_GEN)sed \ + -e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \ + $< > $@ + +command_gschema_in_files = org.mate.panel.applet.command.gschema.xml.in +gsettings_SCHEMAS = $(command_gschema_in_files:.xml.in=.xml) +@GSETTINGS_RULES@ + +EXTRA_DIST = \ + $(applets_in_files).in \ + $(service_in_files) \ + $(command_gschema_in_files) \ + command-preferences.ui \ + command-resources.gresource.xml + +CLEANFILES = \ + $(applets_DATA) \ + $(applets_in_files) \ + $(service_DATA) \ + $(gsettings_SCHEMAS) \ + *.gschema.valid + +-include $(top_srcdir)/git.mk diff --git a/command/data/command-preferences.ui b/command/data/command-preferences.ui new file mode 100644 index 00000000..9a2d5435 --- /dev/null +++ b/command/data/command-preferences.ui @@ -0,0 +1,191 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.36.0 --> +<interface> + <requires lib="gtk+" version="3.22"/> + <object class="GtkImage" id="image1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="icon_name">window-close</property> + </object> + <object class="GtkAdjustment" id="interval_adjustment"> + <property name="lower">1</property> + <property name="upper">86400</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkAdjustment" id="width_adjustment"> + <property name="lower">1</property> + <property name="upper">100</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkDialog" id="preferences_dialog"> + <property name="can_focus">False</property> + <property name="border_width">12</property> + <property name="title" translatable="yes">Command Applet Preferences</property> + <property name="icon_name">utilities-terminal</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkButtonBox"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="button1"> + <property name="label" translatable="yes">_Close</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="image">image1</property> + <property name="use_underline">True</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</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="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkGrid"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">C_ommand:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">command_entry</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">_Interval (seconds):</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">interval_spinbutton</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">Maximum _width (chars):</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">width_spinbutton</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="command_entry"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <signal name="focus-out-event" handler="on_command_entry_focus_out_event" swapped="no"/> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="interval_spinbutton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="adjustment">interval_adjustment</property> + <signal name="value-changed" handler="on_interval_spinbutton_value_changed" swapped="no"/> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="width_spinbutton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="adjustment">width_adjustment</property> + <signal name="value-changed" handler="on_width_spinbutton_value_changed" swapped="no"/> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</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="GtkCheckButton" id="show_icon_check"> + <property name="label" translatable="yes">_Show icon</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="halign">start</property> + <property name="use_underline">True</property> + <property name="draw_indicator">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">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="-7">button1</action-widget> + </action-widgets> + <child type="titlebar"> + <placeholder/> + </child> + </object> +</interface> diff --git a/command/data/command-resources.gresource.xml b/command/data/command-resources.gresource.xml new file mode 100644 index 00000000..72f8ac4c --- /dev/null +++ b/command/data/command-resources.gresource.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<gresources> + <gresource prefix="/org/mate/mate-applets/command"> + <file compressed="true">command-preferences.ui</file> + </gresource> +</gresources> diff --git a/command/data/org.mate.applets.CommandApplet.mate-panel-applet.desktop.in.in b/command/data/org.mate.applets.CommandApplet.mate-panel-applet.desktop.in.in new file mode 100644 index 00000000..04f76f4a --- /dev/null +++ b/command/data/org.mate.applets.CommandApplet.mate-panel-applet.desktop.in.in @@ -0,0 +1,11 @@ +[Applet Factory] +Id=CommandAppletFactory +Location=@LOCATION@ +Name=Command Factory +Description=Command Factory + +[CommandApplet] +Name=Command +Description=Shows the output of a command +# Translators: Do NOT translate or transliterate this text (this is an icon file name)! +Icon=utilities-terminal diff --git a/command/data/org.mate.panel.applet.CommandAppletFactory.service.in b/command/data/org.mate.panel.applet.CommandAppletFactory.service.in new file mode 100644 index 00000000..a4e04846 --- /dev/null +++ b/command/data/org.mate.panel.applet.CommandAppletFactory.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.mate.panel.applet.CommandAppletFactory +Exec=@LOCATION@ diff --git a/command/data/org.mate.panel.applet.command.gschema.xml.in b/command/data/org.mate.panel.applet.command.gschema.xml.in new file mode 100644 index 00000000..b352a21b --- /dev/null +++ b/command/data/org.mate.panel.applet.command.gschema.xml.in @@ -0,0 +1,24 @@ +<schemalist gettext-domain="@GETTEXT_PACKAGE@"> + <schema id="org.mate.panel.applet.command"> + <key name="command" type="s"> + <default>'date +%T'</default> + <summary>Command to execute</summary> + <description>Command/script to execute to get the output</description> + </key> + <key name="interval" type="i"> + <default>1</default> + <summary>Interval for the command</summary> + <description>Interval to execute the command (in seconds)</description> + </key> + <key name="width" type="i"> + <default>60</default> + <summary>Width of output</summary> + <description>Number of characters to display</description> + </key> + <key name="show-icon" type="b"> + <default>false</default> + <summary>Show icon</summary> + <description>If applet icon is shown or not</description> + </key> + </schema> +</schemalist> |