Fix loading of mana icons. Focus search entry if no results were found
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
@@ -292,14 +292,12 @@ class SearchView(Gtk.Grid):
|
||||
if typefilter == "Any":
|
||||
typefilter = ""
|
||||
|
||||
# tree_iter = self.set_combo.get_active_iter()
|
||||
set_filter = ""
|
||||
if not self.set_entry.get_text() == "":
|
||||
for row in self.set_store:
|
||||
if row[1] == self.set_entry.get_text():
|
||||
set_filter = row[0]
|
||||
|
||||
|
||||
# Load card info from internet
|
||||
print("\nStart online search")
|
||||
GObject.idle_add(util.push_status, "Searching for cards", priorty=GObject.PRIORITY_DEFAULT)
|
||||
@@ -323,6 +321,7 @@ class SearchView(Gtk.Grid):
|
||||
GObject.idle_add(util.show_message, "No Results", messagetext, priority=GObject.PRIORITY_DEFAULT)
|
||||
# Reactivate search controls
|
||||
GObject.idle_add(self._do_activate_controls, True, priority=GObject.PRIORITY_DEFAULT)
|
||||
GObject.idle_add(self.searchEntry.grab_focus, priority=GObject.PRIORITY_DEFAULT)
|
||||
return
|
||||
|
||||
# Remove duplicate entries
|
||||
@@ -399,7 +398,6 @@ class SearchView(Gtk.Grid):
|
||||
# Set default rarity and type filters to "Any"
|
||||
self.rarity_combo.set_active(0)
|
||||
self.type_combo.set_active(0)
|
||||
#self.set_combo.set_active(0)
|
||||
|
||||
def _do_activate_controls(self, active):
|
||||
self.searchEntry.set_editable(active)
|
||||
|
||||
@@ -72,6 +72,7 @@ def import_library():
|
||||
print("Library imported")
|
||||
dialog.destroy()
|
||||
|
||||
|
||||
def save_library():
|
||||
if not os.path.exists(config.cache_path):
|
||||
os.makedirs(config.cache_path)
|
||||
@@ -223,7 +224,7 @@ def create_mana_icons(mana_string):
|
||||
# Go through all entries an add the correspondent icon to the final image
|
||||
for icon in list:
|
||||
xpos = poscounter * 105
|
||||
loaded = manaicons.get(icon)
|
||||
loaded = manaicons.get(icon.replace("/", ""))
|
||||
if loaded is None:
|
||||
print("ERROR: No icon file named \"" + icon + "\" found.")
|
||||
else:
|
||||
|
||||