summaryrefslogtreecommitdiff
path: root/src/main.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.vala')
-rw-r--r--src/main.vala55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/main.vala b/src/main.vala
index 3389f45..35bf7af 100644
--- a/src/main.vala
+++ b/src/main.vala
@@ -253,6 +253,50 @@ namespace GUI
</interface>
""";
+ private static string about_xml_ui = """
+ <?xml version="1.0"?>
+ <interface>
+ <requires lib="gtk+" version="2.16"/>
+ <!-- interface-naming-policy project-wide -->
+ <object class="GtkAboutDialog" id="about_dialog">
+ <property name="border_width">5</property>
+ <property name="type_hint">normal</property>
+ <property name="skip_taskbar_hint">True</property>
+ <property name="has_separator">False</property>
+ <property name="program_name">Radeon Simulator</property>
+ <property name="copyright" translatable="yes">Copyright &#xA9; 2010 Joakim Sindholt</property>
+ <property name="comments" translatable="yes">A simulator for Radeon GPUs</property>
+ <property name="website">http://cgit.freedesktop.org/~jsindholt/rsim</property>
+ <property name="license" translatable="yes">This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</property>
+ <property name="authors">Joakim Sindholt &lt;opensource@zhasha.com&gt;</property>
+ <property name="logo">/usr/share/pixmaps/rsim.png</property>
+ <property name="wrap_license">True</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </interface>
+ """;
+
private ListStore cs_store;
private TreeView cs_list;
private Menu edit_menu;
@@ -293,6 +337,17 @@ namespace GUI
action_exportcs.activate.connect((source) => { open_csexport(); });
action_removecs.activate.connect((source) => { remove_cs(); });
+ /* about dialog is kind of a special case. */
+ (builder.get_object("About") as Action).activate.connect((source) => {
+ var about = new Builder();
+ try {
+ about.add_from_string(about_xml_ui, about_xml_ui.length);
+ var dlg = about.get_object("about_dialog") as AboutDialog;
+ dlg.run();
+ dlg.destroy();
+ } catch (Error e) { }
+ });
+
/* menus */
cs_store = builder.get_object("cs_store") as ListStore;
cs_list = builder.get_object("cs_list") as TreeView;