Skip to content
Permalink
Browse files

Use start-here as the menu icon

Instead of providing a custom image and then having to override it, we
set the icon to always be 'start-here'. This way each theme can supply
the correct icon without having to manually change it.
  • Loading branch information
vkareh authored and flexiondotorg committed Sep 26, 2019
1 parent 57103a9 commit 45119cdea80183a2a1464d7686470f8dd87075ac

This file was deleted.

This file was deleted.

@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.14"/>
<object class="GtkAdjustment" id="adjustment1">
@@ -63,6 +64,9 @@
<property name="window_position">center-on-parent</property>
<property name="destroy_with_parent">True</property>
<property name="type_hint">dialog</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox2">
<property name="visible">True</property>
@@ -210,9 +214,6 @@
<action-widget response="-5">okButton</action-widget>
<action-widget response="-6">cancelButton</action-widget>
</action-widgets>
<child>
<placeholder/>
</child>
</object>
<object class="GtkFileChooserDialog" id="fileChooserDialog">
<property name="can_focus">False</property>
@@ -222,6 +223,9 @@
<property name="destroy_with_parent">True</property>
<property name="type_hint">dialog</property>
<property name="action">select-folder</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox20">
<property name="visible">True</property>
@@ -279,9 +283,6 @@
<action-widget response="-5">button1</action-widget>
<action-widget response="0">button2</action-widget>
</action-widgets>
<child>
<placeholder/>
</child>
</object>
<object class="GtkListStore" id="model1">
<columns>
@@ -300,6 +301,9 @@
<property name="border_width">6</property>
<property name="window_position">center</property>
<property name="destroy_with_parent">True</property>
<child type="titlebar">
<placeholder/>
</child>
<child>
<object class="GtkBox" id="vbox1">
<property name="visible">True</property>
@@ -375,50 +379,10 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Button icon:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
</packing>
<placeholder/>
</child>
<child>
<object class="GtkBox" id="hbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">7</property>
<child>
<object class="GtkFileChooserButton" id="button_icon_chooser">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkImage" id="image_button_icon">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-missing-image</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">3</property>
</packing>
<placeholder/>
</child>
<child>
<placeholder/>
@@ -1074,6 +1038,12 @@
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
@@ -1916,8 +1886,5 @@
</child>
</object>
</child>
<child type="titlebar">
<placeholder/>
</child>
</object>
</interface>
@@ -26,12 +26,6 @@
<description></description>
</key>

<key type="i" name="applet-icon-size">
<default>22</default>
<summary></summary>
<description></description>
</key>

<key type="i" name="border-width">
<default>1</default>
<summary></summary>
@@ -62,12 +56,6 @@
<description></description>
</key>

<key type="s" name="applet-icon">
<default>"/usr/share/mate-menu/icons/mate-logo.svg"</default>
<summary></summary>
<description></description>
</key>

<key type="as" name="plugins-list">
<default>['places', 'system_management', 'newpane', 'applications']</default>
<summary></summary>
@@ -51,7 +51,7 @@ def __init__( self ):

#i18n
self.mainWindow.set_title(_("Menu preferences"))
self.mainWindow.set_icon_from_file("/usr/share/mate-menu/icons/mate-logo.svg")
self.mainWindow.set_icon_name("start-here")

self.builder.get_object("startWithFavorites").set_label(_("Always start with favorites pane"))
self.builder.get_object("showButtonIcon").set_label(_("Show button icon"))
@@ -100,7 +100,6 @@ def __init__( self ):
self.builder.get_object("placesIconSizeLabel").set_text(_("Icon size:"))
self.builder.get_object("systemIconSizeLabel").set_text(_("Icon size:"))
self.builder.get_object("hoverLabel").set_text(_("Hover delay (ms):"))
self.builder.get_object("label4").set_text(_("Button icon:"))
self.builder.get_object("label5").set_text(_("Search command:"))

self.builder.get_object("placesLabel").set_text(_("Places"))
@@ -131,7 +130,7 @@ def __init__( self ):
self.folderChooserDialogTitle = (_("Select a folder"))

