Refactored externalized widgets, cleanup and subtle bug fixes

This commit is contained in:
2022-12-03 22:03:05 -06:00
parent 8ed011ab8c
commit 0d01030be3
13 changed files with 359 additions and 298 deletions

View File

@@ -452,11 +452,6 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
<action-widget response="-5">appchooser_select_btn</action-widget>
</action-widgets>
</object>
<object class="GtkImage" id="create_img">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="stock">gtk-new</property>
</object>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
@@ -1424,183 +1419,6 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
</object>
</child>
</object>
<object class="GtkDialog" id="new_file_menu">
<property name="can-focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="window-position">center-always</property>
<property name="destroy-with-parent">True</property>
<property name="type-hint">dialog</property>
<property name="skip-taskbar-hint">True</property>
<property name="skip-pager-hint">True</property>
<property name="decorated">False</property>
<property name="deletable">False</property>
<property name="gravity">center</property>
<property name="attached-to">main_window</property>
<child internal-child="vbox">
<object class="GtkBox">
<property name="can-focus">False</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="button9">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="use-stock">True</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button10">
<property name="label" translatable="yes">Create</property>
<property name="name">create</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Create File/Folder...</property>
<property name="image">create_img</property>
<property name="always-show-image">True</property>
</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">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkEntry" id="new_fname_field">
<property name="width-request">500</property>
<property name="height-request">26</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="has-focus">True</property>
<property name="tooltip-text" translatable="yes">New File/Dir Name...</property>
<property name="activates-default">True</property>
<property name="primary-icon-stock">gtk-edit</property>
<property name="primary-icon-activatable">False</property>
<property name="secondary-icon-activatable">False</property>
<property name="primary-icon-sensitive">False</property>
<property name="secondary-icon-sensitive">False</property>
<property name="placeholder-text" translatable="yes">New File/Dir Name...</property>
<signal name="key-release-event" handler="hide_new_file_menu_enter_key" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="menuButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-bottom">20</property>
<property name="orientation">vertical</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">15</property>
<property name="label" translatable="yes">Folder</property>
<attributes>
<attribute name="size" value="12000"/>
</attributes>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">15</property>
<property name="label" translatable="yes">File</property>
<attributes>
<attribute name="size" value="12000"/>
</attributes>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="context_menu_type_toggle">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="tooltip-text" translatable="yes">File/Folder</property>
<property name="active">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</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">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="-6">button9</action-widget>
<action-widget response="-10">button10</action-widget>
</action-widgets>
</object>
<object class="GtkPopover" id="path_menu">
<property name="width-request">240</property>
<property name="height-request">420</property>

View File

@@ -6,11 +6,12 @@
"Execute in Terminal": ["STOCK_EXECUTE", "execute_in_terminal"]
},
"File Actions": {
"New": ["STOCK_ADD", "create"],
"Rename": ["STOCK_EDIT", "rename"],
"Cut": ["STOCK_CUT", "cut"],
"Copy": ["STOCK_COPY", "copy"],
"Paste": ["STOCK_PASTE", "paste"]
"New": ["STOCK_ADD", "create"],
"Rename": ["STOCK_EDIT", "rename"],
"Cut": ["STOCK_CUT", "cut"],
"Copy": ["STOCK_COPY", "copy"],
"Copy Name": ["STOCK_COPY", "copy_name"],
"Paste": ["STOCK_PASTE", "paste"]
},
"Plugins": {}
}

View File

@@ -0,0 +1,186 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.22"/>
<object class="GtkImage" id="create_img">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="stock">gtk-new</property>
</object>
<object class="GtkDialog" id="new_file_menu">
<property name="can-focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="window-position">center-always</property>
<property name="destroy-with-parent">True</property>
<property name="type-hint">dialog</property>
<property name="skip-taskbar-hint">True</property>
<property name="skip-pager-hint">True</property>
<property name="decorated">False</property>
<property name="deletable">False</property>
<property name="gravity">center</property>
<child internal-child="vbox">
<object class="GtkBox">
<property name="can-focus">False</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="button9">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="use-stock">True</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button10">
<property name="label" translatable="yes">Create</property>
<property name="name">create</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Create File/Folder...</property>
<property name="image">create_img</property>
<property name="always-show-image">True</property>
</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">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkEntry" id="new_fname_field">
<property name="width-request">500</property>
<property name="height-request">26</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="has-focus">True</property>
<property name="tooltip-text" translatable="yes">New File/Dir Name...</property>
<property name="activates-default">True</property>
<property name="primary-icon-stock">gtk-edit</property>
<property name="primary-icon-activatable">False</property>
<property name="secondary-icon-activatable">False</property>
<property name="primary-icon-sensitive">False</property>
<property name="secondary-icon-sensitive">False</property>
<property name="placeholder-text" translatable="yes">New File/Dir Name...</property>
<signal name="key-release-event" handler="hide_new_file_menu_enter_key" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="menuButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-bottom">20</property>
<property name="orientation">vertical</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">15</property>
<property name="label" translatable="yes">Folder</property>
<attributes>
<attribute name="size" value="12000"/>
</attributes>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">15</property>
<property name="label" translatable="yes">File</property>
<attributes>
<attribute name="size" value="12000"/>
</attributes>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="new_file_toggle_type">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="tooltip-text" translatable="yes">File/Folder</property>
<property name="active">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</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">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="-6">button9</action-widget>
<action-widget response="-10">button10</action-widget>
</action-widgets>
</object>
</interface>

View File

@@ -13,7 +13,7 @@
<property name="can-focus">False</property>
<property name="stock">gtk-media-forward</property>
</object>
<object class="GtkDialog" id="edit_file_menu">
<object class="GtkDialog" id="rename_file_menu">
<property name="can-focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
@@ -116,7 +116,7 @@
</packing>
</child>
<child>
<object class="GtkEntry" id="new_rename_fname">
<object class="GtkEntry" id="rename_fname">
<property name="width-request">500</property>
<property name="height-request">26</property>
<property name="visible">True</property>
@@ -130,7 +130,7 @@
<property name="primary-icon-sensitive">False</property>
<property name="secondary-icon-sensitive">False</property>
<property name="placeholder-text" translatable="yes">To:</property>
<signal name="key-release-event" handler="hide_edit_file_menu_enter_key" swapped="no"/>
<signal name="key-release-event" handler="hide_rename_file_menu_enter_key" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -216,7 +216,7 @@
<property name="receives-default">True</property>
<property name="image">rename_img</property>
<property name="always-show-image">True</property>
<signal name="button-release-event" handler="hide_edit_file_menu" swapped="no"/>
<signal name="button-release-event" handler="hide_rename_file_menu" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>