fantasdic r322 - in trunk: . lib/fantasdic/ui
- From: mblondel svn gnome org
- To: svn-commits-list gnome org
- Subject: fantasdic r322 - in trunk: . lib/fantasdic/ui
- Date: Wed, 20 Aug 2008 17:20:35 +0000 (UTC)
Author: mblondel
Date: Wed Aug 20 17:20:35 2008
New Revision: 322
URL: http://svn.gnome.org/viewvc/fantasdic?rev=322&view=rev
Log:
* lib/fantasdic/ui/main_app.rb: Update the search entry font when the
dictionary menu is changed rather than when the search entry is activated.
Modified:
trunk/ChangeLog
trunk/lib/fantasdic/ui/main_app.rb
Modified: trunk/lib/fantasdic/ui/main_app.rb
==============================================================================
--- trunk/lib/fantasdic/ui/main_app.rb (original)
+++ trunk/lib/fantasdic/ui/main_app.rb Wed Aug 20 17:20:35 2008
@@ -300,13 +300,6 @@
def set_font_name(font_name)
@result_text_view.buffer.font_name = font_name
-
- if font_name
- # Change font but don't change size
- font_desc = Pango::FontDescription.new(font_name)
- font_desc.size = @search_entry_default_font_desc.size
- @search_entry.modify_font(font_desc)
- end
end
def scan_clipboard
@@ -481,6 +474,20 @@
sel_dic[:results_font_name] = @result_text_view.buffer.font_name
end
+ # Search entry
+
+ def update_search_entry_font
+ hash = @prefs.dictionaries_infos[selected_dictionary]
+
+ if hash and hash[:results_font_name]
+ # Change font but don't change size
+ font_name = hash[:results_font_name]
+ font_desc = Pango::FontDescription.new(font_name)
+ font_desc.size = @search_entry_default_font_desc.size
+ @search_entry.modify_font(font_desc)
+ end
+ end
+
# Strategy menu
def update_strategy_cb
@@ -695,6 +702,7 @@
# Dictionary combobox
@dictionary_cb.model = Gtk::ListStore.new(String)
update_dictionary_cb
+ update_search_entry_font
# Strategy comboxbox
@strategy_cb.model = Gtk::ListStore.new(String)
@@ -1132,6 +1140,7 @@
@dictionary_cb.signal_connect("changed") do
# Update the cb with the available strats
update_strategy_cb
+ update_search_entry_font
end
@strategy_cb.signal_connect("changed") do
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]