self.startWithFavorites = self.builder.get_object( "startWithFavorites" )
self.showAppComments = self.builder.get_object( "showAppComments" )
self.showAppComments = self.builder.get_object( "showAppComments" )
self.showCategoryIcons = self.builder.get_object( "showCategoryIcons" )
self.showRecentPlugin = self.builder.get_object( "showRecentPlugin" )
self.showApplicationsPlugin = self.builder.get_object( "showApplicationsPlugin" )
@@ -165,8 +164,6 @@ def __init__( self ):
self.hotkeyWidget = keybinding.KeybindingWidget(_("Keyboard shortcut:") )
grid = self.builder.get_object( "main_grid" )
grid.attach(self.hotkeyWidget, 0, 2, 2, 1)
self.buttonIcon = self.builder.get_object( "buttonIcon" )
self.buttonIconChooser = self.builder.get_object( "button_icon_chooser" )
self.image_filter = Gtk.FileFilter()
self.image_filter.set_name(_("Images"))
self.image_filter.add_pattern("*.png")
@@ -176,9 +173,6 @@ def __init__( self ):
self.image_filter.add_pattern("*.ico")
self.image_filter.add_pattern("*.xpm")
self.image_filter.add_pattern("*.svg")
self.buttonIconChooser.add_filter(self.image_filter)
self.buttonIconChooser.set_filter(self.image_filter)
self.buttonIconImage = self.builder.get_object("image_button_icon")
self.searchCommand = self.builder.get_object( "search_command" )
self.computertoggle = self.builder.get_object( "computercheckbutton" )
self.homefoldertoggle = self.builder.get_object( "homecheckbutton" )
@@ -242,7 +236,6 @@ def __init__( self ):
self.bindGSettingsValueToWidget( self.settings, "bool", "hide-applet-icon", self.showButtonIcon, "toggled", self.setShowButtonIcon, self.getShowButtonIcon )
self.bindGSettingsValueToWidget( self.settings, "string", "applet-text", self.buttonText, "changed", self.buttonText.set_text, self.buttonText.get_text )
self.bindGSettingsValueToWidget( self.settings, "string", "hot-key", self.hotkeyWidget, "accel-edited", self.hotkeyWidget.set_val, self.hotkeyWidget.get_val )
self.bindGSettingsValueToWidget( self.settings, "string", "applet-icon", self.buttonIconChooser, "file-set", self.setButtonIcon, self.buttonIconChooser.get_filename )
self.bindGSettingsValueToWidget( self.settingsApplications, "string", "search-command", self.searchCommand, "changed", self.searchCommand.set_text, self.searchCommand.get_text )

self.getPluginsToggle()
@@ -362,11 +355,6 @@ def setPluginsLayout (self, widget):
def setShowButtonIcon( self, value ):
self.showButtonIcon.set_active(not value )

def setButtonIcon( self, value ):
self.buttonIconChooser.set_filename(value)
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(value, -1, 22)
self.buttonIconImage.set_from_pixbuf(pixbuf)

def getShowButtonIcon( self ):
return not self.showButtonIcon.get_active()

@@ -446,7 +434,7 @@ def newPlace(self, newButton):
newPlaceDialog = self.builder.get_object( "editPlaceDialog" )
folderChooserDialog = self.builder.get_object( "fileChooserDialog" )
newPlaceDialog.set_transient_for(self.mainWindow)
newPlaceDialog.set_icon_from_file("/usr/share/mate-menu/icons/mate-logo.svg")
newPlaceDialog.set_icon_name("start-here")
newPlaceDialog.set_title(self.newPlaceDialogTitle)
folderChooserDialog.set_title(self.folderChooserDialogTitle)
newPlaceDialog.set_default_response(Gtk.ResponseType.OK)
@@ -477,7 +465,7 @@ def editPlace(self, editButton):
editPlaceDialog = self.builder.get_object( "editPlaceDialog" )
folderChooserDialog = self.builder.get_object( "fileChooserDialog" )
editPlaceDialog.set_transient_for(self.mainWindow)
editPlaceDialog.set_icon_from_file("/usr/share/mate-menu/icons/mate-logo.svg")
editPlaceDialog.set_icon_name("start-here")
editPlaceDialog.set_title(self.editPlaceDialogTitle)
folderChooserDialog.set_title(self.folderChooserDialogTitle)
editPlaceDialog.set_default_response(Gtk.ResponseType.OK)

0 comments on commit 45119cd

Please sign in to comment.
You can’t perform that action at this time.