This repository has been archived by the owner on Jul 20, 2021. It is now read-only.
Icons theming #10
Closed
Closed
Icons theming #10
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import rb | ||
from gi.repository import Gtk, Gio, GObject, PeasGtk | ||
|
||
class TrayIconConfig(GObject.Object, PeasGtk.Configurable): | ||
|
||
__gtype_name__ = 'TrayIconConfig' | ||
object = GObject.property(type=GObject.Object) | ||
|
||
options = \ | ||
{ | ||
'normal-icon': ('normal_icon', 'text', Gio.SettingsBindFlags.DEFAULT), | ||
'play-icon': ('play_icon', 'text', Gio.SettingsBindFlags.DEFAULT), | ||
'merge-play-icon': ('merge_play_icon', 'active', Gio.SettingsBindFlags.DEFAULT) | ||
} | ||
|
||
def do_create_configure_widget(self): | ||
self.settings = Gio.Settings("org.gnome.rhythmbox.plugins.trayicon") | ||
self.builder = Gtk.Builder() | ||
self.builder.add_from_file(rb.find_plugin_file(self, "trayicon-prefs.ui")) | ||
|
||
for key, (name, prop, flags) in self.options.items(): | ||
self.settings.bind(key, self.builder.get_object(name), prop, flags) | ||
|
||
return self.builder.get_object("trayicon-prefs") | ||
|
||
GObject.type_register(TrayIconConfig) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
tray_icon.py usr/lib/rhythmbox/plugins/tray-icon | ||
config.py usr/lib/rhythmbox/plugins/tray-icon | ||
tray_icon.plugin usr/lib/rhythmbox/plugins/tray-icon | ||
trayicon-prefs.ui usr/share/rhythmbox/plugins/tray_icon | ||
org.gnome.rhythmbox.plugins.trayicon.gschema.xml /usr/share/glib-2.0/schemas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
glib-compile-schemas /usr/share/glib-2.0/schemas/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<schemalist> | ||
<schema id="org.gnome.rhythmbox.plugins.trayicon" path="/org/gnome/rhythmbox/plugins/trayicon/"> | ||
<key name="normal-icon" type="s"> | ||
<default>'rhythmbox'</default> | ||
<summary>Normal icon (paused/stopped)</summary> | ||
<description>Normal icon (paused/stopped)</description> | ||
</key> | ||
<key name="play-icon" type="s"> | ||
<default>'media-playback-start'</default> | ||
<summary>Play icon</summary> | ||
<description>Play icon</description> | ||
</key> | ||
<key name="merge-play-icon" type="b"> | ||
<default>true</default> | ||
</key> | ||
<child name="source" schema="org.gnome.rhythmbox.source"/> | ||
</schema> | ||
</schemalist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<interface> | ||
<!-- interface-requires gtk+ 3.0 --> | ||
<object class="GtkBox" id="trayicon-prefs"> | ||
<property name="visible">True</property> | ||
<property name="can_focus">False</property> | ||
<property name="margin_left">10</property> | ||
<property name="margin_right">10</property> | ||
<property name="margin_top">10</property> | ||
<property name="margin_bottom">10</property> | ||
<property name="orientation">vertical</property> | ||
<property name="spacing">5</property> | ||
<child> | ||
<object class="GtkLabel" id="label3"> | ||
<property name="visible">True</property> | ||
<property name="can_focus">False</property> | ||
<property name="xalign">0</property> | ||
<property name="label" translatable="yes">Icons setup</property> | ||
<attributes> | ||
<attribute name="weight" value="bold"/> | ||
</attributes> | ||
</object> | ||
<packing> | ||
<property name="expand">False</property> | ||
<property name="fill">True</property> | ||
<property name="position">0</property> | ||
</packing> | ||
</child> | ||
<child> | ||
<object class="GtkGrid" id="grid1"> | ||
<property name="visible">True</property> | ||
<property name="can_focus">False</property> | ||
<property name="row_spacing">5</property> | ||
<property name="column_spacing">5</property> | ||
<child> | ||
<object class="GtkLabel" id="label1"> | ||
<property name="visible">True</property> | ||
<property name="can_focus">False</property> | ||
<property name="xalign">1</property> | ||
<property name="label" translatable="yes">Normal icon:</property> | ||
</object> | ||
<packing> | ||
<property name="left_attach">0</property> | ||
<property name="top_attach">0</property> | ||
<property name="width">1</property> | ||
<property name="height">1</property> | ||
</packing> | ||
</child> | ||
<child> | ||
<object class="GtkLabel" id="label2"> | ||
<property name="visible">True</property> | ||
<property name="can_focus">False</property> | ||
<property name="xalign">1</property> | ||
<property name="label" translatable="yes">Playing:</property> | ||
</object> | ||
<packing> | ||
<property name="left_attach">0</property> | ||
<property name="top_attach">1</property> | ||
<property name="width">1</property> | ||
<property name="height">1</property> | ||
</packing> | ||
</child> | ||
<child> | ||
<object class="GtkEntry" id="normal_icon"> | ||
<property name="visible">True</property> | ||
<property name="can_focus">True</property> | ||
<property name="hexpand">True</property> | ||
<property name="invisible_char">•</property> | ||
<property name="invisible_char_set">True</property> | ||
</object> | ||
<packing> | ||
<property name="left_attach">1</property> | ||
<property name="top_attach">0</property> | ||
<property name="width">1</property> | ||
<property name="height">1</property> | ||
</packing> | ||
</child> | ||
<child> | ||
<object class="GtkEntry" id="play_icon"> | ||
<property name="visible">True</property> | ||
<property name="can_focus">True</property> | ||
<property name="hexpand">True</property> | ||
<property name="invisible_char">•</property> | ||
<property name="invisible_char_set">True</property> | ||
</object> | ||
<packing> | ||
<property name="left_attach">1</property> | ||
<property name="top_attach">1</property> | ||
<property name="width">1</property> | ||
<property name="height">1</property> | ||
</packing> | ||
</child> | ||
<child> | ||
<object class="GtkCheckButton" id="merge_play_icon"> | ||
<property name="label" translatable="yes">Draw 'play' icon over 'normal'</property> | ||
<property name="visible">True</property> | ||
<property name="can_focus">True</property> | ||
<property name="receives_default">False</property> | ||
<property name="halign">end</property> | ||
<property name="xalign">0</property> | ||
<property name="draw_indicator">True</property> | ||
</object> | ||
<packing> | ||
<property name="left_attach">1</property> | ||
<property name="top_attach">2</property> | ||
<property name="width">1</property> | ||
<property name="height">1</property> | ||
</packing> | ||
</child> | ||
<child> | ||
<placeholder/> | ||
</child> | ||
</object> | ||
<packing> | ||
<property name="expand">False</property> | ||
<property name="fill">True</property> | ||
<property name="position">1</property> | ||
</packing> | ||
</child> | ||
<child> | ||
<placeholder/> | ||
</child> | ||
</object> | ||
</interface> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this whole block results in an icon that's just a "play" symbol, not a "play + Rhythmbox" symbol, which is what I was going for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. Options dialog has been added: choosing icons/files and drawing mode.