Add custom renderer
[projects/chimara/chimara.git] / player / chimara.ui
index fa62cc701e185a1eaa8140274aa6ee5af11f78cc..db3d886e9b9063973e53095485138ca89d1b689f 100644 (file)
@@ -1,73 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <requires lib="gtk+" version="2.16"/>
-  <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkActionGroup" id="app_group">
-    <child>
-      <object class="GtkAction" id="game">
-        <property name="label">_Game</property>
-        <property name="short_label" translatable="yes">_Game</property>
-      </object>
-    </child>
-    <child>
-      <object class="GtkAction" id="open">
-        <property name="label">_Open...</property>
-        <property name="short_label">_Open</property>
-        <property name="tooltip">Quit the current game and load a new one</property>
-        <property name="stock_id">gtk-media-play</property>
-        <signal name="activate" handler="on_open_activate" swapped="no"/>
-      </object>
-      <accelerator key="o" modifiers="GDK_CONTROL_MASK"/>
-    </child>
-    <child>
-      <object class="GtkAction" id="quit_chimara">
-        <property name="label">_Quit Chimara</property>
-        <property name="short_label" translatable="yes">_Quit Chimara</property>
-        <property name="tooltip">Leave the program</property>
-        <property name="stock_id">gtk-quit</property>
-        <signal name="activate" handler="on_quit_chimara_activate" swapped="no"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkAction" id="edit">
-        <property name="label">_Edit</property>
-        <property name="short_label" translatable="yes">_Edit</property>
-      </object>
-    </child>
-    <child>
-      <object class="GtkRecentAction" id="recent">
-        <property name="label">Open _Recent</property>
-        <property name="short_label" translatable="yes">Open _Recent</property>
-        <property name="limit">10</property>
-        <property name="sort_type">mru</property>
-        <signal name="item-activated" handler="on_recent_item_activated" swapped="no"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkAction" id="preferences">
-        <property name="label">P_references</property>
-        <property name="short_label" translatable="yes">P_references</property>
-        <property name="tooltip">Configure the application</property>
-        <property name="stock_id">gtk-preferences</property>
-        <signal name="activate" handler="on_preferences_activate" swapped="no"/>
-      </object>
-    </child>
-    <child>
-      <object class="GtkAction" id="help">
-        <property name="label">_Help</property>
-        <property name="short_label" translatable="yes">_Help</property>
-      </object>
-    </child>
-    <child>
-      <object class="GtkAction" id="about">
-        <property name="label">_About...</property>
-        <property name="short_label">_About</property>
-        <property name="tooltip">About this application</property>
-        <property name="stock_id">gtk-about</property>
-        <signal name="activate" handler="on_about_activate" swapped="no"/>
-      </object>
-    </child>
-  </object>
+  <requires lib="gtk+" version="2.20"/>
   <object class="GtkActionGroup" id="actiongroup">
     <child>
       <object class="GtkAction" id="restore">
       </object>
     </child>
   </object>
+  <object class="GtkActionGroup" id="app_group">
+    <child>
+      <object class="GtkAction" id="game">
+        <property name="label">_Game</property>
+        <property name="short_label" translatable="yes">_Game</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="open">
+        <property name="label">_Open...</property>
+        <property name="short_label">_Open</property>
+        <property name="tooltip">Quit the current game and load a new one</property>
+        <property name="stock_id">gtk-open</property>
+        <signal name="activate" handler="on_open_activate" swapped="no"/>
+      </object>
+      <accelerator key="o" modifiers="GDK_CONTROL_MASK"/>
+    </child>
+    <child>
+      <object class="GtkAction" id="quit_chimara">
+        <property name="label">_Quit Chimara</property>
+        <property name="short_label" translatable="yes">_Quit Chimara</property>
+        <property name="tooltip">Leave the program</property>
+        <property name="stock_id">gtk-quit</property>
+        <signal name="activate" handler="on_quit_chimara_activate" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="edit">
+        <property name="label">_Edit</property>
+        <property name="short_label" translatable="yes">_Edit</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkRecentAction" id="recent">
+        <property name="label">Open _Recent</property>
+        <property name="short_label" translatable="yes">Open _Recent</property>
+        <property name="limit">10</property>
+        <property name="sort_type">mru</property>
+        <signal name="item-activated" handler="on_recent_item_activated" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="preferences">
+        <property name="label">P_references</property>
+        <property name="short_label" translatable="yes">P_references</property>
+        <property name="tooltip">Configure the application</property>
+        <property name="stock_id">gtk-preferences</property>
+        <signal name="activate" handler="on_preferences_activate" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="help">
+        <property name="label">_Help</property>
+        <property name="short_label" translatable="yes">_Help</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="about">
+        <property name="label">_About...</property>
+        <property name="short_label">_About</property>
+        <property name="tooltip">About this application</property>
+        <property name="stock_id">gtk-about</property>
+        <signal name="activate" handler="on_about_activate" swapped="no"/>
+      </object>
+    </child>
+  </object>
+  <object class="GtkActionGroup" id="browser_group">
+    <child>
+      <object class="GtkAction" id="add_file">
+        <property name="label" translatable="yes">_Add file to library...</property>
+        <property name="short_label" translatable="yes">Add</property>
+        <property name="tooltip" translatable="yes">Add a single game file to your library</property>
+        <property name="stock_id">gtk-add</property>
+        <signal name="activate" handler="action_add_file" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="add_watched_folder">
+        <property name="label" translatable="yes">Add watched _folder to library...</property>
+        <property name="short_label" translatable="yes">Add folder</property>
+        <property name="tooltip" translatable="yes">Add all the game files in a folder to your library, and keep monitoring the folder to see if any game files are added to it in the future</property>
+        <property name="stock_id">gtk-directory</property>
+        <signal name="activate" handler="action_add_watched_folder" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="play">
+        <property name="label" translatable="yes">_Play</property>
+        <property name="short_label" translatable="yes">Play</property>
+        <property name="tooltip" translatable="yes">Play the game</property>
+        <property name="stock_id">gtk-media-play</property>
+        <signal name="activate" handler="action_play" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="more_info">
+        <property name="label" translatable="yes">More _information...</property>
+        <property name="short_label" translatable="yes">Info</property>
+        <property name="tooltip" translatable="yes">View information about this game</property>
+        <property name="stock_id">gtk-info</property>
+        <signal name="activate" handler="action_more_info" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="remove_file">
+        <property name="label" translatable="yes">_Remove file</property>
+        <property name="short_label" translatable="yes">Remove</property>
+        <property name="tooltip" translatable="yes">Remove this game file from your library</property>
+        <property name="stock_id">gtk-remove</property>
+        <signal name="activate" handler="action_remove_file" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="library">
+        <property name="label" translatable="yes">_Library</property>
+      </object>
+    </child>
+  </object>
   <object class="GtkAboutDialog" id="aboutwindow">
     <property name="can_focus">False</property>
     <property name="border_width">5</property>
