summarylogtreecommitdiffstats
path: root/41.patch
blob: 5298a0ba3db2cd3dd5323b680d0e989191efdeeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 723d70174a431bc0a427733161bfb7f26db3e660 Mon Sep 17 00:00:00 2001
From: Ikey Doherty <ikey@solus-project.com>
Date: Thu, 8 Feb 2018 15:34:27 +0000
Subject: [PATCH] Do not use uninitialised properties on startup

This alleviates a crash on startup when the appmenu module isn't actually
installed.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
---
 mate-tweak | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mate-tweak b/mate-tweak
index c9e6216..4f9745c 100755
--- a/mate-tweak
+++ b/mate-tweak
@@ -1513,7 +1513,7 @@ class MateTweak:
         self.builder.get_object("checkbox_localmenu").set_tooltip_text(_("Display application menus in the application window. When local menus are disabled, add the Global Menu applet to a panel to see them."))
 
         # Locally integrated menus
-        if self.schema_has_key('org.mate.interface', 'gtk-shell-shows-menubar'):
+        if self.schema_has_key('org.mate.interface', 'gtk-shell-shows-menubar') and self.appmenu_available:
             self.builder.get_object("checkbox_localmenu").connect("toggled", self.toggle_localmenu)
             self.builder.get_object("checkbox_localmenu").set_active(self.show_localmenu)
         else: