[gnome-tweak-tool] Remove welcome image
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] Remove welcome image
- Date: Tue, 7 Aug 2012 14:13:11 +0000 (UTC)
commit cbe4aaf3bf6fa0bd6408c4a0989ddd461bbfb372
Author: John Stowers <john stowers gmail com>
Date: Tue Aug 7 14:52:52 2012 +0200
Remove welcome image
NEWS | 1 +
data/Makefile.am | 3 +--
data/shell.ui | 6 +-----
data/welcome.png | Bin 44219 -> 0 bytes
gtweak/mainwindow.py | 4 ++--
gtweak/tweakmodel.py | 10 +++++++++-
gtweak/tweaks/tweak_shell.py | 4 ++--
gtweak/tweakview.py | 7 +++++--
8 files changed, 21 insertions(+), 14 deletions(-)
---
diff --git a/NEWS b/NEWS
index 961f42a..61ae5f9 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
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
diff --git a/data/Makefile.am b/data/Makefile.am
index e60ef0b..354a3a3 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -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
diff --git a/data/shell.ui b/data/shell.ui
index 3a56bb7..fa84718 100644
--- a/data/shell.ui
+++ b/data/shell.ui
@@ -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>
diff --git a/gtweak/mainwindow.py b/gtweak/mainwindow.py
index 6fbd568..2dc95e1 100644
--- a/gtweak/mainwindow.py
+++ b/gtweak/mainwindow.py
@@ -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)
diff --git a/gtweak/tweakmodel.py b/gtweak/tweakmodel.py
index 62ccf1c..9db79e7 100644
--- a/gtweak/tweakmodel.py
+++ b/gtweak/tweakmodel.py
@@ -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]
diff --git a/gtweak/tweaks/tweak_shell.py b/gtweak/tweaks/tweak_shell.py
index 6c3189d..78ce783 100644
--- a/gtweak/tweaks/tweak_shell.py
+++ b/gtweak/tweaks/tweak_shell.py
@@ -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"),
diff --git a/gtweak/tweakview.py b/gtweak/tweakview.py
index 3b97454..5346f50 100644
--- a/gtweak/tweakview.py
+++ b/gtweak/tweakview.py
@@ -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):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]