--- ./gnome-control-center-3.6.3.org/panels/info/cc-info-panel.c 2013-03-11 15:44:47.000000000 +0100 +++ ./gnome-control-center-3.6.3/panels/info/cc-info-panel.c 2013-03-11 19:24:59.312666378 +0100 @@ -901,6 +901,97 @@ } static void +info_panel_setup_notice (CcInfoPanel *self) +{ + GtkTextBuffer *buffer; + GtkTextView *textview; + GtkWidget *sw; + gchar *text; + gsize length; + GError* error = NULL; + GtkTextIter start, end; + GtkTextChildAnchor *url1_anchor, *url2_anchor, *url3_anchor, *url4_anchor; + + sw = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), + GTK_POLICY_AUTOMATIC, + GTK_POLICY_AUTOMATIC); + + buffer = gtk_text_buffer_new (NULL); + g_file_get_contents (GNOMECC_DATA_DIR"/canonical_dash_notice.txt", &text, &length, &error); + + gtk_text_buffer_set_text (buffer, text, strlen(text)); + + gtk_text_buffer_create_tag (buffer, "title1", + "weight", PANGO_WEIGHT_BOLD, + "justification", GTK_JUSTIFY_CENTER, + NULL); + gtk_text_buffer_create_tag (buffer, "title2", + "weight", PANGO_WEIGHT_BOLD, + NULL); + + gtk_text_buffer_get_iter_at_offset (buffer, &start, 0); + gtk_text_buffer_get_iter_at_offset (buffer, &end, 37); + gtk_text_buffer_apply_tag_by_name (buffer, "title1", &start, &end); + + gtk_text_buffer_get_iter_at_line_offset (buffer, &start, 2, 173); + url1_anchor = gtk_text_buffer_create_child_anchor (buffer, &start); + + gtk_text_buffer_get_iter_at_line (buffer, &start, 4); + gtk_text_buffer_get_iter_at_line_offset (buffer, &end, 4, 26); + gtk_text_buffer_apply_tag_by_name (buffer, "title2", &start, &end); + + gtk_text_buffer_get_iter_at_line_offset (buffer, &start, 13, 97); + url2_anchor = gtk_text_buffer_create_child_anchor (buffer, &start); + + gtk_text_buffer_get_iter_at_line_offset (buffer, &start, 13, 111); + url3_anchor = gtk_text_buffer_create_child_anchor (buffer, &start); + + gtk_text_buffer_get_iter_at_line (buffer, &start, 15); + gtk_text_buffer_get_iter_at_line_offset (buffer, &end, 15, 13); + gtk_text_buffer_apply_tag_by_name (buffer, "title2", &start, &end); + + gtk_text_buffer_get_iter_at_line_offset (buffer, &start, 16, 355); + url4_anchor = gtk_text_buffer_create_child_anchor (buffer, &start); + + gtk_text_buffer_get_iter_at_line (buffer, &start, 18); + gtk_text_buffer_get_iter_at_line_offset (buffer, &end, 18, 7); + gtk_text_buffer_apply_tag_by_name (buffer, "title2", &start, &end); + + gtk_text_buffer_get_iter_at_line (buffer, &start, 21); + gtk_text_buffer_get_iter_at_line_offset (buffer, &end, 21, 17); + + textview = gtk_text_view_new_with_buffer (buffer); + gtk_text_view_set_wrap_mode (textview, GTK_WRAP_WORD); + gtk_container_add (GTK_CONTAINER (sw), textview); + + widget = gtk_link_button_new_with_label ("http://www.canonical.com/legal", " legal notice"); + gtk_text_view_add_child_at_anchor (textview, + widget, + url1_anchor); + + widget = gtk_link_button_new_with_label ("http://www.ubuntu.com/aboutus/privacypolicy", "our privacy policy"); + gtk_text_view_add_child_at_anchor (textview, + widget, + url2_anchor); + + widget = gtk_link_button_new_with_label ("http://www.ubuntu.com/aboutus/privacypolicy", "our privacy policy"); + gtk_text_view_add_child_at_anchor (textview, + widget, + url3_anchor); + + widget = gtk_link_button_new_with_label ("http://www.ubuntu.com/aboutus/privacypolicy/thirdparties", "www.ubuntu.com/privacypolicy/thirdparties"); + gtk_text_view_add_child_at_anchor (textview, + widget, + url4_anchor); + gtk_widget_show_all(sw); + + gtk_notebook_append_page (WID ("notebook"), sw, NULL); + + +} + +static void default_app_changed (GtkAppChooserButton *button, CcInfoPanel *self) { @@ -1533,6 +1624,14 @@ _("Graphics"), -1); + if (!g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "Unity")) + { + gtk_list_store_append (model, &iter); + gtk_list_store_set (model, &iter, section_name_column, + _("Legal Notice"), + -1); + } + g_signal_connect (selection, "changed", G_CALLBACK (on_section_changed), self); on_section_changed (selection, self); @@ -2023,6 +2122,8 @@ info_panel_setup_default_apps (self); info_panel_setup_media (self); info_panel_setup_graphics (self); + if (!g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "Unity")) + info_panel_setup_notice (self); } void --- ./gnome-control-center-3.6.3.org/panels/info/canonical_dash_notice.txt 2013-03-11 19:19:56.204679480 +0100 +++ ./gnome-control-center-3.6.3/panels/info/canonical_dash_notice.txt 2013-03-11 19:06:09.780715202 +0100 @@ -1 +1,23 @@ +Searching in the dash - Legal notice +This search function is provided to you by Canonical Group Limited (Canonical). This legal notice applies to searching in the dash and incorporates the terms of Canonical's legal notice (and privacy policy). + +Collection and use of data +When you enter a search term into the dash Ubuntu will search your Ubuntu computer and will record the search terms locally. + +Unless you have opted out (see the “Online Search” section below), we will also send your keystrokes as a search term to productsearch.ubuntu.com and selected third parties so that we may complement your search results with online search results from such third parties including: Facebook, Twitter, BBC and Amazon. Canonical and these selected third parties will collect your search terms and use them to provide you with search results while using Ubuntu. + +By searching in the dash you consent to: + • the collection and use of your search terms and IP address in this way; and + • the storage of your search terms and IP address by Canonical and such selected third parties (if applicable). + +Canonical will only use your search terms and IP address in accordance with this legal notice and. Please see for further information about how Canonical protects your personal information. For information on how our selected third parties may use your information, please see their privacy policies. + +Online Search +You may restrict your dash so that we don’t send searches to third parties and you don't receive online search results. To do this go to the Privacy panel and toggle the ‘Include online search results’ option to off. The Privacy panel can be found in your System Settings or via a dash search. For a current list of our selected third parties, please see . + +Changes +Although most changes are likely to be minor, Canonical may change this legal notice from time to time, and at Canonical's sole discretion. Please check this page from time to time for any changes to this legal notice as we will not be able to notify you directly. + +How to contact us +Please submit any questions or comments about searching in the dash or this legal notice by contacting us at the following address: Canonical Group Ltd, 5th Floor, Blue Fin Building, 110 Southwark Street, London, England, SE1 0SU.