From 345d980be3ddf5ce72aee4f3586edf6878eefd8e Mon Sep 17 00:00:00 2001 From: dan Date: Fri, 27 Nov 1998 12:26:46 +0000 Subject: [PATCH] Window Maker 0.20.3 --- AUTHORS | 4 +- INSTALL | 1 + README | 25 ++++++ TODO | 2 +- WINGs/ChangeLog | 7 ++ WINGs/WINGs.h | 2 + WINGs/wbrowser.c | 24 +++++ WPrefs.app/Icons.c | 135 +++++++++++++--------------- WPrefs.app/WindowHandling.c | 2 +- WindowMaker/plmenu.fr.in | 95 ++++++++++++++++++++ WindowMaker/plmenu.hr.in | 213 ++++++++++++++++++++++++++++++++++++++++++++ install-sh | 181 +++++++++++++++++++++++++++++++------ src/WindowMaker.h | 4 +- src/actions.c | 6 +- src/client.c | 5 +- src/defaults.c | 5 +- src/moveres.c | 5 +- src/placement.c | 5 +- src/session.c | 82 +++++++++++++---- src/window.c | 29 +++--- src/winspector.c | 8 ++ util/Makefile.am | 2 +- util/Makefile.in | 2 +- util/wmsetbg.c | 6 +- util/wsetfont | 185 ++++++++++++++++++++++++++++++++++++++ 25 files changed, 891 insertions(+), 144 deletions(-) create mode 100755 WindowMaker/plmenu.fr.in create mode 100755 WindowMaker/plmenu.hr.in create mode 100755 util/wsetfont diff --git a/AUTHORS b/AUTHORS index bd8e170a..2da169c3 100644 --- a/AUTHORS +++ b/AUTHORS @@ -98,8 +98,8 @@ Move/resize code fixes, button press/release fix Ryan Land workspace "layers" -Largo -wm.gnu.net maintainer, FAQ maintainer +Largo +wm.current.nu maintainer, FAQ co-maintainer Stuart Luppescu Documentation help diff --git a/INSTALL b/INSTALL index b62d9aa5..12ccc859 100644 --- a/INSTALL +++ b/INSTALL @@ -26,6 +26,7 @@ SUPPORTED PLATFORMS - XFree86 / OS/2 - Corel NetWinder - SunOS 4.x +- MacOS / MachTen 4.1.1 Patches to make it work on other platforms are welcome. diff --git a/README b/README index f5ddd553..cd45698f 100644 --- a/README +++ b/README @@ -38,6 +38,10 @@ part of the NEXTSTEP(tm) GUI. It's supposed to be relatively fast and small, feature rich, easy to configure and easy to use, with a simple and elegant appearance borrowed from NEXTSTEP(tm). +Window Maker was designed keeping integration with GNUstep in mind and is the +"official" window manager for it. Read more about GNUstep further on this +file. + Window Maker was previously called WindowMaker. Window Maker has no connection with Windowmaker, the software for @@ -134,6 +138,26 @@ using. You can use the system information section at the end of BUGFORM as a guideline. Another thing: please don't send HTML mail. +GNUstep +======= + +GNUstep is a complete object-oriented development system, based on the +OpenStep specification released by NeXT(tm) (now Apple(tm)) and Sun(tm). It +will provide everything one needs to produce cross-platform, object-oriented, +graphical (and non-graphical) applications; providing among other things, +base system libraries, a high-level GUI application framework that uses a +Display PostScript(tm)-like imaging model (DGS), objects for accessing +relational databases, distributed objects and a graphical development +environment, with a interface builder, a project management system and other +tools. + +GNUstep will be used to create a user environment, with everything needed for +a complete graphical user interface, such as a file viewer, text editors and +other applications. Note that the user environment (or "desktop environment") +is only a small part of the whole GNUstep project. + +For more information on the GNUstep project, visit: http://www.gnustep.org + Running multiple instances of Window Maker ========================================== @@ -260,6 +284,7 @@ Window Maker is copyrighted by Alfredo K. Kojima and is licensed through the GNU General Public License. Read the COPYING file for the complete license. NeXT, OpenStep and NEXTSTEP are a trademarks of NeXT Computer, Inc. +All other trademarks are property of their respective owners. The authors reserve the right to make changes in the software without prior notice. diff --git a/TODO b/TODO index f2cc0859..e007ba42 100644 --- a/TODO +++ b/TODO @@ -35,7 +35,7 @@ Need to do: - GNOME stuff - add new file for stuff like default commands and dnd commands for docked apps, balloons for the dock etc - +- alpha-channel app specified icons Maybe some day: =============== diff --git a/WINGs/ChangeLog b/WINGs/ChangeLog index 018a5fa2..205ffbff 100644 --- a/WINGs/ChangeLog +++ b/WINGs/ChangeLog @@ -1,3 +1,10 @@ +changes since wmaker 0.20.2: +............................ + +- WMSetBrowserMaxVisibleColumns() - untested + + + changes since wmaker 0.20.0: ............................ diff --git a/WINGs/WINGs.h b/WINGs/WINGs.h index f8291189..53b41752 100644 --- a/WINGs/WINGs.h +++ b/WINGs/WINGs.h @@ -815,6 +815,8 @@ int WMAddBrowserColumn(WMBrowser *bPtr); void WMRemoveBrowserItem(WMBrowser *bPtr, int column, int row); +void WMSetBrowserMaxVisibleColumns(WMBrowser *bPtr, int columns); + void WMSetBrowserColumnTitle(WMBrowser *bPtr, int column, char *title); WMListItem *WMAddSortedBrowserItem(WMBrowser *bPtr, int column, char *text, Bool isBranch); diff --git a/WINGs/wbrowser.c b/WINGs/wbrowser.c index b81afe8e..3db14b09 100644 --- a/WINGs/wbrowser.c +++ b/WINGs/wbrowser.c @@ -134,6 +134,30 @@ WMCreateBrowser(WMWidget *parent) } +void +WMSetBrowserMaxVisibleColumns(WMBrowser *bPtr, int columns) +{ + if (columns > bPtr->maxVisibleColumns) { + + if (columns > bPtr->columnCount) { + int i = columns - bPtr->columnCount; + + while (i--) { + WMAddBrowserColumn(bPtr); + } + } + + resizeBrowser(bPtr, bPtr->view->size.width, bPtr->view->size.height); + + } else if (columns < bPtr->maxVisibleColumns) { + + resizeBrowser(bPtr, bPtr->view->size.width, bPtr->view->size.height); + } + + bPtr->maxVisibleColumns = columns; +} + + int WMGetBrowserNumberOfColumns(WMBrowser *bPtr) { diff --git a/WPrefs.app/Icons.c b/WPrefs.app/Icons.c index a90711d8..4b936bf7 100644 --- a/WPrefs.app/Icons.c +++ b/WPrefs.app/Icons.c @@ -37,12 +37,7 @@ typedef struct _Panel { WMFrame *posVF; WMFrame *posV; - WMButton *nwB; - WMButton *neB; - WMButton *swB; - WMButton *seB; - WMButton *verB; - WMButton *horB; + WMButton *posB[8]; WMFrame *animF; WMButton *animB[4]; @@ -54,6 +49,7 @@ typedef struct _Panel { WMFrame *sizeF; WMPopUpButton *sizeP; + int iconPos; } _Panel; @@ -66,8 +62,16 @@ showIconLayout(WMWidget *widget, void *data) { _Panel *panel = (_Panel*)data; int w, h; + int i; - if (WMGetButtonSelected(panel->horB)) { + for (i=0; i<8; i++) { + if (panel->posB[i] == widget) { + panel->iconPos = i; + break; + } + } + + if (panel->iconPos & 1) { w = 32; h = 8; } else { @@ -76,14 +80,19 @@ showIconLayout(WMWidget *widget, void *data) } WMResizeWidget(panel->posV, w, h); - if (WMGetButtonSelected(panel->nwB)) { + switch (panel->iconPos & ~1) { + case 0: WMMoveWidget(panel->posV, 2, 2); - } else if (WMGetButtonSelected(panel->neB)) { + break; + case 2: WMMoveWidget(panel->posV, 95-2-w, 2); - } else if (WMGetButtonSelected(panel->swB)) { + break; + case 4: WMMoveWidget(panel->posV, 2, 70-2-h); - } else { + break; + default: WMMoveWidget(panel->posV, 95-2-w, 70-2-h); + break; } } @@ -111,23 +120,20 @@ showData(_Panel *panel) } if (str[0]=='t' || str[0]=='T') { - if (str[1]=='r' || str[1]=='R') { - WMPerformButtonClick(panel->neB); - } else { - WMPerformButtonClick(panel->nwB); - } + i = 0; } else { - if (str[1]=='r' || str[1]=='R') { - WMPerformButtonClick(panel->seB); - } else { - WMPerformButtonClick(panel->swB); - } + i = 4; + } + if (str[1]=='r' || str[1]=='R') { + i += 2; } if (str[2]=='v' || str[2]=='V') { - WMPerformButtonClick(panel->verB); + i += 0; } else { - WMPerformButtonClick(panel->horB); + i += 1; } + panel->iconPos = i; + WMPerformButtonClick(panel->posB[i]); i = GetIntegerForKey("IconSize"); i = (i-24)/8; @@ -171,56 +177,44 @@ createPanel(Panel *p) WMMoveWidget(panel->posF, 25, 10); WMSetFrameTitle(panel->posF, _("Icon Positioning")); - panel->nwB = WMCreateButton(panel->posF, WBTOnOff); - WMResizeWidget(panel->nwB, 24, 24); - WMMoveWidget(panel->nwB, 15, 25); - WMSetButtonAction(panel->nwB, showIconLayout, panel); - - panel->neB = WMCreateButton(panel->posF, WBTOnOff); - WMResizeWidget(panel->neB, 24, 24); - WMMoveWidget(panel->neB, 115, 25); - WMSetButtonAction(panel->neB, showIconLayout, panel); - - panel->swB = WMCreateButton(panel->posF, WBTOnOff); - WMResizeWidget(panel->swB, 24, 24); - WMMoveWidget(panel->swB, 15, 100); - WMSetButtonAction(panel->swB, showIconLayout, panel); - - panel->seB = WMCreateButton(panel->posF, WBTOnOff); - WMResizeWidget(panel->seB, 24, 24); - WMMoveWidget(panel->seB, 115, 100); - WMSetButtonAction(panel->seB, showIconLayout, panel); + for (i=0; i<8; i++) { + panel->posB[i] = WMCreateButton(panel->posF, WBTOnOff); + WMSetButtonAction(panel->posB[i], showIconLayout, panel); - WMGroupButtons(panel->nwB, panel->neB); - WMGroupButtons(panel->nwB, panel->seB); - WMGroupButtons(panel->nwB, panel->swB); + if (i>0) + WMGroupButtons(panel->posB[0], panel->posB[i]); + } + WMMoveWidget(panel->posB[1], 70, 23); + WMResizeWidget(panel->posB[1], 47, 15); + WMMoveWidget(panel->posB[3], 70+47, 23); + WMResizeWidget(panel->posB[3], 47, 15); + + WMMoveWidget(panel->posB[0], 55, 38); + WMResizeWidget(panel->posB[0], 15, 35); + WMMoveWidget(panel->posB[4], 55, 38+35); + WMResizeWidget(panel->posB[4], 15, 35); + + WMMoveWidget(panel->posB[5], 70, 38+70); + WMResizeWidget(panel->posB[5], 47, 15); + WMMoveWidget(panel->posB[7], 70+47, 38+70); + WMResizeWidget(panel->posB[7], 47, 15); + + WMMoveWidget(panel->posB[2], 70+95, 38); + WMResizeWidget(panel->posB[2], 15, 35); + WMMoveWidget(panel->posB[6], 70+95, 38+35); + WMResizeWidget(panel->posB[6], 15, 35); color = WMCreateRGBColor(WMWidgetScreen(panel->win), 0x5100, 0x5100, 0x7100, True); panel->posVF = WMCreateFrame(panel->posF); WMResizeWidget(panel->posVF, 95, 70); - WMMoveWidget(panel->posVF, 30, 38); + WMMoveWidget(panel->posVF, 70, 38); WMSetFrameRelief(panel->posVF, WRSunken); WMSetWidgetBackgroundColor(panel->posVF, color); WMReleaseColor(color); panel->posV = WMCreateFrame(panel->posVF); WMSetFrameRelief(panel->posV, WRSimple); - - panel->verB = WMCreateRadioButton(panel->posF); - WMResizeWidget(panel->verB, 105, 20); - WMMoveWidget(panel->verB, 150, 45); - WMSetButtonText(panel->verB, "Vertical"); - WMSetButtonAction(panel->verB, showIconLayout, panel); - - panel->horB = WMCreateRadioButton(panel->posF); - WMResizeWidget(panel->horB, 105, 20); - WMMoveWidget(panel->horB, 150, 75); - WMSetButtonText(panel->horB, "Horizontal"); - WMSetButtonAction(panel->horB, showIconLayout, panel); - - - WMGroupButtons(panel->horB, panel->verB); WMMapSubwidgets(panel->posF); @@ -298,22 +292,19 @@ storeData(_Panel *panel) SetIntegerForKey(WMGetPopUpButtonSelectedItem(panel->sizeP)*8+24, "IconSize"); - buf[3] = 0; - if (WMGetButtonSelected(panel->nwB)) { - buf[0] = 't'; - buf[1] = 'l'; - } else if (WMGetButtonSelected(panel->neB)) { + buf[3] = 0; + + if (panel->iconPos < 4) { buf[0] = 't'; - buf[1] = 'r'; - } else if (WMGetButtonSelected(panel->swB)) { - buf[0] = 'b'; - buf[1] = 'l'; } else { buf[0] = 'b'; + } + if (panel->iconPos & 2) { buf[1] = 'r'; + } else { + buf[1] = 'l'; } - - if (WMGetButtonSelected(panel->horB)) { + if (panel->iconPos & 1) { buf[2] = 'h'; } else { buf[2] = 'v'; diff --git a/WPrefs.app/WindowHandling.c b/WPrefs.app/WindowHandling.c index 05fdc19e..c0a24f7c 100644 --- a/WPrefs.app/WindowHandling.c +++ b/WPrefs.app/WindowHandling.c @@ -297,7 +297,7 @@ createPanel(Panel *p) panel->miconB = WMCreateSwitchButton(panel->maxiF); WMResizeWidget(panel->miconB, 185, 20); - WMMoveWidget(panel->miconB, 10, 10); + WMMoveWidget(panel->miconB, 10, 15); WMSetButtonText(panel->miconB, _("...do not resize over icons")); panel->mdockB = WMCreateSwitchButton(panel->maxiF); diff --git a/WindowMaker/plmenu.fr.in b/WindowMaker/plmenu.fr.in new file mode 100755 index 00000000..58ce9808 --- /dev/null +++ b/WindowMaker/plmenu.fr.in @@ -0,0 +1,95 @@ +("Applications", + ("Informations", + ("Panneau d'informations", INFO_PANEL), + ("Panneau d'informations légales", LEGAL_PANEL), + ("Console système", EXEC, "xconsole"), + ("Charge système", EXEC, "xosview || xload"), + ("Liste des processus", EXEC, "xterm -e top"), + ("Butineur d'aide", EXEC, "xman") + ), + ("Terminal X", EXEC, "xterm -sb"), + ("Rxvt", EXEC, "rxvt -bg black -fg white -fn fixed"), + ("Espaces de travail", WORKSPACE_MENU), + ("Applications", + ("Graphismes", + ("Gimp", EXEC, "gimp >/dev/null"), + ("XV", EXEC, "xv"), + ("XPaint", EXEC, "xpaint"), + ("XFig", EXEC, "xfig") + ), + ("Xfm", EXEC, "xfm"), + ("OffiX Files", EXEC, "files"), + ("LyX", EXEC , "lyx"), + ("Netscape", EXEC, "netscape"), + ("Ghostview", EXEC, "ghostview %a(Entrez un fichier)"), + ("Acrobat", EXEC, "/usr/local/Acrobat3/bin/acroread %a(Entrez un fichier PDF)"), + ("TkDesk", EXEC, "tkdesk") + ), + ("Editeurs", + ("XFte", EXEC, "xfte"), + ("XEmacs", EXEC, "xemacs || emacs"), + ("XJed", EXEC, "xjed"), + ("NEdit", EXEC, "nedit"), + ("Xedit", EXEC, "xedit"), + ("VI", EXEC, "xterm -e vi") + ), + ("Divers", + ("Xmcd", EXEC, "xmcd 2> /dev/null"), + ("Xplaycd", EXEC, "xplaycd"), + ("Xmixer", EXEC, "xmixer") + ), + ("Utilitaires", + ("Calculatrice", EXEC, "xcalc"), + ("Propriétés de la fenêtre", EXEC, "xprop | xmessage -center -title 'xprop' -file -"), + ("Sélecteur de polices", EXEC, "xfontsel"), + ("Emulateur de terminal", EXEC, "xminicom"), + ("Loupe", EXEC, "xmag"), + ("Carte des couleurs", EXEC, "xcmap"), + ("XKill", EXEC, "xkill"), + ("ASClock", EXEC, "asclock -shape"), + ("Sélections", EXEC, "xclipboard") + ), + ("Sélection", + ("Copier", EXEC, "echo '%s' | wxcopy"), + ("Envoyer à", EXEC, "xterm -name mail -T Pine -e pine %s"), + ("Naviguer", EXEC, "netscape %s"), + ("Rechercher dans le manuel", EXEC, "MANUAL_SEARCH(%s)") + ), + ("Espace de travail", + ("Cacher les autres fenêtres", HIDE_OTHERS), + ("Montrer toutes les fenêtres", SHOW_ALL), + ("Arranger les icônes", ARRANGE_ICONS), + ("Retracer l'écran", REFRESH), + ("Vérrouiller", EXEC, "xlock -allowroot -usefirst"), + ("Sauver la session", SAVE_SESSION), + ("Effacer la session", CLEAR_SESSION) + ), + ("Apparence", + ("Thèmes", OPEN_MENU, "#pkgdatadir#/Themes ~/GNUstep/Library/WindowMaker/Themes WITH setstyle"), + ("Styles", OPEN_MENU, "#pkgdatadir#/Styles ~/GNUstep/Library/WindowMaker/Styles WITH setstyle"), + ("Jeu d'icônes", OPEN_MENU, "#pkgdatadir#/IconSets ~/GNUstep/Library/WindowMaker/IconSets WITH seticons"), + ("Fond d'écran", + ("Unifié", + ("Noir", EXEC, "wdwrite WindowMaker WorkspaceBack '(solid, black)'"), + ("Bleu", EXEC, "wdwrite WindowMaker WorkspaceBack '(solid, \"#505075\")'"), + ("Violet", EXEC, "wdwrite WindowMaker WorkspaceBack '(solid, \"#554466\")'"), + ("Blanc crème", EXEC, "wdwrite WindowMaker WorkspaceBack '(solid, wheat4)'"), + ("Gris foncé", EXEC, "wdwrite WindowMaker WorkspaceBack '(solid, \"#333340\")'"), + ("Bordeaux", EXEC, "wdwrite WindowMaker WorkspaceBack '(solid, \"#400020\")'") + ), + ("Degradé", + ("Drapeau", EXEC, "wdwrite WindowMaker WorkspaceBack '(mdgradient, green, red, white, green)'"), + ("Ciel", EXEC, "wdwrite WindowMaker WorkspaceBack '(vgradient, blue4, white)'") + ), + ("Images", OPEN_MENU, "#pkgdatadir#/Backgrounds ~/GNUstep/Library/WindowMaker/Backgrounds WITH wmsetbg -u -t") + ), + ("Sauver le thème", EXEC, "getstyle -t ~/GNUstep/Library/WindowMaker/Themes /\"%a(Theme name)\""), + ("Sauver le jeu d'icônes", EXEC, "geticonset ~/GNUstep/Library/WindowMaker/IconSets /\"%a(IconSet name)\"") + ), + ("Quitter", + ("Redémarrer", RESTART), + ("Démarrer AfterStep", RESTART, afterstep), + ("Quitter...", EXIT), + ("Terminer la session", SHUTDOWN) + ) +) diff --git a/WindowMaker/plmenu.hr.in b/WindowMaker/plmenu.hr.in new file mode 100755 index 00000000..2e54808a --- /dev/null +++ b/WindowMaker/plmenu.hr.in @@ -0,0 +1,213 @@ +( + Programi, + ( + Info, + ("Info Panel...", INFO_PANEL), + (Legal..., LEGAL_PANEL), + ("Sistemska konzola", EXEC, xconsole), + ("Optere\346enje sistema", EXEC, "xosview || xload"), + ("Lista procesa", EXEC, "xterm -e top"), + ("Pretra\276iva\350 manuala", EXEC, xman) + ), + (XTerm, EXEC, "xterm -sb"), + (Rxvt, EXEC, "rxvt -bg black -fg white -fn fixed"), + ("Radni Prostori", WORKSPACE_MENU), + ( + Programi, + ( + Grafika, + (Gimp, EXEC, "gimp >/dev/null"), + (XV, EXEC, xv), + (XPaint, EXEC, xpaint), + (XFig, EXEC, xfig) + ), + ("X File Manager", EXEC, xfm), + ("OffiX Files", EXEC, files), + (LyX, EXEC, lyx), + (Netscape, EXEC, netscape), + (Ghostview, EXEC, "ghostview %a(Enter file to view)"), + ( + Acrobat, + EXEC, + "/usr/local/Acrobat3/bin/acroread %a(Enter PDF to view)" + ), + (TkDesk, EXEC, tkdesk) + ), + ( + Editori, + (XFte, EXEC, xfte), + (XEmacs, EXEC, "xemacs || emacs"), + (XJed, EXEC, xjed), + (NEdit, EXEC, nedit), + (Xedit, EXEC, xedit), + (VI, EXEC, "xterm -e vi") + ), + ( + Razno, + (Xmcd, EXEC, "xmcd 2> /dev/null"), + (Xplaycd, EXEC, xplaycd), + (Xmixer, EXEC, xmixer) + ), + ( + "Pomo\346ni programi", + (Kalkulator, EXEC, xcalc), + ( + "Postavke prozora", + EXEC, + "xprop | xmessage -center -title 'xprop' -file -" + ), + ("Bira\350 fontova", EXEC, xfontsel), + ("Emulator terminala", EXEC, xminicom), + ("Pove\346alo", EXEC, xmag), + (Colormap, EXEC, xcmap), + (XKill, EXEC, xkill), + (ASClock, EXEC, "asclock -shape"), + (Clipboard, EXEC, xclipboard) + ), + ( + Odabir, + (Kopiraj, EXEC, "echo '%s' | wxcopy"), + ("Po\271alji e-mail", EXEC, "xterm -name mail -T Pine -e pine %s"), + ("Otvori web", EXEC, "netscape %s"), + ("Potra\276i u manualu", EXEC, "MANUAL_SEARCH(%s)") + ), + ( + "Radni prostor", + ("Sakrij ostale", HIDE_OTHERS), + ("Poka\276i sve", SHOW_ALL), + ("Pospremi ikone", ARRANGE_ICONS), + ("Osvje\276i", REFRESH), + ("Zaklju\350aj", EXEC, "xlock -allowroot -usefirst"), + ("Snimi session", SAVE_SESSION), + ("O\350isti snimljeni Session", CLEAR_SESSION) + ), + ( + Izgled, + ( + Teme, + OPEN_MENU, + "/usr/local/share/WindowMaker/Themes ~/GNUstep/Library/WindowMaker/Themes WITH setstyle" + ), + ( + Stilovi, + OPEN_MENU, + "/usr/local/share/WindowMaker/Styles ~/GNUstep/Library/WindowMaker/Styles WITH setstyle" + ), + ( + "Setovi ikona", + OPEN_MENU, + "/usr/local/share/WindowMaker/IconSets ~/GNUstep/Library/WindowMaker/IconSets WITH seticons" + ), + ( + Pozadina, + ( + Boja, + ( + Crna, + EXEC, + "wdwrite WindowMaker WorkspaceBack '(solid, black)'" + ), + ( + Plava, + EXEC, + "wdwrite WindowMaker WorkspaceBack '(solid, \"#505075\")'" + ), + ( + Indigo, + EXEC, + "wdwrite WindowMaker WorkspaceBack '(solid, \"#243e6c\")'" + ), + ( + "Duboko Plava", + EXEC, + "wdwrite WindowMaker WorkspaceBack '(solid, \"#180090\")'" + ), + ( + Purpurna, + EXEC, + "wdwrite WindowMaker WorkspaceBack '(solid, \"#554466\")'" + ), + ( + Pustinjska, + EXEC, + "wdwrite WindowMaker WorkspaceBack '(solid, wheat4)'" + ), + ( + "Tamno siva", + EXEC, + "wdwrite WindowMaker WorkspaceBack '(solid, \"#333340\")'" + ), + ( + Vinska, + EXEC, + "wdwrite WindowMaker WorkspaceBack '(solid, \"#400020\")'" + ) + ), + ( + Preljevi, + ( + "Zalazak sunca", + EXEC, + "wdwrite WindowMaker WorkspaceBack '(mvgradient, deepskyblue4, black, deepskyblue4, tomato4)'" + ), + ( + Nebo, + EXEC, + "wdwrite WindowMaker WorkspaceBack '(vgradient, blue4, white)'" + ), + ( + "Plave nijanse", + EXEC, + "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#7080a5\", \"#101020\")'" + ), + ( + "Indigo nijanse", + EXEC, + "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#746ebc\", \"#242e4c\")'" + ), + ( + "Purpurne nijanse", + EXEC, + "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#654c66\", \"#151426\")'" + ), + ( + "Pustinjske nijanse", + EXEC, + "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#a09060\", \"#302010\")'" + ), + ( + "Sive nijanse", + EXEC, + "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#636380\", \"#131318\")'" + ), + ( + "Vinske nijanse", + EXEC, + "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#600040\", \"#180010\")'" + ) + ), + ( + Slike, + OPEN_MENU, + "/usr/local/share/WindowMaker/Backgrounds ~/GNUstep/Library/WindowMaker/Backgrounds WITH wmsetbg -u -t" + ) + ), + ( + "Snimi temu", + EXEC, + "getstyle -t ~/GNUstep/Library/WindowMaker/Themes/\"%a(Theme name)\"" + ), + ( + "Snimi set ikona", + EXEC, + "geticonset ~/GNUstep/Library/WindowMaker/IconSets/\"%a(IconSet name)\"" + ) + ), + ( + Izlaz, + ("Ponovo startaj", RESTART), + ("Startaj AfterStep", RESTART, afterstep), + (Izlaz..., EXIT), + ("Izlaz iz sessiona...", SHORTCUT, "Mod1+e", SHUTDOWN, QUICK) + ), +) diff --git a/install-sh b/install-sh index 0ff4b6a0..e8436696 100755 --- a/install-sh +++ b/install-sh @@ -1,14 +1,27 @@ #!/bin/sh - # # install - install a program, script, or datafile -# This comes from X11R5; it is not part of GNU. +# This comes from X11R5 (mit/util/scripts/install.sh). # -# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ +# Copyright 1991 by the Massachusetts Institute of Technology # -# This script is compatible with the BSD install script, but was written -# from scratch. +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. # +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. # set DOITPROG to echo to test this script @@ -26,9 +39,12 @@ chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" +transformbasename="" +transform_arg="" instcmd="$mvprog" -chmodcmd="" +chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" @@ -36,6 +52,7 @@ rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" +dir_arg="" while [ x"$1" != x ]; do case $1 in @@ -43,6 +60,10 @@ while [ x"$1" != x ]; do shift continue;; + -d) dir_arg=true + shift + continue;; + -m) chmodcmd="$chmodprog $2" shift shift @@ -62,10 +83,20 @@ while [ x"$1" != x ]; do shift continue;; + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + *) if [ x"$src" = x ] then src=$1 else + # this colon is to work around a 386BSD /bin/sh bug + : dst=$1 fi shift @@ -75,45 +106,145 @@ done if [ x"$src" = x ] then - echo "install: no input file specified" - exit 1 -fi - -if [ x"$dst" = x ] -then - echo "install: no destination specified" + echo "install: no input file specified" exit 1 +else + true fi +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic -if [ -d $dst ] -then - dst="$dst"/`basename $src` + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done fi +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + # Make a temp file name in the proper directory. -dstdir=`dirname $dst` -dsttmp=$dstdir/#inst.$$# + dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name -$doit $instcmd $src $dsttmp + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits -if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi -if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi -if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi -if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. -$doit $rmcmd $dst -$doit $mvcmd $dsttmp $dst + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && exit 0 diff --git a/src/WindowMaker.h b/src/WindowMaker.h index 528d7e25..c981ede8 100644 --- a/src/WindowMaker.h +++ b/src/WindowMaker.h @@ -141,7 +141,7 @@ typedef struct WObjDescriptor { #define WIS_TWIST 1 #define WIS_FLIP 2 #define WIS_NONE 3 - +#define WIS_RANDOM 4 /* secret */ /* switchmenu actions */ #define ACTION_ADD 0 @@ -212,7 +212,7 @@ typedef struct WPreferences { char use_saveunders; /* turn on SaveUnders for menus, * icons etc. */ - char no_window_under_dock; + char no_window_over_dock; char no_window_over_icons; diff --git a/src/actions.c b/src/actions.c index e6ac0501..e13b3422 100644 --- a/src/actions.c +++ b/src/actions.c @@ -414,7 +414,7 @@ wMaximizeWindow(WWindow *wwin, int directions) if (wwin->screen_ptr->dock && (!wwin->screen_ptr->dock->lowered - || wPreferences.no_window_under_dock)) { + || wPreferences.no_window_over_dock)) { new_width -= wPreferences.icon_size + DOCK_EXTRA_SPACE; if (!wwin->screen_ptr->dock->on_right_side) @@ -674,6 +674,10 @@ animateResize(WScreen *scr, int x, int y, int w, int h, if (style == WIS_NONE) return; + if (style == WIS_RANDOM) { + style = rand()%3; + } + k = (hiding ? 2 : 3); switch(style) { case WIS_TWIST: diff --git a/src/client.c b/src/client.c index 41960461..e1993245 100644 --- a/src/client.c +++ b/src/client.c @@ -233,12 +233,13 @@ wClientConfigure(WWindow *wwin, XConfigureRequestEvent *xcre) if (!wwin->flags.shaded) { /* If the window is shaded, wrong height will be set for the window */ if (xcre->value_mask & CWX) - nx = xcre->x; + nx = xcre->x - FRAME_BORDER_WIDTH; else nx = wwin->frame_x; if (xcre->value_mask & CWY) - ny = xcre->y - ((ofs_y < 0) ? 0 : wwin->frame->top_width); + ny = xcre->y - ((ofs_y < 0) ? 0 : wwin->frame->top_width) + - FRAME_BORDER_WIDTH; else ny = wwin->frame_y; diff --git a/src/defaults.c b/src/defaults.c index bc8a32e8..b9e7c8b4 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -222,6 +222,7 @@ static WOptionEnumeration seIconificationStyles[] = { {"Twist", WIS_TWIST, 0}, {"Flip", WIS_FLIP, 0}, {"None", WIS_NONE, 0}, + {"random", WIS_RANDOM, 0}, {NULL, 0, 0} }; @@ -391,8 +392,8 @@ WDefaultEntry optionList[] = { {"AutoArrangeIcons", "NO", NULL, &wPreferences.auto_arrange_icons, getBool, NULL }, - {"NoWindowUnderDock", "NO", NULL, - &wPreferences.no_window_under_dock, getBool, NULL + {"NoWindowOverDock", "NO", NULL, + &wPreferences.no_window_over_dock, getBool, NULL }, {"NoWindowOverIcons", "NO", NULL, &wPreferences.no_window_over_icons, getBool, NULL diff --git a/src/moveres.c b/src/moveres.c index 34ea8e6e..c11e9457 100644 --- a/src/moveres.c +++ b/src/moveres.c @@ -1235,13 +1235,12 @@ wSelectWindows(WScreen *scr, XEvent *ev) void -InteractivePlaceWindow(WWindow *wwin, int *x_ret, int *y_ret) +InteractivePlaceWindow(WWindow *wwin, int *x_ret, int *y_ret, + unsigned width, unsigned height) { WScreen *scr = wwin->screen_ptr; Window root = scr->root_win; int x, y, h = 0; - int width = wwin->client.width; - int height = wwin->client.height; XEvent event; KeyCode shiftl, shiftr; Window junkw; diff --git a/src/placement.c b/src/placement.c index 4a1d3b53..592fcd34 100644 --- a/src/placement.c +++ b/src/placement.c @@ -50,7 +50,8 @@ extern WPreferences wPreferences; */ extern void -InteractivePlaceWindow(WWindow *wwin, int *x_ret, int *y_ret); +InteractivePlaceWindow(WWindow *wwin, int *x_ret, int *y_ret, + unsigned width, unsigned height); /* @@ -375,7 +376,7 @@ PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret, switch (wPreferences.window_placement) { case WPM_MANUAL: - InteractivePlaceWindow(wwin, x_ret, y_ret); + InteractivePlaceWindow(wwin, x_ret, y_ret, width, height); break; case WPM_SMART: diff --git a/src/session.c b/src/session.c index baa3d65d..b0466161 100644 --- a/src/session.c +++ b/src/session.c @@ -58,6 +58,9 @@ #ifdef R6SM + +extern int wScreenCount; + /* requested for SaveYourselfPhase2 */ static Bool sWaitingPhase2 = False; @@ -532,7 +535,8 @@ wSessionRestoreLastWorkspace(WScreen *scr) #ifdef R6SM /* * With full session management support, the part of WMState - * that store client window state will become obsolete, + * that store client window state will become obsolete (maybe we can reuse + * the old code too), * but we still need to store state info like the dock and workspaces. * It is better to keep dock/wspace info in WMState because the user * might want to keep the dock configuration while not wanting to @@ -559,11 +563,19 @@ wSessionRestoreLastWorkspace(WScreen *scr) /* * Windows are identified as: * WM_CLASS(instance.class).WM_WINDOW_ROLE + * + * Saved Info: * - * + * WM_CLASS.instance + * WM_CLASSS.class + * WM_WINDOW_ROLE + * geometry + * (state array (miniaturized, shaded, etc)) + * workspace + * wich dock */ -static void -saveClientState(WWindow *wwin, proplist_t dict) +static proplist_t +makeClientState(WWindow *wwin) { proplist_t key; @@ -585,7 +597,7 @@ smSaveYourselfPhase2Proc(SmcConn smc_conn, SmPointer client_data) Bool gsPrefix = False; char *discardCmd = NULL; time_t t; - FILE *file; + proplist_t state; #ifdef DEBUG1 puts("received SaveYourselfPhase2 SM message"); @@ -629,17 +641,57 @@ smSaveYourselfPhase2Proc(SmcConn smc_conn, SmPointer client_data) free(prefix); /* save the states of all windows we're managing */ - - file = fopen(statefile, "w"); - if (!file) { - wsyserror(_("could not create state file %s"), statefile); - goto fail; + state = PLMakeArrayFromElements(NULL, NULL); + + /* + * Format: + * + * state_file ::= dictionary with version_info ; state + * version_info ::= version = 1; + * state ::= state = array of screen_info + * screen_info ::= array of (screen number, window_info, window_info, ...) + * window_info ::= + */ + for (i=0; iscreen); + pscreen = PLMakeArrayFromElements(PLMakeString(buf), NULL); + + wwin = scr->focused_window; + while (wwin) { + proplist_t pwindow; + + pwindow = makeClientState(wwin); + PLAppendArrayElement(pscreen, pwindow); + + wwin = wwin->prev; + } + + PLAppendArrayElement(state, pscreen); + } + + { + proplist_t statefile; + + statefile = PLMakeDictionaryFromEntries(PLMakeString("Version"), + PLMakeString("1"), + + PLMakeString("Screens"), + state, + + NULL); + + PLSetFilename(statefile, PLMakeString(statefile)); + PLSave(statefile, NO); + + PLRelease(statefile); } - - - - fclose(file); - /* set the remaining properties that we didn't set at * startup time */ diff --git a/src/window.c b/src/window.c index 656ec2a1..a547510e 100644 --- a/src/window.c +++ b/src/window.c @@ -800,18 +800,23 @@ wManageWindow(WScreen *scr, Window window) * or if the window wants to * start iconic. * If geometry was saved, restore it. */ - if (win_state && win_state->state->use_geometry) { - x = win_state->state->x; - y = win_state->state->y; - } else if (wwin->transient_for==None && !scr->flags.startup && - workspace==scr->current_workspace && !iconic && - !(wwin->normal_hints->flags & (USPosition|PPosition))) { - PlaceWindow(wwin, &x, &y, width, height); - } - - if (wwin->window_flags.dont_move_off) - wScreenBringInside(scr, &x, &y, width, height); - + { + Bool dontBring = False; + + if (win_state && win_state->state->use_geometry) { + x = win_state->state->x; + y = win_state->state->y; + } else if (wwin->transient_for==None && !scr->flags.startup && + workspace==scr->current_workspace && !iconic && + !(wwin->normal_hints->flags & (USPosition|PPosition))) { + PlaceWindow(wwin, &x, &y, width, height); + if (wPreferences.window_placement == WPM_MANUAL) + dontBring = True; + } + + if (wwin->window_flags.dont_move_off && dontBring) + wScreenBringInside(scr, &x, &y, width, height); + } /* *-------------------------------------------------- * diff --git a/src/winspector.c b/src/winspector.c index 3fef6573..d3844037 100644 --- a/src/winspector.c +++ b/src/winspector.c @@ -1323,6 +1323,14 @@ createInspectorForWindow(WWindow *wwin) WMSetPopUpButtonItemEnabled(panel->pagePopUp, 4, False); panel->appFrm = NULL; } + + /* if the window is a transient, don't let it have a miniaturize + * button */ + if (wwin->transient_for!=None && wwin->transient_for!=scr->root_win) + WMSetButtonEnabled(panel->attrChk[3], False); + else + WMSetButtonEnabled(panel->attrChk[3], True); + WMRealizeWidget(panel->win); diff --git a/util/Makefile.am b/util/Makefile.am index dee7cdc1..b5caf052 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -7,7 +7,7 @@ bin_PROGRAMS = wxcopy wxpaste wdwrite getstyle setstyle seticons geticonset wmse bin_SCRIPTS = wmaker.inst wm-oldmenu2new wsetfont -EXTRA_DIST = wmaker.inst.in bughint wm-oldmenu2new +EXTRA_DIST = wmaker.inst.in bughint wm-oldmenu2new wsetfont INCLUDES = @DFLAGS@ -I$(top_srcdir)/wrlib -I$(top_srcdir)/libPropList\ @XCFLAGS@ @GFXFLAGS@ diff --git a/util/Makefile.in b/util/Makefile.in index d00b0a0b..8bd15807 100644 --- a/util/Makefile.in +++ b/util/Makefile.in @@ -96,7 +96,7 @@ bin_PROGRAMS = wxcopy wxpaste wdwrite getstyle setstyle seticons geticonset wmse bin_SCRIPTS = wmaker.inst wm-oldmenu2new wsetfont -EXTRA_DIST = wmaker.inst.in bughint wm-oldmenu2new +EXTRA_DIST = wmaker.inst.in bughint wm-oldmenu2new wsetfont INCLUDES = @DFLAGS@ -I$(top_srcdir)/wrlib -I$(top_srcdir)/libPropList\ @XCFLAGS@ @GFXFLAGS@ diff --git a/util/wmsetbg.c b/util/wmsetbg.c index 1eeaebaf..1504d5f2 100644 --- a/util/wmsetbg.c +++ b/util/wmsetbg.c @@ -48,7 +48,9 @@ char *ProgName; -#ifdef at_one_step_from_the_trash +#define fuckin_crap + +#ifdef fuckin_crap /* Alfredo please take a look at this function. I don't like the way * it sends the XKillClient. Should it interfere this way with the rest? * This was added by the patch to allow the transparent background for Eterm. @@ -483,7 +485,7 @@ main(int argc, char **argv) #endif RDestroyImage(image); if (secretBuffer==None) { -#ifdef at_one_step_from_the_trash +#ifdef fuckin_crap setPixmapProperty(pixmap, dpy, root_win); #endif XSetWindowBackgroundPixmap(dpy, root_win, pixmap); diff --git a/util/wsetfont b/util/wsetfont new file mode 100755 index 00000000..c089b4bb --- /dev/null +++ b/util/wsetfont @@ -0,0 +1,185 @@ +#!/bin/sh +# +# language/font setting script for Window Maker +# +# by MANOME Tomonori +# +# [Special Thanks To] +# Korean fontset info from: +# Byeong-Chan, Kim +# Chae-yong Chong +# Latin2 fontset info from: +# Piotr Dembinski +# Toni Bilic +# Greek fontset info from: +# Nikolaos Papagrigoriou +# Quote bug fix info from: +# Luke Kendall + +VERSION="Version 0.4 1998/11/10" + +WDWRITE="wdwrite" + + +if test $# != 1; then + echo + echo "$0 - font/language setting utility for Window Maker" + echo + echo "Usage: $VERSION" + echo " $0