* gdialogs.c: Use g_snprintf() instead of snprintf().
* gnome-file-property-dialog.c: Likewise. * gprefs.c: Likewise.
Этот коммит содержится в:
родитель
72a33a6190
Коммит
8432d4dd4a
@ -1,3 +1,9 @@
|
||||
2001-07-11 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* gdialogs.c: Use g_snprintf() instead of snprintf().
|
||||
* gnome-file-property-dialog.c: Likewise.
|
||||
* gprefs.c: Likewise.
|
||||
|
||||
2001-07-10 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* gscreen.c (panel_icon_list_select_icon): This function doesn't
|
||||
|
@ -244,7 +244,7 @@ file_progress_show (FileOpContext *ctx, long done, long total)
|
||||
|
||||
if (total > 0) {
|
||||
perc = (double) done / (double) total;
|
||||
snprintf (count, 9, "%3d%% ", (gint) (100.0 * perc));
|
||||
g_snprintf (count, 9, "%3d%% ", (gint) (100.0 * perc));
|
||||
gtk_label_set_text (GTK_LABEL (ui->file_label), count);
|
||||
}
|
||||
while (gtk_events_pending ())
|
||||
@ -269,7 +269,7 @@ file_progress_show_count (FileOpContext *ctx, long done, long total)
|
||||
if (ui->aborting)
|
||||
return FILE_ABORT;
|
||||
|
||||
snprintf (count, 100, "%ld/%ld ", done, total);
|
||||
g_snprintf (count, 100, "%ld/%ld ", done, total);
|
||||
gtk_label_set_text (GTK_LABEL (ui->count_label), count);
|
||||
while (gtk_events_pending ())
|
||||
gtk_main_iteration ();
|
||||
@ -484,7 +484,7 @@ file_progress_real_query_replace (FileOpContext *ctx, enum OperationMode mode, c
|
||||
GNOME_STOCK_BUTTON_CANCEL, NULL);
|
||||
|
||||
gtk_window_set_position (GTK_WINDOW (qr_dlg), GTK_WIN_POS_MOUSE);
|
||||
snprintf (msg, sizeof (msg)-1, _("The target file already exists: %s"), destname);
|
||||
g_snprintf (msg, sizeof (msg)-1, _("The target file already exists: %s"), destname);
|
||||
label = gtk_label_new (msg);
|
||||
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
|
@ -244,17 +244,17 @@ create_general_properties (GnomeFilePropertyDialog *fp_dlg)
|
||||
|| S_ISREG (fp_dlg->st.st_mode)
|
||||
|| S_ISLNK (fp_dlg->st.st_mode)) {
|
||||
if ((gint)fp_dlg->st.st_size < 1024) {
|
||||
snprintf (buf, MC_MAXPATHLEN, "%d", (gint) fp_dlg->st.st_size);
|
||||
g_snprintf (buf, MC_MAXPATHLEN, "%d", (gint) fp_dlg->st.st_size);
|
||||
gen_string = g_strconcat (_("File Size: "), buf, _(" bytes"), NULL);
|
||||
} else if ((gint)fp_dlg->st.st_size < 1024 * 1024) {
|
||||
snprintf (buf, MC_MAXPATHLEN, "%.1f", (gfloat) fp_dlg->st.st_size / 1024.0);
|
||||
snprintf (buf2, MC_MAXPATHLEN, "%d", (gint) fp_dlg->st.st_size);
|
||||
g_snprintf (buf, MC_MAXPATHLEN, "%.1f", (gfloat) fp_dlg->st.st_size / 1024.0);
|
||||
g_snprintf (buf2, MC_MAXPATHLEN, "%d", (gint) fp_dlg->st.st_size);
|
||||
gen_string = g_strconcat (_("File Size: "), buf, _(" KBytes ("),
|
||||
buf2, _(" bytes)"), NULL);
|
||||
} else {
|
||||
snprintf (buf, MC_MAXPATHLEN, "%.1f",
|
||||
g_snprintf (buf, MC_MAXPATHLEN, "%.1f",
|
||||
(gfloat) fp_dlg->st.st_size / (1024.0 * 1024.0));
|
||||
snprintf (buf2, MC_MAXPATHLEN, "%d", (gint) fp_dlg->st.st_size);
|
||||
g_snprintf (buf2, MC_MAXPATHLEN, "%d", (gint) fp_dlg->st.st_size);
|
||||
gen_string = g_strconcat (_("File Size: "), buf, _(" MBytes ("),
|
||||
buf2, _(" bytes)"), NULL);
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ create_prop_int (PrefsDlg *dlg, Property *prop)
|
||||
|
||||
entry = gnome_entry_new (_(prop->label));
|
||||
|
||||
snprintf (buffer, 9, "%d", *( (int*) prop->property_variable));
|
||||
g_snprintf (buffer, 9, "%d", *( (int*) prop->property_variable));
|
||||
|
||||
gtk_entry_set_text (GTK_ENTRY (gnome_entry_gtk_entry (GNOME_ENTRY (entry))),
|
||||
buffer);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user