~kroq-gar78/ubuntu/precise/gnome-control-center/fix-885947

« back to all changes in this revision

Viewing changes to debian/patches/141_set_default_internet_apps.patch

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Moya
  • Date: 2011-05-17 10:47:27 UTC
  • mfrom: (0.1.11 experimental) (1.1.45 upstream)
  • Revision ID: james.westby@ubuntu.com-20110517104727-lqel6m8vhfw5jby1
Tags: 1:3.0.1.1-1ubuntu1
* Rebase on Debian, remaining Ubuntu changes:
* debian/control:
  - Build-Depend on hardening-wrapper, dpkg-dev and dh-autoreconf
  - Add dependency on ubuntu-system-service
  - Remove dependency on gnome-icon-theme-symbolic
  - Move dependency on apg, gnome-icon-theme-symbolic and accountsservice to
    be a Recommends: until we get them in main
* debian/rules:
  - Use autoreconf
  - Add binary-post-install rule for gnome-control-center-data
  - Run dh-autoreconf
* debian/gnome-control-center.dirs:
* debian/gnome-control-center.links:
  - Add a link to the control center shell for indicators
* debian/patches/00_disable-nm.patch:
  - Temporary patch to disable building with NetworkManager until we get
    the new one in the archive
* debian/patches/01_git_remove_gettext_calls.patch:
  - Remove calls to AM_GNU_GETTEXT, IT_PROG_INTLTOOL should be enough
* debian/patches/01_git_kill_warning.patch:
  - Kill warning
* debian/patches/50_ubuntu_systemwide_prefs.patch:
  - Ubuntu specific proxy preferences
* debian/patches/51_ubuntu_system_keyboard.patch:
  - Implement the global keyboard spec at https://wiki.ubuntu.com/DefaultKeyboardSettings

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: When starting up, read current web and mail values
2
 
Author: Michael Terry <michael.terry@canonical.com>
3
 
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=638771
4
 
 
5
 
Index: gnome-control-center-2.32.1/capplets/default-applications/gnome-da-capplet.c
6
 
===================================================================
7
 
--- gnome-control-center-2.32.1.orig/capplets/default-applications/gnome-da-capplet.c   2011-01-05 15:02:37.406338902 -0500
8
 
+++ gnome-control-center-2.32.1/capplets/default-applications/gnome-da-capplet.c        2011-01-05 15:02:44.836276440 -0500
9
 
@@ -111,6 +111,34 @@
10
 
 }
11
 
 
12
 
 static void
13
 
+set_combo_to_default_for_scheme (GtkComboBox *combo, GList *handlers, const gchar *scheme)
14
 
+{
15
 
+    GAppInfo *type_default;
16
 
+    GList *l;
17
 
+    int index;
18
 
+
19
 
+    type_default = g_app_info_get_default_for_uri_scheme (scheme);
20
 
+    index = 0;
21
 
+
22
 
+    if (type_default == NULL)
23
 
+        return;
24
 
+
25
 
+    for (l = handlers; l != NULL; l = l->next) {
26
 
+        GnomeDAURLItem *handler = l->data;
27
 
+        if (g_app_info_equal(handler->app_info, type_default)) {
28
 
+            break;
29
 
+        }
30
 
+        ++index;
31
 
+    }
32
 
+
33
 
+    if (l != NULL) {    
34
 
+        gtk_combo_box_set_active (combo, index);
35
 
+    }
36
 
+
37
 
+    g_object_unref (type_default);
38
 
+}
39
 
+
40
 
+static void
41
 
 media_combo_changed_cb (GtkComboBox *combo, GnomeDACapplet *capplet)
42
 
 {
43
 
     guint current_index;
44
 
@@ -507,6 +535,9 @@
45
 
     fill_combo_box (capplet->icon_theme, GTK_COMBO_BOX (capplet->visual_combo_box), capplet->visual_ats, TRUE);
46
 
     fill_combo_box (capplet->icon_theme, GTK_COMBO_BOX (capplet->mobility_combo_box), capplet->mobility_ats, TRUE);
47
 
 
48
 
+    set_combo_to_default_for_scheme (GTK_COMBO_BOX (capplet->web_combo_box), capplet->web_browsers, "http");
49
 
+    set_combo_to_default_for_scheme (GTK_COMBO_BOX (capplet->mail_combo_box), capplet->mail_readers, "mailto");
50
 
+
51
 
     g_signal_connect (capplet->web_combo_box, "changed", G_CALLBACK (web_combo_changed_cb), capplet);
52
 
     g_signal_connect (capplet->mail_combo_box, "changed", G_CALLBACK (mail_combo_changed_cb), capplet);
53
 
     g_signal_connect (capplet->term_combo_box, "changed", G_CALLBACK (terminal_combo_changed_cb), capplet);