~timchen119/ubuntu/utopic/gnome-bluetooth/lp1035431

« back to all changes in this revision

Viewing changes to .pc/fix_browse_devices_selector.patch/applet/main.c

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher, Jeremy Bicha
  • Date: 2012-02-03 11:47:29 UTC
  • Revision ID: package-import@ubuntu.com-20120203114729-z8cj1i2u86dh6q3a
Tags: 3.2.1-1ubuntu5
* debian/patches/01_use_app_indicator.patch:
  - new "Show Bluetooth status in the menu bar" control center option,
    thanks charles (lp: #829690)
* debian/patches/03_text_changes.patch:
  - updated the wording of some of the menu entries, 
    thanks charles (lp: #906042)
* debian/patches/start_in_classic_session.patch:
  - start the applet in the GNOME classic session (lp: #924098)

[ Jeremy Bicha ]
* debian/patches/01_use_app_indicator.patch: 
  - Rename Preferences menu item to "Bluetooth Settings…" (lp: #906042)

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
#include "notify.h"
41
41
#include "agent.h"
42
42
 
 
43
#ifdef HAVE_APP_INDICATOR
 
44
 #define BLUETOOTH_INDICATOR_GSETTINGS_SCHEMA_ID "com.canonical.indicator.bluetooth"
 
45
 #define GSETTINGS_VISIBLE_KEY  "visible"
 
46
 static GSettings *gsettings = NULL;
 
47
#endif /* HAVE_APP_INDICATOR */
 
48
 
43
49
static gboolean option_debug = FALSE;
44
50
static BluetoothApplet *applet = NULL;
45
51
static gboolean discover_lock = FALSE;
394
400
        else
395
401
                set_icon (TRUE);
396
402
 
397
 
        if (state != BLUETOOTH_KILLSWITCH_STATE_NO_ADAPTER) {
 
403
        if (state == BLUETOOTH_KILLSWITCH_STATE_NO_ADAPTER)
 
404
                hide_icon ();
 
405
#ifdef HAVE_APP_INDICATOR
 
406
        else if (!g_settings_get_boolean (gsettings, GSETTINGS_VISIBLE_KEY))
 
407
                hide_icon ();
 
408
#endif
 
409
        else
398
410
                show_icon ();
399
 
                return;
400
 
        }
401
 
        hide_icon ();
402
411
}
403
412
 
404
413
static void
933
942
#ifdef HAVE_APP_INDICATOR
934
943
        indicator = init_notification();
935
944
        app_indicator_set_menu(indicator, GTK_MENU(menu));
 
945
        gsettings = g_settings_new (BLUETOOTH_INDICATOR_GSETTINGS_SCHEMA_ID);
 
946
        g_signal_connect (gsettings, "changed::" GSETTINGS_VISIBLE_KEY,
 
947
                          G_CALLBACK(update_icon_visibility), NULL);
936
948
#else
937
949
        statusicon = init_notification();
938
950
#endif /* HAVE_APP_INDICATOR */