GTK: add "New -> Terminal" to right-click menu
This commit is contained in:
parent
077ac81227
commit
3e4621fe70
@ -518,13 +518,22 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="rcFileNewTab">
|
||||
<property name="label" translatable="yes">New Tab</property>
|
||||
<property name="label" translatable="yes">Tab</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="image">image8</property>
|
||||
<property name="use_stock">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="rcFileNewTerm">
|
||||
<property name="label" translatable="yes">Terminal</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="image">image9</property>
|
||||
<property name="use_stock">False</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@ -634,6 +643,11 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-add</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="image9">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">utilities-terminal</property>
|
||||
</object>
|
||||
<object class="GtkBox" id="viewBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
|
@ -296,6 +296,8 @@ setViewCallbacks mygui myview = do
|
||||
liftIO $ newDir mygui myview
|
||||
_ <- (rcFileNewTab . rcmenu) myview `on` menuItemActivated $
|
||||
liftIO $ newTab' mygui myview
|
||||
_ <- (rcFileNewTerm . rcmenu) myview `on` menuItemActivated $
|
||||
liftIO $ void $ openTerminalHere myview
|
||||
_ <- (rcFileCopy . rcmenu) myview `on` menuItemActivated $
|
||||
liftIO $ withItems mygui myview copyInit
|
||||
_ <- (rcFileRename . rcmenu) myview `on` menuItemActivated $
|
||||
|
@ -108,6 +108,7 @@ data RightClickMenu = MkRightClickMenu {
|
||||
, rcFileNewRegFile :: !ImageMenuItem
|
||||
, rcFileNewDir :: !ImageMenuItem
|
||||
, rcFileNewTab :: !ImageMenuItem
|
||||
, rcFileNewTerm :: !ImageMenuItem
|
||||
, rcFileCut :: !ImageMenuItem
|
||||
, rcFileCopy :: !ImageMenuItem
|
||||
, rcFileRename :: !ImageMenuItem
|
||||
|
@ -163,6 +163,8 @@ createMyView mygui iofmv = do
|
||||
"rcFileNewDir"
|
||||
rcFileNewTab <- builderGetObject builder castToImageMenuItem
|
||||
"rcFileNewTab"
|
||||
rcFileNewTerm <- builderGetObject builder castToImageMenuItem
|
||||
"rcFileNewTerm"
|
||||
rcFileCut <- builderGetObject builder castToImageMenuItem
|
||||
"rcFileCut"
|
||||
rcFileCopy <- builderGetObject builder castToImageMenuItem
|
||||
|
Loading…
Reference in New Issue
Block a user