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

« back to all changes in this revision

Viewing changes to .pc/lp829673_gconf_hide_applet.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:
244
244
                NMDeviceModemCapabilities caps;
245
245
 
246
246
#if WITH_MODEM_MANAGER_1
247
 
                if (g_str_has_prefix (nm_device_get_udi (device), "/org/freedesktop/ModemManager1/Modem/")) {
248
 
                        if (applet->mm1_running)
249
 
                                return applet->broadband_class;
250
 
                        g_message ("%s: ModemManager was not found", __func__);
251
 
                        return NULL;
252
 
                }
 
247
                if (g_str_has_prefix (nm_device_get_udi (device), "/org/freedesktop/ModemManager1/Modem/"))
 
248
                        return applet->broadband_class;
253
249
#endif
254
250
 
255
251
                caps = nm_device_modem_get_current_capabilities (NM_DEVICE_MODEM (device));
3190
3186
        NMApplet *applet = NM_APPLET (user_data);
3191
3187
 
3192
3188
        /* If the shell is running and the agent just got registered, unregister it */
3193
 
        if (   (nm_shell_watcher_version_at_least (applet->shell_watcher, 3, 4))
 
3189
        if (   applet->shell_watcher
 
3190
            && (nm_shell_watcher_version_at_least (applet->shell_watcher, 3, 4))
3194
3191
            && nm_secret_agent_get_registered (NM_SECRET_AGENT (agent))) {
3195
3192
                g_message ("Stopping registered applet secret agent because GNOME Shell is running");
3196
3193
                nm_secret_agent_unregister (NM_SECRET_AGENT (agent));
3269
3266
        /* Try to load the icon; if the load fails, log the problem, and set
3270
3267
         * the icon to the fallback icon if requested.
3271
3268
         */
3272
 
        *icon = gtk_icon_theme_load_icon (applet->icon_theme, name, applet->icon_size, 0, &error);
 
3269
        *icon = gtk_icon_theme_load_icon (applet->icon_theme, name, applet->icon_size, GTK_ICON_LOOKUP_FORCE_SIZE, &error);
3273
3270
        if (!*icon) {
3274
3271
                g_warning ("Icon %s missing: (%d) %s",
3275
3272
                           name,
3373
3370
                             NMApplet *applet)
3374
3371
{
3375
3372
        if (getenv ("NMA_SIZE_DEBUG")) {
3376
 
                g_message ("%s(): status icon size now %d", __func__, size);
 
3373
                g_message ("%s(): status icon size %d requested", __func__, size);
3377
3374
        }
3378
3375
 
3379
3376
        /* icon_size may be 0 if for example the panel hasn't given us any space
3380
3377
         * yet.  We'll get resized later, but for now just load the 16x16 icons.
3381
3378
         */
3382
 
        applet->icon_size = MAX (16, size);
 
3379
        applet->icon_size = size ? size : 16;
3383
3380
 
3384
3381
        nma_icons_reload (applet);
3385
3382
 
3662
3659
        applet_embedded_cb (G_OBJECT (applet->status_icon), NULL, NULL);
3663
3660
 
3664
3661
#if GLIB_CHECK_VERSION(2,26,0)
3665
 
        /* Watch GNOME Shell so we can unregister our applet agent if it appears */
3666
 
        applet->shell_watcher = nm_shell_watcher_new ();
3667
 
        g_signal_connect (applet->shell_watcher,
3668
 
                          "notify::shell-version",
3669
 
                          G_CALLBACK (shell_version_changed_cb),
3670
 
                          applet);
 
3662
        if (!shell_debug) {
 
3663
                /* Watch GNOME Shell so we can unregister our applet agent if it appears */
 
3664
                applet->shell_watcher = nm_shell_watcher_new ();
 
3665
                g_signal_connect (applet->shell_watcher,
 
3666
                                      "notify::shell-version",
 
3667
                                      G_CALLBACK (shell_version_changed_cb),
 
3668
                                      applet);
 
3669
        }
3671
3670
#endif
3672
3671
 
3673
3672
        return G_OBJECT (applet);