[longomatch] Use custom button for the playlist widget
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Use custom button for the playlist widget
- Date: Fri, 28 Nov 2014 11:53:03 +0000 (UTC)
commit 6f4a6ee50780070ae7081c24d383d41496ff89e8
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Nov 28 12:47:23 2014 +0100
Use custom button for the playlist widget
LongoMatch.GUI/Gui/Component/PlayListWidget.cs | 6 +-
.../LongoMatch.Gui.Component.PlayListWidget.cs | 58 ++++++++------------
LongoMatch.GUI/gtk-gui/gui.stetic | 24 ++++++---
data/icons/Makefile.am | 1 +
.../scalable/actions/longomatch-playlist-new.svg | 31 +++++++++++
5 files changed, 73 insertions(+), 47 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/PlayListWidget.cs b/LongoMatch.GUI/Gui/Component/PlayListWidget.cs
index 08c6636..f41d780 100644
--- a/LongoMatch.GUI/Gui/Component/PlayListWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/PlayListWidget.cs
@@ -18,14 +18,12 @@
//
//
using System.Linq;
-using System.Collections.Generic;
using Gtk;
using LongoMatch.Core.Common;
-using LongoMatch.Core.Handlers;
using LongoMatch.Core.Interfaces;
using LongoMatch.Core.Store.Playlists;
using LongoMatch.Core.Store;
-using Mono.Unix;
+using Misc = LongoMatch.Gui.Helpers.Misc;
namespace LongoMatch.Gui.Component
{
@@ -45,6 +43,8 @@ namespace LongoMatch.Gui.Component
Config.EventsBroker.PlaylistsChangedEvent += HandlePlaylistsChangedEvent;
Config.EventsBroker.PlaylistElementSelectedEvent +=
HandlePlaylistElementSelectedEvent;
hbox2.HeightRequest = StyleConf.PlayerCapturerControlsHeight;
+ recimage.Pixbuf = Misc.LoadIcon ("longomatch-control-record",
StyleConf.PlayerCapturerIconSize);
+ newimage.Pixbuf = Misc.LoadIcon ("longomatch-playlist-new",
StyleConf.PlayerCapturerIconSize);
}
protected override void OnDestroyed ()
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.PlayListWidget.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.PlayListWidget.cs
index c7788cb..5d06906 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.PlayListWidget.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.PlayListWidget.cs
@@ -10,7 +10,9 @@ namespace LongoMatch.Gui.Component
private global::LongoMatch.Gui.Component.PlayListTreeView playlisttreeview1;
private global::Gtk.HBox hbox2;
private global::Gtk.Button newbutton;
+ private global::Gtk.Image newimage;
private global::Gtk.Button newvideobutton;
+ private global::Gtk.Image recimage;
protected virtual void Build ()
{
@@ -57,52 +59,36 @@ namespace LongoMatch.Gui.Component
this.newbutton.TooltipMarkup = "Create a new playlist";
this.newbutton.CanFocus = true;
this.newbutton.Name = "newbutton";
- this.newbutton.UseUnderline = true;
+ this.newbutton.Relief = ((global::Gtk.ReliefStyle)(2));
// Container child newbutton.Gtk.Container+ContainerChild
- global::Gtk.Alignment w6 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
- // Container child GtkAlignment.Gtk.Container+ContainerChild
- global::Gtk.HBox w7 = new global::Gtk.HBox ();
- w7.Spacing = 2;
- // Container child GtkHBox.Gtk.Container+ContainerChild
- global::Gtk.Image w8 = new global::Gtk.Image ();
- w8.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-new",
global::Gtk.IconSize.Button);
- w7.Add (w8);
- // Container child GtkHBox.Gtk.Container+ContainerChild
- global::Gtk.Label w10 = new global::Gtk.Label ();
- w7.Add (w10);
- w6.Add (w7);
- this.newbutton.Add (w6);
+ this.newimage = new global::Gtk.Image ();
+ this.newimage.Name = "newimage";
+ this.newbutton.Add (this.newimage);
+ this.newbutton.Label = null;
this.hbox2.Add (this.newbutton);
- global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.hbox2
[this.newbutton]));
- w14.Position = 0;
+ global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox2
[this.newbutton]));
+ w7.Position = 0;
+ w7.Padding = ((uint)(5));
// Container child hbox2.Gtk.Box+BoxChild
this.newvideobutton = new global::Gtk.Button ();
this.newvideobutton.TooltipMarkup = "Export the playlist to new video file";
this.newvideobutton.CanFocus = true;
this.newvideobutton.Name = "newvideobutton";
- this.newvideobutton.UseUnderline = true;
+ this.newvideobutton.Relief = ((global::Gtk.ReliefStyle)(2));
// Container child newvideobutton.Gtk.Container+ContainerChild
- global::Gtk.Alignment w15 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
- // Container child GtkAlignment.Gtk.Container+ContainerChild
- global::Gtk.HBox w16 = new global::Gtk.HBox ();
- w16.Spacing = 2;
- // Container child GtkHBox.Gtk.Container+ContainerChild
- global::Gtk.Image w17 = new global::Gtk.Image ();
- w17.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-media-record",
global::Gtk.IconSize.Button);
- w16.Add (w17);
- // Container child GtkHBox.Gtk.Container+ContainerChild
- global::Gtk.Label w19 = new global::Gtk.Label ();
- w16.Add (w19);
- w15.Add (w16);
- this.newvideobutton.Add (w15);
+ this.recimage = new global::Gtk.Image ();
+ this.recimage.Name = "recimage";
+ this.newvideobutton.Add (this.recimage);
+ this.newvideobutton.Label = null;
this.hbox2.Add (this.newvideobutton);
- global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.hbox2
[this.newvideobutton]));
- w23.Position = 1;
+ global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox2
[this.newvideobutton]));
+ w9.Position = 1;
+ w9.Padding = ((uint)(5));
this.vbox2.Add (this.hbox2);
- global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox2]));
- w24.Position = 1;
- w24.Expand = false;
- w24.Fill = false;
+ global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox2]));
+ w10.Position = 1;
+ w10.Expand = false;
+ w10.Fill = false;
this.Add (this.vbox2);
if ((this.Child != null)) {
this.Child.ShowAll ();
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index 2bafae8..3dd97c7 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -1993,15 +1993,19 @@ Away</property>
<property name="MemberName" />
<property name="Tooltip" translatable="yes">Create a new playlist</property>
<property name="CanFocus">True</property>
- <property name="Type">TextAndIcon</property>
- <property name="Icon">stock:gtk-new Button</property>
- <property name="Label" translatable="yes" />
- <property name="UseUnderline">True</property>
+ <property name="Type">Custom</property>
+ <property name="Relief">None</property>
<signal name="Clicked" handler="OnNewbuttonClicked" />
+ <child>
+ <widget class="Gtk.Image" id="newimage">
+ <property name="MemberName" />
+ </widget>
+ </child>
</widget>
<packing>
<property name="Position">0</property>
<property name="AutoSize">False</property>
+ <property name="Padding">5</property>
</packing>
</child>
<child>
@@ -2009,15 +2013,19 @@ Away</property>
<property name="MemberName" />
<property name="Tooltip" translatable="yes">Export the playlist to new video file</property>
<property name="CanFocus">True</property>
- <property name="Type">TextAndIcon</property>
- <property name="Icon">stock:gtk-media-record Button</property>
- <property name="Label" translatable="yes" />
- <property name="UseUnderline">True</property>
+ <property name="Type">Custom</property>
+ <property name="Relief">None</property>
<signal name="Clicked" handler="OnNewvideobuttonClicked" />
+ <child>
+ <widget class="Gtk.Image" id="recimage">
+ <property name="MemberName" />
+ </widget>
+ </child>
</widget>
<packing>
<property name="Position">1</property>
<property name="AutoSize">False</property>
+ <property name="Padding">5</property>
</packing>
</child>
</widget>
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index 988f6b6..591629d 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -51,6 +51,7 @@ nobase_dist_icons_DATA = Makefile.am \
hicolor/scalable/actions/longomatch-player-pic.svg \
hicolor/scalable/actions/longomatch-player-swap-lock.svg \
hicolor/scalable/actions/longomatch-player-swap-unlock.svg \
+ hicolor/scalable/actions/longomatch-playlist-new.svg \
hicolor/scalable/actions/longomatch-plugin.svg \
hicolor/scalable/actions/longomatch-popup.svg \
hicolor/scalable/actions/longomatch-preferences.svg \
diff --git a/data/icons/hicolor/scalable/actions/longomatch-playlist-new.svg
b/data/icons/hicolor/scalable/actions/longomatch-playlist-new.svg
new file mode 100644
index 0000000..62e1e52
--- /dev/null
+++ b/data/icons/hicolor/scalable/actions/longomatch-playlist-new.svg
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="18px" height="18px" viewBox="0 0 18 18" enable-background="new 0 0 18 18"
xml:space="preserve">
+<g>
+ <path fill="#6A6A6A"
d="M3.938,3.375h13.5C17.748,3.374,18,3.123,18,2.812V1.687c0-0.311-0.252-0.562-0.562-0.562h-13.5
+ c-0.311,0-0.562,0.251-0.562,0.562v1.126C3.376,3.123,3.627,3.375,3.938,3.375z"/>
+ <path fill="#6A6A6A"
d="M3.938,7.875h13.5C17.748,7.876,18,7.624,18,7.312V6.188c0-0.312-0.252-0.563-0.562-0.563h-13.5
+ c-0.311,0-0.562,0.251-0.562,0.563v1.124C3.376,7.623,3.627,7.875,3.938,7.875z"/>
+ <path fill="#6A6A6A"
d="M9.299,11.252h1.919v-1.127h-7.28c-0.311,0-0.562,0.251-0.562,0.562v1.125c0,0.311,0.251,0.562,0.562,0.562
+ h4.098C8.125,11.745,8.645,11.252,9.299,11.252z"/>
+ <path fill="#6A6A6A"
d="M17.667,11.252c0.118,0,0.225,0.038,0.333,0.067v-0.632c0-0.312-0.252-0.562-0.562-0.562h-1.69v1.127
+ H17.667z"/>
+ <path fill="#6A6A6A"
d="M15.747,15.781v1.093h1.69c0.312,0,0.562-0.252,0.562-0.562v-0.599c-0.108,0.029-0.215,0.067-0.333,0.067
+ H15.747z"/>
+ <path fill="#6A6A6A"
d="M9.299,15.781c-0.666,0-1.196-0.511-1.27-1.156H3.938c-0.311,0-0.562,0.252-0.562,0.562v1.125
+ c0,0.312,0.251,0.562,0.562,0.562h7.28v-1.093H9.299z"/>
+ <path fill="#6A6A6A"
d="M1.688,1.125H0.562C0.251,1.125,0,1.376,0,1.687v1.126c0,0.31,0.251,0.562,0.562,0.562h1.125
+ c0.311,0,0.562-0.251,0.562-0.562V1.687C2.25,1.376,1.999,1.125,1.688,1.125z"/>
+ <path fill="#6A6A6A"
d="M1.688,5.625H0.562C0.251,5.625,0,5.876,0,6.188v1.124c0,0.311,0.251,0.563,0.562,0.563h1.125
+ c0.311,0,0.562-0.252,0.562-0.563V6.188C2.25,5.876,1.999,5.625,1.688,5.625z"/>
+ <path fill="#6A6A6A"
d="M1.688,10.125H0.562C0.251,10.125,0,10.376,0,10.688v1.125c0,0.312,0.251,0.562,0.562,0.562h1.125
+ c0.311,0,0.562-0.253,0.562-0.562v-1.125C2.25,10.376,1.999,10.125,1.688,10.125z"/>
+ <path fill="#6A6A6A"
d="M1.688,14.625H0.562C0.251,14.625,0,14.877,0,15.188v1.125c0,0.312,0.251,0.562,0.562,0.562h1.125
+ c0.311,0,0.562-0.252,0.562-0.562v-1.125C2.25,14.877,1.999,14.625,1.688,14.625z"/>
+</g>
+<path id="plus_9_" fill="#50B44B"
d="M12.518,18c-0.166,0-0.3-0.135-0.3-0.299v-2.92H9.299C9.133,14.781,9,14.647,9,14.482v-1.932
+
c0-0.165,0.133-0.299,0.299-0.299h2.919V9.333c0-0.165,0.134-0.298,0.3-0.298h1.931c0.165,0,0.299,0.134,0.299,0.298v2.919h2.92
+
c0.166,0,0.299,0.134,0.299,0.299v1.932c0,0.165-0.133,0.299-0.299,0.299h-2.92v2.92c0,0.164-0.134,0.299-0.299,0.299H12.518z"/>
+</svg>
diff --git a/tools/update-data.py b/tools/update-data.py
old mode 100644
new mode 100755
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]