[brasero] Improve and fix how we remember pane proportions in GtkFileChoosers
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Improve and fix how we remember pane proportions in GtkFileChoosers
- Date: Sun, 8 Nov 2009 14:01:49 +0000 (UTC)
commit e624bfa7d2c3c0fb9c0741f63678e118bee70c5b
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Sun Nov 8 14:57:36 2009 +0100
Improve and fix how we remember pane proportions in GtkFileChoosers
src/brasero-file-chooser.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/brasero-file-chooser.c b/src/brasero-file-chooser.c
index eab1d2c..80d6767 100644
--- a/src/brasero-file-chooser.c
+++ b/src/brasero-file-chooser.c
@@ -164,7 +164,7 @@ brasero_file_chooser_paned_map_event (GtkWidget *widget,
percent = GINT_TO_POINTER (30);
}
- position = widget->allocation.width * GPOINTER_TO_INT (percent) / 100;
+ position = widget->allocation.width * GPOINTER_TO_INT (percent) / 10000;
gtk_paned_set_position (GTK_PANED (widget), position);
}
@@ -175,7 +175,14 @@ brasero_file_chooser_position_percent (GObject *object,
{
gint percent;
- percent = position * 100 / width;
+ percent = position * 10000;
+ if (percent % width) {
+ percent /= width;
+ percent ++;
+ }
+ else
+ percent /= width;
+
g_object_set_data (object, "position-percent", GINT_TO_POINTER (percent));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]