Commit 5ffefc00 authored by Simone Piccardi's avatar Simone Piccardi

Remove unused code for mint cinnamon configurations

parent 4891ae58
......@@ -84,8 +84,6 @@ class MintWelcome():
# builder.get_object("button_timeshift").connect("clicked", self.pkexec, "timeshift-gtk")
# button to launch gufw, commented out
#builder.get_object("button_gufw").connect("clicked", self.launch, "gufw")
builder.get_object("button_layout_legacy").connect("clicked", self.on_button_layout_clicked, LAYOUT_STYLE_LEGACY)
builder.get_object("button_layout_new").connect("clicked", self.on_button_layout_clicked, LAYOUT_STYLE_NEW)
# Settings button depends on DE
de_is_cinnamon = False
......@@ -102,10 +100,6 @@ class MintWelcome():
# Hide settings
builder.get_object("box_first_steps").remove(builder.get_object("box_settings"))
# Hide Cinnamon layout settings in other DEs
if not de_is_cinnamon:
builder.get_object("box_first_steps").remove(builder.get_object("box_cinnamon"))
# Hide new features page for LMDE
if dist_name == "LMDE":
builder.get_object("box_documentation").remove(builder.get_object("box_new_features"))
......@@ -158,60 +152,6 @@ class MintWelcome():
os.system("mkdir -p ~/.linuxmint/mintwelcome")
os.system("touch %s" % NORUN_FLAG)
def on_button_layout_clicked (self, button, style):
applets_legacy = ['panel1:left:0:menu@cinnamon.org',
'panel1:left:1:show-desktop@cinnamon.org',
'panel1:left:2:panel-launchers@cinnamon.org',
'panel1:left:3:window-list@cinnamon.org',
'panel1:right:0:systray@cinnamon.org',
'panel1:right:1:xapp-status@cinnamon.org',
'panel1:right:2:keyboard@cinnamon.org',
'panel1:right:3:notifications@cinnamon.org',
'panel1:right:4:printers@cinnamon.org',
'panel1:right:5:removable-drives@cinnamon.org',
'panel1:right:6:user@cinnamon.org',
'panel1:right:7:network@cinnamon.org',
'panel1:right:8:sound@cinnamon.org',
'panel1:right:9:power@cinnamon.org',
'panel1:right:10:calendar@cinnamon.org']
applets_new = ['panel1:left:0:menu@cinnamon.org',
'panel1:left:1:show-desktop@cinnamon.org',
'panel1:left:2:grouped-window-list@cinnamon.org',
'panel1:right:0:systray@cinnamon.org',
'panel1:right:1:xapp-status@cinnamon.org',
'panel1:right:2:notifications@cinnamon.org',
'panel1:right:3:printers@cinnamon.org',
'panel1:right:4:removable-drives@cinnamon.org',
'panel1:right:5:keyboard@cinnamon.org',
'panel1:right:6:network@cinnamon.org',
'panel1:right:7:sound@cinnamon.org',
'panel1:right:8:power@cinnamon.org',
'panel1:right:9:calendar@cinnamon.org']
settings = Gio.Settings("org.cinnamon")
settings.set_strv("panels-enabled", ['1:0:bottom'])
applets = applets_new
left_icon_size = 0
center_icon_size = 0
right_icon_size = 0
if style == LAYOUT_STYLE_LEGACY:
applets = applets_legacy
panel_size = 27
menu_label = "Menu"
elif style == LAYOUT_STYLE_NEW:
panel_size = 40
right_icon_size = 24
menu_label = ""
settings.set_strv("panels-height", ['1:%s' % panel_size])
settings.set_strv("enabled-applets", applets)
settings.set_string("app-menu-label", menu_label)
settings.set_string("panel-zone-icon-sizes", "[{\"panelId\": 1, \"left\": %s, \"center\": %s, \"right\": %s}]" % (left_icon_size, center_icon_size, right_icon_size))
os.system("cinnamon --replace &")
def visit(self, button, url):
subprocess.Popen(["xdg-open", url])
......
......@@ -581,240 +581,6 @@
<property name="border_width">24</property>
<property name="orientation">vertical</property>
<property name="spacing">18</property>
<child>
<object class="GtkBox" id="box_cinnamon">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">24</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="margin_top">6</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkImage" id="image_new_features8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="icon_name">cs-panel</property>
<property name="icon_size">6</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</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="orientation">vertical</property>
<property name="spacing">3</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Panel Layout</property>
<property name="xalign">0</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="1.2"/>
</attributes>
</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">Choose your favorite layout.</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">False</property>
<property name="border_width">6</property>
<property name="homogeneous">True</property>
<property name="layout_style">expand</property>
<child>
<object class="GtkButton" id="button_layout_legacy">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<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="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Traditional</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkImage" id="img_legacy">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixbuf">legacy.png</property>
<property name="icon_size">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">A small panel and a traditional window list.</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button_layout_new">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<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="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Modern</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkImage" id="img_modern">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixbuf">modern.png</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">A large panel with grouped windows and a small system tray.</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</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>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Note: Cinnamon will restart after you choose a new layout. Any customization you made to the panel will be lost.</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</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">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<!--
<child>
<object class="GtkBox">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment