GTK: add refresh button
This commit is contained in:
parent
3edd3c8a19
commit
61b2313320
@ -262,9 +262,6 @@
|
||||
<object class="GtkBox" id="box2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="urlBar">
|
||||
<property name="visible">True</property>
|
||||
@ -274,6 +271,21 @@
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="refreshView">
|
||||
<property name="label">gtk-refresh</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="padding">5</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
@ -207,6 +207,8 @@ startMainWindow startdir = do
|
||||
"rcFilePaste"
|
||||
rcFileDelete <- builderGetObject builder castToImageMenuItem
|
||||
"rcFileDelete"
|
||||
refreshView <- builderGetObject builder castToButton
|
||||
"refreshView"
|
||||
|
||||
-- create initial list store model with unsorted data
|
||||
rawModel <- newTVarIO =<< listStoreNew
|
||||
|
@ -111,6 +111,10 @@ setCallbacks mygui myview = do
|
||||
"v" <- fmap glibToString eventKeyName
|
||||
liftIO $ operationFinal mygui myview
|
||||
|
||||
_ <- refreshView mygui `on` buttonActivated $ do
|
||||
cdir <- liftIO $ getCurrentDir myview
|
||||
refreshTreeView' mygui myview cdir
|
||||
|
||||
-- menubar-file
|
||||
_ <- menubarFileQuit mygui `on` menuItemActivated $ mainQuit
|
||||
_ <- menubarFileOpen mygui `on` menuItemActivated $
|
||||
|
@ -63,6 +63,7 @@ data MyGUI = MkMyGUI {
|
||||
, rcFileMove :: ImageMenuItem
|
||||
, rcFilePaste :: ImageMenuItem
|
||||
, rcFileDelete :: ImageMenuItem
|
||||
, refreshView :: Button
|
||||
, urlBar :: Entry
|
||||
, statusBar :: Statusbar
|
||||
, treeView :: TreeView
|
||||
|
Loading…
Reference in New Issue
Block a user