aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2006-01-29 22:30:16 +0800
committerChristian Persch <chpe@src.gnome.org>2006-01-29 22:30:16 +0800
commitc4256ec98de17b6d5a85bce9034c3f4e9423a5f7 (patch)
tree5330f9c3916a96e546832042d7be0b66306fd784
parent6f200baa28dffcd7799e17fc2cc29f53d0e23d88 (diff)
downloadgsoc2013-epiphany-c4256ec98de17b6d5a85bce9034c3f4e9423a5f7.tar
gsoc2013-epiphany-c4256ec98de17b6d5a85bce9034c3f4e9423a5f7.tar.gz
gsoc2013-epiphany-c4256ec98de17b6d5a85bce9034c3f4e9423a5f7.tar.bz2
gsoc2013-epiphany-c4256ec98de17b6d5a85bce9034c3f4e9423a5f7.tar.lz
gsoc2013-epiphany-c4256ec98de17b6d5a85bce9034c3f4e9423a5f7.tar.xz
gsoc2013-epiphany-c4256ec98de17b6d5a85bce9034c3f4e9423a5f7.tar.zst
gsoc2013-epiphany-c4256ec98de17b6d5a85bce9034c3f4e9423a5f7.zip
Fix strings again. Bug #328747.
2006-01-29 Christian Persch <chpe@cvs.gnome.org> * lib/ephy-file-helpers.c: * src/ephy-main.c: Fix strings again. Bug #328747.
-rw-r--r--ChangeLog7
-rw-r--r--lib/ephy-file-helpers.c154
-rw-r--r--src/ephy-main.c76
3 files changed, 122 insertions, 115 deletions
diff --git a/ChangeLog b/ChangeLog
index 5fba3cb07..0142479a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-01-29 Christian Persch <chpe@cvs.gnome.org>
+
+ * lib/ephy-file-helpers.c:
+ * src/ephy-main.c:
+
+ Fix strings again. Bug #328747.
+
2006-01-29 Crispin Flowerday <gnome@flowerday.cx>
* src/bookmarks/ephy-bookmark-action.c: (activate_cb),
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index 208995624..1f93225b5 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -76,9 +76,9 @@ ephy_file_tmp_dir (void)
char *full_name;
partial_name = g_strconcat ("epiphany-", g_get_user_name (),
- "-XXXXXX", NULL);
+ "-XXXXXX", NULL);
full_name = g_build_filename (g_get_tmp_dir (), partial_name,
- NULL);
+ NULL);
#ifdef HAVE_MKDTEMP
tmp_dir = mkdtemp (full_name);
#else
@@ -128,7 +128,7 @@ ephy_file_get_downloads_dir (void)
g_free (download_dir);
download_dir = ephy_file_downloads_dir ();
}
- else if (download_dir && strcmp (download_dir, "Desktop") == 0)
+ else if (download_dir && strcmp (download_dir, "Desktop") == 0)
{
g_free (download_dir);
download_dir = ephy_file_desktop_dir ();
@@ -276,9 +276,9 @@ ephy_file_helpers_init (gboolean private_profile,
ephy_file_helpers_error_quark = g_quark_from_static_string ("ephy-file-helpers-error");
files = g_hash_table_new_full (g_str_hash,
- g_str_equal,
- (GDestroyNotify) g_free,
- (GDestroyNotify) g_free);
+ g_str_equal,
+ (GDestroyNotify) g_free,
+ (GDestroyNotify) g_free);
have_private_profile = private_profile;
@@ -287,23 +287,23 @@ ephy_file_helpers_init (gboolean private_profile,
if (ephy_file_tmp_dir () == NULL)
{
g_set_error (error,
- EPHY_FILE_HELPERS_ERROR_QUARK,
- 0,
- _("Could not create a temporary directory in “%s”."),
- g_get_tmp_dir ());
+ EPHY_FILE_HELPERS_ERROR_QUARK,
+ 0,
+ _("Could not create a temporary directory in “%s”."),
+ g_get_tmp_dir ());
return FALSE;
}
dot_dir = g_build_filename (ephy_file_tmp_dir (),
- "epiphany",
- NULL);
+ "epiphany",
+ NULL);
}
else
{
dot_dir = g_build_filename (g_get_home_dir (),
- GNOME_DOT_GNOME,
- "epiphany",
- NULL);
+ GNOME_DOT_GNOME,
+ "epiphany",
+ NULL);
}
return ephy_ensure_dir_exists (ephy_dot_dir (), error);
@@ -349,27 +349,27 @@ ephy_file_helpers_shutdown (void)
gboolean
ephy_ensure_dir_exists (const char *dir,
- GError **error)
+ GError **error)
{
if (g_file_test (dir, G_FILE_TEST_EXISTS) &&
- !g_file_test (dir, G_FILE_TEST_IS_DIR))
+ !g_file_test (dir, G_FILE_TEST_IS_DIR))
{
g_set_error (error,
- EPHY_FILE_HELPERS_ERROR_QUARK,
- 0,
- _("“%s” exists. Please move it out of the way."),
- dir);
+ EPHY_FILE_HELPERS_ERROR_QUARK,
+ 0,
+ _("The file “%s” exists. Please move it out of the way."),
+ dir);
return FALSE;
}
if (!g_file_test (dir, G_FILE_TEST_EXISTS) &&
- mkdir (dir, 488) != 0)
+ mkdir (dir, 488) != 0)
{
g_set_error (error,
- EPHY_FILE_HELPERS_ERROR_QUARK,
- 0,
- _("Failed to create directory “%s”."),
- dir);
+ EPHY_FILE_HELPERS_ERROR_QUARK,
+ 0,
+ _("Failed to create directory “%s”."),
+ dir);
return FALSE;
}
@@ -411,8 +411,8 @@ ephy_find_file_recursive (const char *path,
GSList *
ephy_file_find (const char *path,
- const char *fname,
- gint maxdepth)
+ const char *fname,
+ gint maxdepth)
{
GSList *ret = NULL;
ephy_find_file_recursive (path, fname, &ret, 0, maxdepth);
@@ -421,7 +421,7 @@ ephy_file_find (const char *path,
gboolean
ephy_file_switch_temp_file (const char *filename,
- const char *filename_temp)
+ const char *filename_temp)
{
char *old_file;
gboolean old_exist;
@@ -472,7 +472,7 @@ void
ephy_file_delete_on_exit (const char *path)
{
del_on_exit = g_list_prepend (del_on_exit,
- g_strdup (path));
+ g_strdup (path));
}
static void
@@ -486,7 +486,7 @@ load_mime_from_xml (void)
g_return_if_fail (mime_table == NULL);
mime_table = g_hash_table_new_full (g_str_hash, g_str_equal,
- xmlFree, NULL);
+ xmlFree, NULL);
xml_file = ephy_file ("mime-types-permissions.xml");
if (xml_file == NULL)
@@ -525,7 +525,7 @@ load_mime_from_xml (void)
type = xmlTextReaderGetAttribute (reader, (const xmlChar *)"type");
g_hash_table_insert (mime_table, type,
- GINT_TO_POINTER (permission));
+ GINT_TO_POINTER (permission));
}
ret = xmlTextReaderRead (reader);
@@ -576,7 +576,7 @@ my_gdk_spawn_make_environment_for_screen (GdkScreen *screen,
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
if (envp == NULL)
- envp = environ;
+ envp = environ;
env_len = g_strv_length (envp);
retval = g_new (char *, env_len + 3);
@@ -584,9 +584,9 @@ my_gdk_spawn_make_environment_for_screen (GdkScreen *screen,
display_name = gdk_screen_make_display_name (screen);
for (i = 0; envp[i] != NULL; i++)
- if (!g_str_has_prefix (envp[i], "DISPLAY=") &&
- !g_str_has_prefix (envp[i], EPHY_UUID_ENVVAR "="))
- retval[j++] = g_strdup (envp[i]);
+ if (!g_str_has_prefix (envp[i], "DISPLAY=") &&
+ !g_str_has_prefix (envp[i], EPHY_UUID_ENVVAR "="))
+ retval[j++] = g_strdup (envp[i]);
retval[j++] = g_strconcat ("DISPLAY=", display_name, NULL);
retval[j++] = g_strdup (EPHY_UUID_ENVSTRING);
@@ -599,7 +599,7 @@ my_gdk_spawn_make_environment_for_screen (GdkScreen *screen,
static void
sn_error_trap_push (SnDisplay *display,
- Display *xdisplay)
+ Display *xdisplay)
{
gdk_error_trap_push ();
}
@@ -613,7 +613,7 @@ sn_error_trap_pop (SnDisplay *display,
static char **
make_spawn_environment_for_sn_context (SnLauncherContext *sn_context,
- char **envp)
+ char **envp)
{
char **retval;
int i, j, len;
@@ -629,13 +629,13 @@ make_spawn_environment_for_sn_context (SnLauncherContext *sn_context,
for (i = 0, j = 0; envp[i] != NULL; i++) {
if (!g_str_has_prefix (envp[i], "DESKTOP_STARTUP_ID=") &&
- !g_str_has_prefix (envp[i], EPHY_UUID_ENVVAR "=")) {
+ !g_str_has_prefix (envp[i], EPHY_UUID_ENVVAR "=")) {
retval[j++] = g_strdup (envp[i]);
- }
+ }
}
retval[j++] = g_strdup_printf ("DESKTOP_STARTUP_ID=%s",
- sn_launcher_context_get_startup_id (sn_context));
+ sn_launcher_context_get_startup_id (sn_context));
retval[j++] = g_strdup (EPHY_UUID_ENVSTRING);
retval[j] = NULL;
@@ -739,7 +739,7 @@ startup_timeout (void *data)
static void
add_startup_timeout (GdkScreen *screen,
- SnLauncherContext *sn_context)
+ SnLauncherContext *sn_context)
{
StartupTimeoutData *data;
@@ -766,8 +766,8 @@ add_startup_timeout (GdkScreen *screen,
gboolean
ephy_file_launch_application (GnomeVFSMimeApplication *application,
- const char *parameter,
- guint32 user_time)
+ const char *parameter,
+ guint32 user_time)
{
GdkScreen *screen;
GList *uris = NULL;
@@ -789,8 +789,8 @@ ephy_file_launch_application (GnomeVFSMimeApplication *application,
envp = my_gdk_spawn_make_environment_for_screen (screen, NULL);
sn_display = sn_display_new (gdk_display,
- sn_error_trap_push,
- sn_error_trap_pop);
+ sn_error_trap_push,
+ sn_error_trap_pop);
/* Only initiate notification if application supports it. */
@@ -799,8 +799,8 @@ ephy_file_launch_application (GnomeVFSMimeApplication *application,
char *name;
sn_context = sn_launcher_context_new (sn_display,
- screen ? gdk_screen_get_number (screen) :
- DefaultScreen (gdk_display));
+ screen ? gdk_screen_get_number (screen) :
+ DefaultScreen (gdk_display));
name = g_filename_display_basename (uri);
if (name != NULL) {
@@ -824,12 +824,12 @@ ephy_file_launch_application (GnomeVFSMimeApplication *application,
binary_name = gnome_vfs_mime_application_get_binary_name (application);
sn_launcher_context_set_binary_name (sn_context,
- binary_name);
+ binary_name);
sn_launcher_context_initiate (sn_context,
- g_get_prgname () ? g_get_prgname () : "unknown",
- binary_name,
- (Time) user_time);
+ g_get_prgname () ? g_get_prgname () : "unknown",
+ binary_name,
+ (Time) user_time);
old_envp = envp;
envp = make_spawn_environment_for_sn_context (sn_context, envp);
@@ -846,8 +846,8 @@ ephy_file_launch_application (GnomeVFSMimeApplication *application,
sn_launcher_context_complete (sn_context); /* end sequence */
} else {
add_startup_timeout (screen ? screen :
- gdk_display_get_default_screen (gdk_display_get_default ()),
- sn_context);
+ gdk_display_get_default_screen (gdk_display_get_default ()),
+ sn_context);
}
sn_launcher_context_unref (sn_context);
}
@@ -871,9 +871,9 @@ ephy_file_launch_application (GnomeVFSMimeApplication *application,
static int
launch_desktop_item (const char *desktop_file,
- const char *parameter,
- guint32 user_time,
- GError **error)
+ const char *parameter,
+ guint32 user_time,
+ GError **error)
{
GnomeDesktopItem *item = NULL;
GList *uris = NULL;
@@ -902,7 +902,7 @@ launch_desktop_item (const char *desktop_file,
gboolean
ephy_file_launch_desktop_file (const char *filename,
- guint32 user_time)
+ guint32 user_time)
{
GError *error = NULL;
const char * const *dirs;
@@ -963,12 +963,12 @@ ephy_file_launch_handler (const char *mime_type,
/* Sniff mime type and check if it's safe to open */
info = gnome_vfs_file_info_new ();
if (gnome_vfs_get_file_info (canonical, info,
- GNOME_VFS_FILE_INFO_GET_MIME_TYPE |
- GNOME_VFS_FILE_INFO_FORCE_SLOW_MIME_TYPE) == GNOME_VFS_OK &&
- (info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_MIME_TYPE) &&
- info->mime_type != NULL &&
- info->mime_type[0] != '\0' &&
- ephy_file_check_mime (info->mime_type) == EPHY_MIME_PERMISSION_SAFE)
+ GNOME_VFS_FILE_INFO_GET_MIME_TYPE |
+ GNOME_VFS_FILE_INFO_FORCE_SLOW_MIME_TYPE) == GNOME_VFS_OK &&
+ (info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_MIME_TYPE) &&
+ info->mime_type != NULL &&
+ info->mime_type[0] != '\0' &&
+ ephy_file_check_mime (info->mime_type) == EPHY_MIME_PERMISSION_SAFE)
{
/* FIXME rename tmp file to right extension ? */
app = gnome_vfs_mime_get_default_application (info->mime_type);
@@ -1018,7 +1018,7 @@ ephy_file_monitor_timeout_cb (EphyFileMonitor *monitor)
}
if (monitor->delay_func &&
- monitor->delay_func (monitor, monitor->user_data))
+ monitor->delay_func (monitor, monitor->user_data))
{
monitor->ticks = DELAY_MAX_TICKS / 2;
@@ -1036,10 +1036,10 @@ ephy_file_monitor_timeout_cb (EphyFileMonitor *monitor)
static void
ephy_file_monitor_cb (GnomeVFSMonitorHandle *handle,
- const char *monitor_uri,
- const char *info_uri,
- GnomeVFSMonitorEventType event_type,
- EphyFileMonitor *monitor)
+ const char *monitor_uri,
+ const char *info_uri,
+ GnomeVFSMonitorEventType event_type,
+ EphyFileMonitor *monitor)
{
LOG ("File '%s' has changed, scheduling reload", monitor_uri);
@@ -1064,15 +1064,15 @@ ephy_file_monitor_cb (GnomeVFSMonitorHandle *handle,
{
/* Exponential backoff */
monitor->ticks = MIN (monitor->ticks * 2,
- DELAY_MAX_TICKS);
+ DELAY_MAX_TICKS);
}
if (monitor->timeout_id == 0)
{
monitor->timeout_id =
g_timeout_add (monitor->delay,
- (GSourceFunc) ephy_file_monitor_timeout_cb,
- monitor);
+ (GSourceFunc) ephy_file_monitor_timeout_cb,
+ monitor);
}
break;
@@ -1097,11 +1097,11 @@ ephy_file_monitor_cb (GnomeVFSMonitorHandle *handle,
EphyFileMonitor *
ephy_file_monitor_add (const char *uri,
- GnomeVFSMonitorType monitor_type,
- guint delay,
- EphyFileMonitorFunc callback,
- EphyFileMonitorDelayFunc delay_func,
- gpointer user_data)
+ GnomeVFSMonitorType monitor_type,
+ guint delay,
+ EphyFileMonitorFunc callback,
+ EphyFileMonitorDelayFunc delay_func,
+ gpointer user_data)
{
EphyFileMonitor *monitor;
diff --git a/src/ephy-main.c b/src/ephy-main.c
index 2458de190..881d58b9c 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -73,7 +73,7 @@ static const GOptionEntry option_entries[] =
{ "new-tab", 'n', 0, G_OPTION_ARG_NONE, &open_in_new_tab,
N_("Open a new tab in an existing browser window"), NULL },
{ "new-window", 0, 0, G_OPTION_ARG_NONE, &open_in_new_window,
- N_("Open a new tab in an existing browser window"), NULL },
+ N_("Open a new browser window"), NULL },
{ "bookmarks-editor", 'b', 0, G_OPTION_ARG_NONE, &open_as_bookmarks_editor,
N_("Launch the bookmarks editor"), NULL },
{ "import-bookmarks", '\0', 0, G_OPTION_ARG_FILENAME, &bookmarks_file,
@@ -172,14 +172,14 @@ slowly_and_stupidly_obtain_timestamp (Display *xdisplay)
xwindow =
XCreateWindow (xdisplay,
- RootWindow (xdisplay, 0),
- -100, -100, 1, 1,
- 0,
- CopyFromParent,
- CopyFromParent,
- CopyFromParent,
- CWOverrideRedirect | CWEventMask,
- &attrs);
+ RootWindow (xdisplay, 0),
+ -100, -100, 1, 1,
+ 0,
+ CopyFromParent,
+ CopyFromParent,
+ CopyFromParent,
+ CWOverrideRedirect | CWEventMask,
+ &attrs);
atom_name = XInternAtom (xdisplay, "WM_NAME", TRUE);
g_assert (atom_name != None);
@@ -194,9 +194,9 @@ slowly_and_stupidly_obtain_timestamp (Display *xdisplay)
}
XWindowEvent (xdisplay,
- xwindow,
- PropertyChangeMask,
- &event);
+ xwindow,
+ PropertyChangeMask,
+ &event);
XDestroyWindow(xdisplay, xwindow);
@@ -205,18 +205,18 @@ slowly_and_stupidly_obtain_timestamp (Display *xdisplay)
static void
handle_url (GtkAboutDialog *about,
- const char *link,
- gpointer data)
+ const char *link,
+ gpointer data)
{
ephy_shell_new_tab (ephy_shell_get_default (),
- NULL, NULL, link,
- EPHY_NEW_TAB_OPEN_PAGE);
+ NULL, NULL, link,
+ EPHY_NEW_TAB_OPEN_PAGE);
}
static void
handle_email (GtkAboutDialog *about,
- const char *link,
- gpointer data)
+ const char *link,
+ gpointer data)
{
char *address;
@@ -227,7 +227,7 @@ handle_email (GtkAboutDialog *about,
static void
shell_weak_notify (gpointer data,
- GObject *zombie)
+ GObject *zombie)
{
if (gtk_main_level ())
{
@@ -348,8 +348,8 @@ path_from_command_line_arg (const char *arg)
static void
unref_proxy_reply_cb (DBusGProxy *proxy,
- GError *error,
- gpointer user_data)
+ GError *error,
+ gpointer user_data)
{
if (error != NULL)
{
@@ -442,7 +442,7 @@ call_dbus_proxy (DBusGProxy *proxy,
/* no need to open the homepage if autoresume returns TRUE;
* we already opened session windows */
if (!_ephy_dbus_is_name_owner () ||
- (ephy_session_autoresume
+ (ephy_session_autoresume
(EPHY_SESSION (ephy_shell_get_session (shell)),
user_time) == FALSE))
{
@@ -479,7 +479,7 @@ show_error_message (GError **error)
int
main (int argc,
- char *argv[])
+ char *argv[])
{
GOptionContext *option_context;
GOptionGroup *option_group;
@@ -529,11 +529,11 @@ main (int argc,
#ifdef GNOME_PARAM_GOPTION_CONTEXT
gnome_program_init (PACKAGE, VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PARAM_GOPTION_CONTEXT, option_context,
- GNOME_PARAM_HUMAN_READABLE_NAME, _("Web Browser"),
- GNOME_PARAM_APP_DATADIR, DATADIR,
- NULL);
+ LIBGNOMEUI_MODULE, argc, argv,
+ GNOME_PARAM_GOPTION_CONTEXT, option_context,
+ GNOME_PARAM_HUMAN_READABLE_NAME, _("Web Browser"),
+ GNOME_PARAM_APP_DATADIR, DATADIR,
+ NULL);
#else /* !GNOME_PARAM_GOPTION_CONTEXT */
@@ -577,12 +577,12 @@ main (int argc,
}
gnome_program_init (PACKAGE, VERSION,
- LIBGNOMEUI_MODULE,
- fake_argv_array->len,
- (char**) fake_argv_array->pdata,
- GNOME_PARAM_HUMAN_READABLE_NAME, _("Web Browser"),
- GNOME_PARAM_APP_DATADIR, DATADIR,
- NULL);
+ LIBGNOMEUI_MODULE,
+ fake_argv_array->len,
+ (char**) fake_argv_array->pdata,
+ GNOME_PARAM_HUMAN_READABLE_NAME, _("Web Browser"),
+ GNOME_PARAM_APP_DATADIR, DATADIR,
+ NULL);
g_ptr_array_add (fake_argv_array, NULL);
g_strfreev ((char**) g_ptr_array_free (fake_argv_array, FALSE));
@@ -620,8 +620,8 @@ main (int argc,
if (proxy == NULL)
{
error = g_error_new (STARTUP_ERROR_QUARK,
- 0,
- "Unable to get DBus proxy; aborting activation."); /* FIXME i18n */
+ 0,
+ "Unable to get DBus proxy; aborting activation."); /* FIXME i18n */
_ephy_dbus_release ();
@@ -678,8 +678,8 @@ main (int argc,
/* Work around bug #328844 */
env = g_getenv ("MOZ_ENABLE_PANGO");
if (env == NULL ||
- env[0] == '\0' ||
- strcmp (env, "0") == 0)
+ env[0] == '\0' ||
+ strcmp (env, "0") == 0)
{
g_setenv ("MOZ_DISABLE_PANGO", "1", TRUE);
}