Skip to content

Instantly share code, notes, and snippets.

@rhenium
Last active January 1, 2016 17:49
Show Gist options
  • Save rhenium/8179348 to your computer and use it in GitHub Desktop.
Save rhenium/8179348 to your computer and use it in GitHub Desktop.
mikutter develop の profile タブがおかしいの(再起動後復活してしまう)の応急措置
diff --git a/core/plugin/profile/profile.rb b/core/plugin/profile/profile.rb
index a56d87e..3a7daa4 100644
--- a/core/plugin/profile/profile.rb
+++ b/core/plugin/profile/profile.rb
@@ -112,9 +112,9 @@ Plugin.create :profile do
on_gui_destroy do |widget|
notice "on_gui_destroy: #{widget}"
- if widget.is_a? Plugin::GUI::Timeline
- timeline_storage.delete(widget.slug)
- UserConfig[:profile_opened_tabs] = timeline_storage.values.map(&:id) end end
+ if /profile-(\d+)/ =~ widget.slug.to_s
+ UserConfig[:profile_opened_tabs] -= [$1.to_i]
+ timeline_storage.reject! { |key, value| value.id == $1.to_i } end end
command(:aboutuser,
name: lambda { |opt|
diff --git a/core/plugin/command/command.rb b/core/plugin/command/command.rb
index da32338..196cdde 100644
--- a/core/plugin/command/command.rb
+++ b/core/plugin/command/command.rb
@@ -175,6 +175,7 @@ Plugin.create :command do
visible: true,
icon: Skin.get("close.png"),
role: :tab) do |opt|
+ opt.widget.parent.remove(opt.widget)
opt.widget.destroy
end
diff --git a/core/plugin/gtk/gtk.rb b/core/plugin/gtk/gtk.rb
index dbbf0b9..82794aa 100644
--- a/core/plugin/gtk/gtk.rb
+++ b/core/plugin/gtk/gtk.rb
@@ -115,6 +115,7 @@ Plugin.create :gtk do
UserConfig.disconnect(tab_position_hook_id)
pane_order_delete(i_pane)
i_pane.destroy end
+ window_order_save_request(i_pane.parent) if i_pane.parent
false }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment