...
 
Commits (1)
......@@ -109,9 +109,23 @@ expander_box_widget_add_content (
content);
}
/**
* Reveals or hides the expander box's contents.
*/
void
expander_box_widget_set_reveal (
ExpanderBoxWidget * self,
int reveal);
void
expander_box_widget_set_orientation (
ExpanderBoxWidget * self,
GtkOrientation orientation);
ExpanderBoxWidget *
expander_box_widget_new (
const char * label,
const char * icon_name,
GtkOrientation orientation);
#endif
......@@ -19,6 +19,12 @@
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* \file
*
* Plugin browser.
*/
#ifndef __GUI_WIDGETS_PLUGIN_BROWSER_H__
#define __GUI_WIDGETS_PLUGIN_BROWSER_H__
......@@ -26,32 +32,88 @@
#define PLUGIN_BROWSER_WIDGET_TYPE \
(plugin_browser_widget_get_type ())
G_DECLARE_FINAL_TYPE (PluginBrowserWidget,
plugin_browser_widget,
Z,
PLUGIN_BROWSER_WIDGET,
GtkPaned)
G_DECLARE_FINAL_TYPE (
PluginBrowserWidget,
plugin_browser_widget,
Z, PLUGIN_BROWSER_WIDGET,
GtkPaned)
#define MW_PLUGIN_BROWSER MW_RIGHT_DOCK_EDGE->plugin_browser
typedef struct _ExpanderBoxWidget ExpanderBoxWidget;
/**
* @addtogroup widgets
*
* @{
*/
#define MW_PLUGIN_BROWSER \
MW_RIGHT_DOCK_EDGE->plugin_browser
/**
* The plugin browser allows to browse and filter
* available Plugin's on the system.
*
* It contains references to PluginDescriptor's,
* which it uses to initialize Plugin's on row
* activation or drag-n-drop.
*/
typedef struct _PluginBrowserWidget
{
GtkPaned parent_instance;
GtkGrid * browser_top;
GtkSearchEntry * browser_search;
GtkExpander * collections_exp;
GtkExpander * types_exp;
GtkExpander * cat_exp;
GtkBox * browser_bot;
GtkLabel * plugin_info;
const char * selected_category; ///< selected category
GtkTreeModel * category_tree_model;
GtkTreeModelFilter * plugins_tree_model;
GtkTreeView * plugins_tree_view;
GtkScrolledWindow * plugin_scroll_window;
GtkPaned parent_instance;
/** The stack switcher. */
GtkStackSwitcher * stack_switcher;
GtkBox * stack_switcher_box;
/** The stack containing collection/category/
* protocol. */
GtkStack * stack;
/* The scrolls for each tree view */
GtkScrolledWindow * collection_scroll;
GtkScrolledWindow * category_scroll;
GtkScrolledWindow * protocol_scroll;
GtkScrolledWindow * plugin_scroll;
/* The tree views */
GtkTreeView * collection_tree_view;
GtkTreeView * category_tree_view;
GtkTreeView * protocol_tree_view;
GtkTreeView * plugin_tree_view;
/** Browser bot. */
GtkBox * browser_bot;
/* The toolbar to toggle visibility of
* modulators/effects/instruments/midi modifiers */
GtkToolbar * plugin_toolbar;
GtkToggleToolButton * toggle_instruments;
GtkToggleToolButton * toggle_effects;
GtkToggleToolButton * toggle_modulators;
GtkToggleToolButton * toggle_midi_modifiers;
/** A label to show info about the currently
* selected Plugin. */
GtkLabel * plugin_info;
/** The selected category. */
const char * selected_category;
GtkTreeModel * collection_tree_model;
GtkTreeModel * protocol_tree_model;
GtkTreeModel * category_tree_model;
GtkTreeModelFilter * plugin_tree_model;
} PluginBrowserWidget;
/**
* Instantiates a new PluginBrowserWidget.
*/
PluginBrowserWidget *
plugin_browser_widget_new ();
/**
* @}
*/
#endif
......@@ -103,6 +103,7 @@ _breeze_icons = [
'media-playlist-repeat',
'draw-line',
'audio-speakers-symbolic',
'kdenlive-show-audiothumb',
'application-msword',
'zoom-in',
'zoom-out',
......@@ -162,6 +163,7 @@ _breeze_icons = [
'kdenlive-show-markers',
'document-duplicate',
'mathmode',
'favorites',
'distortionfx',
'selection-end-symbolic',
'edit-select',
......
<?xml version="1.0" ?><svg enable-background="new 0 0 32 32" height="32px" id="svg2" version="1.1" viewBox="0 0 32 32" width="32px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"><g id="background"><rect fill="none" height="32" width="32"/></g><g id="category"><polygon points="20,20 20,12 12,12 12,14 8,14 8,10 10,10 10,2 2,2 2,10 6,10 6,26 12,26 12,30 20,30 20,22 12,22 12,24.001 8,24 8,16 12,16 12,20 "/></g></svg>
\ No newline at end of file
Icon by http://www.picol.org/ found on https://www.iconfinder.com/icons/103432/category_icon on 23 June 2019,
licensed under the Creative Commons (Attribution-Share Alike 3.0 Unported).
It has been modified (color change) and is released under the same license below.
License:
https://creativecommons.org/licenses/by-sa/3.0/
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
enable-background="new 0 0 32 32"
height="32px"
id="svg2"
version="1.1"
viewBox="0 0 32 32"
width="32px"
xml:space="preserve"
sodipodi:docname="iconfinder_category_103432_edited.svg"
inkscape:version="0.92.4 5da689c313, 2019-01-14"><metadata
id="metadata13"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs11" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview9"
showgrid="false"
inkscape:zoom="7.375"
inkscape:cx="16"
inkscape:cy="16"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" /><g
id="background"><rect
fill="none"
height="32"
width="32"
id="rect2" /></g><g
id="category"
style="fill:#e6e6e6"><polygon
points="20,20 20,12 12,12 12,14 8,14 8,10 10,10 10,2 2,2 2,10 6,10 6,26 12,26 12,30 20,30 20,22 12,22 12,24.001 8,24 8,16 12,16 12,20 "
id="polygon5"
style="fill:#e6e6e6" /></g></svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
aria-hidden="true"
focusable="false"
data-prefix="fas"
data-icon="plug"
class="svg-inline--fa fa-plug fa-w-12"
role="img"
viewBox="0 0 384 512"
version="1.1"
id="svg4"
sodipodi:docname="plug-solid.svg"
inkscape:version="0.92.4 5da689c313, 2019-01-14">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview6"
showgrid="false"
inkscape:zoom="0.4609375"
inkscape:cx="192"
inkscape:cy="256"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="0"
inkscape:current-layer="svg4" />
<path
fill="currentColor"
d="M256 144V32c0-17.673 14.327-32 32-32s32 14.327 32 32v112h-64zm112 16H16c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h16v32c0 77.406 54.969 141.971 128 156.796V512h64v-99.204c73.031-14.825 128-79.39 128-156.796v-32h16c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16zm-240-16V32c0-17.673-14.327-32-32-32S64 14.327 64 32v112h64z"
id="path2"
style="fill:#e6e6e6" />
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
viewBox="0 0 4.2333333 4.2333333"
version="1.1"
id="svg8"
inkscape:version="0.92.4 5da689c313, 2019-01-14"
sodipodi:docname="midi-connector.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="7.919596"
inkscape:cx="3.7723253"
inkscape:cy="26.392644"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1920"
inkscape:window-height="992"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-292.76667)">
<path
style="opacity:1;fill:#e6e6e6;stroke:#cccccc;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;paint-order:normal"
d="M 8 0.58984375 A 7.4107144 7.4107144 0 0 0 0.58984375 8 A 7.4107144 7.4107144 0 0 0 5.5527344 14.986328 A 3.1696422 5.1166177 0 0 1 8 13.115234 A 3.1696422 5.1166177 0 0 1 10.445312 14.986328 A 7.4107144 7.4107144 0 0 0 15.410156 8 A 7.4107144 7.4107144 0 0 0 8 0.58984375 z M 8 1.609375 A 1.3392857 1.3392857 0 0 1 9.3398438 2.9472656 A 1.3392857 1.3392857 0 0 1 8 4.2871094 A 1.3392857 1.3392857 0 0 1 6.6601562 2.9472656 A 1.3392857 1.3392857 0 0 1 8 1.609375 z M 4.4648438 2.9902344 A 1.3392857 1.3392857 0 0 1 5.8027344 4.328125 A 1.3392857 1.3392857 0 0 1 4.4648438 5.6679688 A 1.3392857 1.3392857 0 0 1 3.125 4.328125 A 1.3392857 1.3392857 0 0 1 4.4648438 2.9902344 z M 11.570312 2.9902344 A 1.3392857 1.3392857 0 0 1 12.910156 4.328125 A 1.3392857 1.3392857 0 0 1 11.570312 5.6679688 A 1.3392857 1.3392857 0 0 1 10.230469 4.328125 A 1.3392857 1.3392857 0 0 1 11.570312 2.9902344 z M 2.84375 6.1953125 A 1.3392857 1.3392857 0 0 1 4.1816406 7.5351562 A 1.3392857 1.3392857 0 0 1 2.84375 8.8730469 A 1.3392857 1.3392857 0 0 1 1.5039062 7.5351562 A 1.3392857 1.3392857 0 0 1 2.84375 6.1953125 z M 13.199219 6.1953125 A 1.3392857 1.3392857 0 0 1 14.539062 7.5351562 A 1.3392857 1.3392857 0 0 1 13.199219 8.8730469 A 1.3392857 1.3392857 0 0 1 11.859375 7.5351562 A 1.3392857 1.3392857 0 0 1 13.199219 6.1953125 z "
transform="matrix(0.26458333,0,0,0.26458333,0,292.76667)"
id="path947" />
</g>
</svg>
......@@ -211,11 +211,17 @@ timeline-selection-info,
timeline-toolbar,
piano-roll-selection-info,
piano-roll-toolbar,
browser toolbar,
dialog
{
background-color: @bg_dark_variant2;
}
browser toolbar
{
padding: 0px;
}
.header_notebook tabs,
.header_notebook header,
.header_notebook toolbar,
......
......@@ -30,8 +30,6 @@
<child>
<object class="GtkBox" id="stack_switcher_box">
<property name="visible">1</property>
<property name="margin-top">4</property>
<property name="margin-bottom">4</property>
</object>
</child>
<child>
......
......@@ -29,96 +29,56 @@
<property name="position">220</property>
<property name="position_set">True</property>
<property name="wide_handle">True</property>
<property name="vexpand">True</property>
<child>
<object class="GtkGrid" id="browser_top">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="vexpand">True</property>
<property name="height-request">240</property>
<object class="GtkBox">
<property name="visible">1</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkSearchEntry" id="browser_search">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="primary_icon_name">edit-find-symbolic</property>
<property name="primary_icon_activatable">False</property>
<property name="primary_icon_sensitive">False</property>
<object class="GtkBox" id="stack_switcher_box">
<property name="visible">1</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="collections_exp">
<object class="GtkStack" id="stack">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="label_fill">True</property>
<child type="label">
<object class="GtkLabel" id="glabel-collections">
<property name="vexpand">True</property>
<child>
<object class="GtkScrolledWindow" id="collection_scroll">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Collection</property>
<child>
<object class="GtkTreeView" id="collection_tree_view">
<property name="visible">1</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">2</property>
<property name="height">2</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="types_exp">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="label_fill">True</property>
<child type="label">
<object class="GtkLabel" id="glabel-type">
<child>
<object class="GtkScrolledWindow" id="category_scroll">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Type</property>
<property name="justify">fill</property>
<property name="wrap">True</property>
<child>
<object class="GtkTreeView" id="category_tree_view">
<property name="visible">1</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="cat_exp">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="label_fill">True</property>
<child type="label">
<object class="GtkLabel" id="glabel-category">
<child>
<object class="GtkScrolledWindow" id="protocol_scroll">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Category</property>
<child>
<object class="GtkTreeView" id="protocol_tree_view">
<property name="visible">1</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
<property name="width">2</property>
</packing>
</child>
</object>
<packing>
<property name="resize">False</property>
<property name="shrink">False</property>
<property name="resize">1</property>
<property name="shrink">0</property>
</packing>
</child>
<child>
......@@ -126,6 +86,67 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkToolbar" id="plugin_toolbar">
<property name="visible">1</property>
<property name="icon-size">small-toolbar</property>
<child>
<object class="GtkToggleToolButton" id="toggle_instruments">
<property name="visible">1</property>
<property name="icon-name">z-audio-midi</property>
<property name="tooltip-text" translatable="true">Instruments</property>
<signal name="toggled" handler="toggles_changed" object="PluginBrowserWidget" swapped="no"/>
</object>
<packing>
<property name="expand">1</property>
</packing>
</child>
<child>
<object class="GtkToggleToolButton" id="toggle_effects">
<property name="visible">1</property>
<property name="icon-name">z-kdenlive-show-audiothumb</property>
<property name="tooltip-text" translatable="true">Effects</property>
<signal name="toggled" handler="toggles_changed" object="PluginBrowserWidget" swapped="no"/>
</object>
<packing>
<property name="expand">1</property>
</packing>
</child>
<child>
<object class="GtkToggleToolButton" id="toggle_modulators">
<property name="visible">1</property>
<property name="icon-name">z-mathmode</property>
<property name="tooltip-text" translatable="true">Modulators</property>
<signal name="toggled" handler="toggles_changed" object="PluginBrowserWidget" swapped="no"/>
</object>
<packing>
<property name="expand">1</property>
</packing>
</child>
<child>
<object class="GtkToggleToolButton" id="toggle_midi_modifiers">
<property name="visible">1</property>
<property name="icon-name">midi-connector</property>
<property name="tooltip-text" translatable="true">MIDI Modifiers</property>
<signal name="toggled" handler="toggles_changed" object="PluginBrowserWidget" swapped="no"/>
</object>
<packing>
<property name="expand">1</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkScrolledWindow" id="plugin_scroll">
<property name="visible">1</property>
<property name="vexpand">True</property>
<child>
<object class="GtkTreeView" id="plugin_tree_view">
<property name="visible">1</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel" id="plugin_info">
<property name="visible">True</property>
......
......@@ -54,6 +54,20 @@ expander_box_widget_get_private (
self);
}
/**
* Reveals or hides the expander box's contents.
*/
void
expander_box_widget_set_reveal (
ExpanderBoxWidget * self,
int reveal)
{
GET_PRIVATE (self);
gtk_revealer_set_reveal_child (
prv->revealer,
reveal);
}
/**
* Sets the label to show.
*/
......@@ -130,6 +144,27 @@ expander_box_widget_set_icon_name (
GTK_ICON_SIZE_BUTTON);
}
ExpanderBoxWidget *
expander_box_widget_new (
const char * label,
const char * icon_name,
GtkOrientation orientation)
{
ExpanderBoxWidget * self =
g_object_new (EXPANDER_BOX_WIDGET_TYPE,
"visible", 1,
NULL);
expander_box_widget_set_icon_name (
self, icon_name);
expander_box_widget_set_orientation (
self, orientation);
expander_box_widget_set_label (
self, label);
return self;
}
static void
expander_box_widget_class_init (
ExpanderBoxWidgetClass * _klass)
......
......@@ -132,7 +132,7 @@ inspector_widget_init (InspectorWidget * self)
gtk_box_pack_start (
self->stack_switcher_box,
GTK_WIDGET (self->stack_switcher),
TRUE, FALSE, 0);
TRUE, TRUE, 0);
/* set stackswitcher icons */
GValue iconval1 = G_VALUE_INIT;
......@@ -179,6 +179,24 @@ inspector_widget_init (InspectorWidget * self)
GTK_WIDGET (self->plugin),
"title", &iconval3);
GList *children, *iter;
children =
gtk_container_get_children (
GTK_CONTAINER (self->stack_switcher));
for (iter = children;
iter != NULL;
iter = g_list_next (iter))
{
if (!GTK_IS_RADIO_BUTTON (iter->data))
continue;
GtkWidget * radio = GTK_WIDGET (iter->data);
g_object_set (
radio, "hexpand", TRUE, NULL);
}
g_list_free (children);
/*self->size_group =*/
/*gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);*/
......
This diff is collapsed.
......@@ -106,6 +106,9 @@ right_dock_edge_widget_init (
control_room_widget_setup (
self->control_room,
CONTROL_ROOM);
gtk_notebook_set_current_page (
GTK_NOTEBOOK (self->right_notebook), 0);
}
static void
......