diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2009-12-31 14:30:09 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2009-12-31 14:30:09 +0100 |
commit | e92ebe02724afd4f100728106e405b0c75aa511d (patch) | |
tree | 2c3ab56d015b1f8ba922b48c1baaac93d532651c /plugins | |
parent | 4ee6790c26f5b64138e534115c132c41e016e591 (diff) |
track properties view
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/gtkui/callbacks.c | 80 | ||||
-rw-r--r-- | plugins/gtkui/deadbeef.glade | 458 | ||||
-rw-r--r-- | plugins/gtkui/interface.c | 194 | ||||
-rw-r--r-- | plugins/gtkui/interface.h | 1 |
4 files changed, 731 insertions, 2 deletions
diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c index 4482e8c8..17805f56 100644 --- a/plugins/gtkui/callbacks.c +++ b/plugins/gtkui/callbacks.c @@ -199,6 +199,7 @@ on_playlist_button_press_event (GtkWidget *widget, DB_playItem_t *it = deadbeef->pl_get_for_idx_and_iter (y, ps->iterator); if (!it) { // clicked empty space -- deselect everything and show insensitive menu + deadbeef->pl_set_cursor (ps->iterator, -1); it = deadbeef->pl_get_first (ps->iterator); while (it) { SELECT (it, 0); @@ -212,10 +213,20 @@ on_playlist_button_press_event (GtkWidget *widget, // item is unselected -- reset selection and select this DB_playItem_t *it2 = deadbeef->pl_get_first (ps->iterator); while (it2) { - SELECT (it2, 0); + if (SELECTED (it2) && it2 != it) { + SELECT (it2, 0); + } + else if (it2 == it) { + deadbeef->pl_set_cursor (ps->iterator, y); + SELECT (it2, 1); + } it2 = PL_NEXT (it2, ps->iterator); } - SELECT (it, 1); + playlist_refresh (); + } + else { + // something is selected; move cursor but keep selection + deadbeef->pl_set_cursor (ps->iterator, y); playlist_refresh (); } { @@ -2281,7 +2292,72 @@ void on_properties1_activate (GtkMenuItem *menuitem, gpointer user_data) { + GtkWidget *widget = GTK_WIDGET (menuitem); + GTKPL_PROLOGUE; + GtkWidget *w; + const char *meta; + DB_playItem_t *it = deadbeef->pl_get_for_idx_and_iter (deadbeef->pl_get_cursor (ps->iterator), ps->iterator); + if (!it) { + fprintf (stderr, "attempt to view properties of non-existing item\n"); + return; + } + widget = create_trackproperties (); + gtk_window_set_transient_for (GTK_WINDOW (widget), GTK_WINDOW (mainwin)); + // 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); + // 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 = ""; + } + gtk_entry_set_text (GTK_ENTRY (w), meta); + gtk_widget_show (widget); } diff --git a/plugins/gtkui/deadbeef.glade b/plugins/gtkui/deadbeef.glade index 4bbefffe..3cce56a5 100644 --- a/plugins/gtkui/deadbeef.glade +++ b/plugins/gtkui/deadbeef.glade @@ -2831,4 +2831,462 @@ Example: %a - %t [%l]</property> </child> </widget> +<widget class="GtkWindow" id="trackproperties"> + <property name="visible">True</property> + <property name="title" translatable="yes">Track Properties</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">True</property> + <property name="resizable">True</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + + <child> + <widget class="GtkTable" id="table7"> + <property name="border_width">3</property> + <property name="visible">True</property> + <property name="n_rows">7</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">4</property> + <property name="column_spacing">4</property> + + <child> + <widget class="GtkLabel" id="label27"> + <property name="visible">True</property> + <property name="label" translatable="yes">Location</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="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="GtkEntry" id="location"> + <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">0</property> + <property name="bottom_attach">1</property> + <property name="y_options"></property> + </packing> + </child> + + <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="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label29"> + <property name="visible">True</property> + <property name="label" translatable="yes">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="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <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="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + <property name="y_options"></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="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> + + <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="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></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="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="y_options"></property> + </packing> + </child> + + <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="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="x_options">fill</property> + <property name="y_options"></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="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="y_options"></property> + </packing> + </child> + + <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="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> + <property name="x_options">fill</property> + <property name="y_options"></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">0</property> + <property name="column_spacing">3</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="left_attach">0</property> + <property name="right_attach">2</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkScrolledWindow" id="scrolledwindow4"> + <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="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> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + </child> +</widget> + </glade-interface> diff --git a/plugins/gtkui/interface.c b/plugins/gtkui/interface.c index b0869d0d..e06c8882 100644 --- a/plugins/gtkui/interface.c +++ b/plugins/gtkui/interface.c @@ -1931,3 +1931,197 @@ create_inputformat (void) return inputformat; } +GtkWidget* +create_trackproperties (void) +{ + GtkWidget *trackproperties; + GtkWidget *table7; + GtkWidget *label27; + GtkWidget *location; + GtkWidget *label28; + GtkWidget *label29; + GtkWidget *label30; + GtkWidget *title; + GtkWidget *artist; + GtkWidget *album; + GtkWidget *label35; + GtkWidget *genre; + GtkWidget *label36; + GtkWidget *table8; + GtkWidget *label31; + GtkWidget *label33; + GtkWidget *year; + GtkWidget *track; + GtkWidget *scrolledwindow4; + GtkWidget *comment; + + trackproperties = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_title (GTK_WINDOW (trackproperties), "Track Properties"); + gtk_window_set_modal (GTK_WINDOW (trackproperties), TRUE); + + table7 = gtk_table_new (7, 2, FALSE); + gtk_widget_show (table7); + gtk_container_add (GTK_CONTAINER (trackproperties), table7); + gtk_container_set_border_width (GTK_CONTAINER (table7), 3); + gtk_table_set_row_spacings (GTK_TABLE (table7), 4); + gtk_table_set_col_spacings (GTK_TABLE (table7), 4); + + label27 = gtk_label_new ("Location"); + gtk_widget_show (label27); + gtk_table_attach (GTK_TABLE (table7), label27, 0, 1, 0, 1, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_misc_set_alignment (GTK_MISC (label27), 0, 0.5); + + location = gtk_entry_new (); + gtk_widget_show (location); + gtk_table_attach (GTK_TABLE (table7), location, 1, 2, 0, 1, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_editable_set_editable (GTK_EDITABLE (location), FALSE); + gtk_entry_set_invisible_char (GTK_ENTRY (location), 8226); + + label28 = gtk_label_new ("Title"); + gtk_widget_show (label28); + gtk_table_attach (GTK_TABLE (table7), label28, 0, 1, 1, 2, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_misc_set_alignment (GTK_MISC (label28), 0, 0.5); + + label29 = gtk_label_new ("Artist"); + gtk_widget_show (label29); + gtk_table_attach (GTK_TABLE (table7), label29, 0, 1, 2, 3, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_misc_set_alignment (GTK_MISC (label29), 0, 0.5); + + label30 = gtk_label_new ("Album"); + gtk_widget_show (label30); + gtk_table_attach (GTK_TABLE (table7), label30, 0, 1, 3, 4, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_misc_set_alignment (GTK_MISC (label30), 0, 0.5); + + title = gtk_entry_new (); + gtk_widget_show (title); + gtk_table_attach (GTK_TABLE (table7), title, 1, 2, 1, 2, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_editable_set_editable (GTK_EDITABLE (title), FALSE); + gtk_entry_set_invisible_char (GTK_ENTRY (title), 8226); + + artist = gtk_entry_new (); + gtk_widget_show (artist); + gtk_table_attach (GTK_TABLE (table7), artist, 1, 2, 2, 3, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_editable_set_editable (GTK_EDITABLE (artist), FALSE); + gtk_entry_set_invisible_char (GTK_ENTRY (artist), 8226); + + album = gtk_entry_new (); + gtk_widget_show (album); + gtk_table_attach (GTK_TABLE (table7), album, 1, 2, 3, 4, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_editable_set_editable (GTK_EDITABLE (album), FALSE); + gtk_entry_set_invisible_char (GTK_ENTRY (album), 8226); + + label35 = gtk_label_new ("Genre"); + gtk_widget_show (label35); + gtk_table_attach (GTK_TABLE (table7), label35, 0, 1, 4, 5, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_misc_set_alignment (GTK_MISC (label35), 0, 0.5); + + genre = gtk_entry_new (); + gtk_widget_show (genre); + gtk_table_attach (GTK_TABLE (table7), genre, 1, 2, 4, 5, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_editable_set_editable (GTK_EDITABLE (genre), FALSE); + gtk_entry_set_invisible_char (GTK_ENTRY (genre), 8226); + + label36 = gtk_label_new ("Comment"); + gtk_widget_show (label36); + gtk_table_attach (GTK_TABLE (table7), label36, 0, 1, 6, 7, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_misc_set_alignment (GTK_MISC (label36), 0, 0.5); + + table8 = gtk_table_new (2, 2, FALSE); + gtk_widget_show (table8); + gtk_table_attach (GTK_TABLE (table7), table8, 0, 2, 5, 6, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_FILL), 0, 0); + gtk_table_set_col_spacings (GTK_TABLE (table8), 3); + + 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); + + scrolledwindow4 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_show (scrolledwindow4); + gtk_table_attach (GTK_TABLE (table7), scrolledwindow4, 1, 2, 6, 7, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 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); + + /* Store pointers to all widgets, for use by lookup_widget(). */ + GLADE_HOOKUP_OBJECT_NO_REF (trackproperties, trackproperties, "trackproperties"); + GLADE_HOOKUP_OBJECT (trackproperties, table7, "table7"); + GLADE_HOOKUP_OBJECT (trackproperties, label27, "label27"); + GLADE_HOOKUP_OBJECT (trackproperties, location, "location"); + GLADE_HOOKUP_OBJECT (trackproperties, label28, "label28"); + GLADE_HOOKUP_OBJECT (trackproperties, label29, "label29"); + GLADE_HOOKUP_OBJECT (trackproperties, label30, "label30"); + GLADE_HOOKUP_OBJECT (trackproperties, title, "title"); + GLADE_HOOKUP_OBJECT (trackproperties, artist, "artist"); + GLADE_HOOKUP_OBJECT (trackproperties, album, "album"); + GLADE_HOOKUP_OBJECT (trackproperties, label35, "label35"); + GLADE_HOOKUP_OBJECT (trackproperties, genre, "genre"); + GLADE_HOOKUP_OBJECT (trackproperties, label36, "label36"); + 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, scrolledwindow4, "scrolledwindow4"); + GLADE_HOOKUP_OBJECT (trackproperties, comment, "comment"); + + return trackproperties; +} + diff --git a/plugins/gtkui/interface.h b/plugins/gtkui/interface.h index 431e5e12..0ccd4a72 100644 --- a/plugins/gtkui/interface.h +++ b/plugins/gtkui/interface.h @@ -11,3 +11,4 @@ GtkWidget* create_prefwin (void); GtkWidget* create_headermenu (void); GtkWidget* create_addlocation (void); GtkWidget* create_inputformat (void); +GtkWidget* create_trackproperties (void); |