NeoMutt  2024-10-02-37-gfa9146
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
gui.c File Reference

Shared code for the Alias and Query Dialogs. More...

#include "config.h"
#include <stdio.h>
#include "mutt/lib.h"
#include "config/lib.h"
#include "gui/lib.h"
#include "gui.h"
#include "menu/lib.h"
#include "functions.h"
+ Include dependency graph for gui.c:

Go to the source code of this file.

Functions

int alias_config_observer (struct NotifyCallback *nc)
 Notification that a Config Variable has changed - Implements observer_t -.
 
void alias_set_title (struct MuttWindow *sbar, char *menu_name, char *limit)
 Create a title string for the Menu.
 
int alias_recalc (struct MuttWindow *win)
 Recalculate the display of the Alias Window - Implements MuttWindow::recalc() -.
 

Detailed Description

Shared code for the Alias and Query Dialogs.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file gui.c.

Function Documentation

◆ alias_set_title()

void alias_set_title ( struct MuttWindow sbar,
char *  menu_name,
char *  limit 
)

Create a title string for the Menu.

Parameters
sbarSimple Bar Window
menu_nameMenu name
limitLimit being applied

Definition at line 69 of file gui.c.

70{
71 if (!limit)
72 {
73 sbar_set_title(sbar, menu_name);
74 return;
75 }
76
77 char buf[256] = { 0 };
78
79 int len = snprintf(buf, sizeof(buf), "%s - ", menu_name);
80
81 snprintf(buf + len, sizeof(buf) - len, _("Limit: %s"), limit);
82
83 sbar_set_title(sbar, buf);
84}
#define _(a)
Definition: message.h:28
void sbar_set_title(struct MuttWindow *win, const char *title)
Set the title for the Simple Bar.
Definition: sbar.c:227
+ Here is the call graph for this function:
+ Here is the caller graph for this function: