diff options
| author | Victor Kareh <[email protected]> | 2026-07-09 12:36:01 -0400 |
|---|---|---|
| committer | Luke from DC <[email protected]> | 2026-07-27 23:15:29 +0000 |
| commit | 29c889238c3f5d7c24c37e23167a47acbdbfe660 (patch) | |
| tree | 63d1b387a56b119ff92e00ad98928112d8c1bb79 | |
| parent | c6e8d213b702d397363d7f9ada30fef52eafb91b (diff) | |
| download | mate-panel-29c889238c3f5d7c24c37e23167a47acbdbfe660.tar.bz2 mate-panel-29c889238c3f5d7c24c37e23167a47acbdbfe660.tar.xz | |
panel: Change panel-right-stick (boolean) key to pack-type (enum) in object schema
This will make it easier to add a way to center objects later on.
We'll have a pack-index key soon.
Backported from:
- https://gitlab.gnome.org/GNOME/gnome-panel/-/commit/446ff991d
- https://gitlab.gnome.org/GNOME/gnome-panel/-/commit/f42b54636
| -rw-r--r-- | data/org.mate.panel.object.gschema.xml.in | 13 | ||||
| -rw-r--r-- | mate-panel/panel-enums-gsettings.h | 5 | ||||
| -rw-r--r-- | mate-panel/panel-schemas.h | 1 |
3 files changed, 15 insertions, 4 deletions
diff --git a/data/org.mate.panel.object.gschema.xml.in b/data/org.mate.panel.object.gschema.xml.in index 73656bc5..b5cc6ae7 100644 --- a/data/org.mate.panel.object.gschema.xml.in +++ b/data/org.mate.panel.object.gschema.xml.in @@ -10,15 +10,20 @@ <summary>Toplevel panel containing object</summary> <description>The identifier of the toplevel panel which contains this object.</description> </key> + <key name="pack-type" enum="org.mate.panel.PanelObjectPackType"> + <default>'start'</default> + <summary>Interpret position relative to bottom/right edge</summary> + <description>If set to 'end', the position of the object is interpreted relative to the right (or bottom if vertical) edge of the panel.</description> + </key> <key name="position" type="i"> <default>0</default> - <summary>Object's position on the panel</summary> - <description>The position of this panel object. The position is specified by the number of pixels from the left (or top if vertical) panel edge.</description> + <summary>Object's position on the panel (deprecated)</summary> + <description>The position of this panel object. The position is specified by the number of pixels from the left (or top if vertical) panel edge. Deprecated in favor of pack-type and pack-index.</description> </key> <key name="panel-right-stick" type="b"> <default>false</default> - <summary>Interpret position relative to bottom/right edge</summary> - <description>If true, the position of the object is interpreted relative to the right (or bottom if vertical) edge of the panel.</description> + <summary>Interpret position relative to bottom/right edge (deprecated)</summary> + <description>If true, the position of the object is interpreted relative to the right (or bottom if vertical) edge of the panel. Deprecated in favor of pack-type.</description> </key> <key name="locked" type="b"> <default>false</default> diff --git a/mate-panel/panel-enums-gsettings.h b/mate-panel/panel-enums-gsettings.h index bc8a9c42..20e6a641 100644 --- a/mate-panel/panel-enums-gsettings.h +++ b/mate-panel/panel-enums-gsettings.h @@ -31,6 +31,11 @@ G_BEGIN_DECLS +typedef enum { + PANEL_OBJECT_PACK_START = 0, + PANEL_OBJECT_PACK_END = 1 +} PanelObjectPackType; + typedef enum { /*< flags=0 >*/ PANEL_ORIENTATION_TOP = 1 << 0, PANEL_ORIENTATION_RIGHT = 1 << 1, diff --git a/mate-panel/panel-schemas.h b/mate-panel/panel-schemas.h index 1b787288..15b6e9fb 100644 --- a/mate-panel/panel-schemas.h +++ b/mate-panel/panel-schemas.h @@ -45,6 +45,7 @@ #define PANEL_OBJECT_SCHEMA "org.mate.panel.object" #define PANEL_OBJECT_TYPE_KEY "object-type" #define PANEL_OBJECT_TOPLEVEL_ID_KEY "toplevel-id" +#define PANEL_OBJECT_PACK_TYPE_KEY "pack-type" #define PANEL_OBJECT_POSITION_KEY "position" #define PANEL_OBJECT_PANEL_RIGHT_STICK_KEY "panel-right-stick" #define PANEL_OBJECT_LOCKED_KEY "locked" |
