1
1

* dlg.[ch] (x_set_dialog_title): title constified.

(create_dlg): Use g_new0 instead of g_new.
Этот коммит содержится в:
Andrew V. Samoilov 2001-06-11 11:25:25 +00:00
родитель aa8b92b547
Коммит 17791c512b
3 изменённых файлов: 8 добавлений и 13 удалений

Просмотреть файл

@ -1,3 +1,8 @@
2001-06-11 Andrew V. Samoilov <sav@bcs.zp.ua>
* dlg.[ch] (x_set_dialog_title): title constified.
(create_dlg): Use g_new0 instead of g_new.
2001-06-09 Pavel Roskin <proski@gnu.org>
* util.c (load_mc_home_file): New function. Load file from

Просмотреть файл

@ -233,26 +233,16 @@ Dlg_head *create_dlg (int y1, int x1, int lines, int cols,
if ((flags & DLG_TRYUP) && (y1 > 3))
y1 -= 2;
new_d = g_new (Dlg_head, 1);
new_d->current = NULL;
new_d->count = 0;
new_d = g_new0 (Dlg_head, 1);
new_d->direction = DIR_FORWARD;
new_d->color = color_set;
new_d->help_ctx = help_ctx;
new_d->callback = callback ? callback : default_dlg_callback;
new_d->send_idle_msg = 0;
new_d->x = x1;
new_d->y = y1;
new_d->title = 0;
new_d->cols = cols;
new_d->lines = lines;
new_d->refresh_pushed = 0;
new_d->has_menubar = 0;
new_d->name = name;
new_d->raw = 0;
new_d->grided = 0;
new_d->initfocus = NULL;
new_d->running = 0;
#ifdef HAVE_X
if (callback != midnight_callback)
new_d->wdata = xtoolkit_create_dialog (new_d, flags);
@ -1074,7 +1064,7 @@ int dlg_select_nth_widget (Dlg_head *h, int n)
#ifndef PORT_HAS_DIALOG_TITLE
void
x_set_dialog_title (Dlg_head *h, char *title)
x_set_dialog_title (Dlg_head *h, const char *title)
{
h->title = g_strdup (title);
}

Просмотреть файл

@ -257,7 +257,7 @@ void tk_layout (void *first_widget, ...);
void tk_new_frame (Dlg_head *, char *);
void tk_frame (Dlg_head *, char *);
void tk_end_frame (void);
void x_set_dialog_title (Dlg_head *h, char *title);
void x_set_dialog_title (Dlg_head *h, const char *title);
/* The inner workings of run_dlg, exported for the Tk and XView toolkits */
int dlg_key_event (Dlg_head *h, int d_key);