mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 12:12:35 +03:00
clean up toolbar configuration to be slightly less buggy
This commit is contained in:
parent
30ee1f630a
commit
eba0fd70eb
@ -2,6 +2,297 @@
|
||||
<interface>
|
||||
<requires lib="gtk+" version="2.16"/>
|
||||
<!-- interface-naming-policy project-wide -->
|
||||
<object class="GtkAdjustment" id="adjustment_animation_time">
|
||||
<property name="lower">0.10000000000000001</property>
|
||||
<property name="upper">10</property>
|
||||
<property name="value">0.10000000000000001</property>
|
||||
<property name="step_increment">0.10000000000000001</property>
|
||||
<property name="page_increment">1</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_cache_disc_size">
|
||||
<property name="upper">4096</property>
|
||||
<property name="value">1024</property>
|
||||
<property name="step_increment">32</property>
|
||||
<property name="page_increment">256</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_cache_memory_size">
|
||||
<property name="upper">2048</property>
|
||||
<property name="value">16</property>
|
||||
<property name="step_increment">4</property>
|
||||
<property name="page_increment">16</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_disc_cache_age">
|
||||
<property name="upper">999</property>
|
||||
<property name="value">28</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_fetching_cached">
|
||||
<property name="upper">100</property>
|
||||
<property name="value">1</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_fetching_max">
|
||||
<property name="lower">1</property>
|
||||
<property name="upper">100</property>
|
||||
<property name="value">10</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_fetching_perhost">
|
||||
<property name="lower">1</property>
|
||||
<property name="upper">100</property>
|
||||
<property name="value">1</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_font_default_size">
|
||||
<property name="lower">1</property>
|
||||
<property name="upper">99.900000000000006</property>
|
||||
<property name="value">16</property>
|
||||
<property name="step_increment">0.10000000000000001</property>
|
||||
<property name="page_increment">2</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_history_age">
|
||||
<property name="upper">999</property>
|
||||
<property name="value">28</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">28</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_pdf_lmargin">
|
||||
<property name="upper">999</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_pdf_scale">
|
||||
<property name="lower">1</property>
|
||||
<property name="upper">1000</property>
|
||||
<property name="value">100</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_proxy_port">
|
||||
<property name="lower">1</property>
|
||||
<property name="upper">65535</property>
|
||||
<property name="value">3128</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xpad">3</property>
|
||||
<property name="stock">gtk-apply</property>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststore_content_language">
|
||||
<columns>
|
||||
<!-- column-name Code -->
|
||||
<column type="gchararray"/>
|
||||
<!-- column-name Description -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">en</col>
|
||||
<col id="1" translatable="yes">English</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststore_defaultfont">
|
||||
<columns>
|
||||
<!-- column-name Type -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesFonttypeSans</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesFonttypeSerif</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesFonttypeMonospace</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesFonttypeCursive</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesFonttypeFantasy</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststore_developer_view">
|
||||
<columns>
|
||||
<!-- column-name Type -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesDeveloperViewWindow</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesDeveloperViewTab</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesDeveloperViewEditor</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststore_image_loading">
|
||||
<columns>
|
||||
<!-- column-name Type -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesImageLoadBoth</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesImageLoadFore</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesImageLoadBack</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesImageLoadNone</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststore_proxy_type">
|
||||
<columns>
|
||||
<!-- column-name Type -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesProxyTypeDirect</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesProxyTypeManual</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesProxyTypeBasic</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesProxyTypeNLTM</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesProxyTypeSystem</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststore_search_provider">
|
||||
<columns>
|
||||
<!-- column-name Provider -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0">Google</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Yahoo!</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Microsoft Live</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Buisiness.com</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Omgili</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">BBC News</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Ubuntu Packages</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Creative Commons</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Ask</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Answers</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Dictionary.com</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">YouTube</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">AeroMP3</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">AOL</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Baidu</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Amazon</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Ebay</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">IMBD</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">ESPN</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Wikipedia</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">DuckDuckGo</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststore_tab_position">
|
||||
<columns>
|
||||
<!-- column-name Position -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesTabLocTop</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesTabLocLeft</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesTabLocRight</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesTabLocBottom</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststore_toolbar_buttontype">
|
||||
<columns>
|
||||
<!-- column-name Type -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesButtonTypeSmall</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesButtonTypeLarge</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesButtonTypeLargeText</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesButtonTypeText</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkDialog" id="dialogPreferences">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">5</property>
|
||||
@ -2178,7 +2469,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox_pdfexport">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
@ -2583,6 +2873,12 @@
|
||||
<property name="x_options">GTK_EXPAND</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@ -2710,295 +3006,4 @@
|
||||
<action-widget response="-7">close</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststore_search_provider">
|
||||
<columns>
|
||||
<!-- column-name Provider -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0">Google</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Yahoo!</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Microsoft Live</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Buisiness.com</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Omgili</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">BBC News</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Ubuntu Packages</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Creative Commons</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Ask</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Answers</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Dictionary.com</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">YouTube</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">AeroMP3</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">AOL</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Baidu</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Amazon</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Ebay</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">IMBD</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">ESPN</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">Wikipedia</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">DuckDuckGo</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststore_tab_position">
|
||||
<columns>
|
||||
<!-- column-name Position -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesTabLocTop</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesTabLocLeft</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesTabLocRight</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesTabLocBottom</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststore_toolbar_buttontype">
|
||||
<columns>
|
||||
<!-- column-name Type -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesButtonTypeSmall</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesButtonTypeLarge</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesButtonTypeLargeText</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesButtonTypeText</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststore_image_loading">
|
||||
<columns>
|
||||
<!-- column-name Type -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesImageLoadBoth</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesImageLoadFore</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesImageLoadBack</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesImageLoadNone</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststore_defaultfont">
|
||||
<columns>
|
||||
<!-- column-name Type -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesFonttypeSans</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesFonttypeSerif</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesFonttypeMonospace</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesFonttypeCursive</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesFonttypeFantasy</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xpad">3</property>
|
||||
<property name="stock">gtk-apply</property>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststore_proxy_type">
|
||||
<columns>
|
||||
<!-- column-name Type -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesProxyTypeDirect</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesProxyTypeManual</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesProxyTypeBasic</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesProxyTypeNLTM</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesProxyTypeSystem</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_animation_time">
|
||||
<property name="value">0.10000000000000001</property>
|
||||
<property name="lower">0.10000000000000001</property>
|
||||
<property name="upper">10</property>
|
||||
<property name="step_increment">0.10000000000000001</property>
|
||||
<property name="page_increment">1</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_font_default_size">
|
||||
<property name="value">16</property>
|
||||
<property name="lower">1</property>
|
||||
<property name="upper">99.900000000000006</property>
|
||||
<property name="step_increment">0.10000000000000001</property>
|
||||
<property name="page_increment">2</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_history_age">
|
||||
<property name="value">28</property>
|
||||
<property name="upper">999</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">28</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_cache_memory_size">
|
||||
<property name="value">16</property>
|
||||
<property name="upper">2048</property>
|
||||
<property name="step_increment">4</property>
|
||||
<property name="page_increment">16</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_cache_disc_size">
|
||||
<property name="value">1024</property>
|
||||
<property name="upper">4096</property>
|
||||
<property name="step_increment">32</property>
|
||||
<property name="page_increment">256</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_disc_cache_age">
|
||||
<property name="value">28</property>
|
||||
<property name="upper">999</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_proxy_port">
|
||||
<property name="value">3128</property>
|
||||
<property name="lower">1</property>
|
||||
<property name="upper">65535</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_fetching_max">
|
||||
<property name="value">10</property>
|
||||
<property name="lower">1</property>
|
||||
<property name="upper">100</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_fetching_perhost">
|
||||
<property name="value">1</property>
|
||||
<property name="lower">1</property>
|
||||
<property name="upper">100</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_fetching_cached">
|
||||
<property name="value">1</property>
|
||||
<property name="upper">100</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_pdf_scale">
|
||||
<property name="value">100</property>
|
||||
<property name="lower">1</property>
|
||||
<property name="upper">1000</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_pdf_lmargin">
|
||||
<property name="upper">999</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststore_content_language">
|
||||
<columns>
|
||||
<!-- column-name Code -->
|
||||
<column type="gchararray"/>
|
||||
<!-- column-name Description -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">en</col>
|
||||
<col id="1" translatable="yes">English</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkListStore" id="liststore_developer_view">
|
||||
<columns>
|
||||
<!-- column-name Type -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesDeveloperViewWindow</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesDeveloperViewTab</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">preferencesDeveloperViewEditor</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
</interface>
|
||||
|
@ -1,67 +1,84 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--*- mode: xml -*-->
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="toolbarwindow">
|
||||
<!-- interface-requires gtk+ 2.12 -->
|
||||
<!-- interface-naming-policy toplevel-contextual -->
|
||||
<object class="GtkDialog" id="dialogToolbar">
|
||||
<property name="width_request">700</property>
|
||||
<property name="height_request">450</property>
|
||||
<property name="title" translatable="yes"/>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<property name="focus_on_map">True</property>
|
||||
<property name="urgency_hint">False</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="windowvbox">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="title" translatable="yes">gtkToolBarTitle</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="destroy_with_parent">True</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkVBox" id="dialog-vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">2</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="toolbarlabel">
|
||||
<object class="GtkHBox" id="hbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Move items from store to toolbar Rearrange items in toolbar Move items from toolbar to store</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Move items from store to toolbar</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="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Rearrange items in toolbar</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Move items from toolbar to store</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">2</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="visible">True</property>
|
||||
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hscrollbar_policy">automatic</property>
|
||||
<property name="vscrollbar_policy">automatic</property>
|
||||
<child>
|
||||
<object class="GtkViewport" id="viewport1">
|
||||
<property name="visible">True</property>
|
||||
<property name="shadow_type">GTK_SHADOW_IN</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="widgetvbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
@ -71,119 +88,85 @@
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="buttonhbox">
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkHButtonBox" id="dialog-action_area1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="resetbutton">
|
||||
<object class="GtkButton" id="reset">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<child>
|
||||
<object class="GtkHBox" id="button1hbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-refresh</property>
|
||||
<property name="icon_size">4</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="refreshbuttonlabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Reset to defaults</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">10</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">10</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="okbutton">
|
||||
<object class="GtkButton" id="close">
|
||||
<property name="label">gtk-close</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="label">gtk-apply</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">10</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="cancelbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<action-widgets>
|
||||
<action-widget response="0">reset</action-widget>
|
||||
<action-widget response="0">close</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
</interface>
|
||||
|
@ -1,67 +1,122 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.18.3 -->
|
||||
<!--*- mode: xml -*-->
|
||||
<interface>
|
||||
<object class="GtkWindow" id="toolbarwindow">
|
||||
<requires lib="gtk+" version="3.0"/>
|
||||
<object class="GtkImage" id="image2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-refresh</property>
|
||||
</object>
|
||||
<object class="GtkDialog" id="dialogToolbar">
|
||||
<property name="width_request">700</property>
|
||||
<property name="height_request">450</property>
|
||||
<property name="title" translatable="yes"/>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<property name="focus_on_map">True</property>
|
||||
<property name="urgency_hint">False</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="windowvbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="toolbarlabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Move items from store to toolbar Rearrange items in toolbar Move items from toolbar to store</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">gtkToolBarTitle</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">2</property>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox" id="dialog-action_area1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset">
|
||||
<property name="label" translatable="yes">Reset To Defaults</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="image">image2</property>
|
||||
<property name="yalign">0.52999997138977051</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="close">
|
||||
<property name="label">gtk-close</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">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">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="column_homogeneous">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Move items from store to toolbar</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Rearrange items in toolbar</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Move items from toolbar to store</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="visible">True</property>
|
||||
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||
<property name="can_focus">True</property>
|
||||
<child>
|
||||
<object class="GtkViewport" id="viewport1">
|
||||
<property name="visible">True</property>
|
||||
<property name="shadow_type">GTK_SHADOW_IN</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="widgetvbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
@ -71,116 +126,9 @@
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="buttonhbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="resetbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<child>
|
||||
<object class="GtkHBox" id="button1hbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-refresh</property>
|
||||
<property name="icon_size">4</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="refreshbuttonlabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Reset to defaults</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">10</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="okbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="label">gtk-apply</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">10</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="cancelbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -2073,7 +2073,7 @@ struct nsgtk_scaffolding *nsgtk_new_scaffolding(struct gui_window *toplevel)
|
||||
int i;
|
||||
GtkAccelGroup *group;
|
||||
|
||||
gs = malloc(sizeof(*gs));
|
||||
gs = calloc(1, sizeof(*gs));
|
||||
if (gs == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
@ -2491,7 +2491,11 @@ gui_search_web_provider_update(const char *provider_name,
|
||||
|
||||
/* set the search provider parameters up in each scaffold */
|
||||
for (current = scaf_list; current != NULL; current = current->next) {
|
||||
/* add ico to each window's toolbar */
|
||||
if (current->webSearchEntry == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* add ico to each window's toolbar */
|
||||
if (srch_pixbuf != NULL) {
|
||||
nsgtk_entry_set_icon_from_pixbuf(current->webSearchEntry,
|
||||
GTK_ENTRY_ICON_PRIMARY,
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "utils/log.h"
|
||||
#include "utils/messages.h"
|
||||
#include "utils/nsoption.h"
|
||||
#include "utils/file.h"
|
||||
|
||||
#include "gtk/gui.h"
|
||||
#include "gtk/warn.h"
|
||||
@ -44,7 +45,7 @@ static bool edit_mode = false;
|
||||
|
||||
struct nsgtk_toolbar_custom_store {
|
||||
GtkWidget *window;
|
||||
GtkWidget *store_buttons[PLACEHOLDER_BUTTON];
|
||||
GtkWidget *store_buttons[PLACEHOLDER_BUTTON];
|
||||
GtkWidget *widgetvbox;
|
||||
GtkWidget *currentbar;
|
||||
char numberh; /* current horizontal location while adding */
|
||||
@ -107,13 +108,13 @@ static char *remove_underscores(const char *s, bool replacespace)
|
||||
ret = malloc(len + 1);
|
||||
if (ret == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
for (i = 0, ii = 0; i < len; i++) {
|
||||
if (s[i] != '_') {
|
||||
ret[ii++] = s[i];
|
||||
} else if (replacespace) {
|
||||
} else if (replacespace) {
|
||||
ret[ii++] = ' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
ret[ii] = '\0';
|
||||
return ret;
|
||||
@ -208,18 +209,18 @@ nsgtk_theme_searchimage_default(nsgtk_search_buttons tbbutton,
|
||||
switch (tbbutton) {
|
||||
|
||||
case (SEARCH_BACK_BUTTON):
|
||||
image = GTK_IMAGE(nsgtk_image_new_from_stock(NSGTK_STOCK_GO_BACK,
|
||||
iconsize));
|
||||
image = GTK_IMAGE(nsgtk_image_new_from_stock(
|
||||
NSGTK_STOCK_GO_BACK, iconsize));
|
||||
break;
|
||||
|
||||
case (SEARCH_FORWARD_BUTTON):
|
||||
image = GTK_IMAGE(nsgtk_image_new_from_stock(NSGTK_STOCK_GO_FORWARD,
|
||||
iconsize));
|
||||
image = GTK_IMAGE(nsgtk_image_new_from_stock(
|
||||
NSGTK_STOCK_GO_FORWARD, iconsize));
|
||||
break;
|
||||
|
||||
case (SEARCH_CLOSE_BUTTON):
|
||||
image = GTK_IMAGE(nsgtk_image_new_from_stock(NSGTK_STOCK_CLOSE,
|
||||
iconsize));
|
||||
image = GTK_IMAGE(nsgtk_image_new_from_stock(
|
||||
NSGTK_STOCK_CLOSE, iconsize));
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -227,7 +228,8 @@ nsgtk_theme_searchimage_default(nsgtk_search_buttons tbbutton,
|
||||
}
|
||||
|
||||
if (usedef && (image == NULL)) {
|
||||
image = GTK_IMAGE(nsgtk_image_new_from_stock("gtk-missing-image", iconsize));
|
||||
image = GTK_IMAGE(nsgtk_image_new_from_stock(
|
||||
"gtk-missing-image", iconsize));
|
||||
}
|
||||
|
||||
return image;
|
||||
@ -255,7 +257,6 @@ static struct nsgtk_theme *nsgtk_theme_load(GtkIconSize iconsize, bool usedef)
|
||||
theme->image[btnloop] = nsgtk_theme_image_default(btnloop,
|
||||
iconsize,
|
||||
usedef);
|
||||
|
||||
}
|
||||
|
||||
for (btnloop = SEARCH_BACK_BUTTON;
|
||||
@ -823,8 +824,9 @@ static void nsgtk_toolbar_close(struct nsgtk_scaffolding *g)
|
||||
*/
|
||||
static gboolean nsgtk_toolbar_cancel_clicked(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
edit_mode = false;
|
||||
struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
|
||||
|
||||
edit_mode = false;
|
||||
/* reset g->buttons->location */
|
||||
for (int i = BACK_BUTTON; i < PLACEHOLDER_BUTTON; i++) {
|
||||
nsgtk_scaffolding_button(g, i)->location =
|
||||
@ -950,6 +952,7 @@ void nsgtk_toolbar_customization_load(struct nsgtk_scaffolding *g)
|
||||
*/
|
||||
static nserror nsgtk_toolbar_customization_save(struct nsgtk_scaffolding *g)
|
||||
{
|
||||
char *choices = NULL;
|
||||
char *order;
|
||||
int order_len = PLACEHOLDER_BUTTON * 12; /* length of order buffer */
|
||||
int tbidx;
|
||||
@ -981,6 +984,13 @@ static nserror nsgtk_toolbar_customization_save(struct nsgtk_scaffolding *g)
|
||||
|
||||
nsoption_set_charp(toolbar_order, order);
|
||||
|
||||
/* ensure choices are saved */
|
||||
netsurf_mkpath(&choices, NULL, 2, nsgtk_config_home, "Choices");
|
||||
if (choices != NULL) {
|
||||
nsoption_write(choices, NULL, NULL);
|
||||
free(choices);
|
||||
}
|
||||
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
||||
@ -990,8 +1000,9 @@ static nserror nsgtk_toolbar_customization_save(struct nsgtk_scaffolding *g)
|
||||
*/
|
||||
static gboolean nsgtk_toolbar_persist(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
edit_mode = false;
|
||||
struct nsgtk_scaffolding *g = (struct nsgtk_scaffolding *)data;
|
||||
|
||||
edit_mode = false;
|
||||
/* save state to file, update toolbars for all windows */
|
||||
nsgtk_toolbar_customization_save(g);
|
||||
nsgtk_toolbar_cast(g);
|
||||
@ -1098,7 +1109,6 @@ nsgtk_toolbar_store_action(GtkWidget *widget, GdkDragContext *gdc,
|
||||
*/
|
||||
static void nsgtk_toolbar_window_open(struct nsgtk_scaffolding *g)
|
||||
{
|
||||
int x = 0, y = 0;
|
||||
struct nsgtk_theme *theme;
|
||||
nserror res;
|
||||
|
||||
@ -1112,7 +1122,7 @@ static void nsgtk_toolbar_window_open(struct nsgtk_scaffolding *g)
|
||||
res = nsgtk_builder_new_from_resname("toolbar", &window->builder);
|
||||
if (res != NSERROR_OK) {
|
||||
NSLOG(netsurf, INFO, "Toolbar UI builder init failed");
|
||||
nsgtk_warning(messages_get("NoMemory"), 0);
|
||||
nsgtk_warning("Toolbar UI builder init failed", 0);
|
||||
nsgtk_toolbar_cancel_clicked(NULL, g);
|
||||
free(theme);
|
||||
return;
|
||||
@ -1120,8 +1130,8 @@ static void nsgtk_toolbar_window_open(struct nsgtk_scaffolding *g)
|
||||
|
||||
gtk_builder_connect_signals(window->builder, NULL);
|
||||
|
||||
window->window = GTK_WIDGET(gtk_builder_get_object(window->builder,
|
||||
"toolbarwindow"));
|
||||
window->window = GTK_WIDGET(gtk_builder_get_object(
|
||||
window->builder, "dialogToolbar"));
|
||||
if (window->window == NULL) {
|
||||
nsgtk_warning(messages_get("NoMemory"), 0);
|
||||
nsgtk_toolbar_cancel_clicked(NULL, g);
|
||||
@ -1129,8 +1139,11 @@ static void nsgtk_toolbar_window_open(struct nsgtk_scaffolding *g)
|
||||
return;
|
||||
}
|
||||
|
||||
window->widgetvbox = GTK_WIDGET(gtk_builder_get_object(window->builder,
|
||||
"widgetvbox"));
|
||||
gtk_window_set_transient_for(GTK_WINDOW(window->window),
|
||||
nsgtk_scaffolding_window(g));
|
||||
|
||||
window->widgetvbox = GTK_WIDGET(gtk_builder_get_object(
|
||||
window->builder, "widgetvbox"));
|
||||
if (window->widgetvbox == NULL) {
|
||||
nsgtk_warning(messages_get("NoMemory"), 0);
|
||||
nsgtk_toolbar_cancel_clicked(NULL, g);
|
||||
@ -1138,9 +1151,12 @@ static void nsgtk_toolbar_window_open(struct nsgtk_scaffolding *g)
|
||||
return;
|
||||
}
|
||||
|
||||
window->numberh = NSGTK_STORE_WIDTH; /* preset to width [in buttons] of */
|
||||
/* preset to width [in buttons] of */
|
||||
window->numberh = NSGTK_STORE_WIDTH;
|
||||
|
||||
/* store to cause creation of a new toolbar */
|
||||
window->currentbutton = -1;
|
||||
|
||||
/* load toolbuttons */
|
||||
/* add toolbuttons to window */
|
||||
/* set event handlers */
|
||||
@ -1160,33 +1176,20 @@ static void nsgtk_toolbar_window_open(struct nsgtk_scaffolding *g)
|
||||
}
|
||||
free(theme);
|
||||
|
||||
gtk_window_set_transient_for(GTK_WINDOW(window->window),
|
||||
nsgtk_scaffolding_window(g));
|
||||
gtk_window_set_title(GTK_WINDOW(window->window), messages_get(
|
||||
"gtkToolBarTitle"));
|
||||
|
||||
gtk_window_set_accept_focus(GTK_WINDOW(window->window), FALSE);
|
||||
|
||||
gtk_drag_dest_set(GTK_WIDGET(window->window), GTK_DEST_DEFAULT_MOTION |
|
||||
GTK_DEST_DEFAULT_DROP, &entry, 1, GDK_ACTION_COPY);
|
||||
gtk_widget_show_all(window->window);
|
||||
gtk_window_set_position(GTK_WINDOW(window->window),
|
||||
GTK_WIN_POS_CENTER_ON_PARENT);
|
||||
gtk_window_get_position(nsgtk_scaffolding_window(g), &x, &y);
|
||||
gtk_window_move(GTK_WINDOW(window->window), x, y + 100);
|
||||
|
||||
g_signal_connect(GTK_WIDGET(gtk_builder_get_object(window->builder,
|
||||
"cancelbutton")),
|
||||
"clicked",
|
||||
G_CALLBACK(nsgtk_toolbar_cancel_clicked),
|
||||
g);
|
||||
|
||||
g_signal_connect(GTK_WIDGET(gtk_builder_get_object(window->builder,
|
||||
"okbutton")),
|
||||
g_signal_connect(GTK_WIDGET(gtk_builder_get_object(
|
||||
window->builder, "close")),
|
||||
"clicked",
|
||||
G_CALLBACK(nsgtk_toolbar_persist),
|
||||
g);
|
||||
|
||||
g_signal_connect(GTK_WIDGET(gtk_builder_get_object(window->builder,
|
||||
"resetbutton")),
|
||||
g_signal_connect(GTK_WIDGET(gtk_builder_get_object(
|
||||
window->builder, "reset")),
|
||||
"clicked",
|
||||
G_CALLBACK(nsgtk_toolbar_reset),
|
||||
g);
|
||||
@ -1199,6 +1202,8 @@ static void nsgtk_toolbar_window_open(struct nsgtk_scaffolding *g)
|
||||
|
||||
g_signal_connect(window->window, "drag-motion",
|
||||
G_CALLBACK(nsgtk_toolbar_store_action), g);
|
||||
|
||||
gtk_widget_show_all(window->window);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1342,33 +1347,37 @@ nsgtk_toolbar_set_handler(struct nsgtk_scaffolding *g, nsgtk_toolbar_button i)
|
||||
case URL_BAR_ITEM:
|
||||
nsgtk_scaffolding_update_url_bar_ref(g);
|
||||
g_signal_connect(GTK_WIDGET(nsgtk_scaffolding_urlbar(g)),
|
||||
"activate", G_CALLBACK(
|
||||
nsgtk_window_url_activate_event), g);
|
||||
"activate", G_CALLBACK(
|
||||
nsgtk_window_url_activate_event), g);
|
||||
g_signal_connect(GTK_WIDGET(nsgtk_scaffolding_urlbar(g)),
|
||||
"changed", G_CALLBACK(
|
||||
nsgtk_window_url_changed), g);
|
||||
"changed", G_CALLBACK(
|
||||
nsgtk_window_url_changed), g);
|
||||
break;
|
||||
|
||||
case THROBBER_ITEM:
|
||||
nsgtk_scaffolding_update_throbber_ref(g);
|
||||
break;
|
||||
|
||||
case WEBSEARCH_ITEM:
|
||||
nsgtk_scaffolding_update_websearch_ref(g);
|
||||
g_signal_connect(GTK_WIDGET(nsgtk_scaffolding_websearch(g)),
|
||||
"activate", G_CALLBACK(
|
||||
nsgtk_websearch_activate), g);
|
||||
"activate", G_CALLBACK(
|
||||
nsgtk_websearch_activate), g);
|
||||
g_signal_connect(GTK_WIDGET(nsgtk_scaffolding_websearch(g)),
|
||||
"button-press-event", G_CALLBACK(
|
||||
nsgtk_websearch_clear), g);
|
||||
"button-press-event", G_CALLBACK(
|
||||
nsgtk_websearch_clear), g);
|
||||
break;
|
||||
|
||||
default:
|
||||
if ((nsgtk_scaffolding_button(g, i)->bhandler != NULL) &&
|
||||
(nsgtk_scaffolding_button(g, i)->button
|
||||
!= NULL))
|
||||
g_signal_connect(nsgtk_scaffolding_button(g, i)->
|
||||
button, "clicked",
|
||||
G_CALLBACK(nsgtk_scaffolding_button(g,
|
||||
i)->bhandler), g);
|
||||
break;
|
||||
(nsgtk_scaffolding_button(g, i)->button != NULL)) {
|
||||
g_signal_connect(
|
||||
nsgtk_scaffolding_button(g, i)->button,
|
||||
"clicked",
|
||||
G_CALLBACK(nsgtk_scaffolding_button(
|
||||
g, i)->bhandler), g);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1460,7 +1469,8 @@ DATAHANDLER(prevtab, PREVTAB, window)
|
||||
DATAHANDLER(guide, GUIDE, window)
|
||||
DATAHANDLER(info, INFO, window)
|
||||
#undef DATAHANDLER
|
||||
#define DATAHANDLER(p, q, r)\
|
||||
|
||||
#define DATAHANDLER(p, q, r) \
|
||||
gboolean nsgtk_toolbar_##p##_button_data(GtkWidget *widget, GdkDragContext\
|
||||
*cont, GtkSelectionData *selection, guint info, guint time,\
|
||||
gpointer data)\
|
||||
@ -1481,5 +1491,3 @@ gboolean nsgtk_toolbar_##p##_toolbar_button_data(GtkWidget *widget,\
|
||||
DATAHANDLER(throbber, THROBBER, window)
|
||||
DATAHANDLER(websearch, WEBSEARCH, window)
|
||||
#undef DATAHANDLER
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user