~ubuntu-branches/ubuntu/raring/gdm/raring

« back to all changes in this revision

Viewing changes to gui/simple-greeter/gdm-chooser-widget.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-17 11:41:35 UTC
  • mfrom: (1.4.32 upstream)
  • Revision ID: james.westby@ubuntu.com-20090717114135-1ql0hht1lumoiscv
Tags: 2.26.1git20090717-0ubuntu1
* Update to latest upstream git head:
  - Make greeter login window be a dock. Fixes metacity complaining about
    session management. (LP: #395324)
* Drop patches which are fixed upstream:
  - 00git-greeter-session-management.patch
  - 00git-invalid-dmrc-layout.patch
  - 00git-use-after-free.patch
  - 00git-xklavier4.patch
  - 02_dont_force_us_keyboard.patch
  - 04_polkit1.patch
* 80_workaround_incorrect_directories.patch: Update to new upstream version.
* Drop 01_xconfigoptions.patch; these configure variables are not used any
  more in the upstream code, and upstream supplies the X.org -br option by
  default now. Also drop the corresponding configure changes from
  17_update_default_xserver.patch.
* Apply 15_usplash.patch to debian/gdm.init and drop the patch.
* 17_update_default_xserver.patch: Update to new upstream version, add
  corresponding configure change, add patch tag header, forward upstream,
  and rename to 02_x_server_location.patch.
* Drop 99_autoreconf.patch. The only remaining build system change is the
  previous item.
* Drop 20_xdm-stuff.patch, it's just cruft.
* Drop debian/Xsession, and change debian/rules to install the upstream one.
* 01_xrdb_nocpp.patch: Add patch tag header, forward upstream.
* Rename 80_workaround_incorrect_directories.patch to
  04_fix_external_program_directories.patch and add patch tag header.
* Rename 81_initial_server_on_vt7.patch to 05_initial_server_on_vt7.patch.
* debian/rules: Remove /var/gdm (empty and nonstandard) and /var/run (will
  be created at runtime), thanks lintian.
* debian/copyright: Point to versioned GPL, thanks lintian.
* debian/gdm.postrm: Use "set -e" to conform to policy.
* Add debian/xterm.desktop: Reintroduce "failsafe xterm" session.

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
enum {
105
105
        PROP_0,
106
106
        PROP_INACTIVE_TEXT,
107
 
        PROP_ACTIVE_TEXT
 
107
        PROP_ACTIVE_TEXT,
 
108
        PROP_LIST_VISIBLE
108
109
};
109
110
 
110
111
enum {
593
594
}
594
595
 
595
596
static void
 
597
update_chooser_visibility (GdmChooserWidget *widget)
 
598
{
 
599
        if (gdm_chooser_widget_get_number_of_items (widget) > 0) {
 
600
                gtk_widget_show (widget->priv->scrollable_widget);
 
601
        } else {
 
602
                gtk_widget_hide (widget->priv->scrollable_widget);
 
603
        }
 
604
        g_object_notify (G_OBJECT (widget), "list-visible");
 
605
}
 
606
 
 
607
static void
596
608
set_inactive_items_visible (GdmChooserWidget *widget,
597
609
                            gboolean          should_show)
598
610
{
1147
1159
        case PROP_ACTIVE_TEXT:
1148
1160
                g_value_set_string (value, self->priv->active_text);
1149
1161
                break;
 
1162
        case PROP_LIST_VISIBLE:
 
1163
                g_value_set_boolean (value, GTK_WIDGET_VISIBLE (self->priv->scrollable_widget));
 
1164
                break;
1150
1165
        default:
1151
1166
                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
1152
1167
                break;
1319
1334
                                                              (G_PARAM_READWRITE |
1320
1335
                                                               G_PARAM_CONSTRUCT)));
1321
1336
 
 
1337
        g_object_class_install_property (object_class,
 
1338
                                         PROP_LIST_VISIBLE,
 
1339
                                         g_param_spec_boolean ("list-visible",
 
1340
                                                              _("List Visible"),
 
1341
                                                              _("Whether or not the chooser list is visible"),
 
1342
                                                              TRUE,
 
1343
                                                              G_PARAM_READABLE));
 
1344
 
1322
1345
        g_type_class_add_private (klass, sizeof (GdmChooserWidgetPrivate));
1323
1346
}
1324
1347
 
1771
1794
        add_frame (widget);
1772
1795
 
1773
1796
        widget->priv->scrollable_widget = gdm_scrollable_widget_new ();
1774
 
        gtk_widget_show (widget->priv->scrollable_widget);
1775
1797
        gtk_container_add (GTK_CONTAINER (widget->priv->frame_alignment),
1776
1798
                           widget->priv->scrollable_widget);
1777
1799
 
2055
2077
                                           -1);
2056
2078
 
2057
2079
        move_cursor_to_top (widget);
 
2080
        update_chooser_visibility (widget);
2058
2081
}
2059
2082
 
2060
2083
void
2103
2126
        gtk_list_store_remove (widget->priv->list_store, &iter);
2104
2127
 
2105
2128
        move_cursor_to_top (widget);
 
2129
        update_chooser_visibility (widget);
2106
2130
}
2107
2131
 
2108
2132
gboolean