[gnome-disk-utility] Use GtkLevelBar widget for conveying passphrase strength
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility] Use GtkLevelBar widget for conveying passphrase strength
- Date: Wed, 25 Jul 2012 13:10:13 +0000 (UTC)
commit 750d5ae39016a278e6d2136fcb655163d1fd7b0c
Author: David Zeuthen <zeuthen gmail com>
Date: Wed Jul 25 09:09:18 2012 -0400
Use GtkLevelBar widget for conveying passphrase strength
This was added in GTK+ 3.5.8 so require that version.
http://people.freedesktop.org/~david/gnome-disks-use-level-bar-widget.png
Signed-off-by: David Zeuthen <zeuthen gmail com>
configure.ac | 2 +-
src/disks/gdupasswordstrengthwidget.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 6e799ed..6b6b278 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,7 +83,7 @@ CC_CHECK_CFLAGS_APPEND([ \
GLIB2_REQUIRED=2.31.0
UDISKS2_REQUIRED=1.99.0
-GTK3_REQUIRED=3.3.11
+GTK3_REQUIRED=3.5.8
KEYRING1_REQUIRED=3.4.0
PWQUALITY_REQUIRED=1.0.0
diff --git a/src/disks/gdupasswordstrengthwidget.c b/src/disks/gdupasswordstrengthwidget.c
index bca6cd5..8cbb4a3 100644
--- a/src/disks/gdupasswordstrengthwidget.c
+++ b/src/disks/gdupasswordstrengthwidget.c
@@ -38,7 +38,7 @@ struct _GduPasswordStrengthWidget
{
GtkHBox parent;
- GtkWidget *progress_bar;
+ GtkWidget *level_bar;
GtkWidget *notebook;
gchar *password;
@@ -191,7 +191,7 @@ update (GduPasswordStrengthWidget *widget)
g_warn_if_fail (tab_num >= 0 && tab_num < HINT_LAST);
gtk_notebook_set_current_page (GTK_NOTEBOOK (widget->notebook), tab_num);
- gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (widget->progress_bar), strength);
+ gtk_level_bar_set_value (GTK_LEVEL_BAR (widget->level_bar), strength);
}
@@ -203,8 +203,8 @@ gdu_password_strength_widget_constructed (GObject *object)
gtk_box_set_spacing (GTK_BOX (widget), 6);
- widget->progress_bar = gtk_progress_bar_new ();
- gtk_box_pack_start (GTK_BOX (widget), widget->progress_bar, TRUE, TRUE, 0);
+ widget->level_bar = gtk_level_bar_new ();
+ gtk_box_pack_start (GTK_BOX (widget), widget->level_bar, TRUE, TRUE, 0);
widget->notebook = gtk_notebook_new ();
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (widget->notebook), FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]