~ubuntu-branches/ubuntu/precise/indicator-session/precise

« back to all changes in this revision

Viewing changes to src/indicator-session.c

  • Committer: Package Import Robot
  • Author(s): Charles Kerr
  • Date: 2012-03-21 12:28:43 UTC
  • mfrom: (1.1.50)
  • Revision ID: package-import@ubuntu.com-20120321122843-mizl6vgyuu4a913f
Tags: 0.3.95-0ubuntu1
* New upstream release.
  * Fix small memory leaks (lp: #957342)

Show diffs side-by-side

added added

removed removed

Lines of Context:
428
428
        }
429
429
  
430
430
  const gchar* username = NULL;
431
 
  g_variant_get (result, "(s)", &username);
 
431
  g_variant_get (result, "(&s)", &username);
432
432
  indicator_session_update_users_label (self, username);
433
433
        return;
434
434
}
481
481
 
482
482
        if (g_strcmp0(signal_name, "UserRealNameUpdated") == 0) {
483
483
    const gchar* username = NULL;
484
 
    g_variant_get (parameters, "(s)", &username);
 
484
    g_variant_get (parameters, "(&s)", &username);
485
485
    indicator_session_update_users_label (self, username);      
486
486
  }
487
487
  else if (g_strcmp0(signal_name, "UserMenuIsVisible") == 0) {
713
713
  }  
714
714
 
715
715
  GSettings* settings = g_settings_new ("com.canonical.indicator.session");
716
 
  gboolean use_name = g_settings_get_boolean (settings,
717
 
                                              "show-real-name-on-panel");    
 
716
  const gboolean use_name = g_settings_get_boolean (settings, "show-real-name-on-panel");    
 
717
  gtk_label_set_text (self->users.label, name);
 
718
  gtk_widget_set_visible (GTK_WIDGET(self->users.label), use_name);
718
719
  g_object_unref (settings);
719
 
  gtk_label_set_text (self->users.label, g_strdup(name));
720
 
  if (use_name){ 
721
 
    gtk_widget_show(GTK_WIDGET(self->users.label));
722
 
  }
723
 
  else{
724
 
    gtk_widget_hide(GTK_WIDGET(self->users.label));
725
 
  }
726
720
}