OSDN Git Service

Window managing auxiliary is added. It shows only same board windows. (#16374)
[fukui-no-namari/fukui-no-namari.git] / src / FukuiNoNamari / bookmark_window.py
index 77f52ef..062ac28 100644 (file)
@@ -23,6 +23,7 @@ import traceback
 import gnome
 import os.path
 import itertools
+import sys
 
 from bookmark_core import Bookmark
 from bookmark_editwindow import BookmarkEditWindow
@@ -31,9 +32,8 @@ import bookmark_list
 import uri_opener
 import winwrapbase
 import session
+import config
 
-GLADE_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)),
-                         "..", "data")
 GLADE_FILENAME = "bookmark_window.glade"
 
 def open():
@@ -53,7 +53,7 @@ class WinWrap(winwrapbase.WinWrapBase):
         self.bookmarklist = bookmark_list.bookmark_list
         self.bookmarklist.set_view(self)
 
-        glade_path = os.path.join(GLADE_DIR, GLADE_FILENAME)
+        glade_path = os.path.join(config.glade_dir, GLADE_FILENAME)
         self.widget_tree = gtk.glade.XML(glade_path)
         self.window = self.widget_tree.get_widget("window_bookmark")
         self.window.connect("destroy", self.on_destroy)
@@ -110,6 +110,12 @@ class WinWrap(winwrapbase.WinWrapBase):
         self.bookmarklist.set_view(None)
         winwrapbase.WinWrapBase.destroyed(self)
 
+    def show(self):
+        self.window.deiconify()
+
+    def hide(self):
+        self.window.iconify()
+
     def destroy(self):
         self.window.destroy()