aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-06-17 00:21:41 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-06-17 00:21:41 +0800
commitf8ac3a5e684be6024af756a9ac354295849f9dce (patch)
treec1d245e859eab3c921e944fe237136e7a930277a
parent559817b74ae0b6d87899b609d70c116cd6eefe7e (diff)
downloadgsoc2013-epiphany-f8ac3a5e684be6024af756a9ac354295849f9dce.tar
gsoc2013-epiphany-f8ac3a5e684be6024af756a9ac354295849f9dce.tar.gz
gsoc2013-epiphany-f8ac3a5e684be6024af756a9ac354295849f9dce.tar.bz2
gsoc2013-epiphany-f8ac3a5e684be6024af756a9ac354295849f9dce.tar.lz
gsoc2013-epiphany-f8ac3a5e684be6024af756a9ac354295849f9dce.tar.xz
gsoc2013-epiphany-f8ac3a5e684be6024af756a9ac354295849f9dce.tar.zst
gsoc2013-epiphany-f8ac3a5e684be6024af756a9ac354295849f9dce.zip
s/snprintf/g_snprintf to not break gcc 2.95
2003-06-16 Marco Pesenti Gritti <marco@it.gnome.org> * embed/mozilla/mozilla-notifiers.cpp: * lib/ephy-dialog.c: (set_config_from_color): * src/ephy-tabs-menu.c: (tab_set_action_accelerator): * src/prefs-dialog.c: (setup_font_menu), (save_font_menu), (size_spinbutton_changed_cb), (setup_size_control): * src/session.c: (session_save): s/snprintf/g_snprintf to not break gcc 2.95
-rw-r--r--ChangeLog11
-rw-r--r--embed/mozilla/mozilla-notifiers.cpp12
-rw-r--r--lib/ephy-dialog.c2
-rw-r--r--src/ephy-tabs-menu.c2
-rw-r--r--src/prefs-dialog.c20
-rw-r--r--src/session.c8
6 files changed, 33 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index 5ade85434..9166dd302 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,17 @@
2003-06-16 Marco Pesenti Gritti <marco@it.gnome.org>
* embed/mozilla/mozilla-notifiers.cpp:
+ * lib/ephy-dialog.c: (set_config_from_color):
+ * src/ephy-tabs-menu.c: (tab_set_action_accelerator):
+ * src/prefs-dialog.c: (setup_font_menu), (save_font_menu),
+ (size_spinbutton_changed_cb), (setup_size_control):
+ * src/session.c: (session_save):
+
+ s/snprintf/g_snprintf to not break gcc 2.95
+
+2003-06-16 Marco Pesenti Gritti <marco@it.gnome.org>
+
+ * embed/mozilla/mozilla-notifiers.cpp:
Fix use document colors
diff --git a/embed/mozilla/mozilla-notifiers.cpp b/embed/mozilla/mozilla-notifiers.cpp
index 855334371..761742573 100644
--- a/embed/mozilla/mozilla-notifiers.cpp
+++ b/embed/mozilla/mozilla-notifiers.cpp
@@ -455,30 +455,30 @@ mozilla_notifiers_init(EphyEmbedSingle *single)
{
info = g_strconcat (types[k], ".", fonts_language[i].code, NULL);
- snprintf (key, 255, "%s_%s_%s", CONF_RENDERING_FONT,
- types[k],
- fonts_language[i].code);
+ g_snprintf (key, 255, "%s_%s_%s", CONF_RENDERING_FONT,
+ types[k],
+ fonts_language[i].code);
add_notification_and_notify (client, key,
(GConfClientNotifyFunc)mozilla_font_notifier,
info);
font_infos = g_list_append (font_infos, info);
}
- snprintf (key, 255, "%s_%s", CONF_RENDERING_FONT_MIN_SIZE, fonts_language[i].code);
+ g_snprintf (key, 255, "%s_%s", CONF_RENDERING_FONT_MIN_SIZE, fonts_language[i].code);
info = g_strconcat ("minimum-size", ".", fonts_language[i].code, NULL);
add_notification_and_notify (client, key,
(GConfClientNotifyFunc)mozilla_font_size_notifier,
info);
font_infos = g_list_append (font_infos, info);
- snprintf (key, 255, "%s_%s", CONF_RENDERING_FONT_FIXED_SIZE, fonts_language[i].code);
+ g_snprintf (key, 255, "%s_%s", CONF_RENDERING_FONT_FIXED_SIZE, fonts_language[i].code);
info = g_strconcat ("size.fixed", ".", fonts_language[i].code, NULL);
add_notification_and_notify (client, key,
(GConfClientNotifyFunc)mozilla_font_size_notifier,
info);
font_infos = g_list_append (font_infos, info);
- snprintf (key, 255, "%s_%s", CONF_RENDERING_FONT_VAR_SIZE, fonts_language[i].code);
+ g_snprintf (key, 255, "%s_%s", CONF_RENDERING_FONT_VAR_SIZE, fonts_language[i].code);
info = g_strconcat ("size.variable", ".", fonts_language[i].code, NULL);
add_notification_and_notify (client, key,
(GConfClientNotifyFunc)mozilla_font_size_notifier,
diff --git a/lib/ephy-dialog.c b/lib/ephy-dialog.c
index 6e891d3a2..8b6baa2ca 100644
--- a/lib/ephy-dialog.c
+++ b/lib/ephy-dialog.c
@@ -328,7 +328,7 @@ set_config_from_color (GtkWidget *colorpicker, const char *config_name)
&r, &g, &b, &a);
/* write into string (bounded size) */
- snprintf (color_string, 9, "#%02X%02X%02X", r, g, b);
+ g_snprintf (color_string, 9, "#%02X%02X%02X", r, g, b);
/* set the configuration value */
eel_gconf_set_string (config_name, color_string);
diff --git a/src/ephy-tabs-menu.c b/src/ephy-tabs-menu.c
index 128e69395..627cf7f73 100644
--- a/src/ephy-tabs-menu.c
+++ b/src/ephy-tabs-menu.c
@@ -231,7 +231,7 @@ tab_set_action_accelerator (EggActionGroup *action_group,
accel_key = 0;
accel_number = (tab_number + 1) % 10;
- snprintf (accel, 7, "<alt>%d", accel_number);
+ g_snprintf (accel, 7, "<alt>%d", accel_number);
gtk_accelerator_parse (accel, &accel_key, &accel_mods);
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 4746a043b..755b12a08 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -451,8 +451,8 @@ setup_font_menu (PrefsDialog *dialog,
type, &fonts, &default_font);
/* Get the default font */
- snprintf (key, 255, "%s_%s_%s", CONF_RENDERING_FONT, type,
- get_current_language_code (dialog));
+ g_snprintf (key, 255, "%s_%s_%s", CONF_RENDERING_FONT, type,
+ get_current_language_code (dialog));
name = eel_gconf_get_string (key);
if (name == NULL)
{
@@ -500,9 +500,9 @@ save_font_menu (PrefsDialog *dialog,
return;
}
- snprintf (key, 255, "%s_%s_%s", CONF_RENDERING_FONT,
- fonts_types[type],
- get_current_language_code (dialog));
+ g_snprintf (key, 255, "%s_%s_%s", CONF_RENDERING_FONT,
+ fonts_types[type],
+ get_current_language_code (dialog));
eel_gconf_set_string (key, name);
g_free (name);
}
@@ -556,9 +556,9 @@ size_spinbutton_changed_cb (GtkWidget *spin, PrefsDialog *dialog)
type = GPOINTER_TO_INT(g_object_get_data (G_OBJECT(spin), "type"));
- snprintf (key, 255, "%s_%s",
- size_prefs[type],
- get_current_language_code (dialog));
+ g_snprintf (key, 255, "%s_%s",
+ size_prefs[type],
+ get_current_language_code (dialog));
eel_gconf_set_integer (key, gtk_spin_button_get_value (GTK_SPIN_BUTTON (spin)));
}
@@ -601,8 +601,8 @@ setup_size_control (PrefsDialog *dialog,
char key[255];
int size;
- snprintf (key, 255, "%s_%s", pref,
- get_current_language_code (dialog));
+ g_snprintf (key, 255, "%s_%s", pref,
+ get_current_language_code (dialog));
size = eel_gconf_get_integer (key);
if (size == 0) size = default_size;
diff --git a/src/session.c b/src/session.c
index 58b9acae9..7b99447a1 100644
--- a/src/session.c
+++ b/src/session.c
@@ -519,14 +519,14 @@ session_save (Session *session,
gtk_window_get_position (GTK_WINDOW(wmain), &x, &y);
/* set window properties */
- snprintf(buffer, 32, "%d", x);
+ g_snprintf(buffer, 32, "%d", x);
xmlSetProp (window_node, "x", buffer);
- snprintf(buffer, 32, "%d", y);
+ g_snprintf(buffer, 32, "%d", y);
xmlSetProp (window_node, "y", buffer);
- snprintf(buffer, 32, "%d", width);
+ g_snprintf(buffer, 32, "%d", width);
xmlSetProp (window_node, "width", buffer);
- snprintf(buffer, 32, "%d", height);
+ g_snprintf(buffer, 32, "%d", height);
xmlSetProp (window_node, "height", buffer);
for (l = tabs; l != NULL; l = l->next)