aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed-single.cpp
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-06-16 18:56:04 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-06-16 18:56:04 +0800
commit265c85e8ab0a90f2a7d389f5cd9f750eeadf3e22 (patch)
tree27d5f110e573bdbe64ae0a0d500ddd95fc65c4b0 /embed/mozilla/mozilla-embed-single.cpp
parent3241ea896ff4f8939c038ab65f03948d026ed520 (diff)
downloadgsoc2013-epiphany-265c85e8ab0a90f2a7d389f5cd9f750eeadf3e22.tar
gsoc2013-epiphany-265c85e8ab0a90f2a7d389f5cd9f750eeadf3e22.tar.gz
gsoc2013-epiphany-265c85e8ab0a90f2a7d389f5cd9f750eeadf3e22.tar.bz2
gsoc2013-epiphany-265c85e8ab0a90f2a7d389f5cd9f750eeadf3e22.tar.lz
gsoc2013-epiphany-265c85e8ab0a90f2a7d389f5cd9f750eeadf3e22.tar.xz
gsoc2013-epiphany-265c85e8ab0a90f2a7d389f5cd9f750eeadf3e22.tar.zst
gsoc2013-epiphany-265c85e8ab0a90f2a7d389f5cd9f750eeadf3e22.zip
Merge with popup control, we dont need it for bonobo window anymore.
2003-06-16 Marco Pesenti Gritti <marco@it.gnome.org> * embed/Makefile.am: * embed/ephy-embed-popup-control.c: (ephy_embed_popup_control_get_type), (ephy_embed_popup_control_set_property), (ephy_embed_popup_control_get_property), (ephy_embed_popup_control_class_init), (ephy_embed_popup_control_init), (ephy_embed_popup_control_finalize), (get_popup_path), (ephy_embed_popup_control_show), (setup_element_menu), (setup_document_menu), (ephy_embed_popup_control_set_event), (ephy_embed_popup_control_connect_verbs), (ephy_embed_popup_control_get_event), (embed_popup_copy_location_cmd), (embed_popup_copy_email_cmd), (embed_popup_copy_link_location_cmd), (save_property_url), (embed_popup_open_link_cmd), (embed_popup_download_link_cmd), (embed_popup_save_image_as_cmd), (background_download_completed), (embed_popup_set_image_as_background_cmd), (embed_popup_copy_image_location_cmd), (save_url), (embed_popup_save_page_as_cmd), (embed_popup_save_background_as_cmd), (embed_popup_open_frame_cmd), (embed_popup_reload_frame_cmd), (embed_popup_open_image_cmd), (embed_popup_copy_to_clipboard): * embed/ephy-embed-popup-control.h: Merge with popup control, we dont need it for bonobo window anymore. * embed/mozilla/mozilla-embed-single.cpp: Do not override the UA but set vendor prefs so that mozilla can build it correctly. * lib/ephy-dialog.c: (get_radio_button_active_index), (set_config_from_radiobuttongroup), (set_radiobuttongroup_from_config), (prefs_set_group_sensitivity), (impl_get_value): * lib/ephy-dnd.c: (ephy_dnd_node_list_extract_nodes): * lib/ephy-gui.c: * lib/ephy-gui.h: * lib/ephy-string.c: (ephy_string_shorten), (ephy_string_to_int), (ephy_string_strip_chr), (ephy_string_elide_underscores): * lib/ephy-string.h: * src/ephy-nautilus-view.c: (ephy_nautilus_view_instance_init), (gnv_embed_context_menu_cb), (gnv_embed_location_cb), (gnv_view_from_popup), (gnv_popup_cmd_new_window), (gnv_popup_cmd_image_in_new_window), (gnv_popup_cmd_frame_in_new_window), (gnv_cmd_file_print), (gnv_embed_zoom_change_cb):
Diffstat (limited to 'embed/mozilla/mozilla-embed-single.cpp')
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp46
1 files changed, 10 insertions, 36 deletions
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index aea368fe0..e5c69ab33 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -37,7 +37,6 @@
#include <time.h>
#include <libgnome/gnome-i18n.h>
#include <string.h>
-#include <sys/utsname.h>
#include "nsBuildID.h"
#include <nsICacheService.h>
#include <nsCOMPtr.h>
@@ -318,34 +317,6 @@ mozilla_embed_single_class_init (MozillaEmbedSingleClass *klass)
shell_class->show_file_picker = impl_show_file_picker;
}
-static char *
-build_user_agent ()
-{
- static char *user_agent;
- struct utsname name;
- char *system;
-
- if (uname (&name) == 0)
- {
- system = g_strdup_printf ("%s %s",
- name.sysname,
- name.machine);
- }
- else
- {
- system = g_strdup ("Unknown");
- }
-
- user_agent = g_strdup_printf
- ("Mozilla/5.0 (X11; U; %s) Gecko/%d Epiphany/" VERSION,
- system,
- NS_BUILD_ID/100);
-
- g_free (system);
-
- return user_agent;
-}
-
static void
mozilla_set_default_prefs (MozillaEmbedSingle *mes)
{
@@ -418,11 +389,11 @@ mozilla_set_default_prefs (MozillaEmbedSingle *mes)
pref->SetBoolPref ("browser.enable_automatic_image_resizing", PR_TRUE);
/* User agent */
- char *user_agent;
- user_agent = build_user_agent ();
- pref->SetCharPref ("general.useragent.override", user_agent);
- g_free (user_agent);
+ /* FIXME We need to do this because mozilla doesnt set product
+ sub for embedding apps */
+ pref->SetCharPref ("general.useragent.vendor", "Epiphany");
+ pref->SetCharPref ("general.useragent.vendorSub", VERSION);
}
static char *
@@ -750,7 +721,7 @@ impl_get_encodings (EphyEmbedSingle *shell,
info->encoding = g_strdup (encodings[i].name);
- elided = ephy_str_elide_underscores (_(encodings[i].title));
+ elided = ephy_string_elide_underscores (_(encodings[i].title));
if (elide_underscores)
{
@@ -800,7 +771,7 @@ impl_get_language_groups (EphyEmbedSingle *shell,
info->group = lang_groups[i].group;
/* collate without underscores */
- elided = ephy_str_elide_underscores (info->title);
+ elided = ephy_string_elide_underscores (info->title);
info->key = g_utf8_collate_key (elided, -1);
g_free (elided);
@@ -1069,7 +1040,10 @@ impl_show_file_picker (EphyEmbedSingle *shell,
g_free (expanded_directory);
filePicker->InitWithGtkWidget (parentWidget, title, mode);
- filePicker->SetDefaultString (NS_ConvertUTF8toUCS2(file).get());
+ if (file)
+ {
+ filePicker->SetDefaultString (NS_ConvertUTF8toUCS2(file).get());
+ }
filePicker->SetDisplayDirectory (dir);
PRInt16 retval;