[PATCH] Remove the button-label property on SpokeWindow.

Chris Lumens clumens at redhat.com
Wed Oct 16 19:54:25 UTC 2013


We're not using this for anything - all the buttons say "Done".
---
 widgets/glade/AnacondaWidgets.xml |  4 ----
 widgets/src/SpokeWindow.c         | 50 ---------------------------------------
 2 files changed, 54 deletions(-)

diff --git a/widgets/glade/AnacondaWidgets.xml b/widgets/glade/AnacondaWidgets.xml
index 56da94c..9d84f8d 100644
--- a/widgets/glade/AnacondaWidgets.xml
+++ b/widgets/glade/AnacondaWidgets.xml
@@ -92,10 +92,6 @@
                     </object>
                 </object>
             </internal-children>
-
-            <properties>
-                <property id="button-label" translatable="True" />
-            </properties>
         </glade-widget-class>
 
         <glade-widget-class title="Spoke Selector"
diff --git a/widgets/src/SpokeWindow.c b/widgets/src/SpokeWindow.c
index 1bba1e6..02779ba 100644
--- a/widgets/src/SpokeWindow.c
+++ b/widgets/src/SpokeWindow.c
@@ -41,10 +41,6 @@
  *   space.  This is where widgets will be added and the user will do things.
  */
 
-enum {
-    PROP_BUTTON_LABEL = 1
-};
-
 #define DEFAULT_BUTTON_LABEL _("_Done")
 
 enum {
@@ -60,9 +56,6 @@ struct _AnacondaSpokeWindowPrivate {
 
 G_DEFINE_TYPE(AnacondaSpokeWindow, anaconda_spoke_window, ANACONDA_TYPE_BASE_WINDOW)
 
-static void anaconda_spoke_window_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-static void anaconda_spoke_window_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-
 static void anaconda_spoke_window_realize(GtkWidget *widget, gpointer user_data);
 static void anaconda_spoke_window_button_clicked(GtkButton *button,
                                                  AnacondaSpokeWindow *win);
@@ -70,29 +63,9 @@ static void anaconda_spoke_window_button_clicked(GtkButton *button,
 static void anaconda_spoke_window_class_init(AnacondaSpokeWindowClass *klass) {
     GObjectClass *object_class = G_OBJECT_CLASS(klass);
 
-    object_class->set_property = anaconda_spoke_window_set_property;
-    object_class->get_property = anaconda_spoke_window_get_property;
-
     klass->button_clicked = NULL;
 
     /**
-     * AnacondaSpokeWindow:button-label:
-     *
-     * The :button-label string is the text used to label the button displayed
-     * in the upper lefthand of the window.  By default, this button says Done,
-     * but it could be changed to anything appropriate.
-     *
-     * Since: 1.0
-     */
-    g_object_class_install_property(object_class,
-                                    PROP_BUTTON_LABEL,
-                                    g_param_spec_string("button-label",
-                                                        P_("Button Label"),
-                                                        P_("Label to appear on the upper left button"),
-                                                        DEFAULT_BUTTON_LABEL,
-                                                        G_PARAM_READWRITE));
-
-    /**
      * AnacondaSpokeWindow::button-clicked:
      * @window: the window that received the signal
      *
@@ -211,26 +184,3 @@ static void anaconda_spoke_window_button_clicked(GtkButton *button,
                                                  AnacondaSpokeWindow *win) {
     g_signal_emit(win, window_signals[SIGNAL_BUTTON_CLICKED], 0);
 }
-
-static void anaconda_spoke_window_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) {
-    AnacondaSpokeWindow *widget = ANACONDA_SPOKE_WINDOW(object);
-    AnacondaSpokeWindowPrivate *priv = widget->priv;
-
-    switch(prop_id) {
-        case PROP_BUTTON_LABEL:
-            g_value_set_string (value, gtk_button_get_label(GTK_BUTTON(priv->button)));
-            break;
-    }
-}
-
-static void anaconda_spoke_window_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) {
-    AnacondaSpokeWindow *widget = ANACONDA_SPOKE_WINDOW(object);
-    AnacondaSpokeWindowPrivate *priv = widget->priv;
-
-    switch(prop_id) {
-        case PROP_BUTTON_LABEL:
-            gtk_button_set_label(GTK_BUTTON(priv->button), g_value_get_string(value));
-            gtk_button_set_use_underline(GTK_BUTTON(priv->button), TRUE);
-            break;
-    }
-}
-- 
1.8.3.1



More information about the anaconda-patches mailing list