[gnome-music] Rename Searchbar to SearchBar
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] Rename Searchbar to SearchBar
- Date: Mon, 15 Apr 2019 14:12:15 +0000 (UTC)
commit b468775ed0c011e59cf19a121a319fd00008570a
Author: Reuben Dsouza <reubendsouza800 gmail com>
Date: Mon Apr 15 18:02:09 2019 +0530
Rename Searchbar to SearchBar
Searchbar is derived from Gtk.SearchBar. The lowercase b in retrospect
seems like a mistake. ui filenames should follow CamelCase notation.
Rename Searchbar to SearchBar in the source and rename Searchbar.ui
to SearchBar.ui.
Closes:https://gitlab.gnome.org/GNOME/gnome-music/issues/271
data/org.gnome.Music.gresource.xml | 2 +-
data/ui/{Searchbar.ui => SearchBar.ui} | 2 +-
gnomemusic/widgets/searchbar.py | 10 +++++-----
gnomemusic/window.py | 4 ++--
4 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/data/org.gnome.Music.gresource.xml b/data/org.gnome.Music.gresource.xml
index 200159ae..2ac5d2c6 100644
--- a/data/org.gnome.Music.gresource.xml
+++ b/data/org.gnome.Music.gresource.xml
@@ -19,7 +19,7 @@
<file preprocess="xml-stripblanks">ui/PlaylistContextMenu.ui</file>
<file preprocess="xml-stripblanks">ui/PlaylistControls.ui</file>
<file preprocess="xml-stripblanks">ui/PlaylistDialog.ui</file>
- <file preprocess="xml-stripblanks">ui/Searchbar.ui</file>
+ <file preprocess="xml-stripblanks">ui/SearchBar.ui</file>
<file preprocess="xml-stripblanks">ui/SelectionBarMenuButton.ui</file>
<file preprocess="xml-stripblanks">ui/SelectionToolbar.ui</file>
<file preprocess="xml-stripblanks">ui/SidebarRow.ui</file>
diff --git a/data/ui/Searchbar.ui b/data/ui/SearchBar.ui
similarity index 96%
rename from data/ui/Searchbar.ui
rename to data/ui/SearchBar.ui
index 981f486f..2e0eeb42 100644
--- a/data/ui/Searchbar.ui
+++ b/data/ui/SearchBar.ui
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <template class="Searchbar" parent="GtkSearchBar">
+ <template class="SearchBar" parent="GtkSearchBar">
<child>
<object class="GtkBox">
<property name="halign">center</property>
diff --git a/gnomemusic/widgets/searchbar.py b/gnomemusic/widgets/searchbar.py
index c82a88e7..4d5c07a7 100644
--- a/gnomemusic/widgets/searchbar.py
+++ b/gnomemusic/widgets/searchbar.py
@@ -320,12 +320,12 @@ class DropDown(Gtk.Revealer):
return grilo_id == "grl-tracker-source"
-@Gtk.Template(resource_path="/org/gnome/Music/ui/Searchbar.ui")
-class Searchbar(Gtk.SearchBar):
+@Gtk.Template(resource_path="/org/gnome/Music/ui/SearchBar.ui")
+class SearchBar(Gtk.SearchBar):
"""Widget containing the search entry
"""
- __gtype_name__ = 'Searchbar'
+ __gtype_name__ = 'SearchBar'
_search_entry = Gtk.Template.Child()
_drop_down_button = Gtk.Template.Child()
@@ -334,11 +334,11 @@ class Searchbar(Gtk.SearchBar):
stack = GObject.Property(type=Gtk.Stack)
def __repr__(self):
- return '<Searchbar>'
+ return '<SearchBar>'
@log
def __init__(self):
- """Initialize the Searchbar"""
+ """Initialize the SearchBar"""
super().__init__()
self._timeout = None
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index dbf1ff7c..6af945ee 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -50,7 +50,7 @@ from gnomemusic.widgets.headerbar import HeaderBar
from gnomemusic.widgets.notificationspopup import NotificationsPopup
from gnomemusic.widgets.playertoolbar import PlayerToolbar
from gnomemusic.widgets.playlistdialog import PlaylistDialog
-from gnomemusic.widgets.searchbar import Searchbar
+from gnomemusic.widgets.searchbar import SearchBar
from gnomemusic.widgets.selectiontoolbar import SelectionToolbar
from gnomemusic.windowplacement import WindowPlacement
@@ -128,7 +128,7 @@ class Window(Gtk.ApplicationWindow):
self._search = Search()
self._headerbar = HeaderBar()
- self._searchbar = Searchbar()
+ self._searchbar = SearchBar()
self._search.bind_property(
"search-mode-active", self._headerbar, "search-mode-active",
GObject.BindingFlags.BIDIRECTIONAL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]