Music

Gnome-music documentation has started finally. 🙂 I have learned many new and interesting things. Like, how to set up the build system for help. Below is the patch for the build system set up:

diff –git a/Makefile.am b/Makefile.am
index 341c920..7afbaa8 100644
— a/Makefile.am
+++ b/Makefile.am
@@ -3,7 +3,7 @@ NULL =
bin_SCRIPTS = gnome-music
-SUBDIRS = libgd gnomemusic data po
+SUBDIRS = help libgd gnomemusic data po
EXTRA_DIST = \
AUTHORS.in \
diff –git a/configure.ac b/configure.ac
index 4aa9d7e..3ba2ab0 100644
— a/configure.ac
+++ b/configure.ac
@@ -19,6 +19,8 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, “$GETTEXT_PACKAGE”,
[The prefix for our gettext translation domains.])
IT_PROG_INTLTOOL(0.26)
+YELP_HELP_INIT
+
AC_PROG_CC
AM_PROG_CC_C_O
LT_INIT([disable-static])
@@ -42,6 +44,7 @@ PKG_CHECK_MODULES(GRL, grilo-0.2 >= $GRL_MIN_VERSION)
AC_CONFIG_FILES([
Makefile
data/Makefile
+ help/Makefile
data/headerbar.ui
data/AboutDialog.ui
data/PlaylistDialog.ui
diff –git a/help/Makefile.am b/help/Makefile.am
new file mode 100644
index 0000000..f5315ab
— /dev/null
+++ b/help/Makefile.am
@@ -0,0 +1,9 @@
+@YELP_HELP_RULES@
+
+HELP_ID = gnome-music
+
+HELP_FILES =
+
+HELP_MEDIA =
+
+HELP_LINGUAS =

To request a UI freeze break for the menu item we need 2 approvals from release team and notification to the documentation team through email.

Patch for adding help menuitem in gnome-music that is pushed to master after the freeze break approval.: 

diff –git a/data/app-menu.ui b/data/app-menu.ui
index dc98b87..7df19bc 100644
— a/data/app-menu.ui
+++ b/data/app-menu.ui
@@ -14,6 +14,11 @@
</section>
<section>
<item>
+ <attribute name=”label” translatable=”yes”>_Help</attribute>
+ <attribute name=”action”>app.help</attribute>
+ <attribute name=”accel”>F1</attribute>
+ </item>
+ <item>
<attribute name=”action”>app.about</attribute>
<attribute name=”label” translatable=”yes”>_About</attribute>
</item>
diff –git a/gnomemusic/application.py b/gnomemusic/application.py
index 61ab7e8..1154cbc 100644
— a/gnomemusic/application.py
+++ b/gnomemusic/application.py
@@ -67,6 +67,10 @@ class Application(Gtk.Application):
aboutAction.connect(‘activate’, self.about)
self.add_action(aboutAction)
+ helpAction = Gio.SimpleAction.new(‘help’, None)
+ helpAction.connect(‘activate’, self.help)
+ self.add_action(helpAction)
+
newPlaylistAction = Gio.SimpleAction.new(‘newPlaylist’, None)
newPlaylistAction.connect(‘activate’, self.new_playlist)
self.add_action(newPlaylistAction)
@@ -85,6 +89,9 @@ class Application(Gtk.Application):
def now_playing(self, action, param):
pass
+ def help(self, action, param):
+ Gtk.show_uri(None, “help:gnome-music”, Gdk.CURRENT_TIME)
+
def about(self, action, param):
builder = Gtk.Builder()
builder.add_from_resource(‘/org/gnome/Music/AboutDialog.ui’)

I enjoyed working on the above patches as it was totally a new experience and I always crave for doing and learning new things in computing.

I am proud of being a part of OPW, GNOME documentation team and having the bestest mentor.

Advertisements

One thought on “Music

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: