From d3f29988d058f85c3ad46d3533e00e2cb29d7f70 Mon Sep 17 00:00:00 2001 From: kojima Date: Sun, 25 Apr 1999 01:49:46 +0000 Subject: [PATCH] added balloon help --- WPrefs.app/Appearance.c | 24 ++++++++++++++++++++---- WPrefs.app/Configurations.c | 25 ++++++++++++++++++++++++- WPrefs.app/Expert.c | 7 ++++++- WPrefs.app/Focus.c | 5 +++++ WPrefs.app/Icons.c | 19 ++++++++++++++++--- WPrefs.app/KeyboardSettings.c | 6 +++++- WPrefs.app/KeyboardShortcuts.c | 7 ++++++- WPrefs.app/Menu.c | 4 ++++ WPrefs.app/MenuPreferences.c | 5 +++++ WPrefs.app/MouseSettings.c | 14 ++++++++++++-- WPrefs.app/Paths.c | 5 +++++ WPrefs.app/Preferences.c | 4 ++++ WPrefs.app/Text.c | 3 +++ WPrefs.app/WPrefs.c | 7 +++++-- WPrefs.app/WPrefs.h | 6 ++++-- WPrefs.app/WindowHandling.c | 26 +++++++++++++++++++++----- WPrefs.app/Workspace.c | 16 ++++++++++++++-- 17 files changed, 159 insertions(+), 24 deletions(-) diff --git a/WPrefs.app/Appearance.c b/WPrefs.app/Appearance.c index 7b56bfba..e7e83494 100644 --- a/WPrefs.app/Appearance.c +++ b/WPrefs.app/Appearance.c @@ -41,6 +41,8 @@ typedef struct _Panel { WMFrame *frame; char *sectionName; + char *description; + CallbackRec callbacks; WMWindow *win; @@ -1299,7 +1301,11 @@ createPanel(Panel *p) WMHangData(panel->texLs, panel); WMSetListAction(panel->texLs, textureClick, panel); WMSetListDoubleAction(panel->texLs, textureDoubleClick, panel); - + + WMSetBalloonTextForView(_("Double click in the texture you want to use\n" + "for the selected item."), + WMWidgetView(panel->texLs)); + /* command buttons */ font = WMSystemFontOfSize(scr, 10); @@ -1314,6 +1320,9 @@ createPanel(Panel *p) WMSetButtonAction(panel->newB, newTexture, panel); SetButtonAlphaImage(scr, panel->newB, TNEW_FILE); + WMSetBalloonTextForView(_("Create a new texture."), + WMWidgetView(panel->newB)); + panel->ripB = WMCreateCommandButton(panel->frame); WMResizeWidget(panel->ripB, 56, 48); WMMoveWidget(panel->ripB, 341, 180); @@ -1323,6 +1332,9 @@ createPanel(Panel *p) WMSetButtonAction(panel->ripB, extractTexture, panel); SetButtonAlphaImage(scr, panel->ripB, TEXTR_FILE); + WMSetBalloonTextForView(_("Extract texture(s) from a theme or a style file."), + WMWidgetView(panel->ripB)); + WMSetButtonEnabled(panel->ripB, False); panel->editB = WMCreateCommandButton(panel->frame); @@ -1333,6 +1345,8 @@ createPanel(Panel *p) WMSetButtonText(panel->editB, _("Edit")); SetButtonAlphaImage(scr, panel->editB, TEDIT_FILE); WMSetButtonAction(panel->editB, editTexture, panel); + WMSetBalloonTextForView(_("Edit the highlighted texture."), + WMWidgetView(panel->editB)); panel->delB = WMCreateCommandButton(panel->frame); WMResizeWidget(panel->delB, 56, 48); @@ -1343,6 +1357,8 @@ createPanel(Panel *p) SetButtonAlphaImage(scr, panel->delB, TDEL_FILE); WMSetButtonEnabled(panel->delB, False); WMSetButtonAction(panel->delB, deleteTexture, panel); + WMSetBalloonTextForView(_("Delete the highlighted texture."), + WMWidgetView(panel->delB)); WMReleaseFont(font); @@ -1517,6 +1533,9 @@ InitAppearance(WMScreen *scr, WMWindow *win) panel->sectionName = _("Appearance Preferences"); + panel->description = _("Background texture configuration for windows,\n" + "menus and icons."); + panel->win = win; panel->callbacks.createWidgets = createPanel; @@ -1609,6 +1628,3 @@ OpenExtractPanelFor(_Panel *panel, char *path) WMMapWidget(epanel->win); } - - - diff --git a/WPrefs.app/Configurations.c b/WPrefs.app/Configurations.c index 8095f809..9989d967 100644 --- a/WPrefs.app/Configurations.c +++ b/WPrefs.app/Configurations.c @@ -27,6 +27,8 @@ typedef struct _Panel { WMFrame *frame; char *sectionName; + char *description; + CallbackRec callbacks; WMWindow *win; @@ -313,6 +315,9 @@ createPanel(Panel *p) WMSetButtonAltImage(panel->animB, altIcon); WMReleasePixmap(altIcon); } + WMSetBalloonTextForView(_("Disable/enable animations such as those shown\n" + "for window miniaturization, shading etc."), + WMWidgetView(panel->animB)); panel->supB = WMCreateButton(panel->animF, WBTToggle); WMResizeWidget(panel->supB, 64, 64); @@ -329,6 +334,11 @@ createPanel(Panel *p) WMSetButtonAltImage(panel->supB, altIcon); WMReleasePixmap(altIcon); } + WMSetBalloonTextForView(_("Disable/enable `superfluous' features and\n" + "animations. These include the `ghosting' of the\n" + "dock when it's being moved to the another side\n" + "and the explosion animation for undocked icons."), + WMWidgetView(panel->supB)); panel->sfxB = WMCreateButton(panel->animF, WBTToggle); WMResizeWidget(panel->sfxB, 64, 64); @@ -345,7 +355,12 @@ createPanel(Panel *p) WMSetButtonAltImage(panel->sfxB, altIcon); WMReleasePixmap(altIcon); } - + WMSetBalloonTextForView(_("Disable/enable support for sound effects played\n" + "for actions like shading and closing a window.\n" + "You will need a module distributed separately\n" + "for this. You can get it at:\n" + "http://www.frontiernet.net/~southgat/wmsound"), + WMWidgetView(panel->sfxB)); panel->noteL = WMCreateLabel(panel->animF); WMResizeWidget(panel->noteL, 235, 28); @@ -362,6 +377,10 @@ createPanel(Panel *p) WMResizeWidget(panel->dithF, 255, 95); WMMoveWidget(panel->dithF, 255, 130); WMSetFrameTitle(panel->dithF, _("Dithering colormap for 8bpp")); + + WMSetBalloonTextForView(_("Number of colors to reserve for Window Maker\n" + "on displays that support only 8bpp (PseudoColor)."), + WMWidgetView(panel->dithF)); panel->dithB = WMCreateSwitchButton(panel->dithF); WMResizeWidget(panel->dithB, 235, 32); @@ -449,6 +468,10 @@ InitConfigurations(WMScreen *scr, WMWindow *win) panel->sectionName = _("Other Configurations"); + panel->description = _("Animation speeds, titlebar styles, various option\n" + "toggling and number of colors to reserve for\n" + "Window Maker in 8bit displays."); + panel->win = win; panel->callbacks.createWidgets = createPanel; diff --git a/WPrefs.app/Expert.c b/WPrefs.app/Expert.c index dfaaf445..d6e1c2df 100644 --- a/WPrefs.app/Expert.c +++ b/WPrefs.app/Expert.c @@ -25,7 +25,9 @@ typedef struct _Panel { WMFrame *frame; - char *sectionName; + char *sectionName; + + char *description; CallbackRec callbacks; @@ -107,6 +109,9 @@ InitExpert(WMScreen *scr, WMWindow *win) panel->sectionName = _("Expert User Preferences"); + panel->description = _("Options for people who know what they're doing...\n" + "Also have some other misc. options."); + panel->win = win; panel->callbacks.createWidgets = createPanel; diff --git a/WPrefs.app/Focus.c b/WPrefs.app/Focus.c index 75aed5a2..a8965858 100644 --- a/WPrefs.app/Focus.c +++ b/WPrefs.app/Focus.c @@ -28,6 +28,8 @@ typedef struct _Panel { char *sectionName; + char *description; + CallbackRec callbacks; WMWindow *win; @@ -388,6 +390,9 @@ InitFocus(WMScreen *scr, WMWindow *win) panel->sectionName = _("Window Focus Preferences"); + panel->description = _("Keyboard focus switching policy, colormap switching\n" + "policy for 8bpp displays and other related options."); + panel->win = win; panel->callbacks.createWidgets = createPanel; diff --git a/WPrefs.app/Icons.c b/WPrefs.app/Icons.c index e5841ea7..e7244bb2 100644 --- a/WPrefs.app/Icons.c +++ b/WPrefs.app/Icons.c @@ -29,6 +29,8 @@ typedef struct _Panel { char *sectionName; + char *description; + CallbackRec callbacks; WMWindow *win; @@ -246,18 +248,24 @@ createPanel(Panel *p) panel->optF = WMCreateFrame(panel->frame); WMResizeWidget(panel->optF, 260, 70); WMMoveWidget(panel->optF, 25, 150); - WMSetFrameTitle(panel->optF, _("Icon Display")); +/* WMSetFrameTitle(panel->optF, _("Icon Display"));*/ panel->arrB = WMCreateSwitchButton(panel->optF); WMResizeWidget(panel->arrB, 235, 20); WMMoveWidget(panel->arrB, 15, 15); WMSetButtonText(panel->arrB, _("Auto-arrange icons")); + WMSetBalloonTextForView(_("Keep icons and miniwindows arranged all the time."), + WMWidgetView(panel->arrB)); + panel->omnB = WMCreateSwitchButton(panel->optF); WMResizeWidget(panel->omnB, 235, 20); WMMoveWidget(panel->omnB, 15, 40); WMSetButtonText(panel->omnB, _("Omnipresent miniwindows")); + WMSetBalloonTextForView(_("Make miniwindows be present in all workspaces."), + WMWidgetView(panel->omnB)); + WMMapSubwidgets(panel->optF); /***************** Icon Size ****************/ @@ -266,6 +274,8 @@ createPanel(Panel *p) WMMoveWidget(panel->sizeF, 295, 150); WMSetFrameTitle(panel->sizeF, _("Icon Size")); + WMSetBalloonTextForView(_("The size of the dock/application icon and miniwindows"), + WMWidgetView(panel->sizeF)); panel->sizeP = WMCreatePopUpButton(panel->sizeF); WMResizeWidget(panel->sizeP, 156, 20); @@ -335,9 +345,12 @@ InitIcons(WMScreen *scr, WMWindow *win) memset(panel, 0, sizeof(_Panel)); panel->sectionName = _("Icon Preferences"); - + + panel->description = _("Icon/Miniwindow handling options. Icon positioning\n" + "area, sizes of icons, miniaturization animation style."); + panel->win = win; - + panel->callbacks.createWidgets = createPanel; panel->callbacks.updateDomain = storeData; diff --git a/WPrefs.app/KeyboardSettings.c b/WPrefs.app/KeyboardSettings.c index 324764d3..f8ebbbf4 100644 --- a/WPrefs.app/KeyboardSettings.c +++ b/WPrefs.app/KeyboardSettings.c @@ -27,7 +27,9 @@ typedef struct _Panel { WMFrame *frame; char *sectionName; - + + char *description; + CallbackRec callbacks; WMWindow *win; @@ -171,6 +173,8 @@ InitKeyboardSettings(WMScreen *scr, WMWindow *win) panel->sectionName = _("Keyboard Preferences"); + panel->description = _("Not done"); + panel->win = win; panel->callbacks.createWidgets = createPanel; diff --git a/WPrefs.app/KeyboardShortcuts.c b/WPrefs.app/KeyboardShortcuts.c index 7d90dc92..ebea640e 100644 --- a/WPrefs.app/KeyboardShortcuts.c +++ b/WPrefs.app/KeyboardShortcuts.c @@ -31,7 +31,9 @@ typedef struct _Panel { WMFrame *frame; char *sectionName; - + + char *description; + CallbackRec callbacks; WMWindow *win; @@ -498,6 +500,9 @@ InitKeyboardShortcuts(WMScreen *scr, WMWindow *win) panel->sectionName = _("Keyboard Shortcut Preferences"); + panel->description = _("Change the keyboard shortcuts for actions such\n" + "as changing workspaces and opening menus."); + panel->win = win; panel->callbacks.createWidgets = createPanel; diff --git a/WPrefs.app/Menu.c b/WPrefs.app/Menu.c index 26cba123..f8c86d82 100644 --- a/WPrefs.app/Menu.c +++ b/WPrefs.app/Menu.c @@ -31,6 +31,8 @@ typedef struct _Panel { WMFrame *frame; char *sectionName; + char *description; + CallbackRec callbacks; WMWindow *win; @@ -1467,6 +1469,8 @@ InitMenu(WMScreen *scr, WMWindow *win) panel->sectionName = _("Applications Menu Definition"); + panel->description = _("Edit the menu for launching applications."); + panel->win = win; panel->callbacks.createWidgets = createPanel; diff --git a/WPrefs.app/MenuPreferences.c b/WPrefs.app/MenuPreferences.c index e4cd6d21..a406edf5 100644 --- a/WPrefs.app/MenuPreferences.c +++ b/WPrefs.app/MenuPreferences.c @@ -28,6 +28,8 @@ typedef struct _Panel { char *sectionName; + char *description; + CallbackRec callbacks; WMWindow *win; @@ -228,6 +230,9 @@ InitMenuPreferences(WMScreen *scr, WMWindow *win) panel->sectionName = _("Menu Preferences"); + panel->description = _("Menu usability related options. Scrolling speed,\n" + "alignment of submenus etc."); + panel->win = win; panel->callbacks.createWidgets = createPanel; diff --git a/WPrefs.app/MouseSettings.c b/WPrefs.app/MouseSettings.c index c48154c6..01fd74c8 100644 --- a/WPrefs.app/MouseSettings.c +++ b/WPrefs.app/MouseSettings.c @@ -42,6 +42,8 @@ typedef struct _Panel { char *sectionName; + char *description; + CallbackRec callbacks; WMWindow *win; @@ -756,7 +758,12 @@ createPanel(Panel *p) WMResizeWidget(panel->grabF, 240, 55); WMMoveWidget(panel->grabF, 270, 165); WMSetFrameTitle(panel->grabF, _("Mouse Grab Modifier")); - + + WMSetBalloonTextForView(_("Keyboard modifier to use for actions that\n" + "involve dragging windows with the mouse,\n" + "clicking inside the window."), + WMWidgetView(panel->grabF)); + panel->grabP = WMCreatePopUpButton(panel->grabF); WMResizeWidget(panel->grabP, 160, 20); WMMoveWidget(panel->grabP, 40, 25); @@ -919,8 +926,11 @@ InitMouseSettings(WMScreen *scr, WMWindow *win) panel->sectionName = _("Mouse Preferences"); + panel->description = _("Mouse speed/acceleration, double click delay,\n" + "mouse button bindings etc."); + panel->win = win; - + panel->callbacks.createWidgets = createPanel; panel->callbacks.updateDomain = storeData; diff --git a/WPrefs.app/Paths.c b/WPrefs.app/Paths.c index bf4bcf1f..8957c280 100644 --- a/WPrefs.app/Paths.c +++ b/WPrefs.app/Paths.c @@ -27,6 +27,8 @@ typedef struct _Panel { WMFrame *frame; char *sectionName; + + char *description; CallbackRec callbacks; @@ -388,6 +390,9 @@ InitPaths(WMScreen *scr, WMWindow *win) panel->sectionName = _("Search Path Configuration"); + panel->description = _("Search paths to use when looking for pixmaps\n" + "and icons."); + panel->win = win; panel->callbacks.createWidgets = createPanel; diff --git a/WPrefs.app/Preferences.c b/WPrefs.app/Preferences.c index ddfac4e3..a6a95dbd 100644 --- a/WPrefs.app/Preferences.c +++ b/WPrefs.app/Preferences.c @@ -28,6 +28,8 @@ typedef struct _Panel { char *sectionName; + char *description; + CallbackRec callbacks; WMWindow *win; @@ -233,6 +235,8 @@ InitPreferences(WMScreen *scr, WMWindow *win) memset(panel, 0, sizeof(_Panel)); panel->sectionName = _("Miscellaneous Ergonomic Preferences"); + panel->description = _("Various settings like balloon text, geometry\n" + "displays etc."); panel->win = win; diff --git a/WPrefs.app/Text.c b/WPrefs.app/Text.c index 7c48752f..2e61669b 100644 --- a/WPrefs.app/Text.c +++ b/WPrefs.app/Text.c @@ -27,6 +27,8 @@ typedef struct _Panel { WMFrame *frame; char *sectionName; + char *description; + CallbackRec callbacks; WMWindow *win; @@ -323,6 +325,7 @@ InitText(WMScreen *scr, WMWindow *win) memset(panel, 0, sizeof(_Panel)); panel->sectionName = _("Text Preferences"); +/* panel->description =*/ panel->win = win; diff --git a/WPrefs.app/WPrefs.c b/WPrefs.app/WPrefs.c index 3edff3bf..6c87e706 100644 --- a/WPrefs.app/WPrefs.c +++ b/WPrefs.app/WPrefs.c @@ -476,6 +476,9 @@ AddSection(Panel *panel, char *iconFile) WMSetButtonAction(bPtr, changeSection, panel); WMHangData(bPtr, panel); + WMSetBalloonTextForView(((PanelRec*)panel)->description, + WMWidgetView(bPtr)); + SetButtonAlphaImage(WMWidgetScreen(bPtr), bPtr, iconFile); WMMapWidget(bPtr); @@ -485,9 +488,9 @@ AddSection(Panel *panel, char *iconFile) if (WPrefs.sectionCount > 0) { WMGroupButtons(WPrefs.sectionB[0], bPtr); } - + WPrefs.sectionCount++; - + WMResizeWidget(WPrefs.buttonF, WPrefs.sectionCount*64, 64); } diff --git a/WPrefs.app/WPrefs.h b/WPrefs.app/WPrefs.h index d4eb460f..87155855 100644 --- a/WPrefs.app/WPrefs.h +++ b/WPrefs.app/WPrefs.h @@ -42,7 +42,7 @@ /****/ -#define WVERSION "0.31" +#define WVERSION "0.40" #define WMVERSION "0.53.x" @@ -66,7 +66,9 @@ typedef struct PanelRec { WMFrame *frame; char *sectionName; /* section name to display in titlebar */ - + + char *description; + CallbackRec callbacks; } PanelRec; diff --git a/WPrefs.app/WindowHandling.c b/WPrefs.app/WindowHandling.c index ce8ebe52..6142f9ef 100644 --- a/WPrefs.app/WindowHandling.c +++ b/WPrefs.app/WindowHandling.c @@ -27,7 +27,9 @@ typedef struct _Panel { WMFrame *frame; char *sectionName; - + + char *description; + CallbackRec callbacks; WMWindow *win; @@ -221,6 +223,8 @@ createPanel(Panel *p) WMResizeWidget(panel->placF, 270, 110); WMMoveWidget(panel->placF, 20, 10); WMSetFrameTitle(panel->placF, _("Window Placement")); + WMSetBalloonTextForView(_("How to place windows when they are first put\n" + "on screen."), WMWidgetView(panel->placF)); panel->placP = WMCreatePopUpButton(panel->placF); WMResizeWidget(panel->placP, 105, 20); @@ -295,7 +299,11 @@ createPanel(Panel *p) WMResizeWidget(panel->opaqF, 205, 110); WMMoveWidget(panel->opaqF, 300, 10); WMSetFrameTitle(panel->opaqF, _("Opaque Move")); - + WMSetBalloonTextForView(_("Whether the window contents should be moved\n" + "when dragging windows aroung or if only a\n" + "frame should be displayed.\n"), + WMWidgetView(panel->opaqF)); + panel->opaqB = WMCreateButton(panel->opaqF, WBTToggle); WMResizeWidget(panel->opaqB, 64, 64); WMMoveWidget(panel->opaqB, 70, 25); @@ -352,16 +360,21 @@ createPanel(Panel *p) WMMoveWidget(panel->resF, 20, 125); WMSetFrameTitle(panel->resF, _("Edge Resistance")); + WMSetBalloonTextForView(_("Edge resistance will make windows `resist'\n" + "being moved further for the defined threshold\n" + "when moved against other windows or the edges\n" + "of the screen."), WMWidgetView(panel->resF)); + panel->resS = WMCreateSlider(panel->resF); WMResizeWidget(panel->resS, 200, 15); - WMMoveWidget(panel->resS, 10, 20); + WMMoveWidget(panel->resS, 20, 20); WMSetSliderMinValue(panel->resS, 0); WMSetSliderMaxValue(panel->resS, 200); WMSetSliderAction(panel->resS, resistanceCallback, panel); panel->resL = WMCreateLabel(panel->resF); - WMResizeWidget(panel->resL, 40, 15); - WMMoveWidget(panel->resL, 220, 20); + WMResizeWidget(panel->resL, 30, 15); + WMMoveWidget(panel->resL, 230, 20); WMMapSubwidgets(panel->resF); @@ -403,6 +416,9 @@ InitWindowHandling(WMScreen *scr, WMWindow *win) panel->sectionName = _("Window Handling Preferences"); + panel->description = _("Window handling options. Initial placement style\n" + "edge resistance, opaque move etc."); + panel->win = win; panel->callbacks.createWidgets = createPanel; diff --git a/WPrefs.app/Workspace.c b/WPrefs.app/Workspace.c index 80b58db7..dcea228c 100644 --- a/WPrefs.app/Workspace.c +++ b/WPrefs.app/Workspace.c @@ -29,6 +29,8 @@ typedef struct _Panel { char *sectionName; + char *description; + CallbackRec callbacks; WMWindow *win; @@ -234,7 +236,10 @@ createPanel(Panel *p) } free(path); } - + WMSetBalloonTextForView(_("Disable/enable the application Dock (the\n" + "vertical icon bar in the side of the screen)."), + WMWidgetView(panel->dockB)); + panel->clipB = WMCreateButton(panel->dockF, WBTToggle); WMResizeWidget(panel->clipB, 64, 64); WMMoveWidget(panel->clipB, 20, 110); @@ -251,6 +256,10 @@ createPanel(Panel *p) WMReleasePixmap(icon1); } } + WMSetBalloonTextForView(_("Disable/enable the Clip (that thing with\n" + "a paper clip icon)."), + WMWidgetView(panel->clipB)); + WMMapSubwidgets(panel->dockF); if (xis) @@ -285,7 +294,10 @@ InitWorkspace(WMScreen *scr, WMWindow *win) memset(panel, 0, sizeof(_Panel)); panel->sectionName = _("Workspace Preferences"); - + + panel->description = _("Workspace navigation features.\n" + "You can also enable/disable the Dock and Clip here."); + panel->win = win; panel->callbacks.createWidgets = createPanel; -- 2.11.4.GIT