~bilalakhtar/unity/port-to-gtk3

« back to all changes in this revision

Viewing changes to src/PlacesHomeView.cpp

unregister gconf notify events on destruction (LP: #762120)

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
                        MEDIA_DIR,
120
120
                        GCONF_CLIENT_PRELOAD_NONE,
121
121
                        NULL);
122
 
  gconf_client_notify_add(_client,
123
 
                          BROWSER_DIR"/exec", 
124
 
                          (GConfClientNotifyFunc)OnKeyChanged,
125
 
                          this,
126
 
                          NULL, NULL);
127
 
  gconf_client_notify_add(_client,
128
 
                          MAIL_DIR"/command",
129
 
                          (GConfClientNotifyFunc)OnKeyChanged,
130
 
                          this,
131
 
                          NULL, NULL);
132
 
  gconf_client_notify_add(_client,
133
 
                          MEDIA_DIR"/exec",
134
 
                          (GConfClientNotifyFunc)OnKeyChanged,
135
 
                          this,
136
 
                          NULL, NULL);
 
122
  _browser_gconf_notify = gconf_client_notify_add(_client,
 
123
                                                  BROWSER_DIR"/exec", 
 
124
                                                  (GConfClientNotifyFunc)OnKeyChanged,
 
125
                                                  this,
 
126
                                                  NULL, NULL);
 
127
  _mail_gconf_notify =  gconf_client_notify_add(_client,
 
128
                                                MAIL_DIR"/command",
 
129
                                                (GConfClientNotifyFunc)OnKeyChanged,
 
130
                                                this,
 
131
                                                NULL, NULL);
 
132
  _media_gconf_notify = gconf_client_notify_add(_client,
 
133
                                                MEDIA_DIR"/exec",
 
134
                                                (GConfClientNotifyFunc)OnKeyChanged,
 
135
                                                this,
 
136
                                                NULL, NULL);
137
137
                          
138
138
  _last_activate_time.tv_sec = 0;
139
139
  _last_activate_time.tv_nsec = 0;
179
179
 
180
180
  if (_ubus_handle != 0)
181
181
    ubus_server_unregister_interest (ubus_server_get_default (), _ubus_handle);
 
182
    
 
183
  if (_browser_gconf_notify)
 
184
    gconf_client_notify_remove (_client, _browser_gconf_notify);
 
185
  if (_mail_gconf_notify)
 
186
    gconf_client_notify_remove (_client, _mail_gconf_notify);
 
187
  if (_media_gconf_notify)
 
188
    gconf_client_notify_remove (_client, _media_gconf_notify);
 
189
  gconf_client_remove_dir (_client, BROWSER_DIR, NULL);
 
190
  gconf_client_remove_dir (_client, MAIL_DIR, NULL);
 
191
  gconf_client_remove_dir (_client, MEDIA_DIR, NULL);
182
192
}
183
193
 
184
194
void