Now allows to add files, remove titles and files.

This commit is contained in:
Sergio Costas 2014-07-11 23:20:23 +02:00
parent aa9bc39692
commit 1299c83991
9 changed files with 306 additions and 63 deletions

83
data/interface/wask.ui Normal file
View file

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
<requires lib="gtk+" version="3.10"/>
<object class="GtkDialog" id="dialog_ask">
<property name="width_request">320</property>
<property name="height_request">240</property>
<property name="can_focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="window_position">center</property>
<property name="icon">devede.svg</property>
<property name="type_hint">dialog</property>
<property name="skip_taskbar_hint">True</property>
<property name="deletable">False</property>
<property name="has_resize_grip">False</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button1">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button2">
<property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_ask">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_markup">True</property>
<property name="justify">center</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">button1</action-widget>
<action-widget response="1">button2</action-widget>
</action-widgets>
</object>
</interface>

View file

@ -34,8 +34,6 @@
<column type="gchararray"/>
<!-- column-name files_element -->
<column type="GObject"/>
<!-- column-name files_pos -->
<column type="gint"/>
</columns>
</object>
<object class="GtkListStore" id="liststore_titles">
@ -50,7 +48,9 @@
<property name="width_request">750</property>
<property name="height_request">440</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">Devede</property>
<property name="window_position">center</property>
<property name="icon">devede.svg</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
@ -412,6 +412,7 @@
<property name="can_focus">True</property>
<property name="model">liststore_files</property>
<property name="headers_visible">False</property>
<signal name="cursor-changed" handler="set_interface_status" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection2"/>
</child>
@ -440,7 +441,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="add_chapter">
<object class="GtkButton" id="add_file">
<property name="label">gtk-add</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@ -448,6 +449,7 @@
<property name="use_stock">True</property>
<property name="image_position">top</property>
<property name="always_show_image">True</property>
<signal name="clicked" handler="on_add_file_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@ -456,7 +458,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="delete_chapter">
<object class="GtkButton" id="delete_file">
<property name="label">gtk-remove</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@ -464,6 +466,7 @@
<property name="use_stock">True</property>
<property name="image_position">top</property>
<property name="always_show_image">True</property>
<signal name="clicked" handler="on_delete_file_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@ -472,7 +475,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="down_chapter">
<object class="GtkButton" id="down_file">
<property name="label">gtk-go-down</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@ -488,7 +491,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="up_chapter">
<object class="GtkButton" id="up_file">
<property name="label">gtk-go-up</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@ -504,7 +507,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="properties_chapter">
<object class="GtkButton" id="properties_file">
<property name="label">gtk-properties</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@ -520,7 +523,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="preview_chapter">
<object class="GtkButton" id="preview_file">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>

View file

@ -34,8 +34,6 @@
<column type="gchararray"/>
<!-- column-name files_element -->
<column type="GObject"/>
<!-- column-name files_pos -->
<column type="gint"/>
</columns>
</object>
<object class="GtkListStore" id="liststore_titles">
@ -44,15 +42,15 @@
<column type="gchararray"/>
<!-- column-name title_element -->
<column type="GObject"/>
<!-- column-name title_pos -->
<column type="gint"/>
</columns>
</object>
<object class="GtkWindow" id="wmain_window">
<property name="width_request">750</property>
<property name="height_request">440</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">Devede</property>
<property name="window_position">center</property>
<property name="icon">devede.svg</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
@ -414,6 +412,7 @@
<property name="can_focus">True</property>
<property name="model">liststore_files</property>
<property name="headers_visible">False</property>
<signal name="cursor-changed" handler="set_interface_status" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection2"/>
</child>
@ -442,7 +441,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="add_chapter">
<object class="GtkButton" id="add_file">
<property name="label">gtk-add</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@ -450,6 +449,7 @@
<property name="use_stock">True</property>
<property name="image_position">top</property>
<property name="always_show_image">True</property>
<signal name="clicked" handler="on_add_file_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@ -458,7 +458,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="delete_chapter">
<object class="GtkButton" id="delete_file">
<property name="label">gtk-remove</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@ -474,7 +474,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="down_chapter">
<object class="GtkButton" id="down_file">
<property name="label">gtk-go-down</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@ -490,7 +490,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="up_chapter">
<object class="GtkButton" id="up_file">
<property name="label">gtk-go-up</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@ -506,7 +506,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="properties_chapter">
<object class="GtkButton" id="properties_file">
<property name="label">gtk-properties</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@ -522,7 +522,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="preview_chapter">
<object class="GtkButton" id="preview_file">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>

View file

@ -5,6 +5,7 @@
<object class="GtkWindow" id="wselect_disk">
<property name="can_focus">False</property>
<property name="window_position">center</property>
<property name="icon">devede.svg</property>
<signal name="delete-event" handler="on_wselect_disk_delete_event" swapped="no"/>
<child>
<object class="GtkBox" id="box1">

View file

@ -4,6 +4,8 @@
<requires lib="gtk+" version="3.10"/>
<object class="GtkWindow" id="wselect_disk">
<property name="can_focus">False</property>
<property name="window_position">center</property>
<property name="icon_name">devede.svg</property>
<signal name="delete-event" handler="on_wselect_disk_delete_event" swapped="no"/>
<child>
<object class="GtkBox" id="box1">