diff options
Diffstat (limited to 'plugins/gtkui')
-rw-r--r-- | plugins/gtkui/deadbeef.glade | 1083 | ||||
-rw-r--r-- | plugins/gtkui/interface.c | 437 | ||||
-rw-r--r-- | plugins/gtkui/interface.h | 1 | ||||
-rw-r--r-- | plugins/gtkui/mainplaylist.c | 6 | ||||
-rw-r--r-- | plugins/gtkui/plcommon.c | 106 | ||||
-rw-r--r-- | plugins/gtkui/plcommon.h | 3 |
6 files changed, 1560 insertions, 76 deletions
diff --git a/plugins/gtkui/deadbeef.glade b/plugins/gtkui/deadbeef.glade index 803193c9..7504ea9f 100644 --- a/plugins/gtkui/deadbeef.glade +++ b/plugins/gtkui/deadbeef.glade @@ -1240,11 +1240,73 @@ <widget class="GtkButton" id="button1"> <property name="width_request">83</property> <property name="visible">True</property> - <property name="label" translatable="yes">Abort</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_progress_abort" last_modification_time="Sun, 16 Aug 2009 17:17:12 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment10"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox51"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image389"> + <property name="visible">True</property> + <property name="stock">gtk-stop</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label87"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Abort</property> + <property name="use_underline">True</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> </widget> <packing> <property name="padding">0</property> @@ -1393,11 +1455,73 @@ <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"/> + + <child> + <widget class="GtkAlignment" id="alignment11"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox52"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image390"> + <property name="visible">True</property> + <property name="stock">gtk-apply</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label88"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Apply</property> + <property name="use_underline">True</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> </widget> </child> @@ -1406,11 +1530,73 @@ <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> <signal name="clicked" handler="on_closebtn_clicked" last_modification_time="Thu, 01 Apr 2010 12:45:33 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment12"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox53"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image391"> + <property name="visible">True</property> + <property name="stock">gtk-close</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label89"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Close</property> + <property name="use_underline">True</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> </widget> </child> </widget> @@ -1498,11 +1684,73 @@ <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> <signal name="clicked" handler="on_closebtn_clicked" last_modification_time="Sun, 18 Apr 2010 10:49:02 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment13"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox54"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image392"> + <property name="visible">True</property> + <property name="stock">gtk-close</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label90"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Close</property> + <property name="use_underline">True</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> </widget> </child> </widget> @@ -1579,11 +1827,73 @@ <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label">_Cancel</property> - <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <property name="response_id">-6</property> + + <child> + <widget class="GtkAlignment" id="alignment9"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox50"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image388"> + <property name="visible">True</property> + <property name="stock">gtk-cancel</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label86"> + <property name="visible">True</property> + <property name="label">_Cancel</property> + <property name="use_underline">True</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> </widget> </child> @@ -1592,11 +1902,73 @@ <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label">_OK</property> - <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <property name="response_id">-5</property> + + <child> + <widget class="GtkAlignment" id="alignment8"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox49"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image387"> + <property name="visible">True</property> + <property name="stock">gtk-ok</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label85"> + <property name="visible">True</property> + <property name="label">_OK</property> + <property name="use_underline">True</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> </widget> </child> </widget> @@ -1923,11 +2295,73 @@ Example: %a - %t [%l]</property> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label">gtk-close</property> - <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <property name="response_id">-7</property> + + <child> + <widget class="GtkAlignment" id="alignment14"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox55"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image393"> + <property name="visible">True</property> + <property name="stock">gtk-close</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label91"> + <property name="visible">True</property> + <property name="label">_Close</property> + <property name="use_underline">True</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> </widget> </child> </widget> @@ -4349,11 +4783,73 @@ SOCKS5_HOSTNAME</property> <widget class="GtkButton" id="configure_plugin"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Configure</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_configure_plugin_clicked" last_modification_time="Tue, 01 Dec 2009 16:54:36 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment15"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox56"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image394"> + <property name="visible">True</property> + <property name="stock">gtk-preferences</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label92"> + <property name="visible">True</property> + <property name="label" translatable="yes">Configure</property> + <property name="use_underline">True</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> </widget> <packing> <property name="padding">0</property> @@ -4448,11 +4944,73 @@ SOCKS5_HOSTNAME</property> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <property name="response_id">-6</property> + + <child> + <widget class="GtkAlignment" id="alignment17"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox58"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image396"> + <property name="visible">True</property> + <property name="stock">gtk-cancel</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label94"> + <property name="visible">True</property> + <property name="label">_Cancel</property> + <property name="use_underline">True</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> </widget> </child> @@ -4461,11 +5019,73 @@ SOCKS5_HOSTNAME</property> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label">gtk-ok</property> - <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <property name="response_id">-5</property> + + <child> + <widget class="GtkAlignment" id="alignment16"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox57"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image395"> + <property name="visible">True</property> + <property name="stock">gtk-ok</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label93"> + <property name="visible">True</property> + <property name="label">_OK</property> + <property name="use_underline">True</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> </widget> </child> </widget> @@ -4585,11 +5205,73 @@ SOCKS5_HOSTNAME</property> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <property name="response_id">-6</property> + + <child> + <widget class="GtkAlignment" id="alignment18"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox59"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image397"> + <property name="visible">True</property> + <property name="stock">gtk-cancel</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label95"> + <property name="visible">True</property> + <property name="label">_Cancel</property> + <property name="use_underline">True</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> </widget> </child> @@ -4598,11 +5280,73 @@ SOCKS5_HOSTNAME</property> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label">gtk-ok</property> - <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <property name="response_id">-5</property> + + <child> + <widget class="GtkAlignment" id="alignment19"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox60"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image398"> + <property name="visible">True</property> + <property name="stock">gtk-ok</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label96"> + <property name="visible">True</property> + <property name="label">_OK</property> + <property name="use_underline">True</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> </widget> </child> </widget> @@ -4676,4 +5420,295 @@ SOCKS5_HOSTNAME</property> </child> </widget> +<widget class="GtkDialog" id="groupbydlg"> + <property name="visible">True</property> + <property name="title" translatable="yes">Group By</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</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_DIALOG</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + <property name="has_separator">True</property> + + <child internal-child="vbox"> + <widget class="GtkVBox" id="dialog-vbox5"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child internal-child="action_area"> + <widget class="GtkHButtonBox" id="dialog-action_area4"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> + + <child> + <widget class="GtkButton" id="cancelbutton4"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="response_id">-6</property> + + <child> + <widget class="GtkAlignment" id="alignment7"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox48"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image386"> + <property name="visible">True</property> + <property name="stock">gtk-cancel</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label84"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Cancel</property> + <property name="use_underline">True</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkButton" id="okbutton4"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="response_id">-5</property> + + <child> + <widget class="GtkAlignment" id="alignment6"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox47"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image385"> + <property name="visible">True</property> + <property name="stock">gtk-ok</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label83"> + <property name="visible">True</property> + <property name="label" translatable="yes">_OK</property> + <property name="use_underline">True</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">GTK_PACK_END</property> + </packing> + </child> + + <child> + <widget class="GtkVBox" id="vbox25"> + <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="hbox46"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">8</property> + + <child> + <widget class="GtkLabel" id="label81"> + <property name="visible">True</property> + <property name="label" translatable="yes">Format:</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="format"> + <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">True</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="GtkLabel" id="label82"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Format conversions (start with %): + [a]rtist, [t]itle, al[b]um, [B]and, + track[n]umber, [N]totaltracks, + [l]ength, [y]ear, [g]enre, [c]omment, + copy[r]ight, [f]ilename, [T]ags +Example: %a - %t [%l]</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">True</property> + <property name="xalign">0.10000000149</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> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> +</widget> + </glade-interface> diff --git a/plugins/gtkui/interface.c b/plugins/gtkui/interface.c index 7cbe60f4..928741f4 100644 --- a/plugins/gtkui/interface.c +++ b/plugins/gtkui/interface.c @@ -1016,6 +1016,10 @@ create_addprogress (void) GtkWidget *hbox7; GtkWidget *label22; GtkWidget *button1; + GtkWidget *alignment10; + GtkWidget *hbox51; + GtkWidget *image389; + GtkWidget *label87; addprogress = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_container_set_border_width (GTK_CONTAINER (addprogress), 12); @@ -1045,12 +1049,28 @@ create_addprogress (void) gtk_widget_show (label22); gtk_box_pack_start (GTK_BOX (hbox7), label22, TRUE, FALSE, 0); - button1 = gtk_button_new_with_mnemonic ("Abort"); + button1 = gtk_button_new (); gtk_widget_show (button1); gtk_box_pack_start (GTK_BOX (hbox7), button1, FALSE, FALSE, 0); gtk_widget_set_size_request (button1, 83, -1); GTK_WIDGET_UNSET_FLAGS (button1, GTK_CAN_FOCUS); + alignment10 = gtk_alignment_new (0.5, 0.5, 0, 0); + gtk_widget_show (alignment10); + gtk_container_add (GTK_CONTAINER (button1), alignment10); + + hbox51 = gtk_hbox_new (FALSE, 2); + gtk_widget_show (hbox51); + gtk_container_add (GTK_CONTAINER (alignment10), hbox51); + + image389 = gtk_image_new_from_stock ("gtk-stop", GTK_ICON_SIZE_BUTTON); + gtk_widget_show (image389); + gtk_box_pack_start (GTK_BOX (hbox51), image389, FALSE, FALSE, 0); + + label87 = gtk_label_new_with_mnemonic ("_Abort"); + gtk_widget_show (label87); + gtk_box_pack_start (GTK_BOX (hbox51), label87, FALSE, FALSE, 0); + g_signal_connect ((gpointer) addprogress, "delete_event", G_CALLBACK (on_addprogress_delete_event), NULL); @@ -1065,6 +1085,10 @@ create_addprogress (void) GLADE_HOOKUP_OBJECT (addprogress, hbox7, "hbox7"); GLADE_HOOKUP_OBJECT (addprogress, label22, "label22"); GLADE_HOOKUP_OBJECT (addprogress, button1, "button1"); + GLADE_HOOKUP_OBJECT (addprogress, alignment10, "alignment10"); + GLADE_HOOKUP_OBJECT (addprogress, hbox51, "hbox51"); + GLADE_HOOKUP_OBJECT (addprogress, image389, "image389"); + GLADE_HOOKUP_OBJECT (addprogress, label87, "label87"); return addprogress; } @@ -1120,13 +1144,25 @@ create_trackproperties (void) GtkWidget *metalist; GtkWidget *hbuttonbox1; GtkWidget *write_tags; + GtkWidget *alignment11; + GtkWidget *hbox52; + GtkWidget *image390; + GtkWidget *label88; GtkWidget *closebtn; + GtkWidget *alignment12; + GtkWidget *hbox53; + GtkWidget *image391; + GtkWidget *label89; GtkWidget *label64; GtkWidget *vbox24; GtkWidget *scrolledwindow6; GtkWidget *properties; GtkWidget *hbuttonbox2; GtkWidget *button2; + GtkWidget *alignment13; + GtkWidget *hbox54; + GtkWidget *image392; + GtkWidget *label90; GtkWidget *label80; trackproperties = gtk_window_new (GTK_WINDOW_TOPLEVEL); @@ -1161,16 +1197,48 @@ create_trackproperties (void) gtk_box_pack_start (GTK_BOX (vbox16), hbuttonbox1, FALSE, FALSE, 0); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_END); - write_tags = gtk_button_new_with_mnemonic ("Write"); + write_tags = gtk_button_new (); gtk_widget_show (write_tags); gtk_container_add (GTK_CONTAINER (hbuttonbox1), write_tags); GTK_WIDGET_SET_FLAGS (write_tags, GTK_CAN_DEFAULT); - closebtn = gtk_button_new_with_mnemonic ("Close"); + alignment11 = gtk_alignment_new (0.5, 0.5, 0, 0); + gtk_widget_show (alignment11); + gtk_container_add (GTK_CONTAINER (write_tags), alignment11); + + hbox52 = gtk_hbox_new (FALSE, 2); + gtk_widget_show (hbox52); + gtk_container_add (GTK_CONTAINER (alignment11), hbox52); + + image390 = gtk_image_new_from_stock ("gtk-apply", GTK_ICON_SIZE_BUTTON); + gtk_widget_show (image390); + gtk_box_pack_start (GTK_BOX (hbox52), image390, FALSE, FALSE, 0); + + label88 = gtk_label_new_with_mnemonic ("_Apply"); + gtk_widget_show (label88); + gtk_box_pack_start (GTK_BOX (hbox52), label88, FALSE, FALSE, 0); + + closebtn = gtk_button_new (); gtk_widget_show (closebtn); gtk_container_add (GTK_CONTAINER (hbuttonbox1), closebtn); GTK_WIDGET_SET_FLAGS (closebtn, GTK_CAN_DEFAULT); + alignment12 = gtk_alignment_new (0.5, 0.5, 0, 0); + gtk_widget_show (alignment12); + gtk_container_add (GTK_CONTAINER (closebtn), alignment12); + + hbox53 = gtk_hbox_new (FALSE, 2); + gtk_widget_show (hbox53); + gtk_container_add (GTK_CONTAINER (alignment12), hbox53); + + image391 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_BUTTON); + gtk_widget_show (image391); + gtk_box_pack_start (GTK_BOX (hbox53), image391, FALSE, FALSE, 0); + + label89 = gtk_label_new_with_mnemonic ("_Close"); + gtk_widget_show (label89); + gtk_box_pack_start (GTK_BOX (hbox53), label89, FALSE, FALSE, 0); + 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); @@ -1196,11 +1264,27 @@ create_trackproperties (void) gtk_box_pack_start (GTK_BOX (vbox24), hbuttonbox2, FALSE, FALSE, 0); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox2), GTK_BUTTONBOX_END); - button2 = gtk_button_new_with_mnemonic ("Close"); + button2 = gtk_button_new (); gtk_widget_show (button2); gtk_container_add (GTK_CONTAINER (hbuttonbox2), button2); GTK_WIDGET_SET_FLAGS (button2, GTK_CAN_DEFAULT); + alignment13 = gtk_alignment_new (0.5, 0.5, 0, 0); + gtk_widget_show (alignment13); + gtk_container_add (GTK_CONTAINER (button2), alignment13); + + hbox54 = gtk_hbox_new (FALSE, 2); + gtk_widget_show (hbox54); + gtk_container_add (GTK_CONTAINER (alignment13), hbox54); + + image392 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_BUTTON); + gtk_widget_show (image392); + gtk_box_pack_start (GTK_BOX (hbox54), image392, FALSE, FALSE, 0); + + label90 = gtk_label_new_with_mnemonic ("_Close"); + gtk_widget_show (label90); + gtk_box_pack_start (GTK_BOX (hbox54), label90, FALSE, FALSE, 0); + label80 = gtk_label_new ("Properties"); gtk_widget_show (label80); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook3), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook3), 1), label80); @@ -1229,13 +1313,25 @@ create_trackproperties (void) GLADE_HOOKUP_OBJECT (trackproperties, metalist, "metalist"); GLADE_HOOKUP_OBJECT (trackproperties, hbuttonbox1, "hbuttonbox1"); GLADE_HOOKUP_OBJECT (trackproperties, write_tags, "write_tags"); + GLADE_HOOKUP_OBJECT (trackproperties, alignment11, "alignment11"); + GLADE_HOOKUP_OBJECT (trackproperties, hbox52, "hbox52"); + GLADE_HOOKUP_OBJECT (trackproperties, image390, "image390"); + GLADE_HOOKUP_OBJECT (trackproperties, label88, "label88"); GLADE_HOOKUP_OBJECT (trackproperties, closebtn, "closebtn"); + GLADE_HOOKUP_OBJECT (trackproperties, alignment12, "alignment12"); + GLADE_HOOKUP_OBJECT (trackproperties, hbox53, "hbox53"); + GLADE_HOOKUP_OBJECT (trackproperties, image391, "image391"); + GLADE_HOOKUP_OBJECT (trackproperties, label89, "label89"); GLADE_HOOKUP_OBJECT (trackproperties, label64, "label64"); GLADE_HOOKUP_OBJECT (trackproperties, vbox24, "vbox24"); GLADE_HOOKUP_OBJECT (trackproperties, scrolledwindow6, "scrolledwindow6"); GLADE_HOOKUP_OBJECT (trackproperties, properties, "properties"); GLADE_HOOKUP_OBJECT (trackproperties, hbuttonbox2, "hbuttonbox2"); GLADE_HOOKUP_OBJECT (trackproperties, button2, "button2"); + GLADE_HOOKUP_OBJECT (trackproperties, alignment13, "alignment13"); + GLADE_HOOKUP_OBJECT (trackproperties, hbox54, "hbox54"); + GLADE_HOOKUP_OBJECT (trackproperties, image392, "image392"); + GLADE_HOOKUP_OBJECT (trackproperties, label90, "label90"); GLADE_HOOKUP_OBJECT (trackproperties, label80, "label80"); return trackproperties; @@ -1262,7 +1358,15 @@ create_editcolumndlg (void) GtkWidget *label25; GtkWidget *dialog_action_area1; GtkWidget *cancelbutton1; + GtkWidget *alignment9; + GtkWidget *hbox50; + GtkWidget *image388; + GtkWidget *label86; GtkWidget *okbutton1; + GtkWidget *alignment8; + GtkWidget *hbox49; + GtkWidget *image387; + GtkWidget *label85; editcolumndlg = gtk_dialog_new (); gtk_container_set_border_width (GTK_CONTAINER (editcolumndlg), 12); @@ -1359,16 +1463,48 @@ create_editcolumndlg (void) gtk_widget_show (dialog_action_area1); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END); - cancelbutton1 = gtk_button_new_with_mnemonic ("_Cancel"); + cancelbutton1 = gtk_button_new (); gtk_widget_show (cancelbutton1); gtk_dialog_add_action_widget (GTK_DIALOG (editcolumndlg), cancelbutton1, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (cancelbutton1, GTK_CAN_DEFAULT); - okbutton1 = gtk_button_new_with_mnemonic ("_OK"); + alignment9 = gtk_alignment_new (0.5, 0.5, 0, 0); + gtk_widget_show (alignment9); + gtk_container_add (GTK_CONTAINER (cancelbutton1), alignment9); + + hbox50 = gtk_hbox_new (FALSE, 2); + gtk_widget_show (hbox50); + gtk_container_add (GTK_CONTAINER (alignment9), hbox50); + + image388 = gtk_image_new_from_stock ("gtk-cancel", GTK_ICON_SIZE_BUTTON); + gtk_widget_show (image388); + gtk_box_pack_start (GTK_BOX (hbox50), image388, FALSE, FALSE, 0); + + label86 = gtk_label_new_with_mnemonic ("_Cancel"); + gtk_widget_show (label86); + gtk_box_pack_start (GTK_BOX (hbox50), label86, FALSE, FALSE, 0); + + okbutton1 = gtk_button_new (); gtk_widget_show (okbutton1); gtk_dialog_add_action_widget (GTK_DIALOG (editcolumndlg), okbutton1, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT); + alignment8 = gtk_alignment_new (0.5, 0.5, 0, 0); + gtk_widget_show (alignment8); + gtk_container_add (GTK_CONTAINER (okbutton1), alignment8); + + hbox49 = gtk_hbox_new (FALSE, 2); + gtk_widget_show (hbox49); + gtk_container_add (GTK_CONTAINER (alignment8), hbox49); + + image387 = gtk_image_new_from_stock ("gtk-ok", GTK_ICON_SIZE_BUTTON); + gtk_widget_show (image387); + gtk_box_pack_start (GTK_BOX (hbox49), image387, FALSE, FALSE, 0); + + label85 = gtk_label_new_with_mnemonic ("_OK"); + gtk_widget_show (label85); + gtk_box_pack_start (GTK_BOX (hbox49), label85, FALSE, FALSE, 0); + g_signal_connect ((gpointer) id, "changed", G_CALLBACK (on_column_id_changed), NULL); @@ -1392,7 +1528,15 @@ create_editcolumndlg (void) GLADE_HOOKUP_OBJECT (editcolumndlg, label25, "label25"); GLADE_HOOKUP_OBJECT_NO_REF (editcolumndlg, dialog_action_area1, "dialog_action_area1"); GLADE_HOOKUP_OBJECT (editcolumndlg, cancelbutton1, "cancelbutton1"); + GLADE_HOOKUP_OBJECT (editcolumndlg, alignment9, "alignment9"); + GLADE_HOOKUP_OBJECT (editcolumndlg, hbox50, "hbox50"); + GLADE_HOOKUP_OBJECT (editcolumndlg, image388, "image388"); + GLADE_HOOKUP_OBJECT (editcolumndlg, label86, "label86"); GLADE_HOOKUP_OBJECT (editcolumndlg, okbutton1, "okbutton1"); + GLADE_HOOKUP_OBJECT (editcolumndlg, alignment8, "alignment8"); + GLADE_HOOKUP_OBJECT (editcolumndlg, hbox49, "hbox49"); + GLADE_HOOKUP_OBJECT (editcolumndlg, image387, "image387"); + GLADE_HOOKUP_OBJECT (editcolumndlg, label85, "label85"); return editcolumndlg; } @@ -1533,9 +1677,17 @@ create_prefwin (void) GtkWidget *pref_plugin_website; GtkWidget *hbox20; GtkWidget *configure_plugin; + GtkWidget *alignment15; + GtkWidget *hbox56; + GtkWidget *image394; + GtkWidget *label92; GtkWidget *label3; GtkWidget *dialog_action_area2; GtkWidget *closebutton1; + GtkWidget *alignment14; + GtkWidget *hbox55; + GtkWidget *image393; + GtkWidget *label91; prefwin = gtk_dialog_new (); gtk_widget_set_size_request (prefwin, 630, 400); @@ -2197,10 +2349,26 @@ create_prefwin (void) gtk_widget_show (hbox20); gtk_box_pack_start (GTK_BOX (vbox12), hbox20, FALSE, FALSE, 0); - configure_plugin = gtk_button_new_with_mnemonic ("Configure"); + configure_plugin = gtk_button_new (); gtk_widget_show (configure_plugin); gtk_box_pack_start (GTK_BOX (hbox20), configure_plugin, TRUE, FALSE, 0); + alignment15 = gtk_alignment_new (0.5, 0.5, 0, 0); + gtk_widget_show (alignment15); + gtk_container_add (GTK_CONTAINER (configure_plugin), alignment15); + + hbox56 = gtk_hbox_new (FALSE, 2); + gtk_widget_show (hbox56); + gtk_container_add (GTK_CONTAINER (alignment15), hbox56); + + image394 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_BUTTON); + gtk_widget_show (image394); + gtk_box_pack_start (GTK_BOX (hbox56), image394, FALSE, FALSE, 0); + + label92 = gtk_label_new_with_mnemonic ("Configure"); + gtk_widget_show (label92); + gtk_box_pack_start (GTK_BOX (hbox56), label92, FALSE, FALSE, 0); + label3 = gtk_label_new ("Plugins"); gtk_widget_show (label3); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 5), label3); @@ -2210,11 +2378,27 @@ create_prefwin (void) gtk_widget_show (dialog_action_area2); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area2), GTK_BUTTONBOX_END); - closebutton1 = gtk_button_new_from_stock ("gtk-close"); + closebutton1 = gtk_button_new (); gtk_widget_show (closebutton1); gtk_dialog_add_action_widget (GTK_DIALOG (prefwin), closebutton1, GTK_RESPONSE_CLOSE); GTK_WIDGET_SET_FLAGS (closebutton1, GTK_CAN_DEFAULT); + alignment14 = gtk_alignment_new (0.5, 0.5, 0, 0); + gtk_widget_show (alignment14); + gtk_container_add (GTK_CONTAINER (closebutton1), alignment14); + + hbox55 = gtk_hbox_new (FALSE, 2); + gtk_widget_show (hbox55); + gtk_container_add (GTK_CONTAINER (alignment14), hbox55); + + image393 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_BUTTON); + gtk_widget_show (image393); + gtk_box_pack_start (GTK_BOX (hbox55), image393, FALSE, FALSE, 0); + + label91 = gtk_label_new_with_mnemonic ("_Close"); + gtk_widget_show (label91); + gtk_box_pack_start (GTK_BOX (hbox55), label91, FALSE, FALSE, 0); + g_signal_connect ((gpointer) pref_dynsamplerate, "clicked", G_CALLBACK (on_pref_dynsamplerate_clicked), NULL); @@ -2479,9 +2663,17 @@ create_prefwin (void) GLADE_HOOKUP_OBJECT (prefwin, pref_plugin_website, "pref_plugin_website"); GLADE_HOOKUP_OBJECT (prefwin, hbox20, "hbox20"); GLADE_HOOKUP_OBJECT (prefwin, configure_plugin, "configure_plugin"); + GLADE_HOOKUP_OBJECT (prefwin, alignment15, "alignment15"); + GLADE_HOOKUP_OBJECT (prefwin, hbox56, "hbox56"); + GLADE_HOOKUP_OBJECT (prefwin, image394, "image394"); + GLADE_HOOKUP_OBJECT (prefwin, label92, "label92"); GLADE_HOOKUP_OBJECT (prefwin, label3, "label3"); GLADE_HOOKUP_OBJECT_NO_REF (prefwin, dialog_action_area2, "dialog_action_area2"); GLADE_HOOKUP_OBJECT (prefwin, closebutton1, "closebutton1"); + GLADE_HOOKUP_OBJECT (prefwin, alignment14, "alignment14"); + GLADE_HOOKUP_OBJECT (prefwin, hbox55, "hbox55"); + GLADE_HOOKUP_OBJECT (prefwin, image393, "image393"); + GLADE_HOOKUP_OBJECT (prefwin, label91, "label91"); return prefwin; } @@ -2497,7 +2689,15 @@ create_editplaylistdlg (void) GtkWidget *title; GtkWidget *dialog_action_area3; GtkWidget *cancelbutton2; + GtkWidget *alignment17; + GtkWidget *hbox58; + GtkWidget *image396; + GtkWidget *label94; GtkWidget *okbutton2; + GtkWidget *alignment16; + GtkWidget *hbox57; + GtkWidget *image395; + GtkWidget *label93; editplaylistdlg = gtk_dialog_new (); gtk_container_set_border_width (GTK_CONTAINER (editplaylistdlg), 8); @@ -2531,16 +2731,48 @@ create_editplaylistdlg (void) gtk_widget_show (dialog_action_area3); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area3), GTK_BUTTONBOX_END); - cancelbutton2 = gtk_button_new_from_stock ("gtk-cancel"); + cancelbutton2 = gtk_button_new (); gtk_widget_show (cancelbutton2); gtk_dialog_add_action_widget (GTK_DIALOG (editplaylistdlg), cancelbutton2, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (cancelbutton2, GTK_CAN_DEFAULT); - okbutton2 = gtk_button_new_from_stock ("gtk-ok"); + alignment17 = gtk_alignment_new (0.5, 0.5, 0, 0); + gtk_widget_show (alignment17); + gtk_container_add (GTK_CONTAINER (cancelbutton2), alignment17); + + hbox58 = gtk_hbox_new (FALSE, 2); + gtk_widget_show (hbox58); + gtk_container_add (GTK_CONTAINER (alignment17), hbox58); + + image396 = gtk_image_new_from_stock ("gtk-cancel", GTK_ICON_SIZE_BUTTON); + gtk_widget_show (image396); + gtk_box_pack_start (GTK_BOX (hbox58), image396, FALSE, FALSE, 0); + + label94 = gtk_label_new_with_mnemonic ("_Cancel"); + gtk_widget_show (label94); + gtk_box_pack_start (GTK_BOX (hbox58), label94, FALSE, FALSE, 0); + + okbutton2 = gtk_button_new (); gtk_widget_show (okbutton2); gtk_dialog_add_action_widget (GTK_DIALOG (editplaylistdlg), okbutton2, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (okbutton2, GTK_CAN_DEFAULT); + alignment16 = gtk_alignment_new (0.5, 0.5, 0, 0); + gtk_widget_show (alignment16); + gtk_container_add (GTK_CONTAINER (okbutton2), alignment16); + + hbox57 = gtk_hbox_new (FALSE, 2); + gtk_widget_show (hbox57); + gtk_container_add (GTK_CONTAINER (alignment16), hbox57); + + image395 = gtk_image_new_from_stock ("gtk-ok", GTK_ICON_SIZE_BUTTON); + gtk_widget_show (image395); + gtk_box_pack_start (GTK_BOX (hbox57), image395, FALSE, FALSE, 0); + + label93 = gtk_label_new_with_mnemonic ("_OK"); + gtk_widget_show (label93); + gtk_box_pack_start (GTK_BOX (hbox57), label93, FALSE, FALSE, 0); + /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (editplaylistdlg, editplaylistdlg, "editplaylistdlg"); GLADE_HOOKUP_OBJECT_NO_REF (editplaylistdlg, dialog_vbox3, "dialog_vbox3"); @@ -2550,7 +2782,15 @@ create_editplaylistdlg (void) GLADE_HOOKUP_OBJECT (editplaylistdlg, title, "title"); GLADE_HOOKUP_OBJECT_NO_REF (editplaylistdlg, dialog_action_area3, "dialog_action_area3"); GLADE_HOOKUP_OBJECT (editplaylistdlg, cancelbutton2, "cancelbutton2"); + GLADE_HOOKUP_OBJECT (editplaylistdlg, alignment17, "alignment17"); + GLADE_HOOKUP_OBJECT (editplaylistdlg, hbox58, "hbox58"); + GLADE_HOOKUP_OBJECT (editplaylistdlg, image396, "image396"); + GLADE_HOOKUP_OBJECT (editplaylistdlg, label94, "label94"); GLADE_HOOKUP_OBJECT (editplaylistdlg, okbutton2, "okbutton2"); + GLADE_HOOKUP_OBJECT (editplaylistdlg, alignment16, "alignment16"); + GLADE_HOOKUP_OBJECT (editplaylistdlg, hbox57, "hbox57"); + GLADE_HOOKUP_OBJECT (editplaylistdlg, image395, "image395"); + GLADE_HOOKUP_OBJECT (editplaylistdlg, label93, "label93"); return editplaylistdlg; } @@ -2565,7 +2805,15 @@ create_addlocationdlg (void) GtkWidget *addlocation_entry; GtkWidget *addlocation_actionarea; GtkWidget *cancelbutton3; + GtkWidget *alignment18; + GtkWidget *hbox59; + GtkWidget *image397; + GtkWidget *label95; GtkWidget *okbutton3; + GtkWidget *alignment19; + GtkWidget *hbox60; + GtkWidget *image398; + GtkWidget *label96; addlocationdlg = gtk_dialog_new (); gtk_container_set_border_width (GTK_CONTAINER (addlocationdlg), 8); @@ -2595,16 +2843,48 @@ create_addlocationdlg (void) gtk_widget_show (addlocation_actionarea); gtk_button_box_set_layout (GTK_BUTTON_BOX (addlocation_actionarea), GTK_BUTTONBOX_END); - cancelbutton3 = gtk_button_new_from_stock ("gtk-cancel"); + cancelbutton3 = gtk_button_new (); gtk_widget_show (cancelbutton3); gtk_dialog_add_action_widget (GTK_DIALOG (addlocationdlg), cancelbutton3, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (cancelbutton3, GTK_CAN_DEFAULT); - okbutton3 = gtk_button_new_from_stock ("gtk-ok"); + alignment18 = gtk_alignment_new (0.5, 0.5, 0, 0); + gtk_widget_show (alignment18); + gtk_container_add (GTK_CONTAINER (cancelbutton3), alignment18); + + hbox59 = gtk_hbox_new (FALSE, 2); + gtk_widget_show (hbox59); + gtk_container_add (GTK_CONTAINER (alignment18), hbox59); + + image397 = gtk_image_new_from_stock ("gtk-cancel", GTK_ICON_SIZE_BUTTON); + gtk_widget_show (image397); + gtk_box_pack_start (GTK_BOX (hbox59), image397, FALSE, FALSE, 0); + + label95 = gtk_label_new_with_mnemonic ("_Cancel"); + gtk_widget_show (label95); + gtk_box_pack_start (GTK_BOX (hbox59), label95, FALSE, FALSE, 0); + + okbutton3 = gtk_button_new (); gtk_widget_show (okbutton3); gtk_dialog_add_action_widget (GTK_DIALOG (addlocationdlg), okbutton3, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (okbutton3, GTK_CAN_DEFAULT); + alignment19 = gtk_alignment_new (0.5, 0.5, 0, 0); + gtk_widget_show (alignment19); + gtk_container_add (GTK_CONTAINER (okbutton3), alignment19); + + hbox60 = gtk_hbox_new (FALSE, 2); + gtk_widget_show (hbox60); + gtk_container_add (GTK_CONTAINER (alignment19), hbox60); + + image398 = gtk_image_new_from_stock ("gtk-ok", GTK_ICON_SIZE_BUTTON); + gtk_widget_show (image398); + gtk_box_pack_start (GTK_BOX (hbox60), image398, FALSE, FALSE, 0); + + label96 = gtk_label_new_with_mnemonic ("_OK"); + gtk_widget_show (label96); + gtk_box_pack_start (GTK_BOX (hbox60), label96, FALSE, FALSE, 0); + /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (addlocationdlg, addlocationdlg, "addlocationdlg"); GLADE_HOOKUP_OBJECT_NO_REF (addlocationdlg, dialog_vbox4, "dialog_vbox4"); @@ -2613,8 +2893,141 @@ create_addlocationdlg (void) GLADE_HOOKUP_OBJECT (addlocationdlg, addlocation_entry, "addlocation_entry"); GLADE_HOOKUP_OBJECT_NO_REF (addlocationdlg, addlocation_actionarea, "addlocation_actionarea"); GLADE_HOOKUP_OBJECT (addlocationdlg, cancelbutton3, "cancelbutton3"); + GLADE_HOOKUP_OBJECT (addlocationdlg, alignment18, "alignment18"); + GLADE_HOOKUP_OBJECT (addlocationdlg, hbox59, "hbox59"); + GLADE_HOOKUP_OBJECT (addlocationdlg, image397, "image397"); + GLADE_HOOKUP_OBJECT (addlocationdlg, label95, "label95"); GLADE_HOOKUP_OBJECT (addlocationdlg, okbutton3, "okbutton3"); + GLADE_HOOKUP_OBJECT (addlocationdlg, alignment19, "alignment19"); + GLADE_HOOKUP_OBJECT (addlocationdlg, hbox60, "hbox60"); + GLADE_HOOKUP_OBJECT (addlocationdlg, image398, "image398"); + GLADE_HOOKUP_OBJECT (addlocationdlg, label96, "label96"); return addlocationdlg; } +GtkWidget* +create_groupbydlg (void) +{ + GtkWidget *groupbydlg; + GtkWidget *dialog_vbox5; + GtkWidget *vbox25; + GtkWidget *hbox46; + GtkWidget *label81; + GtkWidget *format; + GtkWidget *label82; + GtkWidget *dialog_action_area4; + GtkWidget *cancelbutton4; + GtkWidget *alignment7; + GtkWidget *hbox48; + GtkWidget *image386; + GtkWidget *label84; + GtkWidget *okbutton4; + GtkWidget *alignment6; + GtkWidget *hbox47; + GtkWidget *image385; + GtkWidget *label83; + + groupbydlg = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (groupbydlg), "Group By"); + gtk_window_set_type_hint (GTK_WINDOW (groupbydlg), GDK_WINDOW_TYPE_HINT_DIALOG); + + dialog_vbox5 = GTK_DIALOG (groupbydlg)->vbox; + gtk_widget_show (dialog_vbox5); + + vbox25 = gtk_vbox_new (FALSE, 8); + gtk_widget_show (vbox25); + gtk_box_pack_start (GTK_BOX (dialog_vbox5), vbox25, TRUE, TRUE, 0); + gtk_container_set_border_width (GTK_CONTAINER (vbox25), 12); + + hbox46 = gtk_hbox_new (FALSE, 8); + gtk_widget_show (hbox46); + gtk_box_pack_start (GTK_BOX (vbox25), hbox46, FALSE, FALSE, 0); + + label81 = gtk_label_new ("Format:"); + gtk_widget_show (label81); + gtk_box_pack_start (GTK_BOX (hbox46), label81, FALSE, FALSE, 0); + + format = gtk_entry_new (); + gtk_widget_show (format); + gtk_box_pack_start (GTK_BOX (hbox46), format, TRUE, TRUE, 0); + gtk_entry_set_invisible_char (GTK_ENTRY (format), 9679); + gtk_entry_set_activates_default (GTK_ENTRY (format), TRUE); + + label82 = gtk_label_new ("Format conversions (start with %):\n [a]rtist, [t]itle, al[b]um, [B]and,\n track[n]umber, [N]totaltracks,\n [l]ength, [y]ear, [g]enre, [c]omment,\n copy[r]ight, [f]ilename, [T]ags\nExample: %a - %t [%l]"); + gtk_widget_show (label82); + gtk_box_pack_start (GTK_BOX (vbox25), label82, FALSE, FALSE, 0); + GTK_WIDGET_SET_FLAGS (label82, GTK_CAN_FOCUS); + gtk_label_set_use_markup (GTK_LABEL (label82), TRUE); + gtk_label_set_selectable (GTK_LABEL (label82), TRUE); + gtk_misc_set_alignment (GTK_MISC (label82), 0.1, 0.5); + + dialog_action_area4 = GTK_DIALOG (groupbydlg)->action_area; + gtk_widget_show (dialog_action_area4); + gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area4), GTK_BUTTONBOX_END); + + cancelbutton4 = gtk_button_new (); + gtk_widget_show (cancelbutton4); + gtk_dialog_add_action_widget (GTK_DIALOG (groupbydlg), cancelbutton4, GTK_RESPONSE_CANCEL); + GTK_WIDGET_SET_FLAGS (cancelbutton4, GTK_CAN_DEFAULT); + + alignment7 = gtk_alignment_new (0.5, 0.5, 0, 0); + gtk_widget_show (alignment7); + gtk_container_add (GTK_CONTAINER (cancelbutton4), alignment7); + + hbox48 = gtk_hbox_new (FALSE, 2); + gtk_widget_show (hbox48); + gtk_container_add (GTK_CONTAINER (alignment7), hbox48); + + image386 = gtk_image_new_from_stock ("gtk-cancel", GTK_ICON_SIZE_BUTTON); + gtk_widget_show (image386); + gtk_box_pack_start (GTK_BOX (hbox48), image386, FALSE, FALSE, 0); + + label84 = gtk_label_new_with_mnemonic ("_Cancel"); + gtk_widget_show (label84); + gtk_box_pack_start (GTK_BOX (hbox48), label84, FALSE, FALSE, 0); + + okbutton4 = gtk_button_new (); + gtk_widget_show (okbutton4); + gtk_dialog_add_action_widget (GTK_DIALOG (groupbydlg), okbutton4, GTK_RESPONSE_OK); + GTK_WIDGET_SET_FLAGS (okbutton4, GTK_CAN_DEFAULT); + + alignment6 = gtk_alignment_new (0.5, 0.5, 0, 0); + gtk_widget_show (alignment6); + gtk_container_add (GTK_CONTAINER (okbutton4), alignment6); + + hbox47 = gtk_hbox_new (FALSE, 2); + gtk_widget_show (hbox47); + gtk_container_add (GTK_CONTAINER (alignment6), hbox47); + + image385 = gtk_image_new_from_stock ("gtk-ok", GTK_ICON_SIZE_BUTTON); + gtk_widget_show (image385); + gtk_box_pack_start (GTK_BOX (hbox47), image385, FALSE, FALSE, 0); + + label83 = gtk_label_new_with_mnemonic ("_OK"); + gtk_widget_show (label83); + gtk_box_pack_start (GTK_BOX (hbox47), label83, FALSE, FALSE, 0); + + /* Store pointers to all widgets, for use by lookup_widget(). */ + GLADE_HOOKUP_OBJECT_NO_REF (groupbydlg, groupbydlg, "groupbydlg"); + GLADE_HOOKUP_OBJECT_NO_REF (groupbydlg, dialog_vbox5, "dialog_vbox5"); + GLADE_HOOKUP_OBJECT (groupbydlg, vbox25, "vbox25"); + GLADE_HOOKUP_OBJECT (groupbydlg, hbox46, "hbox46"); + GLADE_HOOKUP_OBJECT (groupbydlg, label81, "label81"); + GLADE_HOOKUP_OBJECT (groupbydlg, format, "format"); + GLADE_HOOKUP_OBJECT (groupbydlg, label82, "label82"); + GLADE_HOOKUP_OBJECT_NO_REF (groupbydlg, dialog_action_area4, "dialog_action_area4"); + GLADE_HOOKUP_OBJECT (groupbydlg, cancelbutton4, "cancelbutton4"); + GLADE_HOOKUP_OBJECT (groupbydlg, alignment7, "alignment7"); + GLADE_HOOKUP_OBJECT (groupbydlg, hbox48, "hbox48"); + GLADE_HOOKUP_OBJECT (groupbydlg, image386, "image386"); + GLADE_HOOKUP_OBJECT (groupbydlg, label84, "label84"); + GLADE_HOOKUP_OBJECT (groupbydlg, okbutton4, "okbutton4"); + GLADE_HOOKUP_OBJECT (groupbydlg, alignment6, "alignment6"); + GLADE_HOOKUP_OBJECT (groupbydlg, hbox47, "hbox47"); + GLADE_HOOKUP_OBJECT (groupbydlg, image385, "image385"); + GLADE_HOOKUP_OBJECT (groupbydlg, label83, "label83"); + + return groupbydlg; +} + diff --git a/plugins/gtkui/interface.h b/plugins/gtkui/interface.h index 0e08c966..5c4b5923 100644 --- a/plugins/gtkui/interface.h +++ b/plugins/gtkui/interface.h @@ -12,3 +12,4 @@ GtkWidget* create_editcolumndlg (void); GtkWidget* create_prefwin (void); GtkWidget* create_editplaylistdlg (void); GtkWidget* create_addlocationdlg (void); +GtkWidget* create_groupbydlg (void); diff --git a/plugins/gtkui/mainplaylist.c b/plugins/gtkui/mainplaylist.c index 4ff9c95f..8247106b 100644 --- a/plugins/gtkui/mainplaylist.c +++ b/plugins/gtkui/mainplaylist.c @@ -39,6 +39,7 @@ GdkPixbuf *play16_pixbuf; GdkPixbuf *pause16_pixbuf; GdkPixbuf *buffering16_pixbuf; + // HACK!! extern GtkWidget *theme_treeview; @@ -143,8 +144,6 @@ void main_selection_changed (DdbListviewIter it, int idx) { ddb_listview_draw_row (search, search_get_idx ((DB_playItem_t *)it), it); } -const char *group_by_str = ""; - void main_draw_group_title (DdbListview *listview, GdkDrawable *drawable, DdbListviewIter it, int x, int y, int width, int height) { if (group_by_str && group_by_str[0]) { char str[1024]; @@ -314,7 +313,8 @@ main_playlist_init (GtkWidget *widget) { g_object_set_property (G_OBJECT (widget), "has-tooltip", &value); g_signal_connect (G_OBJECT (widget), "query-tooltip", G_CALLBACK (playlist_tooltip_handler), NULL); } - group_by_str = deadbeef->conf_get_str ("playlist.group_by", ""); + strncpy (group_by_str, deadbeef->conf_get_str ("playlist.group_by", ""), sizeof (group_by_str)); + group_by_str[sizeof (group_by_str)-1] = 0; } void diff --git a/plugins/gtkui/plcommon.c b/plugins/gtkui/plcommon.c index aa43425d..86fe1ad1 100644 --- a/plugins/gtkui/plcommon.c +++ b/plugins/gtkui/plcommon.c @@ -33,6 +33,8 @@ //#define trace(...) { fprintf(stderr, __VA_ARGS__); } #define trace(fmt,...) +char group_by_str[MAX_GROUP_BY_STR]; + extern GtkWidget *theme_treeview; extern GdkPixbuf *play16_pixbuf; extern GdkPixbuf *pause16_pixbuf; @@ -421,13 +423,11 @@ list_context_menu (DdbListview *listview, DdbListviewIter it, int idx) { gtk_menu_popup (GTK_MENU (playlist_menu), NULL, NULL, NULL, listview, 0, gtk_get_current_event_time()); } -extern const char *group_by_str; - void on_group_by_none_activate (GtkMenuItem *menuitem, gpointer user_data) { - group_by_str = ""; + strcpy (group_by_str, ""); deadbeef->conf_set_str ("playlist.group_by", group_by_str); main_refresh (); } @@ -436,7 +436,7 @@ void on_group_by_artist_date_album_activate (GtkMenuItem *menuitem, gpointer user_data) { - group_by_str = "%a - [%y] %b"; + strcpy (group_by_str, "%a - [%y] %b"); deadbeef->conf_set_str ("playlist.group_by", group_by_str); main_refresh (); } @@ -445,11 +445,32 @@ void on_group_by_artist_activate (GtkMenuItem *menuitem, gpointer user_data) { - group_by_str = "%a"; + strcpy (group_by_str, "%a"); deadbeef->conf_set_str ("playlist.group_by", group_by_str); main_refresh (); } +void +on_group_by_custom_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + GtkWidget *dlg = create_groupbydlg (); + + gtk_dialog_set_default_response (GTK_DIALOG (dlg), GTK_RESPONSE_OK); +// gtk_window_set_title (GTK_WINDOW (dlg), "Group by"); + gint response = gtk_dialog_run (GTK_DIALOG (dlg)); + + if (response == GTK_RESPONSE_OK) { + GtkWidget *entry = lookup_widget (dlg, "format"); + const gchar *text = gtk_entry_get_text (GTK_ENTRY (entry)); + strncpy (group_by_str, text, sizeof (group_by_str)); + group_by_str[sizeof (group_by_str)-1] = 0; + deadbeef->conf_set_str ("playlist.group_by", group_by_str); + main_refresh (); + } + gtk_widget_destroy (dlg); +} + static DdbListview *last_playlist; static int active_column; @@ -698,7 +719,7 @@ on_remove_column_activate (GtkMenuItem *menuitem, } GtkWidget* -create_headermenu (void) +create_headermenu (int groupby) { GtkWidget *headermenu; GtkWidget *add_column; @@ -710,6 +731,7 @@ create_headermenu (void) GtkWidget *none; GtkWidget *artist_date_album; GtkWidget *artist; + GtkWidget *custom; headermenu = gtk_menu_new (); @@ -725,29 +747,51 @@ create_headermenu (void) gtk_widget_show (remove_column); gtk_container_add (GTK_CONTAINER (headermenu), remove_column); - separator = gtk_separator_menu_item_new (); - gtk_widget_show (separator); - gtk_container_add (GTK_CONTAINER (headermenu), separator); - gtk_widget_set_sensitive (separator, FALSE); + if (groupby) { + separator = gtk_separator_menu_item_new (); + gtk_widget_show (separator); + gtk_container_add (GTK_CONTAINER (headermenu), separator); + gtk_widget_set_sensitive (separator, FALSE); + + group_by = gtk_menu_item_new_with_mnemonic ("Group by"); + gtk_widget_show (group_by); + gtk_container_add (GTK_CONTAINER (headermenu), group_by); + + group_by_menu = gtk_menu_new (); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (group_by), group_by_menu); + + none = gtk_menu_item_new_with_mnemonic ("None"); + gtk_widget_show (none); + gtk_container_add (GTK_CONTAINER (group_by_menu), none); + + artist_date_album = gtk_menu_item_new_with_mnemonic ("Artist/Date/Album"); + gtk_widget_show (artist_date_album); + gtk_container_add (GTK_CONTAINER (group_by_menu), artist_date_album); + + artist = gtk_menu_item_new_with_mnemonic ("Artist"); + gtk_widget_show (artist); + gtk_container_add (GTK_CONTAINER (group_by_menu), artist); - group_by = gtk_menu_item_new_with_mnemonic ("Group by"); - gtk_widget_show (group_by); - gtk_container_add (GTK_CONTAINER (headermenu), group_by); + custom = gtk_menu_item_new_with_mnemonic ("Custom"); + gtk_widget_show (custom); + gtk_container_add (GTK_CONTAINER (group_by_menu), custom); - group_by_menu = gtk_menu_new (); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (group_by), group_by_menu); + g_signal_connect ((gpointer) none, "activate", + G_CALLBACK (on_group_by_none_activate), + NULL); - none = gtk_menu_item_new_with_mnemonic ("None"); - gtk_widget_show (none); - gtk_container_add (GTK_CONTAINER (group_by_menu), none); + g_signal_connect ((gpointer) artist_date_album, "activate", + G_CALLBACK (on_group_by_artist_date_album_activate), + NULL); - artist_date_album = gtk_menu_item_new_with_mnemonic ("Artist/Date/Album"); - gtk_widget_show (artist_date_album); - gtk_container_add (GTK_CONTAINER (group_by_menu), artist_date_album); + g_signal_connect ((gpointer) artist, "activate", + G_CALLBACK (on_group_by_artist_activate), + NULL); - artist = gtk_menu_item_new_with_mnemonic ("Artist"); - gtk_widget_show (artist); - gtk_container_add (GTK_CONTAINER (group_by_menu), artist); + g_signal_connect ((gpointer) custom, "activate", + G_CALLBACK (on_group_by_custom_activate), + NULL); + } g_signal_connect ((gpointer) add_column, "activate", G_CALLBACK (on_add_column_activate), @@ -759,24 +803,12 @@ create_headermenu (void) G_CALLBACK (on_remove_column_activate), NULL); - g_signal_connect ((gpointer) none, "activate", - G_CALLBACK (on_group_by_none_activate), - NULL); - - g_signal_connect ((gpointer) artist_date_album, "activate", - G_CALLBACK (on_group_by_artist_date_album_activate), - NULL); - - g_signal_connect ((gpointer) artist, "activate", - G_CALLBACK (on_group_by_artist_activate), - NULL); - return headermenu; } void header_context_menu (DdbListview *ps, int column) { - GtkWidget *menu = create_headermenu (); + GtkWidget *menu = create_headermenu (GTK_WIDGET (ps) == lookup_widget (mainwin, "playlist") ? 1 : 0); last_playlist = ps; active_column = column; gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, ps, 3, gtk_get_current_event_time()); diff --git a/plugins/gtkui/plcommon.h b/plugins/gtkui/plcommon.h index ee9912b9..8332cfcb 100644 --- a/plugins/gtkui/plcommon.h +++ b/plugins/gtkui/plcommon.h @@ -26,6 +26,9 @@ typedef struct { char *format; } col_info_t; +#define MAX_GROUP_BY_STR 100 +extern char group_by_str[MAX_GROUP_BY_STR]; + void write_column_config (const char *name, int idx, const char *title, int width, int align_right, int id, const char *format); |