Skip to content

Commit

Permalink
Start cleaning up non-applicable settings
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshStrobl committed Jan 7, 2022
1 parent 619aaf4 commit 434c551
Show file tree
Hide file tree
Showing 15 changed files with 0 additions and 2,300 deletions.
1 change: 0 additions & 1 deletion panels/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ panels = [
'printers',
'region',
'removable-media',
'search',
'sharing',
'sound',
'universal-access',
Expand Down
26 changes: 0 additions & 26 deletions panels/multitasking/cc-multitasking-panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,12 @@ struct _CcMultitaskingPanel
{
CcPanel parent_instance;

GSettings *interface_settings;
GSettings *mutter_settings;
GSettings *shell_settings;
GSettings *wm_settings;

GtkSwitch *active_screen_edges_switch;
GtkToggleButton *current_workspace_radio;
GtkToggleButton *dynamic_workspaces_radio;
GtkToggleButton *fixed_workspaces_radio;
GtkSwitch *hot_corner_switch;
GtkSpinButton *number_of_workspaces_spin;
GtkToggleButton *workspaces_primary_display_radio;
GtkToggleButton *workspaces_span_displays_radio;
Expand All @@ -53,9 +49,7 @@ cc_multitasking_panel_finalize (GObject *object)
{
CcMultitaskingPanel *self = (CcMultitaskingPanel *)object;

g_clear_object (&self->interface_settings);
g_clear_object (&self->mutter_settings);
g_clear_object (&self->shell_settings);
g_clear_object (&self->wm_settings);

G_OBJECT_CLASS (cc_multitasking_panel_parent_class)->finalize (object);
Expand All @@ -74,10 +68,8 @@ cc_multitasking_panel_class_init (CcMultitaskingPanelClass *klass)
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/multitasking/cc-multitasking-panel.ui");

gtk_widget_class_bind_template_child (widget_class, CcMultitaskingPanel, active_screen_edges_switch);
gtk_widget_class_bind_template_child (widget_class, CcMultitaskingPanel, current_workspace_radio);
gtk_widget_class_bind_template_child (widget_class, CcMultitaskingPanel, dynamic_workspaces_radio);
gtk_widget_class_bind_template_child (widget_class, CcMultitaskingPanel, fixed_workspaces_radio);
gtk_widget_class_bind_template_child (widget_class, CcMultitaskingPanel, hot_corner_switch);
gtk_widget_class_bind_template_child (widget_class, CcMultitaskingPanel, number_of_workspaces_spin);
gtk_widget_class_bind_template_child (widget_class, CcMultitaskingPanel, workspaces_primary_display_radio);
gtk_widget_class_bind_template_child (widget_class, CcMultitaskingPanel, workspaces_span_displays_radio);
Expand All @@ -90,13 +82,6 @@ cc_multitasking_panel_init (CcMultitaskingPanel *self)

gtk_widget_init_template (GTK_WIDGET (self));

self->interface_settings = g_settings_new ("org.gnome.desktop.interface");
g_settings_bind (self->interface_settings,
"enable-hot-corners",
self->hot_corner_switch,
"active",
G_SETTINGS_BIND_DEFAULT);

self->mutter_settings = g_settings_new ("org.gnome.mutter");

if (g_settings_get_boolean (self->mutter_settings, "workspaces-only-on-primary"))
Expand Down Expand Up @@ -132,15 +117,4 @@ cc_multitasking_panel_init (CcMultitaskingPanel *self)
self->number_of_workspaces_spin,
"value",
G_SETTINGS_BIND_DEFAULT);

self->shell_settings = g_settings_new ("org.gnome.shell.app-switcher");

if (g_settings_get_boolean (self->shell_settings, "current-workspace-only"))
gtk_toggle_button_set_active (self->current_workspace_radio, TRUE);

g_settings_bind (self->shell_settings,
"current-workspace-only",
self->current_workspace_radio,
"active",
G_SETTINGS_BIND_DEFAULT);
}
97 changes: 0 additions & 97 deletions panels/multitasking/cc-multitasking-panel.ui
Original file line number Diff line number Diff line change
Expand Up @@ -47,34 +47,6 @@
<class name="content"/>
</style>

<!-- Hot Corner -->
<child>
<object class="CcMultitaskingRow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="activatable-widget">hot_corner_switch</property>
<property name="title" translatable="yes">_Hot Corner</property>
<property name="subtitle" translatable="yes">Touch the top-left corner to open the Activities Overview.</property>
<property name="use_underline">True</property>
<child>
<object class="GtkSwitch" id="hot_corner_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="valign">center</property>
</object>
</child>
<child type="artwork">
<object class="GtkImage">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="halign">center</property>
<property name="margin">18</property>
<property name="resource">/org/gnome/control-center/multitasking/assets/hot-corner.svg</property>
</object>
</child>
</object>
</child>

<!-- Active Screen Edges -->
<child>
<object class="CcMultitaskingRow">
Expand Down Expand Up @@ -270,77 +242,8 @@
</child>
</object>
</child>

</object>
</child>

<!-- Application Switching -->
<child>
<object class="GtkLabel">
<property name="visible">true</property>
<property name="can-focus">true</property>
<property name="label" translatable="yes">Application Switching</property>
<property name="xalign">0.0</property>
<attributes>
<attribute name="weight" value="bold" />
</attributes>
</object>
</child>

<child>
<object class="GtkListBox">
<property name="visible">true</property>
<property name="can-focus">true</property>
<property name="selection-mode">none</property>
<property name="margin-bottom">18</property>

<style>
<class name="content"/>
</style>

<!-- All Workspaces -->
<child>
<object class="CcMultitaskingRow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="activatable-widget">all_workspaces_radio</property>
<property name="title" translatable="yes">Include applications from all _workspaces</property>
<property name="use_underline">True</property>
<child type="prefix">
<object class="GtkRadioButton" id="all_workspaces_radio">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="valign">center</property>
</object>
</child>
</object>
</child>

<!-- Current Workspace -->
<child>
<object class="CcMultitaskingRow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="activatable-widget">current_workspace_radio</property>
<property name="title" translatable="yes">Include applications from the _current workspace only</property>
<property name="use_underline">True</property>
<child type="prefix">
<object class="GtkRadioButton" id="current_workspace_radio">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="valign">center</property>
<property name="group">all_workspaces_radio</property>
</object>
</child>
</object>
</child>

</object>
</child>

</object>
</child>

</object>
</child>
</object>
Expand Down
Loading

0 comments on commit 434c551

Please sign in to comment.