gui: Replace "Add New ..." button with a single GtkButton

I find that I usually create playlists through either a right click
action or through a keyboard shortcut, so we don't need an extra option
hidden inside a MenuButton.  Let's remove the button and show the "Add
Library Path" option directly instead.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2016-09-27 14:06:11 -04:00
parent eb8a23f2ff
commit d7709fd5fb
3 changed files with 12 additions and 81 deletions

View File

@ -3,6 +3,7 @@
- Don't save and restore the "Last Played" tracks column width - Don't save and restore the "Last Played" tracks column width
- Save databases if they have been upgraded - Save databases if they have been upgraded
- Don't duplicate tracks in the library after a defrag - Don't duplicate tracks in the library after a defrag
- Remove "Add New ..." menubutton and replace with Add Library Path button
6.5.0-rc: 6.5.0-rc:
- Convert to CMake/CTest - Convert to CMake/CTest

View File

@ -19,7 +19,7 @@ static void __collection_add(GtkFileChooser *chooser)
g_free(filename); g_free(filename);
} }
void __collection_choose(GtkMenuItem *item, gpointer data) void __collection_choose(GtkButton *button, gpointer data)
{ {
GtkFileFilter *filter; GtkFileFilter *filter;
GtkWidget *dialog; GtkWidget *dialog;

View File

@ -25,40 +25,6 @@
<property name="icon_name">emblem-favorite</property> <property name="icon_name">emblem-favorite</property>
<property name="icon_size">1</property> <property name="icon_size">1</property>
</object> </object>
<object class="GtkImage" id="image21">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">folder-new</property>
</object>
<object class="GtkImage" id="image22">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">document-new</property>
</object>
<object class="GtkMenu" id="menu1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImageMenuItem">
<property name="label" translatable="yes">Library Path</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="image">image21</property>
<property name="use_stock">False</property>
<signal name="activate" handler="__collection_choose" swapped="no"/>
</object>
</child>
<child>
<object class="GtkImageMenuItem">
<property name="label" translatable="yes">Playlist</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="image">image22</property>
<property name="use_stock">False</property>
<signal name="activate" handler="__view_rc_add_new" swapped="no"/>
</object>
</child>
</object>
<object class="GtkImage" id="image23"> <object class="GtkImage" id="image23">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
@ -119,6 +85,11 @@
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="icon_size">6</property> <property name="icon_size">6</property>
</object> </object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">folder-new</property>
</object>
<object class="GtkTreeStore" id="o_playlist_store"> <object class="GtkTreeStore" id="o_playlist_store">
<columns> <columns>
<!-- column-name Image --> <!-- column-name Image -->
@ -826,59 +797,18 @@ audio-volume-medium</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkMenuButton"> <object class="GtkButton">
<property name="label" translatable="yes">Add Library Path</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
<property name="popup">menu1</property> <property name="image">image3</property>
<property name="direction">up</property> <signal name="clicked" handler="__collection_choose" swapped="no"/>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">list-add</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Add New ...</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkArrow">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="arrow_type">up</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">3</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
</object> </object>