summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-01 14:49:44 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-01 14:49:44 +0200
commit9183e3d1c54fae7be902ced6dd06f41546ec2e8e (patch)
treea96efb0105f1672a2e14e880ad52994d5bce2162 /plugins
parentd556baa0cebd866a8a780aa63858fa561494b411 (diff)
removed old summary tab page from track properties;
enabled editing metadata from track properties
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkui/callbacks.c1
-rw-r--r--plugins/gtkui/callbacks.h4
-rw-r--r--plugins/gtkui/deadbeef.glade597
-rw-r--r--plugins/gtkui/interface.c268
-rw-r--r--plugins/gtkui/prefwin.c2
-rw-r--r--plugins/gtkui/trkproperties.c134
6 files changed, 125 insertions, 881 deletions
diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c
index bd6c610a..7e7c09fd 100644
--- a/plugins/gtkui/callbacks.c
+++ b/plugins/gtkui/callbacks.c
@@ -1020,3 +1020,4 @@ on_toggle_eq (GtkMenuItem *menuitem,
}
}
+
diff --git a/plugins/gtkui/callbacks.h b/plugins/gtkui/callbacks.h
index 1ed7dc72..1502eb1a 100644
--- a/plugins/gtkui/callbacks.h
+++ b/plugins/gtkui/callbacks.h
@@ -829,3 +829,7 @@ on_ape_strip_id3v2_toggled (GtkToggleButton *togglebutton,
void
on_ape_strip_apev2_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
+
+void
+on_closebtn_clicked (GtkButton *button,
+ gpointer user_data);
diff --git a/plugins/gtkui/deadbeef.glade b/plugins/gtkui/deadbeef.glade
index 268080a5..adda7e68 100644
--- a/plugins/gtkui/deadbeef.glade
+++ b/plugins/gtkui/deadbeef.glade
@@ -1269,6 +1269,8 @@
</widget>
<widget class="GtkWindow" id="trackproperties">
+ <property name="width_request">400</property>
+ <property name="height_request">400</property>
<property name="visible">True</property>
<property name="title" translatable="yes">Track Properties</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
@@ -1304,110 +1306,6 @@
<property name="spacing">8</property>
<child>
- <widget class="GtkScrolledWindow" id="scrolledwindow5">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="metalist">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">True</property>
- <property name="rules_hint">True</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- <property name="fixed_height_mode">False</property>
- <property name="hover_selection">False</property>
- <property name="hover_expand">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkButton" id="write_tags">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Write</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <signal name="clicked" handler="on_write_tags_clicked" last_modification_time="Sat, 27 Mar 2010 20:48:33 GMT"/>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button4">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Close</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label64">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Full</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox13">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child>
<widget class="GtkHBox" id="hbox23">
<property name="visible">True</property>
<property name="homogeneous">False</property>
@@ -1460,172 +1358,31 @@
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox24">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child>
- <widget class="GtkLabel" id="label28">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Title:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="title">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">•</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox25">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child>
- <widget class="GtkLabel" id="label29">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Track Artist:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="artist">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">•</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox35">
+ <widget class="GtkScrolledWindow" id="scrolledwindow5">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child>
- <widget class="GtkLabel" id="label63">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Band/Album Artist:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
- <widget class="GtkEntry" id="band">
+ <widget class="GtkTreeView" id="metalist">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">•</property>
- <property name="activates_default">False</property>
+ <property name="headers_visible">True</property>
+ <property name="rules_hint">True</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <property name="fixed_height_mode">False</property>
+ <property name="hover_selection">False</property>
+ <property name="hover_expand">False</property>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
</child>
</widget>
<packing>
@@ -1636,315 +1393,26 @@
</child>
<child>
- <widget class="GtkHBox" id="hbox26">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child>
- <widget class="GtkLabel" id="label30">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Album:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="album">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">•</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox27">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child>
- <widget class="GtkLabel" id="label35">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Genre:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="genre">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">•</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table8">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">8</property>
- <property name="column_spacing">8</property>
-
- <child>
- <widget class="GtkLabel" id="label31">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Year:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label33">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Track:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="year">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">•</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="track">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">•</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox28">
+ <widget class="GtkHButtonBox" id="hbuttonbox1">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child>
- <widget class="GtkLabel" id="label36">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Comment:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <property name="spacing">0</property>
<child>
- <widget class="GtkScrolledWindow" id="scrolledwindow4">
+ <widget class="GtkButton" id="write_tags">
<property name="visible">True</property>
+ <property name="can_default">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTextView" id="comment">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="overwrite">False</property>
- <property name="accepts_tab">True</property>
- <property name="justification">GTK_JUSTIFY_LEFT</property>
- <property name="wrap_mode">GTK_WRAP_NONE</property>
- <property name="cursor_visible">True</property>
- <property name="pixels_above_lines">0</property>
- <property name="pixels_below_lines">0</property>
- <property name="pixels_inside_wrap">0</property>
- <property name="left_margin">0</property>
- <property name="right_margin">0</property>
- <property name="indent">0</property>
- <property name="text" translatable="yes"></property>
- </widget>
- </child>
+ <property name="label" translatable="yes">Write</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="on_write_tags_clicked" last_modification_time="Sat, 27 Mar 2010 20:48:33 GMT"/>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
</child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHButtonBox" id="hbuttonbox2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">0</property>
<child>
- <widget class="GtkButton" id="button3">
+ <widget class="GtkButton" id="closebtn">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
@@ -1952,13 +1420,14 @@
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
+ <signal name="clicked" handler="on_closebtn_clicked" last_modification_time="Thu, 01 Apr 2010 12:45:33 GMT"/>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
</packing>
</child>
</widget>
@@ -1969,9 +1438,9 @@
</child>
<child>
- <widget class="GtkLabel" id="label65">
+ <widget class="GtkLabel" id="label64">
<property name="visible">True</property>
- <property name="label" translatable="yes">Summary</property>
+ <property name="label" translatable="yes">Metadata</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
diff --git a/plugins/gtkui/interface.c b/plugins/gtkui/interface.c
index 9bd0cbee..c9fffcc2 100644
--- a/plugins/gtkui/interface.c
+++ b/plugins/gtkui/interface.c
@@ -1080,45 +1080,18 @@ create_trackproperties (void)
GtkWidget *trackproperties;
GtkWidget *notebook3;
GtkWidget *vbox16;
+ GtkWidget *hbox23;
+ GtkWidget *label27;
+ GtkWidget *location;
GtkWidget *scrolledwindow5;
GtkWidget *metalist;
GtkWidget *hbuttonbox1;
GtkWidget *write_tags;
- GtkWidget *button4;
+ GtkWidget *closebtn;
GtkWidget *label64;
- GtkWidget *vbox13;
- GtkWidget *hbox23;
- GtkWidget *label27;
- GtkWidget *location;
- GtkWidget *hbox24;
- GtkWidget *label28;
- GtkWidget *title;
- GtkWidget *hbox25;
- GtkWidget *label29;
- GtkWidget *artist;
- GtkWidget *hbox35;
- GtkWidget *label63;
- GtkWidget *band;
- GtkWidget *hbox26;
- GtkWidget *label30;
- GtkWidget *album;
- GtkWidget *hbox27;
- GtkWidget *label35;
- GtkWidget *genre;
- GtkWidget *table8;
- GtkWidget *label31;
- GtkWidget *label33;
- GtkWidget *year;
- GtkWidget *track;
- GtkWidget *hbox28;
- GtkWidget *label36;
- GtkWidget *scrolledwindow4;
- GtkWidget *comment;
- GtkWidget *hbuttonbox2;
- GtkWidget *button3;
- GtkWidget *label65;
trackproperties = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_widget_set_size_request (trackproperties, 400, 400);
gtk_window_set_title (GTK_WINDOW (trackproperties), "Track Properties");
gtk_window_set_destroy_with_parent (GTK_WINDOW (trackproperties), TRUE);
gtk_window_set_skip_taskbar_hint (GTK_WINDOW (trackproperties), TRUE);
@@ -1133,6 +1106,21 @@ create_trackproperties (void)
gtk_container_add (GTK_CONTAINER (notebook3), vbox16);
gtk_container_set_border_width (GTK_CONTAINER (vbox16), 12);
+ hbox23 = gtk_hbox_new (FALSE, 8);
+ gtk_widget_show (hbox23);
+ gtk_box_pack_start (GTK_BOX (vbox16), hbox23, FALSE, TRUE, 0);
+
+ label27 = gtk_label_new ("Location:");
+ gtk_widget_show (label27);
+ gtk_box_pack_start (GTK_BOX (hbox23), label27, FALSE, FALSE, 0);
+ gtk_misc_set_alignment (GTK_MISC (label27), 0, 0.5);
+
+ location = gtk_entry_new ();
+ gtk_widget_show (location);
+ gtk_box_pack_start (GTK_BOX (hbox23), location, TRUE, TRUE, 0);
+ gtk_editable_set_editable (GTK_EDITABLE (location), FALSE);
+ gtk_entry_set_invisible_char (GTK_ENTRY (location), 8226);
+
scrolledwindow5 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_show (scrolledwindow5);
gtk_box_pack_start (GTK_BOX (vbox16), scrolledwindow5, TRUE, TRUE, 0);
@@ -1154,182 +1142,15 @@ create_trackproperties (void)
gtk_container_add (GTK_CONTAINER (hbuttonbox1), write_tags);
GTK_WIDGET_SET_FLAGS (write_tags, GTK_CAN_DEFAULT);
- button4 = gtk_button_new_with_mnemonic ("Close");
- gtk_widget_show (button4);
- gtk_container_add (GTK_CONTAINER (hbuttonbox1), button4);
- GTK_WIDGET_SET_FLAGS (button4, GTK_CAN_DEFAULT);
+ closebtn = gtk_button_new_with_mnemonic ("Close");
+ gtk_widget_show (closebtn);
+ gtk_container_add (GTK_CONTAINER (hbuttonbox1), closebtn);
+ GTK_WIDGET_SET_FLAGS (closebtn, GTK_CAN_DEFAULT);
- label64 = gtk_label_new ("Full");
+ label64 = gtk_label_new ("Metadata");
gtk_widget_show (label64);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook3), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook3), 0), label64);
- vbox13 = gtk_vbox_new (FALSE, 8);
- gtk_widget_show (vbox13);
- gtk_container_add (GTK_CONTAINER (notebook3), vbox13);
- gtk_container_set_border_width (GTK_CONTAINER (vbox13), 12);
-
- hbox23 = gtk_hbox_new (FALSE, 8);
- gtk_widget_show (hbox23);
- gtk_box_pack_start (GTK_BOX (vbox13), hbox23, FALSE, FALSE, 0);
-
- label27 = gtk_label_new ("Location:");
- gtk_widget_show (label27);
- gtk_box_pack_start (GTK_BOX (hbox23), label27, FALSE, FALSE, 0);
- gtk_misc_set_alignment (GTK_MISC (label27), 0, 0.5);
-
- location = gtk_entry_new ();
- gtk_widget_show (location);
- gtk_box_pack_start (GTK_BOX (hbox23), location, TRUE, TRUE, 0);
- gtk_editable_set_editable (GTK_EDITABLE (location), FALSE);
- gtk_entry_set_invisible_char (GTK_ENTRY (location), 8226);
-
- hbox24 = gtk_hbox_new (FALSE, 8);
- gtk_widget_show (hbox24);
- gtk_box_pack_start (GTK_BOX (vbox13), hbox24, FALSE, FALSE, 0);
-
- label28 = gtk_label_new ("Title:");
- gtk_widget_show (label28);
- gtk_box_pack_start (GTK_BOX (hbox24), label28, FALSE, FALSE, 0);
- gtk_misc_set_alignment (GTK_MISC (label28), 0, 0.5);
-
- title = gtk_entry_new ();
- gtk_widget_show (title);
- gtk_box_pack_start (GTK_BOX (hbox24), title, TRUE, TRUE, 0);
- gtk_editable_set_editable (GTK_EDITABLE (title), FALSE);
- gtk_entry_set_invisible_char (GTK_ENTRY (title), 8226);
-
- hbox25 = gtk_hbox_new (FALSE, 8);
- gtk_widget_show (hbox25);
- gtk_box_pack_start (GTK_BOX (vbox13), hbox25, FALSE, FALSE, 0);
-
- label29 = gtk_label_new ("Track Artist:");
- gtk_widget_show (label29);
- gtk_box_pack_start (GTK_BOX (hbox25), label29, FALSE, FALSE, 0);
- gtk_misc_set_alignment (GTK_MISC (label29), 0, 0.5);
-
- artist = gtk_entry_new ();
- gtk_widget_show (artist);
- gtk_box_pack_start (GTK_BOX (hbox25), artist, TRUE, TRUE, 0);
- gtk_editable_set_editable (GTK_EDITABLE (artist), FALSE);
- gtk_entry_set_invisible_char (GTK_ENTRY (artist), 8226);
-
- hbox35 = gtk_hbox_new (FALSE, 8);
- gtk_widget_show (hbox35);
- gtk_box_pack_start (GTK_BOX (vbox13), hbox35, TRUE, TRUE, 0);
-
- label63 = gtk_label_new ("Band/Album Artist:");
- gtk_widget_show (label63);
- gtk_box_pack_start (GTK_BOX (hbox35), label63, FALSE, FALSE, 0);
- gtk_misc_set_alignment (GTK_MISC (label63), 0, 0.5);
-
- band = gtk_entry_new ();
- gtk_widget_show (band);
- gtk_box_pack_start (GTK_BOX (hbox35), band, TRUE, TRUE, 0);
- gtk_editable_set_editable (GTK_EDITABLE (band), FALSE);
- gtk_entry_set_invisible_char (GTK_ENTRY (band), 8226);
-
- hbox26 = gtk_hbox_new (FALSE, 8);
- gtk_widget_show (hbox26);
- gtk_box_pack_start (GTK_BOX (vbox13), hbox26, FALSE, FALSE, 0);
-
- label30 = gtk_label_new ("Album:");
- gtk_widget_show (label30);
- gtk_box_pack_start (GTK_BOX (hbox26), label30, FALSE, FALSE, 0);
- gtk_misc_set_alignment (GTK_MISC (label30), 0, 0.5);
-
- album = gtk_entry_new ();
- gtk_widget_show (album);
- gtk_box_pack_start (GTK_BOX (hbox26), album, TRUE, TRUE, 0);
- gtk_editable_set_editable (GTK_EDITABLE (album), FALSE);
- gtk_entry_set_invisible_char (GTK_ENTRY (album), 8226);
-
- hbox27 = gtk_hbox_new (FALSE, 8);
- gtk_widget_show (hbox27);
- gtk_box_pack_start (GTK_BOX (vbox13), hbox27, FALSE, FALSE, 0);
-
- label35 = gtk_label_new ("Genre:");
- gtk_widget_show (label35);
- gtk_box_pack_start (GTK_BOX (hbox27), label35, FALSE, FALSE, 0);
- gtk_misc_set_alignment (GTK_MISC (label35), 0, 0.5);
-
- genre = gtk_entry_new ();
- gtk_widget_show (genre);
- gtk_box_pack_start (GTK_BOX (hbox27), genre, TRUE, TRUE, 0);
- gtk_editable_set_editable (GTK_EDITABLE (genre), FALSE);
- gtk_entry_set_invisible_char (GTK_ENTRY (genre), 8226);
-
- table8 = gtk_table_new (2, 2, FALSE);
- gtk_widget_show (table8);
- gtk_box_pack_start (GTK_BOX (vbox13), table8, FALSE, FALSE, 0);
- gtk_table_set_row_spacings (GTK_TABLE (table8), 8);
- gtk_table_set_col_spacings (GTK_TABLE (table8), 8);
-
- label31 = gtk_label_new ("Year:");
- gtk_widget_show (label31);
- gtk_table_attach (GTK_TABLE (table8), label31, 0, 1, 0, 1,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- gtk_label_set_line_wrap (GTK_LABEL (label31), TRUE);
- gtk_misc_set_alignment (GTK_MISC (label31), 0, 0.5);
-
- label33 = gtk_label_new ("Track:");
- gtk_widget_show (label33);
- gtk_table_attach (GTK_TABLE (table8), label33, 1, 2, 0, 1,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- gtk_label_set_use_markup (GTK_LABEL (label33), TRUE);
- gtk_misc_set_alignment (GTK_MISC (label33), 0, 0.5);
-
- year = gtk_entry_new ();
- gtk_widget_show (year);
- gtk_table_attach (GTK_TABLE (table8), year, 0, 1, 1, 2,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- gtk_editable_set_editable (GTK_EDITABLE (year), FALSE);
- gtk_entry_set_invisible_char (GTK_ENTRY (year), 8226);
-
- track = gtk_entry_new ();
- gtk_widget_show (track);
- gtk_table_attach (GTK_TABLE (table8), track, 1, 2, 1, 2,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- gtk_editable_set_editable (GTK_EDITABLE (track), FALSE);
- gtk_entry_set_invisible_char (GTK_ENTRY (track), 8226);
-
- hbox28 = gtk_hbox_new (FALSE, 8);
- gtk_widget_show (hbox28);
- gtk_box_pack_start (GTK_BOX (vbox13), hbox28, TRUE, TRUE, 0);
-
- label36 = gtk_label_new ("Comment:");
- gtk_widget_show (label36);
- gtk_box_pack_start (GTK_BOX (hbox28), label36, FALSE, FALSE, 0);
- gtk_misc_set_alignment (GTK_MISC (label36), 0, 0.5);
-
- scrolledwindow4 = gtk_scrolled_window_new (NULL, NULL);
- gtk_widget_show (scrolledwindow4);
- gtk_box_pack_start (GTK_BOX (hbox28), scrolledwindow4, TRUE, TRUE, 0);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_SHADOW_IN);
-
- comment = gtk_text_view_new ();
- gtk_widget_show (comment);
- gtk_container_add (GTK_CONTAINER (scrolledwindow4), comment);
- gtk_text_view_set_editable (GTK_TEXT_VIEW (comment), FALSE);
-
- hbuttonbox2 = gtk_hbutton_box_new ();
- gtk_widget_show (hbuttonbox2);
- gtk_box_pack_start (GTK_BOX (vbox13), hbuttonbox2, TRUE, TRUE, 0);
- gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox2), GTK_BUTTONBOX_END);
-
- button3 = gtk_button_new_with_mnemonic ("Close");
- gtk_widget_show (button3);
- gtk_container_add (GTK_CONTAINER (hbuttonbox2), button3);
- GTK_WIDGET_SET_FLAGS (button3, GTK_CAN_DEFAULT);
-
- label65 = gtk_label_new ("Summary");
- gtk_widget_show (label65);
- gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook3), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook3), 1), label65);
-
g_signal_connect ((gpointer) trackproperties, "key_press_event",
G_CALLBACK (on_trackproperties_key_press_event),
NULL);
@@ -1339,48 +1160,23 @@ create_trackproperties (void)
g_signal_connect ((gpointer) write_tags, "clicked",
G_CALLBACK (on_write_tags_clicked),
NULL);
+ g_signal_connect ((gpointer) closebtn, "clicked",
+ G_CALLBACK (on_closebtn_clicked),
+ NULL);
/* Store pointers to all widgets, for use by lookup_widget(). */
GLADE_HOOKUP_OBJECT_NO_REF (trackproperties, trackproperties, "trackproperties");
GLADE_HOOKUP_OBJECT (trackproperties, notebook3, "notebook3");
GLADE_HOOKUP_OBJECT (trackproperties, vbox16, "vbox16");
+ GLADE_HOOKUP_OBJECT (trackproperties, hbox23, "hbox23");
+ GLADE_HOOKUP_OBJECT (trackproperties, label27, "label27");
+ GLADE_HOOKUP_OBJECT (trackproperties, location, "location");
GLADE_HOOKUP_OBJECT (trackproperties, scrolledwindow5, "scrolledwindow5");
GLADE_HOOKUP_OBJECT (trackproperties, metalist, "metalist");
GLADE_HOOKUP_OBJECT (trackproperties, hbuttonbox1, "hbuttonbox1");
GLADE_HOOKUP_OBJECT (trackproperties, write_tags, "write_tags");
- GLADE_HOOKUP_OBJECT (trackproperties, button4, "button4");
+ GLADE_HOOKUP_OBJECT (trackproperties, closebtn, "closebtn");
GLADE_HOOKUP_OBJECT (trackproperties, label64, "label64");
- GLADE_HOOKUP_OBJECT (trackproperties, vbox13, "vbox13");
- GLADE_HOOKUP_OBJECT (trackproperties, hbox23, "hbox23");
- GLADE_HOOKUP_OBJECT (trackproperties, label27, "label27");
- GLADE_HOOKUP_OBJECT (trackproperties, location, "location");
- GLADE_HOOKUP_OBJECT (trackproperties, hbox24, "hbox24");
- GLADE_HOOKUP_OBJECT (trackproperties, label28, "label28");
- GLADE_HOOKUP_OBJECT (trackproperties, title, "title");
- GLADE_HOOKUP_OBJECT (trackproperties, hbox25, "hbox25");
- GLADE_HOOKUP_OBJECT (trackproperties, label29, "label29");
- GLADE_HOOKUP_OBJECT (trackproperties, artist, "artist");
- GLADE_HOOKUP_OBJECT (trackproperties, hbox35, "hbox35");
- GLADE_HOOKUP_OBJECT (trackproperties, label63, "label63");
- GLADE_HOOKUP_OBJECT (trackproperties, band, "band");
- GLADE_HOOKUP_OBJECT (trackproperties, hbox26, "hbox26");
- GLADE_HOOKUP_OBJECT (trackproperties, label30, "label30");
- GLADE_HOOKUP_OBJECT (trackproperties, album, "album");
- GLADE_HOOKUP_OBJECT (trackproperties, hbox27, "hbox27");
- GLADE_HOOKUP_OBJECT (trackproperties, label35, "label35");
- GLADE_HOOKUP_OBJECT (trackproperties, genre, "genre");
- GLADE_HOOKUP_OBJECT (trackproperties, table8, "table8");
- GLADE_HOOKUP_OBJECT (trackproperties, label31, "label31");
- GLADE_HOOKUP_OBJECT (trackproperties, label33, "label33");
- GLADE_HOOKUP_OBJECT (trackproperties, year, "year");
- GLADE_HOOKUP_OBJECT (trackproperties, track, "track");
- GLADE_HOOKUP_OBJECT (trackproperties, hbox28, "hbox28");
- GLADE_HOOKUP_OBJECT (trackproperties, label36, "label36");
- GLADE_HOOKUP_OBJECT (trackproperties, scrolledwindow4, "scrolledwindow4");
- GLADE_HOOKUP_OBJECT (trackproperties, comment, "comment");
- GLADE_HOOKUP_OBJECT (trackproperties, hbuttonbox2, "hbuttonbox2");
- GLADE_HOOKUP_OBJECT (trackproperties, button3, "button3");
- GLADE_HOOKUP_OBJECT (trackproperties, label65, "label65");
return trackproperties;
}
diff --git a/plugins/gtkui/prefwin.c b/plugins/gtkui/prefwin.c
index 741a6414..364b3b4a 100644
--- a/plugins/gtkui/prefwin.c
+++ b/plugins/gtkui/prefwin.c
@@ -176,8 +176,6 @@ static gboolean
add_hotkey_to_config (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) {
int *counter = (int *)data;
GValue key = {0,}, value = {0,};
-// g_value_init (&key, G_TYPE_STRING);
-// g_value_init (&value, G_TYPE_STRING);
gtk_tree_model_get_value (model, iter, 0, &key);
gtk_tree_model_get_value (model, iter, 1, &value);
const char *skey = g_value_get_string (&key);
diff --git a/plugins/gtkui/trkproperties.c b/plugins/gtkui/trkproperties.c
index 2f8faa6c..481cdc8c 100644
--- a/plugins/gtkui/trkproperties.c
+++ b/plugins/gtkui/trkproperties.c
@@ -58,6 +58,20 @@ on_trackproperties_key_press_event (GtkWidget *widget,
}
void
+on_closebtn_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ if (trackproperties) {
+ if (track) {
+ deadbeef->pl_item_unref (track);
+ track = NULL;
+ }
+ gtk_widget_destroy (trackproperties);
+ trackproperties = NULL;
+ }
+}
+
+void
on_metadata_edited (GtkCellRendererText *renderer, gchar *path, gchar *new_text, gpointer user_data) {
GtkListStore *store = GTK_LIST_STORE (user_data);
GtkTreePath *treepath = gtk_tree_path_new_from_string (path);
@@ -67,6 +81,24 @@ on_metadata_edited (GtkCellRendererText *renderer, gchar *path, gchar *new_text,
gtk_list_store_set (store, &iter, 1, new_text, -1);
}
+// full metadata
+static const char *types[] = {
+ "artist", "Artist",
+ "band", "Band / Album Artist",
+ "title", "Track Title",
+ "track", "Track Number",
+ "album", "Album",
+ "genre", "Genre",
+ "year", "Date",
+ "performer", "Performer",
+ "composer", "Composer",
+ "numtracks", "Total Tracks",
+ "disc", "Disc Number",
+ "comment", "Comment",
+ "vendor", "Encoded by",
+ NULL
+};
+
void
show_track_properties_dlg (DB_playItem_t *it) {
if (it) {
@@ -81,87 +113,9 @@ show_track_properties_dlg (DB_playItem_t *it) {
GtkWidget *widget = trackproperties;
GtkWidget *w;
const char *meta;
- // fill in metadata
// location
w = lookup_widget (widget, "location");
gtk_entry_set_text (GTK_ENTRY (w), it->fname);
- // title
- w = lookup_widget (widget, "title");
- meta = deadbeef->pl_find_meta (it, "title");
- if (!meta) {
- meta = "";
- }
- gtk_entry_set_text (GTK_ENTRY (w), meta);
- // artist
- w = lookup_widget (widget, "artist");
- meta = deadbeef->pl_find_meta (it, "artist");
- if (!meta) {
- meta = "";
- }
- gtk_entry_set_text (GTK_ENTRY (w), meta);
- // band
- w = lookup_widget (widget, "band");
- meta = deadbeef->pl_find_meta (it, "band");
- if (!meta) {
- meta = "";
- }
- gtk_entry_set_text (GTK_ENTRY (w), meta);
- // album
- w = lookup_widget (widget, "album");
- meta = deadbeef->pl_find_meta (it, "album");
- if (!meta) {
- meta = "";
- }
- gtk_entry_set_text (GTK_ENTRY (w), meta);
- // genre
- w = lookup_widget (widget, "genre");
- meta = deadbeef->pl_find_meta (it, "genre");
- if (!meta) {
- meta = "";
- }
- gtk_entry_set_text (GTK_ENTRY (w), meta);
- // year
- w = lookup_widget (widget, "year");
- meta = deadbeef->pl_find_meta (it, "year");
- if (!meta) {
- meta = "";
- }
- gtk_entry_set_text (GTK_ENTRY (w), meta);
- // track
- w = lookup_widget (widget, "track");
- meta = deadbeef->pl_find_meta (it, "track");
- if (!meta) {
- meta = "";
- }
- gtk_entry_set_text (GTK_ENTRY (w), meta);
- // comment
- w = lookup_widget (widget, "comment");
- meta = deadbeef->pl_find_meta (it, "comment");
- if (!meta) {
- meta = "";
- }
- GtkTextBuffer *buffer = gtk_text_buffer_new (NULL);
- gtk_text_buffer_set_text (buffer, meta, strlen (meta));
- gtk_text_view_set_buffer (GTK_TEXT_VIEW (w), buffer);
- g_object_unref (buffer);
-
- // full metadata
- const char *types[] = {
- "artist", "Artist",
- "band", "Band / Album Artist",
- "title", "Track Title",
- "track", "Track Number",
- "album", "Album",
- "genre", "Genre",
- "year", "Date",
- "performer", "Performer",
- "composer", "Composer",
- "numtracks", "Total Tracks",
- "disc", "Disc Number",
- "comment", "Comment",
- "vendor", "Encoded by",
- NULL
- };
GtkTreeView *tree = GTK_TREE_VIEW (lookup_widget (widget, "metalist"));
GtkListStore *store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
@@ -214,6 +168,25 @@ show_track_properties_dlg (DB_playItem_t *it) {
gtk_window_present (GTK_WINDOW (widget));
}
+static gboolean
+set_metadata_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) {
+ GValue key = {0,}, value = {0,};
+ gtk_tree_model_get_value (model, iter, 0, &key);
+ gtk_tree_model_get_value (model, iter, 1, &value);
+ const char *skey = g_value_get_string (&key);
+ const char *svalue = g_value_get_string (&value);
+
+
+ for (int i = 0; types[i]; i += 2) {
+ if (!strcmp (skey, types[i+1])) {
+ printf ("setting %s = %s\n", types[i], svalue);
+ deadbeef->pl_replace_meta (DB_PLAYITEM (data), types[i], svalue);
+ }
+ }
+
+ return FALSE;
+}
+
void
on_write_tags_clicked (GtkButton *button,
gpointer user_data)
@@ -233,6 +206,10 @@ on_write_tags_clicked (GtkButton *button,
if (!strcmp (decoders[i]->plugin.id, track->decoder_id)) {
dec = decoders[i];
if (dec->write_metadata) {
+ // put all metainfo into track
+ GtkTreeView *tree = GTK_TREE_VIEW (lookup_widget (trackproperties, "metalist"));
+ GtkTreeModel *model = GTK_TREE_MODEL (gtk_tree_view_get_model (tree));
+ gtk_tree_model_foreach (model, set_metadata_cb, track);
dec->write_metadata (track);
}
break;
@@ -323,4 +300,3 @@ error:
deadbeef->junk_free_id3v2 (&tag);
#endif
}
-