~ubuntu-branches/ubuntu/precise/network-manager-applet/precise

« back to all changes in this revision

Viewing changes to .pc/lp289466_always_show_tray_icon.patch/src/applet.c

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2012-03-14 16:03:22 UTC
  • mfrom: (1.2.27)
  • Revision ID: package-import@ubuntu.com-20120314160322-wdd419cyddzw00ib
Tags: 0.9.3.995+git.20120313t141231.c89224f-0ubuntu1
* upstream snapshot 2012-03-13 14:12:31 (GMT)
  + c89224f42f7cee4fca7369a890011a67350d8ff6
  - Freeze Exception: (LP: #953123)
  - Adding EAP-FAST support in UI.
  - mobile-wizard: fix sensitizing providers' list (LP: #894249)
* debian/patches/lp912150_lazy_notify_init.patch: dropped, applied upstream.
* debian/patches/lp330571_dxteam_wired_connect_text.patch: refreshed.
* debian/patches/lp330608_dxteam_gsm_connect_text.patch: refreshed.
* debian/patches/nm-applet-use-indicator.patch: refreshed.
* debian/patches/no_Werror.patch: dropped, applied upstream.
* debian/rules: pass --enable-more-warnings=no to retain the same behavior as
  with the no_Werror.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
434
434
        g_return_val_if_fail (connection != NULL, NULL);
435
435
        g_return_val_if_fail (applet != NULL, NULL);
436
436
 
437
 
        s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
 
437
        s_con = nm_connection_get_setting_connection (connection);
438
438
        g_return_val_if_fail (s_con != NULL, NULL);
439
439
 
440
440
        ctype = nm_setting_connection_get_connection_type (s_con);
647
647
        char *markup;
648
648
        GtkWidget *label;
649
649
 
650
 
        s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
 
650
        s_con = nm_connection_get_setting_connection (connection);
651
651
        item = gtk_image_menu_item_new_with_label ("");
652
652
        if (add_active && (active == connection)) {
653
653
                /* Pure evil */
798
798
static gboolean
799
799
applet_notify_server_has_actions (void)
800
800
{
801
 
        gboolean has_actions = FALSE;
 
801
        static gboolean has_actions = FALSE;
 
802
        static gboolean initialized = FALSE;
802
803
        GList *server_caps, *iter;
803
804
 
 
805
        if (initialized)
 
806
                return has_actions;
 
807
        initialized = TRUE;
 
808
 
804
809
        server_caps = notify_get_server_caps();
805
810
        for (iter = server_caps; iter; iter = g_list_next (iter)) {
806
811
                if (!strcmp ((const char *) iter->data, NOTIFY_CAPS_ACTIONS_KEY)) {
858
863
        notify_notification_set_urgency (notify, urgency);
859
864
        notify_notification_set_timeout (notify, NOTIFY_EXPIRES_DEFAULT);
860
865
 
861
 
        if (applet->notify_actions && action1) {
 
866
        if (applet_notify_server_has_actions () && action1) {
862
867
                notify_notification_add_action (notify, action1, action1_label,
863
868
                                                action1_cb, action1_user_data, NULL);
864
869
        }
983
988
        g_return_val_if_fail (vpn != NULL, NULL);
984
989
 
985
990
        connection = applet_get_connection_for_active (applet, NM_ACTIVE_CONNECTION (vpn));
986
 
        s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
 
991
        s_con = nm_connection_get_setting_connection (connection);
987
992
 
988
993
        switch (reason) {
989
994
        case NM_VPN_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED:
1029
1034
        g_return_val_if_fail (vpn != NULL, NULL);
1030
1035
 
1031
1036
        connection = applet_get_connection_for_active (applet, NM_ACTIVE_CONNECTION (vpn));
1032
 
        s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
 
1037
        s_con = nm_connection_get_setting_connection (connection);
1033
1038
 
1034
1039
        switch (reason) {
1035
1040
        case NM_VPN_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED:
1117
1122
        g_return_val_if_fail (connection != NULL, NULL);
1118
1123
        g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
1119
1124
 
1120
 
        s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
 
1125
        s_con = nm_connection_get_setting_connection (connection);
1121
1126
        g_return_val_if_fail (s_con != NULL, NULL);
1122
1127
 
1123
1128
        return nm_setting_connection_get_id (s_con);
1192
1197
                /* Connection already active; do nothing */
1193
1198
                return;
1194
1199
 
1195
 
        s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
 
1200
        s_con = nm_connection_get_setting_connection (connection);
1196
1201
        info = g_malloc0 (sizeof (VPNActivateInfo));
1197
1202
        info->applet = applet;
1198
1203
        info->vpn_name = g_strdup (nm_setting_connection_get_id (s_con));
1245
1250
                if (!connection)
1246
1251
                        continue;
1247
1252
 
1248
 
                s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
 
1253
                s_con = nm_connection_get_setting_connection (connection);
1249
1254
                g_assert (s_con);
1250
1255
 
1251
1256
                if (!strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_VPN_SETTING_NAME)) {
1613
1618
                NMConnection *connection = NM_CONNECTION (iter->data);
1614
1619
                NMSettingConnection *s_con;
1615
1620
 
1616
 
                s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
 
1621
                s_con = nm_connection_get_setting_connection (connection);
1617
1622
                if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_VPN_SETTING_NAME))
1618
1623
                        /* Not a VPN connection */
1619
1624
                        continue;
1620
1625
 
1621
 
                if (!nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN)) {
 
1626
                if (!nm_connection_get_setting_vpn (connection)) {
1622
1627
                        g_warning ("%s: VPN connection '%s' didn't have required vpn setting.", __func__,
1623
1628
                                   nm_setting_connection_get_id (s_con));
1624
1629
                        continue;
2463
2468
 
2464
2469
        id = nm_device_get_iface (device);
2465
2470
        if (connection) {
2466
 
                s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
 
2471
                s_con = nm_connection_get_setting_connection (connection);
2467
2472
                id = nm_setting_connection_get_id (s_con);
2468
2473
        }
2469
2474
 
2544
2549
                NMSettingConnection *s_con;
2545
2550
 
2546
2551
                if (!strcmp (nm_connection_get_path (candidate), path)) {
2547
 
                        s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (candidate, NM_TYPE_SETTING_CONNECTION));
 
2552
                        s_con = nm_connection_get_setting_connection (candidate);
2548
2553
                        id = nm_setting_connection_get_id (s_con);
2549
2554
                        break;
2550
2555
                }
2827
2832
        GError *error = NULL;
2828
2833
        SecretsRequest *req = NULL;
2829
2834
 
2830
 
        s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
 
2835
        s_con = nm_connection_get_setting_connection (connection);
2831
2836
        g_return_if_fail (s_con != NULL);
2832
2837
 
2833
2838
        /* VPN secrets get handled a bit differently */
3329
3334
                          G_CALLBACK (applet_embedded_cb), NULL);
3330
3335
        applet_embedded_cb (G_OBJECT (applet->status_icon), NULL, NULL);
3331
3336
 
3332
 
        applet->notify_actions = applet_notify_server_has_actions ();
3333
 
 
3334
3337
        return G_OBJECT (applet);
3335
3338
 
3336
3339
error: