From f895ab2ee8f0e838d01a51544d7ec06693349a06 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Thu, 29 Dec 2011 13:58:45 +0000 Subject: gtk_check_version should be GTK_CHECK_VERSION, lowercase version is C function, not a preprocessor macro --- src/gpm-prefs-core.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/gpm-prefs-core.c') diff --git a/src/gpm-prefs-core.c b/src/gpm-prefs-core.c index db1e546..1121f40 100644 --- a/src/gpm-prefs-core.c +++ b/src/gpm-prefs-core.c @@ -360,7 +360,7 @@ gpm_prefs_setup_action_combo (GpmPrefs *prefs, const gchar *widget_name, if (policy == GPM_ACTION_POLICY_SHUTDOWN && !prefs->priv->can_shutdown) { egg_debug ("Cannot add option, as cannot shutdown."); } else if (policy == GPM_ACTION_POLICY_SHUTDOWN && prefs->priv->can_shutdown) { - #if gtk_check_version (2, 24, 0) + #if GTK_CHECK_VERSION (2, 24, 0) gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Shutdown")); g_ptr_array_add(array, GINT_TO_POINTER (policy)); #else @@ -372,7 +372,7 @@ gpm_prefs_setup_action_combo (GpmPrefs *prefs, const gchar *widget_name, } else if (policy == GPM_ACTION_POLICY_HIBERNATE && !prefs->priv->can_hibernate) { egg_debug ("Cannot add option, as cannot hibernate."); } else if (policy == GPM_ACTION_POLICY_SUSPEND && prefs->priv->can_suspend) { - #if gtk_check_version (2, 24, 0) + #if GTK_CHECK_VERSION (2, 24, 0) gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Suspend")); g_ptr_array_add (array, GINT_TO_POINTER (policy)); #else @@ -380,7 +380,7 @@ gpm_prefs_setup_action_combo (GpmPrefs *prefs, const gchar *widget_name, g_ptr_array_add (array, GINT_TO_POINTER (policy)); #endif } else if (policy == GPM_ACTION_POLICY_HIBERNATE && prefs->priv->can_hibernate) { - #if gtk_check_version (2, 24, 0) + #if GTK_CHECK_VERSION (2, 24, 0) gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Hibernate")); g_ptr_array_add(array, GINT_TO_POINTER (policy)); #else @@ -388,7 +388,7 @@ gpm_prefs_setup_action_combo (GpmPrefs *prefs, const gchar *widget_name, g_ptr_array_add (array, GINT_TO_POINTER (policy)); #endif } else if (policy == GPM_ACTION_POLICY_BLANK) { - #if gtk_check_version (2, 24, 0) + #if GTK_CHECK_VERSION (2, 24, 0) gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Blank screen")); g_ptr_array_add (array, GINT_TO_POINTER (policy)); #else @@ -396,7 +396,7 @@ gpm_prefs_setup_action_combo (GpmPrefs *prefs, const gchar *widget_name, g_ptr_array_add (array, GINT_TO_POINTER (policy)); #endif } else if (policy == GPM_ACTION_POLICY_INTERACTIVE) { - #if gtk_check_version (2, 24, 0) + #if GTK_CHECK_VERSION (2, 24, 0) gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Ask me")); g_ptr_array_add(array, GINT_TO_POINTER (policy)); #else @@ -406,7 +406,7 @@ gpm_prefs_setup_action_combo (GpmPrefs *prefs, const gchar *widget_name, } else if (policy == GPM_ACTION_POLICY_NOTHING) { /* we only add do nothing in the GUI if the user has explicitly specified this in MateConf */ if (value == GPM_ACTION_POLICY_NOTHING) { - #if gtk_check_version (2, 24, 0) + #if GTK_CHECK_VERSION (2, 24, 0) gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Do nothing")); g_ptr_array_add(array, GINT_TO_POINTER (policy)); #else @@ -472,14 +472,14 @@ gpm_prefs_setup_time_combo (GpmPrefs *prefs, const gchar *widget_name, /* get translation for number of seconds */ if (values[i] != 0) { text = gpm_get_timestring (values[i]); - #if gtk_check_version (2, 24, 0) + #if GTK_CHECK_VERSION (2, 24, 0) gtk_combo_box_text_append_text(GTK_COMBO_BOX (widget), text); #else gtk_combo_box_append_text (GTK_COMBO_BOX (widget), text); #endif g_free (text); } else { - #if gtk_check_version (2, 24, 0) + #if GTK_CHECK_VERSION (2, 24, 0) gtk_combo_box_text_append_text(GTK_COMBO_BOX (widget), _("Never")); #else gtk_combo_box_append_text (GTK_COMBO_BOX (widget), _("Never")); @@ -725,7 +725,7 @@ prefs_setup_ac (GpmPrefs *prefs) if (prefs->priv->has_button_lid == FALSE) { widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hbox_ac_lid")); - #if gtk_check_version (2, 24, 0) + #if GTK_CHECK_VERSION (2, 24, 0) gtk_widget_hide(widget); #else gtk_widget_hide_all (widget); @@ -734,7 +734,7 @@ prefs_setup_ac (GpmPrefs *prefs) if (prefs->priv->has_lcd == FALSE) { widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hbox_ac_brightness")); - #if gtk_check_version (2, 24, 0) + #if GTK_CHECK_VERSION (2, 24, 0) gtk_widget_hide(widget); #else gtk_widget_hide_all (widget); @@ -742,7 +742,7 @@ prefs_setup_ac (GpmPrefs *prefs) widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "checkbutton_ac_display_dim")); - #if gtk_check_version (2, 24, 0) + #if GTK_CHECK_VERSION (2, 24, 0) gtk_widget_hide(widget); #else gtk_widget_hide_all (widget); @@ -820,7 +820,7 @@ prefs_setup_battery (GpmPrefs *prefs) if (prefs->priv->has_button_lid == FALSE) { widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hbox_battery_lid")); - #if gtk_check_version(2, 24, 0) + #if GTK_CHECK_VERSION(2, 24, 0) gtk_widget_hide(widget); #else gtk_widget_hide_all (widget); @@ -828,7 +828,7 @@ prefs_setup_battery (GpmPrefs *prefs) } if (prefs->priv->has_lcd == FALSE) { widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "checkbutton_battery_display_dim")); - #if gtk_check_version(2, 24, 0) + #if GTK_CHECK_VERSION(2, 24, 0) gtk_widget_hide(widget) #else gtk_widget_hide_all (widget); @@ -914,7 +914,7 @@ prefs_setup_general (GpmPrefs *prefs) if (prefs->priv->has_button_suspend == FALSE) { widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hbox_general_suspend")); - #if gtk_check_version (2, 24, 0) + #if GTK_CHECK_VERSION (2, 24, 0) gtk_widget_hide(widget) #else gtk_widget_hide_all (widget); @@ -1017,7 +1017,7 @@ gpm_prefs_init (GpmPrefs *prefs) prefs->priv->builder = gtk_builder_new (); - #if gtk_check_version(2, 24, 0) + #if GTK_CHECK_VERSION(2, 24, 0) retval = gtk_builder_add_from_file (prefs->priv->builder, GPM_DATA "/gpm-prefs.ui", &error); #else -- cgit v1.2.1 From fcb6eb4aed20575c12818e796dfd3506045373ce Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Thu, 29 Dec 2011 15:02:44 +0000 Subject: fix missing semicolons, introduced in 3893856a1e22cb62a9d36eca5ab96284859d0d19 --- src/gpm-prefs-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gpm-prefs-core.c') diff --git a/src/gpm-prefs-core.c b/src/gpm-prefs-core.c index 1121f40..b484083 100644 --- a/src/gpm-prefs-core.c +++ b/src/gpm-prefs-core.c @@ -829,7 +829,7 @@ prefs_setup_battery (GpmPrefs *prefs) if (prefs->priv->has_lcd == FALSE) { widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "checkbutton_battery_display_dim")); #if GTK_CHECK_VERSION(2, 24, 0) - gtk_widget_hide(widget) + gtk_widget_hide(widget); #else gtk_widget_hide_all (widget); #endif @@ -915,7 +915,7 @@ prefs_setup_general (GpmPrefs *prefs) widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hbox_general_suspend")); #if GTK_CHECK_VERSION (2, 24, 0) - gtk_widget_hide(widget) + gtk_widget_hide(widget); #else gtk_widget_hide_all (widget); #endif -- cgit v1.2.1 From 89973129ca9fae822573242a9815f1f65ac0ded9 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Thu, 29 Dec 2011 15:07:48 +0000 Subject: fix missing switch of GTK_COMBO_BOX to GTK_COMBO_BOX_TEXT --- src/gpm-prefs-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gpm-prefs-core.c') diff --git a/src/gpm-prefs-core.c b/src/gpm-prefs-core.c index b484083..7304d1a 100644 --- a/src/gpm-prefs-core.c +++ b/src/gpm-prefs-core.c @@ -473,14 +473,14 @@ gpm_prefs_setup_time_combo (GpmPrefs *prefs, const gchar *widget_name, if (values[i] != 0) { text = gpm_get_timestring (values[i]); #if GTK_CHECK_VERSION (2, 24, 0) - gtk_combo_box_text_append_text(GTK_COMBO_BOX (widget), text); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), text); #else gtk_combo_box_append_text (GTK_COMBO_BOX (widget), text); #endif g_free (text); } else { #if GTK_CHECK_VERSION (2, 24, 0) - gtk_combo_box_text_append_text(GTK_COMBO_BOX (widget), _("Never")); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT (widget), _("Never")); #else gtk_combo_box_append_text (GTK_COMBO_BOX (widget), _("Never")); #endif -- cgit v1.2.1