From 1fe9ef3056e80dfed05bbb1b00443c11a64223c1 Mon Sep 17 00:00:00 2001 From: mathias Date: Tue, 12 Jul 2005 04:56:05 +0000 Subject: Renaming of 'bsetroot' to 'fbsetroot' (Mathias) blackbox's 'bsetroot' and fluxbox's 'bsetroot' have different syntax nowadays and collide when you install fluxbox and blackbox. hence the renaming. --- ChangeLog | 10 +- doc/Makefile.am | 4 +- doc/bsetroot.1 | 120 -------------- doc/fbsetroot.1 | 113 +++++++++++++ nls/C/Translation.m | 2 +- nls/be_BY/Translation.m | 2 +- nls/bg_BG/Translation.m | 2 +- nls/cs_CZ/Translation.m | 2 +- nls/da_DK/Translation.m | 2 +- nls/de_DE/Translation.m | 2 +- nls/es_ES/Translation.m | 2 +- nls/et_EE/Translation.m | 2 +- nls/fluxbox-nls.hh | 8 +- nls/fr_FR/Translation.m | 2 +- nls/it_IT/Translation.m | 2 +- nls/ja_JP/Translation.m | 2 +- nls/ko_KR/Translation.m | 2 +- nls/lv_LV/Translation.m | 2 +- nls/nl_NL/Translation.m | 2 +- nls/pl_PL/Translation.m | 2 +- nls/pt_BR/Translation.m | 2 +- nls/pt_PT/Translation.m | 2 +- nls/ru_RU/Translation.m | 2 +- nls/sl_SI/Translation.m | 2 +- nls/sv_SE/Translation.m | 2 +- nls/tr_TR/Translation.m | 2 +- nls/vi_VN/Translation.m | 2 +- util/Makefile.am | 8 +- util/bsetroot.cc | 427 ------------------------------------------------ util/bsetroot.hh | 55 ------- util/fbsetbg | 14 +- util/fbsetroot.cc | 427 ++++++++++++++++++++++++++++++++++++++++++++++++ util/fbsetroot.hh | 55 +++++++ util/startfluxbox.in | 2 +- 34 files changed, 644 insertions(+), 643 deletions(-) delete mode 100644 doc/bsetroot.1 create mode 100644 doc/fbsetroot.1 delete mode 100644 util/bsetroot.cc delete mode 100644 util/bsetroot.hh create mode 100644 util/fbsetroot.cc create mode 100644 util/fbsetroot.hh diff --git a/ChangeLog b/ChangeLog index 9278b38..7fbc1f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,14 @@ (Format: Year/Month/Day) Changes for 0.9.14: -*05/07/07: +*05/07/12: + Renaming of 'bsetroot' to 'fbsetroot' (Mathias) + blackbox's 'bsetroot' and fluxbox's 'bsetroot' have different syntax + nowadays and collide when you install fluxbox and blackbox. hence + the renaming + updated manpage, helper utils (fbgm, startfluxbox, fbsetbg), nls etc +*05/07/06: + Added even more applications to fbgm (Mathias) + fluxbox-generate_menu.in * Added info about locale path in -info argument (Thanks php-coder) src/main.cc, nls/* *05/07/05: diff --git a/doc/Makefile.am b/doc/Makefile.am index 13d3c3b..7568c18 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -4,9 +4,9 @@ SUBDIRS = ru CLEANFILES = fluxbox.1 fluxstyle.1 MAINTAINERCLEANFILES = Makefile.in -man_MANS = fluxbox.1 bsetroot.1 fbrun.1 fbsetbg.1 \ +man_MANS = fluxbox.1 fbsetroot.1 fbrun.1 fbsetbg.1 \ startfluxbox.1 fluxstyle.1 fbrun.1 -EXTRA_DIST=fluxbox.1.in bsetroot.1 fbrun.1 startfluxbox.1 fbsetbg.1 \ +EXTRA_DIST=fluxbox.1.in fbsetroot.1 fbrun.1 startfluxbox.1 fbsetbg.1 \ fluxstyle.1.in Coding_style distclean-local: rm -f *\~ diff --git a/doc/bsetroot.1 b/doc/bsetroot.1 deleted file mode 100644 index 9d4bd07..0000000 --- a/doc/bsetroot.1 +++ /dev/null @@ -1,120 +0,0 @@ -.\" -.\" Man page for Bsetroot -.\" -.\" Copyright (c) 2000 by Wilbert Berendsen -.\" Copyright (c) 2004 by Curt "Asenchi" Micol -.\" -.\" This page was updated for Fluxbox by Curt "Asenchi" Micol on June 25, 2004 -.\" -.\" Permission to use, copy, modify, and distribute this documentation for -.\" any purpose with or without fee is hereby granted, provided that the -.\" above copyright notice and this permission notice appear in all copies. -.\" -.\" THE DOCUMENTATION IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL -.\" WARRANTIES WITH REGARD TO THIS DOCUMENTATION INCLUDING ALL IMPLIED -.\" WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE -.\" AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -.\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -.\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -.\" TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -.\" PERFORMANCE OF THIS DOCUMENTATION -.\" -.TH bsetroot 1 "June 25th, 2004" "0.60.3" -.SH NAME -bsetroot \- a simple background utility used by the Fluxbox window manager, ori -ginally written -for and by the original Blackbox window manager team. -.SH SYNOPSIS -.BR bsetroot " \-help" -.br -.B bsetroot -.RI "[ \-display " display " ] \-solid " color -.br -.B bsetroot -.RI "[ \-display " display " ] \-mod " "x y" " \-fg " color " \-bg " color -.br -.B bsetroot -.RI "[ \-display " display " ] \-gradient " texture " \-from " color " \-to " color -.SH DESCRIPTION -Bsetroot is a utility that can control the appearance of the root window in -three ways: Either give it a solid color, or write a two color modula pattern -to it, or render a gradient texture, based on two different colors. -.PP -Bsetroot resembles -.IR xsetroot (1) -in this functionality but it supports multiple screen displays, and gradient -textures the same way as Blackbox or Fluxbox does. -It doesn't handle cursors etc. -Bsetroot was originally part of the Blackbox package and was carried over with -the code that became Fluxbox. -.SH OPTIONS -Bsetroot operates in three ways, you must choose one of the first 3 options: -.TP -.BI \-solid " color" -Sets the root window to specified color. -.TP -.BI \-mod " x y" -Creates a modula pattern. You must specify -.BR \-bg " and " \-fg -colors. -.TP -.BI \-gradient " texturestring" -Renders the specified texture string to the root window. -.RS -.PP -.I texturestring -may be one of: -.PP -.B Horizontal / Vertical / Diagonal / Crossdiagonal / Pipecross / Elliptic / Rectangle / Pyramid -.PP -Select one of these texture types, they only apply when -.B \-gradient -is specifed. You must also specify both a -.BR \-from " and a " \-to -color. -.RE -.TP -.BI \-display " display" -Tells Bsetroot to connect to the specified display. -.TP -.BI "\-bg, \-background " color -Background color. -Needed for -.B \-mod -patterns. -.TP -.BI "\-fg, \-foreground " color -Foreground color. -Needed for -.B \-mod -patterns. -.TP -.BI \-from " color" -Start color for rendering textures. -Needed for -.B \-gradient -operation mode. -.TP -.BI \-to " color" -Ending color for rendering textures. -Needed for -.B \-gradient -operation mode. -.TP -.B \-help -Prints version info and short help text. -.SH AUTHOR -Bsetroot is written and maintained by Brad Hughes -.nh \" hyphenation off -(blackbox@alug.org) -.hy \" on again -and Jeff Raven -.nh -(jraven@psu.edu). -.PP -This manpage was modified by Curt "Asenchi" Micol for -the Fluxbox window manager. -.hy -.SH SEE ALSO -.IR fluxbox (1) -.IR fbsetbg (1) diff --git a/doc/fbsetroot.1 b/doc/fbsetroot.1 new file mode 100644 index 0000000..ec8c088 --- /dev/null +++ b/doc/fbsetroot.1 @@ -0,0 +1,113 @@ +.\" +.\" Man page for fbsetroot +.\" +.\" Copyright (c) 2000 by Wilbert Berendsen +.\" Copyright (c) 2004 by Curt "Asenchi" Micol +.\" +.\" This page was updated for Fluxbox by Curt "Asenchi" Micol on June 25, 2004 +.\" +.\" Permission to use, copy, modify, and distribute this documentation for +.\" any purpose with or without fee is hereby granted, provided that the +.\" above copyright notice and this permission notice appear in all copies. +.\" +.\" THE DOCUMENTATION IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL +.\" WARRANTIES WITH REGARD TO THIS DOCUMENTATION INCLUDING ALL IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +.\" AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +.\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +.\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +.\" TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +.\" PERFORMANCE OF THIS DOCUMENTATION +.\" +.TH fbsetroot 1 "July 8th, 2005" "0.9.13" +.SH NAME +fbsetroot \- a simple background utility used by the Fluxbox window manager, originally +written for and by the original Blackbox window manager team. +.SH SYNOPSIS +.BR fbsetroot " \-help" +.br +.B fbsetroot +.RI "[ \-display " display " ] \-solid " color +.br +.B fbsetroot +.RI "[ \-display " display " ] \-mod " "x y" " \-fg " color " \-bg " color +.br +.B fbsetroot +.RI "[ \-display " display " ] \-gradient " texture " \-from " color " \-to " color +.SH DESCRIPTION +fbsetroot is a utility that can control the appearance of the root window in +three ways: Either give it a solid color, or write a two color modula pattern +to it, or render a gradient texture, based on two different colors. +.PP +fbsetroot resembles +.IR xsetroot (1) +in this functionality but it supports multiple screen displays, and gradient +textures the same way as Blackbox or Fluxbox does. +It doesn't handle cursors etc. +fbsetroot was originally part of the Blackbox package and was carried over with +the code that became Fluxbox. It was called bsetroot back in those days. +.SH OPTIONS +fbsetroot operates in three ways, you must choose one of the first 3 options: +.TP +.BI \-solid " color" +Sets the root window to specified color. +.TP +.BI \-mod " x y" +Creates a modula pattern. You must specify +.BR \-bg " and " \-fg +colors. +.TP +.BI \-gradient " texturestring" +Renders the specified texture string to the root window. +.RS +.PP +.I texturestring +may be one of: +.PP +.B Horizontal / Vertical / Diagonal / Crossdiagonal / Pipecross / Elliptic / Rectangle / Pyramid +.PP +Select one of these texture types, they only apply when +.B \-gradient +is specifed. You must also specify both a +.BR \-from " and a " \-to +color. +.RE +.TP +.BI \-display " display" +Tells fbsetroot to connect to the specified display. +.TP +.BI "\-bg, \-background " color +Background color. +Needed for +.B \-mod +patterns. +.TP +.BI "\-fg, \-foreground " color +Foreground color. +Needed for +.B \-mod +patterns. +.TP +.BI \-from " color" +Start color for rendering textures. +Needed for +.B \-gradient +operation mode. +.TP +.BI \-to " color" +Ending color for rendering textures. +Needed for +.B \-gradient +operation mode. +.TP +.B \-help +Prints version info and short help text. +.SH AUTHOR +fbsetroot is written and maintained by the Fluxbox Development Team +.PP +This manpage was modified by Curt "Asenchi" Micol for +the Fluxbox window manager. +.hy +.SH SEE ALSO +.IR fluxbox (1) +.IR fbsetbg (1) diff --git a/nls/C/Translation.m b/nls/C/Translation.m index 620b644..ebd8847 100644 --- a/nls/C/Translation.m +++ b/nls/C/Translation.m @@ -213,7 +213,7 @@ $set 17 #Workspace 3 New Workspace 4 Remove Last -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: error: must specify one of: -solid, -mod, -gradient\n 2 Couldn't create pixmap atoms, giving up! diff --git a/nls/be_BY/Translation.m b/nls/be_BY/Translation.m index 1c3993d..3c2c771 100644 --- a/nls/be_BY/Translation.m +++ b/nls/be_BY/Translation.m @@ -211,7 +211,7 @@ $set 17 #Workspace 3 Íîâàå ïðàöî¢íàå ìåñöà 4 Âûäàë³öü àïîøíÿå -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: ïàìûëêà: ïàâ³ííà áûöü íåøòà ç íàñòóïíàãà: -solid, -mod, -gradient\n 2 Couldn't create pixmap atoms, giving up! diff --git a/nls/bg_BG/Translation.m b/nls/bg_BG/Translation.m index 7397653..a82f35e 100644 --- a/nls/bg_BG/Translation.m +++ b/nls/bg_BG/Translation.m @@ -104,7 +104,7 @@ $set 17 #Workspace 3 Íîâî Ðàáîòíî Ìÿñòî 4 Ìàõíè Ïîñëåäíîòî -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: error: must specify one of: -solid, -mod, -gradient\n 3 %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ diff --git a/nls/cs_CZ/Translation.m b/nls/cs_CZ/Translation.m index ef8eb6b..20ab710 100644 --- a/nls/cs_CZ/Translation.m +++ b/nls/cs_CZ/Translation.m @@ -210,7 +210,7 @@ $set 17 #Workspace 3 Nová plocha 4 Odstranit poslední -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: error: must specify one of: -solid, -mod, -gradient\n 2 Couldn't create pixmap atoms, giving up! diff --git a/nls/da_DK/Translation.m b/nls/da_DK/Translation.m index da98671..0e555d5 100644 --- a/nls/da_DK/Translation.m +++ b/nls/da_DK/Translation.m @@ -104,7 +104,7 @@ $set 17 #Workspace 3 Nyt skrivebord 4 Fjern sidste -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: fejl: specificér en af følgende: -solid, -mod, -gradient\n 3 %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ diff --git a/nls/de_DE/Translation.m b/nls/de_DE/Translation.m index 6c28c4d..8036e97 100644 --- a/nls/de_DE/Translation.m +++ b/nls/de_DE/Translation.m @@ -206,7 +206,7 @@ $set 17 #Workspace 3 Neuer Desktop 4 Letzten Desktop entfernen -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: error: must specify one of: -solid, -mod, -gradient\n 2 Couldn't create pixmap atoms, giving up! diff --git a/nls/es_ES/Translation.m b/nls/es_ES/Translation.m index 6008ef7..11489c6 100644 --- a/nls/es_ES/Translation.m +++ b/nls/es_ES/Translation.m @@ -104,7 +104,7 @@ $set 17 #Workspace 3 Escritorio nuevo 4 Quitar el último escritorio -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: error: es necesario especifiar uno de: -solid, -mod, -gradient\n 3 %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ diff --git a/nls/et_EE/Translation.m b/nls/et_EE/Translation.m index e36a681..023ed30 100644 --- a/nls/et_EE/Translation.m +++ b/nls/et_EE/Translation.m @@ -102,7 +102,7 @@ $set 17 #Workspace 3 Uus töölaud 4 Eemalda viimane -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: viga: pead määratlema ühe järgnevaist: -solid, -mod, -gradient\n 3 %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ diff --git a/nls/fluxbox-nls.hh b/nls/fluxbox-nls.hh index a6c9079..26057a9 100644 --- a/nls/fluxbox-nls.hh +++ b/nls/fluxbox-nls.hh @@ -202,10 +202,10 @@ enum { WorkspaceNewWorkspace = 3, WorkspaceRemoveLast = 4, - bsetrootSet = 18, - bsetrootMustSpecify = 1, - bsetrootNoPixmapAtoms = 2, - bsetrootUsage = 3, + fbsetrootSet = 18, + fbsetrootMustSpecify = 1, + fbsetrootNoPixmapAtoms = 2, + fbsetrootUsage = 3, mainSet = 19, mainDISPLAYRequiresArg = 1, diff --git a/nls/fr_FR/Translation.m b/nls/fr_FR/Translation.m index 27c6333..cac5c5b 100644 --- a/nls/fr_FR/Translation.m +++ b/nls/fr_FR/Translation.m @@ -104,7 +104,7 @@ $set 17 #Workspace 3 Nouveau bureau 4 Supprimer le dernier -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: Erreur: il faut préciser: -solid, -mod, -gradient\n 3 %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ diff --git a/nls/it_IT/Translation.m b/nls/it_IT/Translation.m index 888fe0b..9add2e1 100644 --- a/nls/it_IT/Translation.m +++ b/nls/it_IT/Translation.m @@ -103,7 +103,7 @@ $set 17 #Workspace 3 Crea una nuova 4 Elimina l'ultima -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: errore: specicare una delle opzioni : -solid, -mod, -gradient\n 3 %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ diff --git a/nls/ja_JP/Translation.m b/nls/ja_JP/Translation.m index 9441ba0..b4e868f 100644 --- a/nls/ja_JP/Translation.m +++ b/nls/ja_JP/Translation.m @@ -106,7 +106,7 @@ $set 17 #Workspace 3 ¿·µ¬¥ï¡¼¥¯¥¹¥Ú¡¼¥¹ºîÀ® 4 ËöÈø¤Î¥ï¡¼¥¯¥¹¥Ú¡¼¥¹¤òºï½ü -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: error: ¼¡¤ÎÃ椫¤é°ì¤Ä¤òÁªÂò¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó: -solid, -mod, -gradient\n 3 %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ diff --git a/nls/ko_KR/Translation.m b/nls/ko_KR/Translation.m index c74627f..3bd2807 100644 --- a/nls/ko_KR/Translation.m +++ b/nls/ko_KR/Translation.m @@ -210,7 +210,7 @@ $set 17 #Workspace 3 »õ ÀÛ¾÷°ø°£ Ãß°¡ 4 ¸¶Áö¸· °Í Á¦°Å -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: error: must specify one of: -solid, -mod, -gradient\n 2 Couldn't create pixmap atoms, giving up! diff --git a/nls/lv_LV/Translation.m b/nls/lv_LV/Translation.m index d09f105..0a4998e 100644 --- a/nls/lv_LV/Translation.m +++ b/nls/lv_LV/Translation.m @@ -103,7 +103,7 @@ $set 17 #Workspace 3 Jauna Darba vieta 4 Noòemt Pçdçjo -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: kïûda: jânosaka viens no: -solid, -mod, -gradient\n 3 %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ diff --git a/nls/nl_NL/Translation.m b/nls/nl_NL/Translation.m index 3493cbf..2381c80 100644 --- a/nls/nl_NL/Translation.m +++ b/nls/nl_NL/Translation.m @@ -105,7 +105,7 @@ $set 17 #Workspace 3 Nieuw werkveld 4 Verwijder laatste -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: error: must specify one of: -solid, -mod, -gradient\n 3 %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ diff --git a/nls/pl_PL/Translation.m b/nls/pl_PL/Translation.m index 69c4e89..1c13f3a 100644 --- a/nls/pl_PL/Translation.m +++ b/nls/pl_PL/Translation.m @@ -217,7 +217,7 @@ $set 17 #Workspace 3 Nowy Pulpit 4 Usuñ Ostatni -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: b³±d: musisz okre¶liæ jedno z: -solid, -mod, -gradient\n 2 Nie mogê stowrzyæ elementów pixmap - dajê sobie spokój! diff --git a/nls/pt_BR/Translation.m b/nls/pt_BR/Translation.m index 4bc3145..1fb44c6 100644 --- a/nls/pt_BR/Translation.m +++ b/nls/pt_BR/Translation.m @@ -104,7 +104,7 @@ $set 17 #Workspace 3 Nova Area de Trabalho 4 Remover Ultima -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: erro: necessario especificar um dos seguintes argumentos: -solid, -mod, -gradient\n 3 %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ diff --git a/nls/pt_PT/Translation.m b/nls/pt_PT/Translation.m index 1aee9a0..162c16b 100644 --- a/nls/pt_PT/Translation.m +++ b/nls/pt_PT/Translation.m @@ -104,7 +104,7 @@ $set 17 #Workspace 3 Nova Area de Trabalho 4 Remover Ultima Area de Trabalho -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: erro: necessario especificar um dos seguintes argumentos: -solid, -mod, -gradient\n 3 %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ diff --git a/nls/ru_RU/Translation.m b/nls/ru_RU/Translation.m index 454ff3a..1c4d24e 100644 --- a/nls/ru_RU/Translation.m +++ b/nls/ru_RU/Translation.m @@ -154,7 +154,7 @@ $set 17 #Workspace 3 îÏ×ÙÊ ÒÁÂÏÞÉÊ ÓÔÏÌ 4 õÄÁÌÉÔØ ÐÏÓÌÅÄÎÉÊ -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: ÏÛÉÂËÁ: ÎÅÏÂÈÏÄÉÍÏ ÚÁÄÁÔØ ÏÄÉÎ ÉÚ ÓÌÅÄÕÀÝÉÈ ËÌÀÞÅÊ: -solid, -mod, -gradient\n 3 %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ diff --git a/nls/sl_SI/Translation.m b/nls/sl_SI/Translation.m index 9b96ec1..3228cc7 100644 --- a/nls/sl_SI/Translation.m +++ b/nls/sl_SI/Translation.m @@ -105,7 +105,7 @@ $set 17 #Workspace 3 Nova delovna povr¹ina 4 Odstrani zadnjo -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: napaka: doloèiti je treba eno: -solid, -mod, -gradient\n 3 %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ diff --git a/nls/sv_SE/Translation.m b/nls/sv_SE/Translation.m index 87670cf..2458774 100644 --- a/nls/sv_SE/Translation.m +++ b/nls/sv_SE/Translation.m @@ -105,7 +105,7 @@ $set 17 #Workspace 3 Nytt skrivbord 4 Ta bort sista -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: fel: måste specifiera en av: -solid, -mod, -gradient\n 3 %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ diff --git a/nls/tr_TR/Translation.m b/nls/tr_TR/Translation.m index 74444c8..af871cc 100644 --- a/nls/tr_TR/Translation.m +++ b/nls/tr_TR/Translation.m @@ -104,7 +104,7 @@ $set 17 #Workspace 3 Yeni Masaüstü 4 Son Masaüstünü Kaldýr -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s : hata : -solid, -mod yada -gradient'den en az birisini belirlemek zorundasýnýz\n 3 %s 2.0 : Telif hakký (c) 1997-2000 Brad Hughes\n\n\ diff --git a/nls/vi_VN/Translation.m b/nls/vi_VN/Translation.m index b538b79..39e7459 100644 --- a/nls/vi_VN/Translation.m +++ b/nls/vi_VN/Translation.m @@ -185,7 +185,7 @@ $set 17 #Workspace 3 Không gian má»›i 4 Xóa không gian cuối -$set 18 #bsetroot +$set 18 #fbsetroot 1 %s: lá»—i: cần Ä‘Æ°a ra má»™t trong các từ khóa sau: -solid, -mod, -gradient\n 2 Không thể tạo các pixmap! diff --git a/util/Makefile.am b/util/Makefile.am index 3e45aa6..58a232f 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -2,9 +2,9 @@ SUBDIRS= fbrun INCLUDES= -I$(top_srcdir)/src -I$(top_srcdir)/src/FbTk bin_SCRIPTS= fbsetbg fluxbox-generate_menu startfluxbox -bin_PROGRAMS= bsetroot -bsetroot_SOURCES= bsetroot.cc bsetroot.hh -bsetroot_LDADD= ../src/FbRootWindow.o ../src/FbAtoms.o \ +bin_PROGRAMS= fbsetroot +fbsetroot_SOURCES= fbsetroot.cc fbsetroot.hh +fbsetroot_LDADD=../src/FbRootWindow.o ../src/FbAtoms.o \ ../src/FbTk/libFbTk.a MAINTAINERCLEANFILES= Makefile.in @@ -16,7 +16,7 @@ all-local: startfluxbox clean-local: rm -f startfluxbox fluxbox-generate_menu -bsetroot.o: bsetroot.cc ../config.h $(srcdir)/bsetroot.hh \ +fbsetroot.o: fbsetroot.cc ../config.h $(srcdir)/fbsetroot.hh \ $(top_srcdir)/src/FbRootWindow.hh $(top_srcdir)/src/FbAtoms.hh startfluxbox: startfluxbox.in diff --git a/util/bsetroot.cc b/util/bsetroot.cc deleted file mode 100644 index 56cec1a..0000000 --- a/util/bsetroot.cc +++ /dev/null @@ -1,427 +0,0 @@ -// Copyright (c) 2002 - 2005 Henrik Kinnunen (fluxgen at fluxbox dot org) -// Copyright (c) 1997 - 2000 Brad Hughes -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - -// $Id$ - -#include "bsetroot.hh" - -#include "../src/FbTk/I18n.hh" -#include "../src/FbTk/ImageControl.hh" -#include "../src/FbTk/GContext.hh" -#include "../src/FbRootWindow.hh" - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif // HAVE_CONFIG_H - -#include - -#ifdef HAVE_CSTRING - #include -#else - #include -#endif -#ifdef HAVE_CSTDLIB - #include -#else - #include -#endif -#ifdef HAVE_CSTDIO - #include -#else - #include -#endif -#include - -using namespace std; - -bsetroot::bsetroot(int argc, char **argv, char *dpy_name) - : FbTk::App(dpy_name), m_app_name(argv[0]) { - - pixmaps = (Pixmap *) 0; - grad = fore = back = (char *) 0; - - bool mod = false, sol = false, grd = false; - int mod_x = 0, mod_y = 0, i = 0; - - img_ctrl = new FbTk::ImageControl*[ScreenCount(display())]; - for (; i < ScreenCount(display()); i++) { - img_ctrl[i] = new FbTk::ImageControl(i, true); - } - - for (i = 1; i < argc; i++) { - if (! strcmp("-help", argv[i])) { - usage(); - - } else if ((! strcmp("-fg", argv[i])) || - (! strcmp("-foreground", argv[i])) || - (! strcmp("-from", argv[i]))) { - if ((++i) >= argc) - usage(1); - fore = argv[i]; - - } else if ((! strcmp("-bg", argv[i])) || - (! strcmp("-background", argv[i])) || - (! strcmp("-to", argv[i]))) { - if ((++i) >= argc) - usage(1); - back = argv[i]; - - } else if (! strcmp("-solid", argv[i])) { - if ((++i) >= argc) - usage(1); - fore = argv[i]; - sol = true; - - } else if (! strcmp("-mod", argv[i])) { - if ((++i) >= argc) - usage(); - mod_x = atoi(argv[i]); - if ((++i) >= argc) - usage(); - mod_y = atoi(argv[i]); - if (mod_x < 1) - mod_x = 1; - if (mod_y < 1) - mod_y = 1; - mod = true; - - } else if (! strcmp("-gradient", argv[i])) { - if ((++i) >= argc) - usage(); - - grad = argv[i]; - grd = true; - - } else if (! strcmp("-display", argv[i])) { - // -display passed through tests earlier... we just skip it now - i++; - - } else - usage(); - } - - if ((mod + sol + grd) != true) { - _FB_USES_NLS; - cerr<> 8) & 0xff; - } - } - - - Pixmap bitmap, r_bitmap; - - - bitmap = XCreateBitmapFromData(display(), - root.window(), data, 16, 16); - - // bitmap used as tile, needs to have the same depth as background pixmap - r_bitmap = XCreatePixmap(display(), - root.window(), 16, 16, - root.depth()); - - FbTk::Color f(fore, screen), b(back, screen); - - if (! f.isAllocated()) - f.setPixel(WhitePixel(display(), screen)); - if (! b.isAllocated()) - b.setPixel(BlackPixel(display(), screen)); - - FbTk::GContext gc(root); - - gc.setForeground(f); - gc.setBackground(b); - - // copying bitmap to the one going to be used as tile - XCopyPlane(display(), bitmap, r_bitmap, gc.gc(), - 0, 0, 16, 16, 0, 0, 1l); - - gc.setTile(r_bitmap); - gc.setFillStyle(FillTiled); - - pixmaps[screen] = XCreatePixmap(display(), - root.window(), - root.width(), root.height(), - root.depth()); - - XFillRectangle(display(), pixmaps[screen], gc.gc(), 0, 0, - root.width(), root.height()); - - setRootAtoms(pixmaps[screen], screen); - root.setBackgroundPixmap(pixmaps[screen]); - root.clear(); - - XFreePixmap(display(), bitmap); - XFreePixmap(display(), r_bitmap); - } -} - -/** - draws pixmaps with a fluxbox texure -*/ -void bsetroot::gradient() { - // using temporaray pixmap and then copying it to background pixmap, as it'll - // get crashed somewhere on the way causing apps like XChat chrashing - // as the pixmap has been destroyed - Pixmap tmp; - pixmaps = new Pixmap[ScreenCount(display())]; - // we must insert gradient text - string texture_value = grad ? grad : "solid"; - texture_value.insert(0, "gradient "); - FbTk::Texture texture; - texture.setFromString(texture_value.c_str()); - - for (int screen = 0; screen < ScreenCount(display()); screen++) { - FbRootWindow root(screen); - - - FbTk::GContext gc(root); - texture.color().setFromString(fore, screen); - texture.colorTo().setFromString(back, screen); - - - if (! texture.color().isAllocated()) - texture.color().setPixel(WhitePixel(display(), screen)); - - if (! texture.colorTo().isAllocated()) - texture.colorTo().setPixel(BlackPixel(display(), screen)); - - tmp = img_ctrl[screen]->renderImage(root.width(), root.height(), - texture); - - pixmaps[screen] = XCreatePixmap(display(), - root.window(), - root.width(), root.height(), - root.depth()); - - - XCopyArea(display(), tmp, pixmaps[screen], gc.gc(), 0, 0, - root.width(), root.height(), - 0, 0); - - setRootAtoms(pixmaps[screen], screen); - - root.setBackgroundPixmap(pixmaps[screen]); - root.clear(); - - if (! (root.visual()->c_class & 1)) { - img_ctrl[screen]->removeImage(tmp); - img_ctrl[screen]->cleanCache(); - } - - } -} - -/** - Shows information about usage -*/ -void bsetroot::usage(int exit_code) { - _FB_USES_NLS; - cerr< display connection\n" - " -mod modula pattern\n" - " -foreground, -fg modula foreground color\n" - " -background, -bg modula background color\n\n" - " -gradient gradient texture\n" - " -from gradient start color\n" - " -to gradient end color\n\n" - " -solid solid color\n\n" - " -help print this help text and exit\n", - "bsetroot usage options")<= argc) { - _FB_USES_NLS; - cerr<<_FBTEXT(main, DISPLAYRequiresArg, - "error: '-display' requires an argument", - "option requires an argument")< -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - -// $Id$ - -#ifndef BSETROOT_HH -#define BSETROOT_HH - -#include "../src/FbTk/App.hh" - -namespace FbTk { - -class ImageControl; - -}; - -class bsetroot : public FbTk::App { -public: - bsetroot(int argc, char **argv, char * dpy_name= 0); - ~bsetroot(); - - void gradient(); - void modula(int, int); - void solid(); - void usage(int = 0); - void setRootAtoms(Pixmap pixmap, int screen); - -private: - FbTk::ImageControl **img_ctrl; - Pixmap *pixmaps; - - char *fore, *back, *grad; - int num_screens; - char *m_app_name; -}; - - -#endif // BSETROOT_HH diff --git a/util/fbsetbg b/util/fbsetbg index a75f461..eaa1f9d 100644 --- a/util/fbsetbg +++ b/util/fbsetbg @@ -61,7 +61,7 @@ display_usage() { cat << EOF Usage: $command [-u/-U [wallpapersetter]] [-fFcCtTaA /path/to/wallpaper] [-r/-R /path/to/wallpaperdirectory] - [-b/-B bsetrootoptions] [-l] [-h] [-i] [-p] + [-b/-B fbsetrootoptions] [-l] [-h] [-i] [-p] Use \`\`$command -h'' for a complete help message. EOF @@ -80,7 +80,7 @@ Options: ( if your bgsetter doesn't support this we fall back to -f ) -u Use specified wallpapersetter, use no argument to forget. - -b Forward the options to bsetroot. + -b Forward the options to fbsetroot. -r set random wallpaper from a directory -F,-C,-T,-A,-U,-B,-R same as uncapsed but without remembering. @@ -174,7 +174,7 @@ message() { remembercommand() { grep -vs "|${DISPLAY}$" ${lastwallpaper} > ${lastwallpaper}.tmp mv -f ${lastwallpaper}.tmp ${lastwallpaper} - if [ "$option" = bsetroot ]; then + if [ "$option" = fbsetroot ]; then echo $option'|'$wallpaper'|'$DISPLAY >> $lastwallpaper return fi @@ -262,11 +262,11 @@ while [ $# -gt 0 ]; do wallpaper=$2 remember=false break ;; - -b) option=bsetroot + -b) option=fbsetroot shift wallpaper=$* break ;; - -B) option=bsetroot + -B) option=fbsetroot shift wallpaper=$* remember=false @@ -461,8 +461,8 @@ if [ -z "$DISPLAY" ]; then fi -if [ "$option" = bsetroot ]; then - bsetroot $wallpaper +if [ "$option" = fbsetroot ]; then + fbsetroot $wallpaper if [ ! "$remember" = false ]; then remembercommand fi diff --git a/util/fbsetroot.cc b/util/fbsetroot.cc new file mode 100644 index 0000000..434f150 --- /dev/null +++ b/util/fbsetroot.cc @@ -0,0 +1,427 @@ +// Copyright (c) 2002 - 2005 Henrik Kinnunen (fluxgen at fluxbox dot org) +// Copyright (c) 1997 - 2000 Brad Hughes +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + +// $Id$ + +#include "fbsetroot.hh" + +#include "../src/FbTk/I18n.hh" +#include "../src/FbTk/ImageControl.hh" +#include "../src/FbTk/GContext.hh" +#include "../src/FbRootWindow.hh" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif // HAVE_CONFIG_H + +#include + +#ifdef HAVE_CSTRING + #include +#else + #include +#endif +#ifdef HAVE_CSTDLIB + #include +#else + #include +#endif +#ifdef HAVE_CSTDIO + #include +#else + #include +#endif +#include + +using namespace std; + +fbsetroot::fbsetroot(int argc, char **argv, char *dpy_name) + : FbTk::App(dpy_name), m_app_name(argv[0]) { + + pixmaps = (Pixmap *) 0; + grad = fore = back = (char *) 0; + + bool mod = false, sol = false, grd = false; + int mod_x = 0, mod_y = 0, i = 0; + + img_ctrl = new FbTk::ImageControl*[ScreenCount(display())]; + for (; i < ScreenCount(display()); i++) { + img_ctrl[i] = new FbTk::ImageControl(i, true); + } + + for (i = 1; i < argc; i++) { + if (! strcmp("-help", argv[i])) { + usage(); + + } else if ((! strcmp("-fg", argv[i])) || + (! strcmp("-foreground", argv[i])) || + (! strcmp("-from", argv[i]))) { + if ((++i) >= argc) + usage(1); + fore = argv[i]; + + } else if ((! strcmp("-bg", argv[i])) || + (! strcmp("-background", argv[i])) || + (! strcmp("-to", argv[i]))) { + if ((++i) >= argc) + usage(1); + back = argv[i]; + + } else if (! strcmp("-solid", argv[i])) { + if ((++i) >= argc) + usage(1); + fore = argv[i]; + sol = true; + + } else if (! strcmp("-mod", argv[i])) { + if ((++i) >= argc) + usage(); + mod_x = atoi(argv[i]); + if ((++i) >= argc) + usage(); + mod_y = atoi(argv[i]); + if (mod_x < 1) + mod_x = 1; + if (mod_y < 1) + mod_y = 1; + mod = true; + + } else if (! strcmp("-gradient", argv[i])) { + if ((++i) >= argc) + usage(); + + grad = argv[i]; + grd = true; + + } else if (! strcmp("-display", argv[i])) { + // -display passed through tests earlier... we just skip it now + i++; + + } else + usage(); + } + + if ((mod + sol + grd) != true) { + _FB_USES_NLS; + cerr<> 8) & 0xff; + } + } + + + Pixmap bitmap, r_bitmap; + + + bitmap = XCreateBitmapFromData(display(), + root.window(), data, 16, 16); + + // bitmap used as tile, needs to have the same depth as background pixmap + r_bitmap = XCreatePixmap(display(), + root.window(), 16, 16, + root.depth()); + + FbTk::Color f(fore, screen), b(back, screen); + + if (! f.isAllocated()) + f.setPixel(WhitePixel(display(), screen)); + if (! b.isAllocated()) + b.setPixel(BlackPixel(display(), screen)); + + FbTk::GContext gc(root); + + gc.setForeground(f); + gc.setBackground(b); + + // copying bitmap to the one going to be used as tile + XCopyPlane(display(), bitmap, r_bitmap, gc.gc(), + 0, 0, 16, 16, 0, 0, 1l); + + gc.setTile(r_bitmap); + gc.setFillStyle(FillTiled); + + pixmaps[screen] = XCreatePixmap(display(), + root.window(), + root.width(), root.height(), + root.depth()); + + XFillRectangle(display(), pixmaps[screen], gc.gc(), 0, 0, + root.width(), root.height()); + + setRootAtoms(pixmaps[screen], screen); + root.setBackgroundPixmap(pixmaps[screen]); + root.clear(); + + XFreePixmap(display(), bitmap); + XFreePixmap(display(), r_bitmap); + } +} + +/** + draws pixmaps with a fluxbox texure +*/ +void fbsetroot::gradient() { + // using temporaray pixmap and then copying it to background pixmap, as it'll + // get crashed somewhere on the way causing apps like XChat chrashing + // as the pixmap has been destroyed + Pixmap tmp; + pixmaps = new Pixmap[ScreenCount(display())]; + // we must insert gradient text + string texture_value = grad ? grad : "solid"; + texture_value.insert(0, "gradient "); + FbTk::Texture texture; + texture.setFromString(texture_value.c_str()); + + for (int screen = 0; screen < ScreenCount(display()); screen++) { + FbRootWindow root(screen); + + + FbTk::GContext gc(root); + texture.color().setFromString(fore, screen); + texture.colorTo().setFromString(back, screen); + + + if (! texture.color().isAllocated()) + texture.color().setPixel(WhitePixel(display(), screen)); + + if (! texture.colorTo().isAllocated()) + texture.colorTo().setPixel(BlackPixel(display(), screen)); + + tmp = img_ctrl[screen]->renderImage(root.width(), root.height(), + texture); + + pixmaps[screen] = XCreatePixmap(display(), + root.window(), + root.width(), root.height(), + root.depth()); + + + XCopyArea(display(), tmp, pixmaps[screen], gc.gc(), 0, 0, + root.width(), root.height(), + 0, 0); + + setRootAtoms(pixmaps[screen], screen); + + root.setBackgroundPixmap(pixmaps[screen]); + root.clear(); + + if (! (root.visual()->c_class & 1)) { + img_ctrl[screen]->removeImage(tmp); + img_ctrl[screen]->cleanCache(); + } + + } +} + +/** + Shows information about usage +*/ +void fbsetroot::usage(int exit_code) { + _FB_USES_NLS; + cerr< display connection\n" + " -mod modula pattern\n" + " -foreground, -fg modula foreground color\n" + " -background, -bg modula background color\n\n" + " -gradient gradient texture\n" + " -from gradient start color\n" + " -to gradient end color\n\n" + " -solid solid color\n\n" + " -help print this help text and exit\n", + "fbsetroot usage options")<= argc) { + _FB_USES_NLS; + cerr<<_FBTEXT(main, DISPLAYRequiresArg, + "error: '-display' requires an argument", + "option requires an argument")< +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + +// $Id$ + +#ifndef FBSETROOT_HH +#define FBSETROOT_HH + +#include "../src/FbTk/App.hh" + +namespace FbTk { + +class ImageControl; + +}; + +class fbsetroot : public FbTk::App { +public: + fbsetroot(int argc, char **argv, char * dpy_name= 0); + ~fbsetroot(); + + void gradient(); + void modula(int, int); + void solid(); + void usage(int = 0); + void setRootAtoms(Pixmap pixmap, int screen); + +private: + FbTk::ImageControl **img_ctrl; + Pixmap *pixmaps; + + char *fore, *back, *grad; + int num_screens; + char *m_app_name; +}; + + +#endif // FBSETROOT_HH diff --git a/util/startfluxbox.in b/util/startfluxbox.in index 74f9a96..154ccdb 100755 --- a/util/startfluxbox.in +++ b/util/startfluxbox.in @@ -44,7 +44,7 @@ else # # This sets a black background -@pkgbindir@/bsetroot -solid black +@pkgbindir@/fbsetroot -solid black # This shows the fluxbox-splash-screen # fbsetbg -C @pkgdatadir@/splash.jpg -- cgit v0.11.2