Improve page titles.
This commit is contained in:
@@ -247,7 +247,7 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="searchTitle">
|
<object class="GtkLabel" id="lib_title">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="margin_left">5</property>
|
<property name="margin_left">5</property>
|
||||||
|
|||||||
@@ -330,7 +330,37 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkBox" id="selectionToolsBox">
|
<object class="GtkBox" id="selectionToolsBox">
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="margin_left">2</property>
|
||||||
|
<property name="margin_right">2</property>
|
||||||
<property name="spacing">2</property>
|
<property name="spacing">2</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="search_title_label">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="no_show_all">True</property>
|
||||||
|
<property name="label" translatable="yes">Showing results for:</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="search_title">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="margin_left">2</property>
|
||||||
|
<property name="margin_right">2</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="semibold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="addRemoveButton">
|
<object class="GtkButton" id="addRemoveButton">
|
||||||
<property name="label" translatable="yes">Add to Library</property>
|
<property name="label" translatable="yes">Add to Library</property>
|
||||||
@@ -343,15 +373,10 @@
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">0</property>
|
<property name="pack_type">end</property>
|
||||||
|
<property name="position">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<placeholder/>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<placeholder/>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
|
|||||||
@@ -112,23 +112,36 @@
|
|||||||
<object class="GtkBox" id="wantsToolBar">
|
<object class="GtkBox" id="wantsToolBar">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="margin_left">2</property>
|
||||||
|
<property name="margin_right">2</property>
|
||||||
<property name="spacing">2</property>
|
<property name="spacing">2</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="wantsTileLabel">
|
<object class="GtkLabel">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Showing:</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">0</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<placeholder/>
|
<object class="GtkLabel" id="wants_title">
|
||||||
</child>
|
<property name="visible">True</property>
|
||||||
<child>
|
<property name="can_focus">False</property>
|
||||||
<placeholder/>
|
<property name="margin_left">2</property>
|
||||||
|
<property name="margin_right">2</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="semibold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ class LibraryHandlers:
|
|||||||
card_tree.store.clear()
|
card_tree.store.clear()
|
||||||
self.app.ui.get_object("noResults").set_visible(True)
|
self.app.ui.get_object("noResults").set_visible(True)
|
||||||
|
|
||||||
self.app.ui.get_object("searchTitle").set_text(tag)
|
self.app.ui.get_object("lib_title").set_text(tag)
|
||||||
|
|
||||||
def lib_new_tag_and_add(self, item, cards):
|
def lib_new_tag_and_add(self, item, cards):
|
||||||
response = self.app.show_name_enter_dialog("Enter name for new Tag", "")
|
response = self.app.show_name_enter_dialog("Enter name for new Tag", "")
|
||||||
|
|||||||
@@ -11,17 +11,12 @@ class SearchHandlers:
|
|||||||
def __init__(self, app: 'application.Application'):
|
def __init__(self, app: 'application.Application'):
|
||||||
self.app = app
|
self.app = app
|
||||||
|
|
||||||
# set mana icons on filter buttons
|
|
||||||
buttons = [x for x in self.app.ui.get_object("manaFilterGrid").get_children()
|
buttons = [x for x in self.app.ui.get_object("manaFilterGrid").get_children()
|
||||||
if isinstance(x, Gtk.ToggleButton)]
|
if isinstance(x, Gtk.ToggleButton)]
|
||||||
self._init_mana_buttons(buttons)
|
self._init_mana_buttons(buttons)
|
||||||
# set auto completion for filter entry
|
|
||||||
self._init_set_entry(self.app.ui.get_object("setEntry"))
|
self._init_set_entry(self.app.ui.get_object("setEntry"))
|
||||||
# Fill rarity box
|
|
||||||
self._init_combo_box(self.app.ui.get_object("rarityCombo"), util.rarity_dict.keys())
|
self._init_combo_box(self.app.ui.get_object("rarityCombo"), util.rarity_dict.keys())
|
||||||
# Fill type box
|
|
||||||
self._init_combo_box(self.app.ui.get_object("typeCombo"), util.card_types)
|
self._init_combo_box(self.app.ui.get_object("typeCombo"), util.card_types)
|
||||||
# Create Model for search results
|
|
||||||
self._init_results_tree()
|
self._init_results_tree()
|
||||||
|
|
||||||
def do_search_cards(self, sender):
|
def do_search_cards(self, sender):
|
||||||
@@ -35,6 +30,8 @@ class SearchHandlers:
|
|||||||
card_list.update(results)
|
card_list.update(results)
|
||||||
|
|
||||||
self.app.ui.get_object("searchOverlay").set_visible(False)
|
self.app.ui.get_object("searchOverlay").set_visible(False)
|
||||||
|
self.app.ui.get_object("search_title_label").set_visible(True)
|
||||||
|
self.app.ui.get_object("search_title").set_text(search_term)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def do_clear_mana_filter(mana_filter_grid):
|
def do_clear_mana_filter(mana_filter_grid):
|
||||||
|
|||||||
@@ -158,10 +158,7 @@ class WantsHandlers:
|
|||||||
tree.store.clear()
|
tree.store.clear()
|
||||||
self.app.ui.get_object("wantsOverlay").set_visible(True)
|
self.app.ui.get_object("wantsOverlay").set_visible(True)
|
||||||
|
|
||||||
# Set Title
|
self.app.ui.get_object("wants_title").set_text(str(selected_list))
|
||||||
label = self.app.ui.get_object("wantsTileLabel") # type: Gtk.Label
|
|
||||||
label.set_markup("<big>" + str(selected_list) + "</big>")
|
|
||||||
|
|
||||||
|
|
||||||
def reload_wants_list(self, preserve=False):
|
def reload_wants_list(self, preserve=False):
|
||||||
tree = self.app.ui.get_object("wantsListsTree")
|
tree = self.app.ui.get_object("wantsListsTree")
|
||||||
|
|||||||
Reference in New Issue
Block a user