~ubuntu-branches/ubuntu/utopic/network-manager-applet/utopic-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2014-01-06 22:29:40 UTC
  • mfrom: (1.2.35) (0.5.25 sid)
  • Revision ID: package-import@ubuntu.com-20140106222940-kxvsf0nrqhukudst
Tags: 0.9.8.4-1ubuntu1
* Merge changes from Debian, remaining changes:
  - Don't keep a postinst script; we don't need to worry about migration
    from versions prior to 0.9.0.
  - Build-Depend on dh-translations, libappindicator3-dev, docbook-to-man.
  - Different Descriptions for libnm-gtk packages.
  - debian/rules: ship extra icons, use --enable-indicators, export
    translations for Launchpad and fail if any files are missing from
    .install files, or not being installed.
  - debian/rules: use -delete to remove .la/.a files.
  - No notice about netdev group in README.Debian.
  - 11-user-connections.patch: don't use this patch, keep secrets system-wide
    as meant by upstream.
  - 12-force-online.patch: don't use this patch, we deal with the online
    state a different way...
  - lp289466_always_show_tray_icon.patch: always show the tray icon, even
    if NM is not running.
  - lp328572-dxteam-connect-text.patch,
    lp330571_dxteam_wired_connect_text.patch,
    lp330608_dxteam_gsm_connect_text.patch: update notification text to be
    prettier.
  - lp341684_device_sensitive_disconnect_notify.patch: show correct
    notification messages for disconnect events, to be in line with the other
    *connect*text patches.
  - lp460144_correctly_update_notification.patch: cleaner notification
    messages, and allow for messages to be updated instead of cleared.
  - applet-wifi-menu-before-vpn.patch: show Create New and Connect to Hidden
    wifi menu items with the other Wifi items, rather than separated by
    the VPN menus.
  - clear-notification-actions.patch: clear notification actions before
    adding new ones, to not append extra "Don't show this again" buttons.
  - key-certificate-extensions.patch: allow for the extra certificate file
    extension ".key".
  - lp829673_gconf_hide_applet.patch: allow for a gsettings key that disables
    ever showing the applet on the notification area.
  - nm-applet-use-indicator.patch: patch to support showing nm-applet as an
    appindicator in Unity.
  - position_dialogs_to_center_of_the_screen.patch: position dialogs to the
    center of the screen.
  - make_menu_items_insensitive_based_on_permissions.patch,
    hide_policy_items_env_var.patch: provide a method to desensitize or hide
    menu items which are useless given the current policykit policy level of
    the user.
  - applet_adhoc_use_wpa_rsn_part1.patch: enable Ad-Hoc using WPA RSN.
  - lp1048516_dont_req_keyring_in_greeter.patch: don't try to load the
    keyring if the user has no permissions to edit their own connections.
  - lp1048520_delay_pin_dialog_in_greeter.patch: only ask for PIN entry when
    a connection is being established rather than when a modem is detected.
  - rebuild_menu_after_init.patch: force a rebuild of the menu to avoid it
    staying empty on login.

Show diffs side-by-side

added added

removed removed

Lines of Context:
246
246
                NMDeviceModemCapabilities caps;
247
247
 
248
248
#if WITH_MODEM_MANAGER_1
249
 
                if (g_str_has_prefix (nm_device_get_udi (device), "/org/freedesktop/ModemManager1/Modem/")) {
250
 
                        if (applet->mm1_running)
251
 
                                return applet->broadband_class;
252
 
                        g_message ("%s: ModemManager was not found", __func__);
253
 
                        return NULL;
254
 
                }
 
249
                if (g_str_has_prefix (nm_device_get_udi (device), "/org/freedesktop/ModemManager1/Modem/"))
 
250
                        return applet->broadband_class;
255
251
#endif
256
252
 
257
253
                caps = nm_device_modem_get_current_capabilities (NM_DEVICE_MODEM (device));
3418
3414
        NMApplet *applet = NM_APPLET (user_data);
3419
3415
 
3420
3416
        /* If the shell is running and the agent just got registered, unregister it */
3421
 
        if (   (nm_shell_watcher_version_at_least (applet->shell_watcher, 3, 4))
 
3417
        if (   applet->shell_watcher
 
3418
            && (nm_shell_watcher_version_at_least (applet->shell_watcher, 3, 4))
3422
3419
            && nm_secret_agent_get_registered (NM_SECRET_AGENT (agent))) {
3423
3420
                g_message ("Stopping registered applet secret agent because GNOME Shell is running");
3424
3421
                nm_secret_agent_unregister (NM_SECRET_AGENT (agent));
3497
3494
        /* Try to load the icon; if the load fails, log the problem, and set
3498
3495
         * the icon to the fallback icon if requested.
3499
3496
         */
3500
 
        *icon = gtk_icon_theme_load_icon (applet->icon_theme, name, applet->icon_size, 0, &error);
 
3497
        *icon = gtk_icon_theme_load_icon (applet->icon_theme, name, applet->icon_size, GTK_ICON_LOOKUP_FORCE_SIZE, &error);
3501
3498
        if (!*icon) {
3502
3499
                g_warning ("Icon %s missing: (%d) %s",
3503
3500
                           name,
3601
3598
                             NMApplet *applet)
3602
3599
{
3603
3600
        if (getenv ("NMA_SIZE_DEBUG")) {
3604
 
                g_message ("%s(): status icon size now %d", __func__, size);
 
3601
                g_message ("%s(): status icon size %d requested", __func__, size);
3605
3602
        }
3606
3603
 
3607
3604
        /* icon_size may be 0 if for example the panel hasn't given us any space
3608
3605
         * yet.  We'll get resized later, but for now just load the 16x16 icons.
3609
3606
         */
3610
 
        applet->icon_size = MAX (16, size);
 
3607
        applet->icon_size = size ? size : 16;
3611
3608
 
3612
3609
        nma_icons_reload (applet);
3613
3610
 
4015
4012
        applet_embedded_cb (G_OBJECT (applet->status_icon), NULL, NULL);
4016
4013
 
4017
4014
#if GLIB_CHECK_VERSION(2,26,0)
4018
 
        /* Watch GNOME Shell so we can unregister our applet agent if it appears */
4019
 
        applet->shell_watcher = nm_shell_watcher_new ();
4020
 
        g_signal_connect (applet->shell_watcher,
4021
 
                          "notify::shell-version",
4022
 
                          G_CALLBACK (shell_version_changed_cb),
4023
 
                          applet);
 
4015
        if (!shell_debug) {
 
4016
                /* Watch GNOME Shell so we can unregister our applet agent if it appears */
 
4017
                applet->shell_watcher = nm_shell_watcher_new ();
 
4018
                g_signal_connect (applet->shell_watcher,
 
4019
                                      "notify::shell-version",
 
4020
                                      G_CALLBACK (shell_version_changed_cb),
 
4021
                                      applet);
 
4022
        }
4024
4023
#endif
4025
4024
 
4026
4025
        return G_OBJECT (applet);