[gedit-plugins/gnome-3-38] Fixes #41 Charmap pluggin. Usee only methods that can be called using gir/introspective



commit 2487d979c55dfc6f9bc8f1d3ee45a8a558ec6bc4
Author: Jordi Mas <jmas softcatala org>
Date:   Sat Feb 20 18:18:51 2021 +0100

    Fixes #41 Charmap pluggin. Usee only methods that can be called using gir/introspective

 plugins/charmap/charmap/__init__.py | 12 ------------
 plugins/charmap/charmap/panel.py    |  4 +++-
 2 files changed, 3 insertions(+), 13 deletions(-)
---
diff --git a/plugins/charmap/charmap/__init__.py b/plugins/charmap/charmap/__init__.py
index 60dd5d1..d25ece5 100644
--- a/plugins/charmap/charmap/__init__.py
+++ b/plugins/charmap/charmap/__init__.py
@@ -98,18 +98,6 @@ class CharmapPlugin(GObject.Object, Gedit.WindowActivatable):
         uc = chartable.get_active_character()
         text = "%s %s" % (uc, Gucharmap.get_unicode_name(uc))
 
-        a = Gucharmap.get_nameslist_equals(uc)
-        if a:
-            text += "   = %s" % a[0]
-            for i in range(len (a) - 1):
-                text += "; %s" % a[i + 1]
-
-        a = Gucharmap.get_nameslist_stars(uc)
-        if a:
-            text += "   \342\200\242 %s" % a[0]
-            for i in range(len (a) - 1):
-                text += "; %s" % a[i + 1]
-
         self.on_table_status_message(chartable, text)
 
     def on_table_focus_out_event(self, chartable, event):
diff --git a/plugins/charmap/charmap/panel.py b/plugins/charmap/charmap/panel.py
index 351cf30..4a6c700 100644
--- a/plugins/charmap/charmap/panel.py
+++ b/plugins/charmap/charmap/panel.py
@@ -58,7 +58,9 @@ class CharmapPanel(Gtk.Box):
     def on_chapter_view_selection_changed(self, selection):
         model, it = selection.get_selected()
         if it:
-            codepoint_list = self.view.get_codepoint_list()
+            script_name = self.view.get_selected()
+            codepoint_list = Gucharmap.ScriptCodepointList()
+            codepoint_list.append_script(script_name)
             self.chartable.set_codepoint_list(codepoint_list)
 
     def get_chartable(self):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]