diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-06-17 21:56:45 +0200 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-06-17 21:56:45 +0200 |
commit | 2cda5af95aabb6ea22e6e04fcf30f8aa5d5af3f1 (patch) | |
tree | 18b59f5588b0df2c46af13b5d1df693f90a4257f /plugins | |
parent | d390a25a61f2f9ba17938079a704f38a60e4f149 (diff) |
gtkui: improved custom title dlg
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/gtkui/deadbeef.glade | 78 | ||||
-rw-r--r-- | plugins/gtkui/interface.c | 24 | ||||
-rw-r--r-- | plugins/gtkui/widgets.c | 2 |
3 files changed, 81 insertions, 23 deletions
diff --git a/plugins/gtkui/deadbeef.glade b/plugins/gtkui/deadbeef.glade index fc2fefbb..7828a9bf 100644 --- a/plugins/gtkui/deadbeef.glade +++ b/plugins/gtkui/deadbeef.glade @@ -8787,46 +8787,84 @@ Descending</property> </child> <child> - <widget class="GtkHBox" id="hbox123"> + <widget class="GtkVBox" id="vbox46"> <property name="border_width">12</property> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">8</property> <child> - <widget class="GtkCheckButton" id="set_custom_title"> + <widget class="GtkTextView" id="textview2"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Set custom title</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">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_WORD</property> + <property name="cursor_visible">False</property> + <property name="pixels_above_lines">8</property> + <property name="pixels_below_lines">8</property> + <property name="pixels_inside_wrap">0</property> + <property name="left_margin">8</property> + <property name="right_margin">8</property> + <property name="indent">0</property> + <property name="text" translatable="yes">This dialog allows to set custom title for any track. This is most useful for radio stations. An option to set the custom title is also present in the "Add Location" dialog. The title itself is visible in columns displaying the "Artist" metadata field. It should look like "[custom] artist" if the Artist field is present, or just "custom" otherwise.</property> </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="GtkEntry" id="custom_title"> + <widget class="GtkHBox" id="hbox123"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</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="homogeneous">False</property> + <property name="spacing">8</property> + + <child> + <widget class="GtkCheckButton" id="set_custom_title"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Set custom title</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</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="custom_title"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</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">True</property> + <property name="expand">False</property> <property name="fill">True</property> </packing> </child> diff --git a/plugins/gtkui/interface.c b/plugins/gtkui/interface.c index 7f5ce942..5cd3ce7e 100644 --- a/plugins/gtkui/interface.c +++ b/plugins/gtkui/interface.c @@ -4402,6 +4402,8 @@ create_setcustomtitledlg (void) { GtkWidget *setcustomtitledlg; GtkWidget *dialog_vbox16; + GtkWidget *vbox46; + GtkWidget *textview2; GtkWidget *hbox123; GtkWidget *set_custom_title; GtkWidget *custom_title; @@ -4417,10 +4419,26 @@ create_setcustomtitledlg (void) dialog_vbox16 = gtk_dialog_get_content_area (GTK_DIALOG (setcustomtitledlg)); gtk_widget_show (dialog_vbox16); + vbox46 = gtk_vbox_new (FALSE, 8); + gtk_widget_show (vbox46); + gtk_box_pack_start (GTK_BOX (dialog_vbox16), vbox46, TRUE, TRUE, 0); + gtk_container_set_border_width (GTK_CONTAINER (vbox46), 12); + + textview2 = gtk_text_view_new (); + gtk_widget_show (textview2); + gtk_box_pack_start (GTK_BOX (vbox46), textview2, FALSE, TRUE, 0); + gtk_text_view_set_editable (GTK_TEXT_VIEW (textview2), FALSE); + gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (textview2), GTK_WRAP_WORD); + gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (textview2), FALSE); + gtk_text_view_set_pixels_above_lines (GTK_TEXT_VIEW (textview2), 8); + gtk_text_view_set_pixels_below_lines (GTK_TEXT_VIEW (textview2), 8); + gtk_text_view_set_left_margin (GTK_TEXT_VIEW (textview2), 8); + gtk_text_view_set_right_margin (GTK_TEXT_VIEW (textview2), 8); + gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview2)), _("This dialog allows to set custom title for any track. This is most useful for radio stations. An option to set the custom title is also present in the \"Add Location\" dialog. The title itself is visible in columns displaying the \"Artist\" metadata field. It should look like \"[custom] artist\" if the Artist field is present, or just \"custom\" otherwise."), -1); + hbox123 = gtk_hbox_new (FALSE, 8); gtk_widget_show (hbox123); - gtk_box_pack_start (GTK_BOX (dialog_vbox16), hbox123, TRUE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (hbox123), 12); + gtk_box_pack_start (GTK_BOX (vbox46), hbox123, FALSE, TRUE, 0); set_custom_title = gtk_check_button_new_with_mnemonic (_("Set custom title")); gtk_widget_show (set_custom_title); @@ -4448,6 +4466,8 @@ create_setcustomtitledlg (void) /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (setcustomtitledlg, setcustomtitledlg, "setcustomtitledlg"); GLADE_HOOKUP_OBJECT_NO_REF (setcustomtitledlg, dialog_vbox16, "dialog_vbox16"); + GLADE_HOOKUP_OBJECT (setcustomtitledlg, vbox46, "vbox46"); + GLADE_HOOKUP_OBJECT (setcustomtitledlg, textview2, "textview2"); GLADE_HOOKUP_OBJECT (setcustomtitledlg, hbox123, "hbox123"); GLADE_HOOKUP_OBJECT (setcustomtitledlg, set_custom_title, "set_custom_title"); GLADE_HOOKUP_OBJECT (setcustomtitledlg, custom_title, "custom_title"); diff --git a/plugins/gtkui/widgets.c b/plugins/gtkui/widgets.c index 37057d34..1bacb50e 100644 --- a/plugins/gtkui/widgets.c +++ b/plugins/gtkui/widgets.c @@ -475,7 +475,7 @@ w_unknown_create (const char *type) { g_signal_connect_after ((gpointer) w->drawarea, "draw", G_CALLBACK (unknown_draw), w); #endif w_override_signals (w->base.widget, w); - return w; + return (ddb_gtkui_widget_t *)w; } const char * |