@@ -201,15 +252,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 </property>
     <property name="authors">Marijn van Vliet
 Philip Chimento</property>
-    <signal name="response" handler="gtk_widget_hide" swapped="no"/>
     <signal name="delete-event" handler="gtk_widget_hide_on_delete" swapped="no"/>
+    <signal name="response" handler="gtk_widget_hide" swapped="no"/>
     <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
+      <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">2</property>
         <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
+          <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
@@ -233,11 +285,49 @@ Philip Chimento</property>
       <column type="gchararray"/>
     </columns>
   </object>
-  <object class="GtkVBox" id="player-vbox">
+  <object class="GtkVBox" id="browser-box">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
+    <property name="orientation">vertical</property>
     <child>
-      <placeholder/>
+      <object class="GtkTreeView" id="library-view">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="model">library-model</property>
+        <property name="headers_visible">False</property>
+        <property name="headers_clickable">False</property>
+        <property name="search_column">0</property>
+        <child internal-child="selection">
+          <object class="GtkTreeSelection" id="treeview-selection"/>
+        </child>
+        <child>
+          <object class="GtkTreeViewColumn" id="library-text-column">
+            <property name="title" translatable="yes">Text</property>
+            <property name="expand">True</property>
+            <child>
+              <object class="GtkCellRendererText" id="library-text-renderer"/>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkTreeViewColumn" id="library-cover-art-column">
+            <property name="fixed_width">120</property>
+            <property name="title" translatable="yes">Cover art</property>
+            <child>
+              <object class="GtkCellRendererPixbuf" id="library-cover-art-renderer"/>
+              <attributes>
+                <attribute name="pixbuf">4</attribute>
+              </attributes>
+            </child>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="pack_type">end</property>
+        <property name="position">0</property>
+      </packing>
     </child>
   </object>
   <object class="GtkListStore" id="interpreters">
@@ -248,6 +338,27 @@ Philip Chimento</property>
       <column type="gchararray"/>
     </columns>
   </object>
+  <object class="GtkListStore" id="library-model">
+    <columns>
+      <!-- column-name ifid -->
+      <column type="gchararray"/>
+      <!-- column-name title -->
+      <column type="gchararray"/>
+      <!-- column-name author -->
+      <column type="gchararray"/>
+      <!-- column-name firstpublished -->
+      <column type="guint"/>
+      <!-- column-name coverart -->
+      <column type="GdkPixbuf"/>
+    </columns>
+  </object>
+  <object class="GtkVBox" id="player-vbox">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <child>
+      <placeholder/>
+    </child>
+  </object>
   <object class="GtkNotebook" id="prefs-notebook">
     <property name="visible">True</property>
     <property name="can_focus">True</property>
@@ -399,7 +510,6 @@ Philip Chimento</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="hscrollbar_policy">never</property>
-                    <property name="vscrollbar_policy">automatic</property>
                     <child>
                       <object class="GtkTreeView" id="style-treeview">
                         <property name="visible">True</property>
@@ -408,6 +518,9 @@ Philip Chimento</property>
                         <property name="model">style-list</property>
                         <property name="headers_visible">False</property>
                         <property name="headers_clickable">False</property>
+                        <child internal-child="selection">
+                          <object class="GtkTreeSelection" id="treeview-selection1"/>
+                        </child>
                         <child>
                           <object class="GtkTreeViewColumn" id="style-name-column">
                             <property name="title" translatable="yes">Style Name</property>
@@ -794,8 +907,6 @@ Philip Chimento</property>
                   <object class="GtkScrolledWindow" id="scrolledwindow2">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="hscrollbar_policy">automatic</property>
-                    <property name="vscrollbar_policy">automatic</property>
                     <child>
                       <object class="GtkTreeView" id="interpreters_view">
                         <property name="visible">True</property>
@@ -804,6 +915,9 @@ Philip Chimento</property>
                         <property name="model">interpreters</property>
                         <property name="headers_clickable">False</property>
                         <property name="rules_hint">True</property>
+                        <child internal-child="selection">
+                          <object class="GtkTreeSelection" id="treeview-selection2"/>
+                        </child>
                         <child>
                           <object class="GtkTreeViewColumn" id="format_column">
                             <property name="title">Format</property>