Commit cbe4aaf3 authored by John Stowers's avatar John Stowers

Remove welcome image

parent f98a842a
3.5.4
* Update icon (bug 649359)
* Fix appearance of tweaks to no longer have a white background
* Remove welcome image and start with a tweakgroup selected by default
3.5.0
* Work with new gnome shell dbus interface
......
......@@ -2,8 +2,7 @@ SUBDIRS = icons
guidir = $(pkgdatadir)
gui_DATA = \
shell.ui \
welcome.png
shell.ui
desktop_in_files = gnome-tweak-tool.desktop.in
desktopdir = $(datadir)/applications
......
......@@ -114,11 +114,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImage" id="welcome_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-missing-image</property>
</object>
<placeholder/>
</child>
</object>
</child>
......
......@@ -32,8 +32,8 @@ class MainWindow:
filename = os.path.join(gtweak.PKG_DATA_DIR, 'shell.ui')
builder.add_from_file(filename)
welcome = builder.get_object('welcome_image')
welcome.set_from_file(os.path.join(gtweak.PKG_DATA_DIR, 'welcome.png'))
# welcome = builder.get_object('welcome_image')
# welcome.set_from_file(os.path.join(gtweak.PKG_DATA_DIR, 'welcome.png'))
toolbar = builder.get_object('toolbar')
toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR)
......
......@@ -27,6 +27,7 @@ TWEAK_GROUP_FONTS = _("Fonts")
TWEAK_GROUP_THEME = _("Theme")
TWEAK_GROUP_DESKTOP = _("Desktop")
TWEAK_GROUP_WINDOWS = _("Windows")
TWEAK_GROUP_SHELL = _("Shell")
#translate this the same as the name of the file manager (nautilus)
TWEAK_GROUP_FILES = _("Files")
......@@ -108,6 +109,7 @@ class TweakModel(Gtk.ListStore):
# map of tweakgroup.name -> tweakgroup
self._tweak_group_names = {}
self._tweak_group_iters = {}
@property
def tweaks(self):
......@@ -150,8 +152,11 @@ class TweakModel(Gtk.ListStore):
LOG.critical("Tweak group named: %s already exists" % tweakgroup.name)
return
self.append([tweakgroup.name, tweakgroup])
print "ssssssssssssssssssssssS",tweakgroup.name
_iter = self.append([tweakgroup.name, tweakgroup])
self._tweak_group_names[tweakgroup.name] = tweakgroup
self._tweak_group_iters[tweakgroup.name] = _iter
def add_tweak_auto_to_group(self, tweak):
if not tweak.loaded:
......@@ -167,4 +172,7 @@ class TweakModel(Gtk.ListStore):
def search_matches(self, txt):
return [t for t in self.tweaks if t.search_matches(txt)]
def get_tweakgroup_iter(self, name):
return self._tweak_group_iters[name]
......@@ -27,7 +27,7 @@ from gi.repository import Gtk, GLib, GObject, Gio
from gtweak.utils import walk_directories, extract_zip_file, make_combo_list_with_default
from gtweak.gsettings import GSettingsSetting, GSettingsMissingError, GSettingsFakeSetting
from gtweak.gshellwrapper import GnomeShellFactory
from gtweak.tweakmodel import Tweak, TweakGroup, TWEAK_GROUP_THEME
from gtweak.tweakmodel import Tweak, TweakGroup, TWEAK_GROUP_THEME, TWEAK_GROUP_SHELL
from gtweak.widgets import ZipFileChooserButton, GSettingsComboTweak, GSettingsComboEnumTweak, GSettingsSwitchTweak, build_label_beside_widget, build_horizontal_sizegroup, build_combo_box_text
class ShowWindowButtons(GSettingsComboTweak):
......@@ -239,7 +239,7 @@ TWEAKS = (
TWEAK_GROUPS = (
TweakGroup(
_("Shell"),
TWEAK_GROUP_SHELL,
GSettingsSwitchTweak("org.gnome.desktop.interface", "clock-show-date", schema_filename="org.gnome.desktop.interface.gschema.xml"),
GSettingsSwitchTweak("org.gnome.desktop.interface", "clock-show-seconds", schema_filename="org.gnome.desktop.interface.gschema.xml"),
GSettingsSwitchTweak("org.gnome.shell.calendar", "show-weekdate", schema_filename="org.gnome.shell.gschema.xml"),
......
......@@ -20,9 +20,11 @@ import datetime
from gi.repository import Gtk, Gdk, GObject
import gtweak
import gtweak.tweakmodel
from gtweak.tweakmodel import TweakModel
DEFAULT_TWEAKGROUP = gtweak.tweakmodel.TWEAK_GROUP_DESKTOP
class TweakView:
def __init__(self, builder, model):
self._notebook = builder.get_object('notebook')
......@@ -66,7 +68,8 @@ class TweakView:
def run(self):
self._main_window.show_all()
self.show_only_tweaks([])
self.treeview.get_selection().select_iter(
self._model.get_tweakgroup_iter(DEFAULT_TWEAKGROUP))
Gtk.main()
def show_only_tweaks(self, tweaks):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment