kwo pushed a commit to branch master.
commit 18b47b5d8af52664745415b5dc352568cdd31087
Author: Kim Woelders <[email protected]>
Date: Wed Jul 10 10:38:12 2013 +0200
Disable moving "None" background to front.
Also some cosmetics.
---
src/backgrounds.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/backgrounds.c b/src/backgrounds.c
index 90401b0..6c3d0c6 100644
--- a/src/backgrounds.c
+++ b/src/backgrounds.c
@@ -1263,6 +1263,7 @@ BackgroundsConfigSave(void)
if (!fs)
return;
+ /* For obscure reasons, store backgrounds in reverse order. */
for (i = num - 1; i >= 0; i--)
{
bg = (Background *) ecore_list_index_goto(bg_list, i);
@@ -1391,7 +1392,7 @@ BackgroundsSighan(int sig, void *prm __UNUSED__)
switch (sig)
{
case ESIGNAL_INIT:
- /* create a fallback background in case no background is found */
+ /* Create the "None" background */
BackgroundCreate(NULL, 0, NULL, 0, 0, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 0);
break;
@@ -1655,8 +1656,14 @@ static void
CB_ConfigureFrontBG(Dialog * d __UNUSED__, int val __UNUSED__,
void *data __UNUSED__)
{
- ecore_list_prepend(bg_list, ecore_list_node_remove(bg_list, tmp_bg));
- BGSettingsGoTo(tmp_bg);
+ Background *bg;
+
+ if (BackgroundIsNone(tmp_bg))
+ return; /* Don't move "None" background */
+
+ bg = ecore_list_node_remove(bg_list, tmp_bg);
+ ecore_list_prepend(bg_list, bg);
+ BGSettingsGoTo(bg);
BG_RedrawView();
autosave();
}
--
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk