Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximper-shell-notification-center
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
ximper-shell-notification-center
Commits
d10b50da
Verified
Commit
d10b50da
authored
May 25, 2026
by
Kirill Unitsaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
control-center: remove dual layout
parent
2ad20060
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
107 deletions
+13
-107
style.scss
data/style/style.scss
+0
-7
ximper-shell-notification-center.5.scd
man/ximper-shell-notification-center.5.scd
+0
-7
config.json.in
src/config.json.in
+0
-1
configModel.vala
src/configModel/configModel.vala
+2
-10
configSchema.json
src/configSchema.json
+4
-2
controlCenter.vala
src/controlCenter/controlCenter.vala
+2
-65
notifications.vala
src/controlCenter/widgets/notifications/notifications.vala
+5
-15
No files found.
data/style/style.scss
View file @
d10b50da
...
...
@@ -39,13 +39,6 @@ scrollbar {
padding
:
0
;
}
/* Dual layout */
.dual-layout
{
&
>
separator
{
margin
:
0
15px
;
}
}
.notifications-placeholder
{
opacity
:
0
.5
;
}
...
...
man/ximper-shell-notification-center.5.scd
View file @
d10b50da
...
...
@@ -165,13 +165,6 @@ config file to be able to detect config errors
to its content, up to 'control-center-height' as ++
maximum. If false, height is fixed.
*control-center-layout* ++
type: string ++
default: single ++
values: single, dual ++
description: Panel layout. "single" is a vertical column. ++
"dual" places widgets and notifications side by side.
*control-center-width* ++
type: integer ++
default: 500 ++
...
...
src/config.json.in
View file @
d10b50da
...
...
@@ -7,7 +7,6 @@
"control-center-width": 400,
"control-center-height": 740,
"control-center-dynamic-height": true,
"control-center-layout": "single",
"control-center-margin-top": 8,
"control-center-margin-bottom": 8,
"control-center-margin-right": 8,
...
...
src/configModel/configModel.vala
View file @
d10b50da
...
...
@@ -659,14 +659,6 @@ namespace XimperShellNotificationCenter {
public
string
control_center_preferred_output
{
get
;
set
;
default
=
""
;
}
/**
* Panel layout: "single" (vertical) or "dual" (two columns).
*/
public
string
control_center_layout
{
get
;
set
;
default
=
"single"
;
}
/**
* Notification body image height, in pixels.
*/
private
const
int
NOTIFICATION_BODY_IMAGE_MINIMUM_HEIGHT
=
100
;
...
...
@@ -853,7 +845,7 @@ namespace XimperShellNotificationCenter {
var
tmp_table
=
new
OrderedHashTable
<
T
>
();
if
(
node
.
get_node_type
()
!=
Json
.
NodeType
.
OBJECT
)
{
stderr
.
printf
(
"Node %s is not a json object!
...
\n"
,
stderr
.
printf
(
"Node %s is not a json object!
…
\n"
,
property_name
);
return
tmp_table
;
}
...
...
@@ -1013,7 +1005,7 @@ namespace XimperShellNotificationCenter {
GenericArray
<
T
>
tmp_array
=
new
GenericArray
<
T
>
();
if
(
node
.
get_node_type
()
!=
Json
.
NodeType
.
ARRAY
)
{
stderr
.
printf
(
"Node %s is not a json array!
...
\n"
,
stderr
.
printf
(
"Node %s is not a json array!
…
\n"
,
property_name
);
return
tmp_array
;
}
...
...
src/configSchema.json
View file @
d10b50da
...
...
@@ -298,9 +298,11 @@
},
"control-center-layout"
:
{
"type"
:
"string"
,
"description"
:
"
Panel layout: single (vertical column) or dual (widgets and notifications side by side)
"
,
"description"
:
"
Deprecated. Ignored.
"
,
"default"
:
"single"
,
"enum"
:
[
"single"
,
"dual"
]
"enum"
:
[
"single"
,
"dual"
],
"deprecated"
:
true
,
"x-ximper-hidden"
:
true
},
"transition-time"
:
{
"type"
:
"integer"
,
...
...
src/controlCenter/controlCenter.vala
View file @
d10b50da
...
...
@@ -16,10 +16,6 @@ namespace XimperShellNotificationCenter {
private
List
<
unowned
Widgets
.
BaseWidget
>
widgets
;
private
const
string
[]
DEFAULT_WIDGETS
=
{
"notifications"
};
private
Gtk
.
Box
?
dual_container
=
null
;
private
Gtk
.
Box
?
left_column
=
null
;
private
Gtk
.
SizeGroup
?
dual_size_group
=
null
;
private
string
?
monitor_name
=
null
;
public
ControlCenter
()
{
...
...
@@ -199,14 +195,6 @@ namespace XimperShellNotificationCenter {
remove_from_parent
(
notifications_widget
);
}
// Remove dual layout container
if
(
dual_container
!=
null
)
{
box
.
remove
(
dual_container
);
dual_container
=
null
;
left_column
=
null
;
dual_size_group
=
null
;
}
// Reset widgets list, keep notifications
widgets
=
new
List
<
unowned
Widgets
.
BaseWidget
>
();
if
(
notifications_widget
!=
null
)
{
...
...
@@ -218,20 +206,6 @@ namespace XimperShellNotificationCenter {
w
=
DEFAULT_WIDGETS
;
}
bool
is_dual
=
ConfigModel
.
instance
.
control_center_layout
==
"dual"
&&
notifications_widget
!=
null
;
// Prepare target containers
Gtk
.
Box
widgets_target
;
if
(
is_dual
)
{
setup_dual_container
();
widgets_target
=
left_column
;
}
else
{
widgets_target
=
box
;
}
bool
has_notifications
=
false
;
foreach
(
string
key
in
w
)
{
...
...
@@ -253,51 +227,14 @@ namespace XimperShellNotificationCenter {
}
widgets
.
append
(
widget
);
widgets_target
.
append
(
widget
);
box
.
append
(
widget
);
}
// Add notifications
if
(
has_notifications
)
{
if
(
is_dual
)
{
var
right
=
new
Gtk
.
Box
(
Gtk
.
Orientation
.
VERTICAL
,
0
);
right
.
add_css_class
(
"notifications-column"
);
right
.
set_hexpand
(
true
);
dual_size_group
.
add_widget
(
right
);
right
.
append
(
notifications_widget
);
dual_container
.
append
(
right
);
}
else
{
box
.
append
(
notifications_widget
);
}
box
.
append
(
notifications_widget
);
notifications_widget
.
reload_config
();
}
if
(
is_dual
)
{
box
.
append
(
dual_container
);
}
}
private
void
setup_dual_container
()
{
dual_container
=
new
Gtk
.
Box
(
Gtk
.
Orientation
.
HORIZONTAL
,
0
);
dual_container
.
add_css_class
(
"dual-layout"
);
dual_container
.
set_vexpand
(
true
);
dual_size_group
=
new
Gtk
.
SizeGroup
(
Gtk
.
SizeGroupMode
.
HORIZONTAL
);
left_column
=
new
Gtk
.
Box
(
Gtk
.
Orientation
.
VERTICAL
,
0
);
left_column
.
add_css_class
(
"widgets-column"
);
left_column
.
set_hexpand
(
true
);
dual_size_group
.
add_widget
(
left_column
);
var
separator
=
new
Gtk
.
Separator
(
Gtk
.
Orientation
.
VERTICAL
);
dual_container
.
append
(
left_column
);
dual_container
.
append
(
separator
);
}
/** Resets the UI positions */
...
...
src/controlCenter/widgets/notifications/notifications.vala
View file @
d10b50da
...
...
@@ -101,26 +101,17 @@ namespace XimperShellNotificationCenter.Widgets {
bool
dynamic
=
ConfigModel
.
instance
.
control_center_dynamic_height
;
bool
is_dual
=
ConfigModel
.
instance
.
control_center_layout
==
"dual"
;
set_vexpand
(
is_dual
||
!
dynamic
);
set_vexpand
(!
dynamic
);
scrolled_window
.
set_propagate_natural_height
(
dynamic
&&
!
is_dual
);
dynamic
);
update_header_visibility
();
}
private
void
update_header_visibility
()
{
bool
has_notis
=
!
is_empty
();
bool
is_dual
=
ConfigModel
.
instance
.
control_center_layout
==
"dual"
;
// Placeholder only in dual mode when empty
bool
show_placeholder
=
is_dual
&&
!
has_notis
;
placeholder_box
.
set_visible
(
show_placeholder
);
scrolled_window
.
set_visible
(!
show_placeholder
&&
(
is_dual
||
has_notis
));
placeholder_box
.
set_visible
(
false
);
scrolled_window
.
set_visible
(
has_notis
);
switch
(
show_title
)
{
case
"true"
:
...
...
@@ -134,8 +125,7 @@ namespace XimperShellNotificationCenter.Widgets {
title_label
.
set_visible
(
false
);
break
;
default
:
// auto
header_box
.
set_visible
(
is_dual
||
has_notis
);
header_box
.
set_visible
(
has_notis
);
title_label
.
set_visible
(
true
);
clear_all_button
.
set_sensitive
(
has_notis
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment