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

« 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: 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:
243
243
                NMDeviceModemCapabilities caps;
244
244
 
245
245
#if WITH_MODEM_MANAGER_1
246
 
                if (g_str_has_prefix (nm_device_get_udi (device), "/org/freedesktop/ModemManager1/Modem/")) {
247
 
                        if (applet->mm1_running)
248
 
                                return applet->broadband_class;
249
 
                        g_message ("%s: ModemManager was not found", __func__);
250
 
                        return NULL;
251
 
                }
 
246
                if (g_str_has_prefix (nm_device_get_udi (device), "/org/freedesktop/ModemManager1/Modem/"))
 
247
                        return applet->broadband_class;
252
248
#endif
253
249
 
254
250
                caps = nm_device_modem_get_current_capabilities (NM_DEVICE_MODEM (device));
3060
3056
        NMApplet *applet = NM_APPLET (user_data);
3061
3057
 
3062
3058
        /* If the shell is running and the agent just got registered, unregister it */
3063
 
        if (   (nm_shell_watcher_version_at_least (applet->shell_watcher, 3, 4))
 
3059
        if (   applet->shell_watcher
 
3060
            && (nm_shell_watcher_version_at_least (applet->shell_watcher, 3, 4))
3064
3061
            && nm_secret_agent_get_registered (NM_SECRET_AGENT (agent))) {
3065
3062
                g_message ("Stopping registered applet secret agent because GNOME Shell is running");
3066
3063
                nm_secret_agent_unregister (NM_SECRET_AGENT (agent));
3139
3136
        /* Try to load the icon; if the load fails, log the problem, and set
3140
3137
         * the icon to the fallback icon if requested.
3141
3138
         */
3142
 
        *icon = gtk_icon_theme_load_icon (applet->icon_theme, name, applet->icon_size, 0, &error);
 
3139
        *icon = gtk_icon_theme_load_icon (applet->icon_theme, name, applet->icon_size, GTK_ICON_LOOKUP_FORCE_SIZE, &error);
3143
3140
        if (!*icon) {
3144
3141
                g_warning ("Icon %s missing: (%d) %s",
3145
3142
                           name,
3243
3240
                             NMApplet *applet)
3244
3241
{
3245
3242
        if (getenv ("NMA_SIZE_DEBUG")) {
3246
 
                g_message ("%s(): status icon size now %d", __func__, size);
 
3243
                g_message ("%s(): status icon size %d requested", __func__, size);
3247
3244
        }
3248
3245
 
3249
3246
        /* icon_size may be 0 if for example the panel hasn't given us any space
3250
3247
         * yet.  We'll get resized later, but for now just load the 16x16 icons.
3251
3248
         */
3252
 
        applet->icon_size = MAX (16, size);
 
3249
        applet->icon_size = size ? size : 16;
3253
3250
 
3254
3251
        nma_icons_reload (applet);
3255
3252
 
3534
3531
        applet_embedded_cb (G_OBJECT (applet->status_icon), NULL, NULL);
3535
3532
 
3536
3533
#if GLIB_CHECK_VERSION(2,26,0)
3537
 
        /* Watch GNOME Shell so we can unregister our applet agent if it appears */
3538
 
        applet->shell_watcher = nm_shell_watcher_new ();
3539
 
        g_signal_connect (applet->shell_watcher,
3540
 
                          "notify::shell-version",
3541
 
                          G_CALLBACK (shell_version_changed_cb),
3542
 
                          applet);
 
3534
        if (!shell_debug) {
 
3535
                /* Watch GNOME Shell so we can unregister our applet agent if it appears */
 
3536
                applet->shell_watcher = nm_shell_watcher_new ();
 
3537
                g_signal_connect (applet->shell_watcher,
 
3538
                                      "notify::shell-version",
 
3539
                                      G_CALLBACK (shell_version_changed_cb),
 
3540
                                      applet);
 
3541
        }
3543
3542
#endif
3544
3543
 
3545
3544
        return G_OBJECT (applet);