summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2009-10-21 15:56:39 -0700
committerAaron Plattner <aplattner@nvidia.com>2009-10-21 15:56:39 -0700
commitd948d9b7bbdc46ada71bfc92931e6fd7601a6e8d (patch)
treeb25b4602fe50f3dd0bd5728ca49f4e0da0fafd75
parentc82cf906728d7772312bb1eed3c24df352f80458 (diff)
190.42190.42
-rw-r--r--src/XF86Config-parser/Merge.c15
-rw-r--r--src/gtk+-2.x/ctklicense.c34
2 files changed, 37 insertions, 12 deletions
diff --git a/src/XF86Config-parser/Merge.c b/src/XF86Config-parser/Merge.c
index 26521ee..e302e5e 100644
--- a/src/XF86Config-parser/Merge.c
+++ b/src/XF86Config-parser/Merge.c
@@ -691,6 +691,21 @@ static int xconfigMergeLayout(XConfigPtr dstConfig, XConfigPtr srcConfig)
srcAdj = srcAdj->next;
}
+ /* Merge the options */
+
+ if (srcLayout->options) {
+ XConfigOptionPtr srcOption;
+
+ srcOption = srcLayout->options;
+ while (srcOption) {
+ xconfigMergeOption(&(dstLayout->options),
+ &(srcLayout->options),
+ xconfigOptionName(srcOption),
+ &(dstLayout->comment));
+ srcOption = srcOption->next;
+ }
+ }
+
return 1;
} /* xconfigMergeLayout() */
diff --git a/src/gtk+-2.x/ctklicense.c b/src/gtk+-2.x/ctklicense.c
index c0b3f8b..1b3a135 100644
--- a/src/gtk+-2.x/ctklicense.c
+++ b/src/gtk+-2.x/ctklicense.c
@@ -177,6 +177,8 @@ gint ctk_license_run_dialog(CtkLicenseDialog *ctk_license_dialog)
gint w, h;
gint result;
+ GtkRange *range;
+ GtkAdjustment *adj;
GdkScreen * s =
gtk_window_get_screen(GTK_WINDOW(GTK_DIALOG(ctk_license_dialog->dialog)));
@@ -185,7 +187,7 @@ gint ctk_license_run_dialog(CtkLicenseDialog *ctk_license_dialog)
gtk_window_get_size(GTK_WINDOW(GTK_DIALOG(ctk_license_dialog->dialog)),
&w, &h);
- /* Make license dialog default to 75% of the screen height */
+ /* Make license dialog default to 55% of the screen height */
h = (gint)(0.55f * gdk_screen_get_height(s));
w = 1;
@@ -195,21 +197,29 @@ gint ctk_license_run_dialog(CtkLicenseDialog *ctk_license_dialog)
/* Reset scroll bar to the top */
- gtk_adjustment_set_value(GTK_ADJUSTMENT(
- GTK_RANGE(
- GTK_SCROLLED_WINDOW(ctk_license_dialog->window)->
- vscrollbar)->adjustment)
- ,0.0f);
+ range =
+ GTK_RANGE(GTK_SCROLLED_WINDOW(ctk_license_dialog->window)->vscrollbar);
+ adj = gtk_range_get_adjustment(range);
-
- /* Disable the YES button */
-
- gtk_dialog_set_response_sensitive(GTK_DIALOG(ctk_license_dialog->dialog),
- GTK_RESPONSE_ACCEPT,
- FALSE);
+ gtk_adjustment_set_value(adj, 0.0f);
gtk_widget_show_all(ctk_license_dialog->dialog);
+
+ /* Sensitize the YES button */
+
+ if ( adj->page_size >= adj->upper ) {
+ gtk_dialog_set_response_sensitive(GTK_DIALOG(
+ ctk_license_dialog->dialog),
+ GTK_RESPONSE_ACCEPT,
+ TRUE);
+ } else {
+ gtk_dialog_set_response_sensitive(GTK_DIALOG(
+ ctk_license_dialog->dialog),
+ GTK_RESPONSE_ACCEPT,
+ FALSE);
+ }
+
result = gtk_dialog_run (GTK_DIALOG(ctk_license_dialog->dialog));
gtk_widget_hide_all(ctk_license_dialog->dialog);