mirror of
https://github.com/elementary/gala.git
synced 2024-12-27 03:04:08 +03:00
More cleaning up
This commit is contained in:
parent
a10be988fb
commit
91e274cf30
@ -34,9 +34,7 @@ namespace Gala
|
|||||||
|
|
||||||
public async void load ()
|
public async void load ()
|
||||||
{
|
{
|
||||||
var file = File.new_for_path (filename);
|
show = new Gnome.BGSlideShow (filename);
|
||||||
|
|
||||||
show = new Gnome.BGSlideShow(filename);
|
|
||||||
|
|
||||||
show.load_async (null, (obj, res) => {
|
show.load_async (null, (obj, res) => {
|
||||||
loaded = true;
|
loaded = true;
|
||||||
|
@ -42,15 +42,12 @@ namespace Gala
|
|||||||
|
|
||||||
void update ()
|
void update ()
|
||||||
{
|
{
|
||||||
var reference_child = get_child_at_index (0);
|
var reference_child = (get_child_at_index (0) as Background);
|
||||||
if (reference_child != null) {
|
if (reference_child != null)
|
||||||
(reference_child as Background).changed.disconnect (background_changed);
|
reference_child.changed.disconnect (background_changed);
|
||||||
}
|
|
||||||
|
|
||||||
destroy_all_children ();
|
destroy_all_children ();
|
||||||
|
|
||||||
var settings = BackgroundSettings.get_default ().schema;
|
|
||||||
|
|
||||||
for (var i = 0; i < screen.get_n_monitors (); i++) {
|
for (var i = 0; i < screen.get_n_monitors (); i++) {
|
||||||
var background = new BackgroundManager (screen, i);
|
var background = new BackgroundManager (screen, i);
|
||||||
|
|
||||||
|
@ -19,6 +19,9 @@ namespace Gala
|
|||||||
{
|
{
|
||||||
public class SystemBackground : Meta.BackgroundActor
|
public class SystemBackground : Meta.BackgroundActor
|
||||||
{
|
{
|
||||||
|
const Clutter.Color DEFAULT_BACKGROUND_COLOR = { 0x2e, 0x34, 0x36, 0xff };
|
||||||
|
const string DEFAULT_BACKGROUND_FILE = Config.PKGDATADIR + "/texture.png";
|
||||||
|
|
||||||
static Meta.Background? system_background = null;
|
static Meta.Background? system_background = null;
|
||||||
|
|
||||||
public signal void loaded ();
|
public signal void loaded ();
|
||||||
@ -30,17 +33,16 @@ namespace Gala
|
|||||||
|
|
||||||
construct
|
construct
|
||||||
{
|
{
|
||||||
var filename = Config.PKGDATADIR + "/texture.png";
|
|
||||||
|
|
||||||
if (system_background == null) {
|
if (system_background == null) {
|
||||||
system_background = new Meta.Background (meta_screen);
|
system_background = new Meta.Background (meta_screen);
|
||||||
system_background.set_filename (filename, GDesktop.BackgroundStyle.WALLPAPER);
|
system_background.set_color (DEFAULT_BACKGROUND_COLOR);
|
||||||
|
system_background.set_filename (DEFAULT_BACKGROUND_FILE, GDesktop.BackgroundStyle.WALLPAPER);
|
||||||
}
|
}
|
||||||
|
|
||||||
background = system_background;
|
background = system_background;
|
||||||
|
|
||||||
var cache = Meta.BackgroundImageCache.get_default ();
|
var cache = Meta.BackgroundImageCache.get_default ();
|
||||||
var image = cache.load (filename);
|
var image = cache.load (DEFAULT_BACKGROUND_FILE);
|
||||||
if (image.is_loaded ()) {
|
if (image.is_loaded ()) {
|
||||||
image = null;
|
image = null;
|
||||||
Idle.add(() => {
|
Idle.add(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user