[gedit-plugins] Manage the sensitivity of the panel.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-plugins] Manage the sensitivity of the panel.
- Date: Tue, 21 Dec 2010 20:52:27 +0000 (UTC)
commit 5c7ab4a4c2a911003b96cf8bda54b9b011117801
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Tue Dec 21 21:50:59 2010 +0100
Manage the sensitivity of the panel.
plugins/charmap/charmap/__init__.py | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/plugins/charmap/charmap/__init__.py b/plugins/charmap/charmap/__init__.py
index 11df6c8..b97d524 100644
--- a/plugins/charmap/charmap/__init__.py
+++ b/plugins/charmap/charmap/__init__.py
@@ -37,12 +37,7 @@ class CharmapPlugin(GObject.Object, Gedit.WindowActivatable):
self.system_settings.connect("changed::monospace-font-name", self.font_changed)
panel = self.window.get_side_panel()
- theme = Gtk.IconTheme.get_default()
-
- if theme.has_icon("accessories-character-map"):
- image = Gtk.Image.new_from_icon_name("accessories-character-map", Gtk.IconSize.MENU)
- else:
- image = Gtk.Image.new_from_icon_name("gucharmap", Gtk.IconSize.MENU)
+ image = Gtk.Image.new_from_icon_name("accessories-character-map", Gtk.IconSize.MENU)
self.create_charmap_panel()
panel.add_item(self.panel, "GeditCharmapPanel", _("Character Map"), image)
@@ -55,7 +50,7 @@ class CharmapPlugin(GObject.Object, Gedit.WindowActivatable):
panel.remove_item(self.panel)
def do_update_state(self):
- pass
+ self.panel.set_sensitive(len(self.window.get_documents()) >= 1)
def get_document_font(self):
if self.editor_settings.get_boolean("use-default-font"):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]