summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will@willthompson.co.uk>2012-01-27 09:25:35 +0000
committerWill Thompson <will@willthompson.co.uk>2012-01-27 09:25:35 +0000
commit4578cafdf45cc6f7f10e50448f0b52f9aa3a95eb (patch)
tree5de5c715c6ebce95996cbeac3fb11a4efb5eb2bf
parentc53e558f8e4e7058567c081ce20023dab037f0c9 (diff)
Replace instructions with buttons.
https://bugs.freedesktop.org/show_bug.cgi?id=44889
-rw-r--r--Bustle/UI.hs16
-rw-r--r--data/bustle.ui137
2 files changed, 141 insertions, 12 deletions
diff --git a/Bustle/UI.hs b/Bustle/UI.hs
index 7139cb6..bd38e03 100644
--- a/Bustle/UI.hs
+++ b/Bustle/UI.hs
@@ -326,6 +326,7 @@ emptyWindow = do
[newItem, openItem, saveItem, closeItem, aboutItem] <-
mapM (getW castToImageMenuItem)
["new", "open", "save", "close", "about"]
+ [newButton, openButton] <- mapM (getW castToButton) ["newButton", "openButton"]
exportItem <- getW castToMenuItem "export"
openTwoItem <- getW castToMenuItem "openTwo"
viewStatistics <- getW castToCheckMenuItem "statistics"
@@ -346,10 +347,17 @@ emptyWindow = do
withProgramIcon (windowSetIcon window)
embedIO $ onDestroy window . makeCallback maybeQuit
- -- File menu
- embedIO $ onActivateLeaf newItem . makeCallback startRecording
- embedIO $ onActivateLeaf openItem . makeCallback (openDialogue window)
- io $ openTwoItem `onActivateLeaf` widgetShowAll openTwoDialog
+ -- File menu and related buttons
+ embedIO $ \r -> do
+ let new = makeCallback startRecording r
+ onActivateLeaf newItem new
+ onClicked newButton new
+
+ let open = makeCallback (openDialogue window) r
+ onActivateLeaf openItem open
+ onClicked openButton open
+
+ onActivateLeaf openTwoItem $ widgetShowAll openTwoDialog
-- Help menu
withProgramIcon $ \icon -> io $
diff --git a/data/bustle.ui b/data/bustle.ui
index a62cc90..e2f2f09 100644
--- a/data/bustle.ui
+++ b/data/bustle.ui
@@ -178,16 +178,137 @@
<property name="show_tabs">False</property>
<property name="show_border">False</property>
<child>
- <object class="GtkLabel" id="label4">
+ <object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">&lt;big&gt;&lt;b&gt;No log loaded&lt;/b&gt;&lt;/big&gt;
-
-• Choose &lt;b&gt;File → New&lt;/b&gt; to record a new D-Bus traffic log;
-• Choose &lt;b&gt;File → Open&lt;/b&gt; to load a previously-recorded log.
-
-You may also use the &lt;i&gt;bustle-pcap&lt;/i&gt; command-line tool to record logs.</property>
- <property name="use_markup">True</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <child>
+ <object class="GtkVBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkHButtonBox" id="buttonbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <property name="homogeneous">True</property>
+ <property name="layout_style">center</property>
+ <child>
+ <object class="GtkButton" id="newButton">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <child>
+ <object class="GtkVBox" id="box3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-new</property>
+ <property name="icon-size">6</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="balahah">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Record a new log</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="openButton">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <child>
+ <object class="GtkVBox" id="box4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-open</property>
+ <property name="icon-size">6</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="balahah1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Open an existing log</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </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="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">You may also use the &lt;i&gt;bustle-pcap&lt;/i&gt; command-line tool to record logs.</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
</object>
</child>
<child type="tab">