--- src/gpm-prefs-core.c.orig 2008-05-12 23:03:12.000000000 +0800
+++ src/gpm-prefs-core.c 2008-06-04 10:50:33.034096000 +0800
@@ -797,6 +797,20 @@
ACTION_HIBERNATE,
ACTION_SHUTDOWN,
NULL};
+/* Disable AC tab on Solaris Sparc in Phase 1 development */
+#if defined(sun) && defined(__SVR4)
+ GtkWidget *notebook;
+ gint page;
+
+ if ((prefs->priv->has_button_lid == FALSE)
+ && (prefs->priv->has_lcd == FALSE)) {
+ notebook = glade_xml_get_widget (prefs->priv->glade_xml, "notebook_preferences");
+ widget = glade_xml_get_widget (prefs->priv->glade_xml, "vbox_ac");
+ page = gtk_notebook_page_num (GTK_NOTEBOOK (notebook), GTK_WIDGET (widget));
+ gtk_notebook_remove_page (GTK_NOTEBOOK (notebook), page);
+ return;
+ }
+#endif
gpm_prefs_setup_action_combo (prefs, "combobox_ac_lid",
GPM_CONF_BUTTON_LID_AC,
@@ -825,6 +839,22 @@
widget = glade_xml_get_widget (prefs->priv->glade_xml, "checkbutton_ac_display_dim");
gtk_widget_hide_all (widget);
}
+
+/* Disable sleep configuration in Phase 1 development */
+#if defined(sun) && defined(__SVR4)
+ widget = glade_xml_get_widget (prefs->priv->glade_xml, "hbox_ac_computer");
+ gtk_widget_hide_all (widget);
+
+ if (prefs->priv->has_lcd == FALSE) {
+ widget = glade_xml_get_widget (prefs->priv->glade_xml, "vbox_ac_display");
+ gtk_widget_hide_all (widget);
+ } else {
+ widget = glade_xml_get_widget (prefs->priv->glade_xml, "hbox_ac_display");
+ gtk_widget_hide_all (widget);
+ widget = glade_xml_get_widget (prefs->priv->glade_xml, "checkbutton_ac_display_dim");
+ gtk_widget_hide_all (widget);
+ }
+#endif
}
static void
@@ -892,6 +922,22 @@
widget = glade_xml_get_widget (prefs->priv->glade_xml, "checkbutton_battery_display_dim");
gtk_widget_hide_all (widget);
}
+
+/* Disable sleep configuration in Phase 1 development */
+#if defined(sun) && defined(__SVR4)
+ widget = glade_xml_get_widget (prefs->priv->glade_xml, "hbox_battery_computer");
+ gtk_widget_hide_all (widget);
+
+ if (prefs->priv->has_lcd == FALSE) {
+ widget = glade_xml_get_widget (prefs->priv->glade_xml, "vbox_battery_display");
+ gtk_widget_hide_all (widget);
+ } else {
+ widget = glade_xml_get_widget (prefs->priv->glade_xml, "hbox_battery_display");
+ gtk_widget_hide_all (widget);
+ widget = glade_xml_get_widget (prefs->priv->glade_xml, "checkbutton_battery_display_dim");
+ gtk_widget_hide_all (widget);
+ }
+#endif
}
static void