Skip to content

Commit

Permalink
[crash] Use a more serious primary text when not on Semplice
Browse files Browse the repository at this point in the history
Signed-off-by: Eugenio Paolantonio (g7) <[email protected]>
  • Loading branch information
g7 committed Nov 21, 2015
1 parent 56adbaf commit 42670a7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
8 changes: 8 additions & 0 deletions crash/crash_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

import locale, t9n.library

import os

locale.setlocale(locale.LC_ALL, '')
locale.bindtextdomain("linstaller", "/usr/share/locale")
_ = t9n.library.translation_init("linstaller")
Expand Down Expand Up @@ -95,6 +97,12 @@ def __init__(self):
self.dialogclose.connect("clicked", self.hide_dialog)
self.errorclose.connect("clicked", self.hide_error)

if os.path.exists("/etc/semplice-live-mode"):
# Semplice, we can cheer up! :)
self.crashwindow.set_markup(
_("<big><b>Drunk people should not write software.</b></big>")
)

self.crashwindow.show()

win = Window()
Expand Down
16 changes: 5 additions & 11 deletions crash/ui.glade
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.19.0 -->
<interface>
<!-- interface-requires gtk+ 3.0 -->
<requires lib="gtk+" version="3.0"/>
<object class="GtkMessageDialog" id="crash">
<property name="width_request">400</property>
<property name="can_focus">False</property>
Expand All @@ -13,15 +14,12 @@
<property name="type_hint">dialog</property>
<property name="urgency_hint">True</property>
<property name="message_type">other</property>
<property name="text" translatable="yes">&lt;big&gt;&lt;b&gt;Drunk people should not write software.&lt;/b&gt;&lt;/big&gt;</property>
<property name="text" translatable="yes">&lt;big&gt;&lt;b&gt;An error occurred.&lt;/b&gt;&lt;/big&gt;</property>
<property name="use_markup">True</property>
<property name="secondary_text" translatable="yes">Unfortunately, this is our case.
We are sorry to tell you that the installer for some reason crashed.
<property name="secondary_text" translatable="yes">We are sorry to tell you that the installer for some reason crashed.

There is a log file that you may want to read to see what is wrong, Its path is &lt;b&gt;/var/log/linstaller/linstaller_latest.log&lt;/b&gt;.
Use the "&lt;i&gt;Pastebin it!&lt;/i&gt;" button to post it to a public pastebin. A working Internet connection is required.

You can use the "&lt;i&gt;Semplice on IRC&lt;/i&gt;" item into the Help menu to get help.</property>
Use the "&lt;i&gt;Pastebin it!&lt;/i&gt;" button to post it to a public pastebin. A working Internet connection is required.</property>
<property name="secondary_use_markup">True</property>
<child internal-child="vbox">
<object class="GtkBox" id="messagedialog-vbox">
Expand All @@ -39,7 +37,6 @@ You can use the "&lt;i&gt;Semplice on IRC&lt;/i&gt;" item into the Help menu to
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="expand">False</property>
Expand All @@ -54,7 +51,6 @@ You can use the "&lt;i&gt;Semplice on IRC&lt;/i&gt;" item into the Help menu to
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="expand">False</property>
Expand Down Expand Up @@ -100,7 +96,6 @@ You can use the "&lt;i&gt;Semplice on IRC&lt;/i&gt;" item into the Help menu to
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
Expand Down Expand Up @@ -147,7 +142,6 @@ You can use the "&lt;i&gt;Semplice on IRC&lt;/i&gt;" item into the Help menu to
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
Expand Down

0 comments on commit 42670a7

Please sign in to comment.