示例#1
0
static void
setup_current_user (ShellStatusMenu *status)
{
  ShellStatusMenuPrivate *priv = status->priv;
  const char *name;

  priv->user = gdm_user_manager_get_user_by_uid (priv->manager, getuid ());
  if (priv->user != NULL)
    {
      g_object_ref (priv->user);
      name = gdm_user_get_real_name (priv->user);
    }
  else
    {
      name = _("Unknown");
    }

  update_name_text (status);

  if (priv->user != NULL)
    {
      reset_icon (status);

      priv->user_icon_changed_id =
        g_signal_connect (priv->user,
                          "icon-changed",
                          G_CALLBACK (on_user_icon_changed),
                          status);
      priv->user_notify_id =
        g_signal_connect (priv->user,
                          "notify::display-name",
                          G_CALLBACK (user_notify_display_name_cb),
                          status);
    }
}
示例#2
0
static void
on_user_icon_changed (GdmUser         *user,
                      ShellStatusMenu *status)
{
  g_debug ("User icon changed");
  reset_icon (status);
}
示例#3
0
static void
helper_toolbar_parse_helper_str(GtkWidget *widget, gchar *str)
{
    gchar **lines;
    lines = g_strsplit(str, "\n", 0);

    if (lines && lines[0]) {
        if (!strcmp("prop_list_update", lines[0]))
            helper_toolbar_prop_list_update(widget, lines);
        else if (!strcmp("custom_reload_notify", lines[0])) {
            uim_prop_reload_configs();
            helper_toolbar_check_custom();
            reset_icon();
        }
        g_strfreev(lines);
    }
}