Add custom renderer
[projects/chimara/chimara.git] / player / chimara.ui
index bb60f49ffb1337abdc4ff20408cb1db032bbef73..db3d886e9b9063973e53095485138ca89d1b689f 100644 (file)
         <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>
+        <property name="stock_id">gtk-open</property>
         <signal name="activate" handler="on_open_activate" swapped="no"/>
       </object>
       <accelerator key="o" modifiers="GDK_CONTROL_MASK"/>
       </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>
@@ -233,6 +285,51 @@ Philip Chimento</property>
       <column type="gchararray"/>
     </columns>
   </object>
+  <object class="GtkVBox" id="browser-box">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="orientation">vertical</property>
+    <child>
+      <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">
     <columns>
       <!-- column-name Format -->
@@ -241,6 +338,20 @@ 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>