From 3b92aaac28a82fdb40d48906cde0b637afde18c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Br=C3=B6tzmann?= Date: Mon, 15 Oct 2018 19:23:18 +0200 Subject: [PATCH] [set_location] Add dependency bar --- set_location/config_dialog.ui | 24 ++++++++++++------------ set_location/set_location.py | 6 ++---- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/set_location/config_dialog.ui b/set_location/config_dialog.ui index aedf343..639e124 100644 --- a/set_location/config_dialog.ui +++ b/set_location/config_dialog.ui @@ -18,24 +18,15 @@ True False + True warning - True False 6 end - - True - False - You need to install gir1.2-gtkchamplain and gir1.2-gtkclutter-1.0 for the map to work. - - - False - True - 1 - + @@ -48,7 +39,16 @@ False - + + True + False + You need to install gir1.2-gtkchamplain and gir1.2-gtkclutter-1.0 for the map to work. + + + False + True + 0 + diff --git a/set_location/set_location.py b/set_location/set_location.py index 6c77da4..2dbcd0d 100644 --- a/set_location/set_location.py +++ b/set_location/set_location.py @@ -35,7 +35,7 @@ try: GtkClutter.init([]) # Must be initialized before importing those: from gi.repository import Champlain, GtkChamplain except: - log.exception('Champlain library not available') + log.exception('To view the map, you have to install all dependencies') CHAMPLAIN_AVAILABLE = False @@ -141,13 +141,11 @@ class SetLocationPluginConfigDialog(GajimPluginConfigDialog): map_placeholder = self.xml.get_object('map_placeholder') dependency_bar = self.xml.get_object('dependency_warning') - dependency_bar.connect("close", lambda b: b.hide()) - dependency_bar.connect("response", lambda b,i: b.hide()) if CHAMPLAIN_AVAILABLE and not self.is_active: map_placeholder.set_no_show_all(True) map_placeholder.hide() - dependency_bar.set_revealed(False) + dependency_bar.hide() map_box = self.xml.get_object('map_box') map_box.set_size_request(400, -1)