NeoMutt  2024-11-14-34-g5aaf0d
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 72 of file gui.c.

73{
74 if (!limit)
75 {
76 sbar_set_title(sbar, menu_name);
77 return;
78 }
79
80 char buf[256] = { 0 };
81
82 int len = snprintf(buf, sizeof(buf), "%s - ", menu_name);
83
84 snprintf(buf + len, sizeof(buf) - len, _("Limit: %s"), limit);
85
86 sbar_set_title(sbar, buf);
87}
#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: