From f0ef1266140fcc4e8bc30a4bcbd4aba441dba65a Mon Sep 17 00:00:00 2001 From: moguno Date: Sun, 21 Jul 2013 08:50:24 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=BF=E3=83=96=E3=81=AE=E3=82=A2=E3=82=A4=E3=82?= =?UTF-8?q?=B3=E3=83=B3=E3=82=B5=E3=82=A4=E3=82=BA=E3=82=92=E5=A4=89=E6=9B=B4?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E3=81=AB=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/plugin/gtk/gtk.rb | 11 +++++++++-- core/plugin/set_view/set_view.rb | 5 ++++- core/userconfig.rb | 2 ++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/core/plugin/gtk/gtk.rb b/core/plugin/gtk/gtk.rb index 0a07502..9ab8d6c 100644 --- a/core/plugin/gtk/gtk.rb +++ b/core/plugin/gtk/gtk.rb @@ -124,7 +124,14 @@ Plugin.create :gtk do tab = create_tab(i_tab) if @tabs_promise[i_tab.slug] @tabs_promise[i_tab.slug].call(tab) - @tabs_promise.delete(i_tab.slug) end end + @tabs_promise.delete(i_tab.slug) end + + tab_icon_size_hook_id = UserConfig.connect(:tab_icon_size){ |key, val, before_val, id| + notice "change tab icon size to #{val}" + if !tab.destroyed? + icon = i_tab.icon + i_tab.set_icon nil + i_tab.set_icon icon end } end on_profile_created do |i_profile| create_pane(i_profile) end @@ -502,7 +509,7 @@ Plugin.create :gtk do if tab tab.remove(tab.child) if tab.child if i_tab.icon.is_a?(String) - tab.add(::Gtk::WebIcon.new(i_tab.icon, 24, 24).show) + tab.add(::Gtk::WebIcon.new(i_tab.icon, UserConfig[:tab_icon_size], UserConfig[:tab_icon_size]).show) else tab.add(::Gtk::Label.new(i_tab.name).show) end end self end diff --git a/core/plugin/set_view/set_view.rb b/core/plugin/set_view/set_view.rb index 95581ae..6cfd302 100644 --- a/core/plugin/set_view/set_view.rb +++ b/core/plugin/set_view/set_view.rb @@ -78,7 +78,10 @@ Plugin::create(:set_view) do tooltip(_("受信したつぶやきに短縮URLが含まれていた場合、それを短縮されていない状態に戻してから表示します。")) end - select _('タブの位置'), :tab_position, 0 => _('上'), 1 => _('下'), 2 => _('左'), 3 => _('右') + settings(_('タブ')) do + select _('タブの位置'), :tab_position, 0 => _('上'), 1 => _('下'), 2 => _('左'), 3 => _('右') + adjustment _('アイコンサイズ'), :tab_icon_size, 1, 100 + end select(_('URLを開く方法'), :url_open_specified_command) do option false, _("デフォルトブラウザを使う") diff --git a/core/userconfig.rb b/core/userconfig.rb index 7e3078d..c2c815b 100644 --- a/core/userconfig.rb +++ b/core/userconfig.rb @@ -103,6 +103,8 @@ class UserConfig :mumble_self_bg => [65535, 65535, 255*222], :mumble_selected_bg => [255*222, 255*222, 65535], + :tab_icon_size => 24, + # 右クリックメニューの並び順 :mumble_contextmenu_order => ['copy_selected_region', 'copy_description', -- 1.7.10.2 (Apple Git-33)