[gnome-initial-setup] gis-assistant: Remove the page action widget area



commit c951fdbf50b23e98d3baf20b5c6304e7d5f90637
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Sep 25 19:59:37 2013 -0400

    gis-assistant: Remove the page action widget area
    
    We no longer use action widgets.

 gnome-initial-setup/Makefile.am            |    1 -
 gnome-initial-setup/gis-assistant.c        |   35 +------
 gnome-initial-setup/gis-center-container.c |  168 ----------------------------
 gnome-initial-setup/gis-center-container.h |   59 ----------
 gnome-initial-setup/gis-page.c             |    8 --
 gnome-initial-setup/gis-page.h             |    1 -
 6 files changed, 2 insertions(+), 270 deletions(-)
---
diff --git a/gnome-initial-setup/Makefile.am b/gnome-initial-setup/Makefile.am
index b727563..f9138c9 100644
--- a/gnome-initial-setup/Makefile.am
+++ b/gnome-initial-setup/Makefile.am
@@ -13,7 +13,6 @@ libexec_PROGRAMS = gnome-initial-setup gnome-initial-setup-copy-worker
 
 gnome_initial_setup_SOURCES =  \
        gnome-initial-setup.c gnome-initial-setup.h \
-       gis-center-container.c gis-center-container.h \
        gis-assistant.c gis-assistant.h \
        gis-page.c gis-page.h \
        gis-driver.c gis-driver.h
diff --git a/gnome-initial-setup/gis-assistant.c b/gnome-initial-setup/gis-assistant.c
index 851fe14..59477aa 100644
--- a/gnome-initial-setup/gis-assistant.c
+++ b/gnome-initial-setup/gis-assistant.c
@@ -29,7 +29,6 @@
 #include <gtk/gtk.h>
 
 #include "gis-assistant.h"
-#include "gis-center-container.h"
 
 enum {
   PROP_0,
@@ -53,8 +52,6 @@ struct _GisAssistantPrivate
   GtkWidget *cancel;
   GtkWidget *progress_indicator;
   GtkWidget *main_layout;
-  GtkWidget *action_area;
-  GtkWidget *page_action_widget_area;
   GtkWidget *spinner;
   GtkWidget *titlebar;
   GtkWidget *stack;
@@ -165,29 +162,6 @@ gis_assistant_previous_page (GisAssistant *assistant)
 }
 
 static void
-remove_from_page_action_area (GtkWidget *widget,
-                              gpointer   user_data)
-{
-  GisAssistantPrivate *priv = user_data;
-  gtk_container_remove (GTK_CONTAINER (priv->page_action_widget_area), widget);
-}
-
-static void
-update_action_widget (GisAssistant *assistant)
-{
-  GisAssistantPrivate *priv = gis_assistant_get_instance_private (assistant);
-  GtkWidget *action;
-
-  gtk_container_foreach (GTK_CONTAINER (priv->page_action_widget_area),
-                         remove_from_page_action_area, priv);
-
-  action = gis_page_get_action_widget (priv->current_page);
-  if (action)
-    gtk_container_add (GTK_CONTAINER (priv->page_action_widget_area),
-                       action);
-}
-
-static void
 remove_from_progress_indicator (GtkWidget *widget,
                                 gpointer   user_data)
 {
@@ -396,7 +370,6 @@ update_current_page (GisAssistant *assistant,
 
   update_titlebar (assistant);
   update_applying_state (assistant);
-  update_action_widget (assistant);
   update_navigation_buttons (assistant);
   update_progress_indicator (assistant);
   gis_page_shown (page);
@@ -458,8 +431,6 @@ gis_assistant_init (GisAssistant *assistant)
   g_signal_connect (priv->stack, "notify::visible-child",
                     G_CALLBACK (current_page_changed), assistant);
 
-  priv->page_action_widget_area = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
-
   priv->forward = gtk_button_new ();
   gtk_button_set_image (GTK_BUTTON (priv->forward),
                         gtk_image_new_from_stock (GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_BUTTON));
@@ -495,13 +466,11 @@ gis_assistant_init (GisAssistant *assistant)
   priv->progress_indicator = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
   gtk_widget_set_halign (priv->progress_indicator, GTK_ALIGN_CENTER);
 
-  priv->action_area = gis_center_container_new (priv->page_action_widget_area,
-                                                priv->progress_indicator);
+  gtk_box_pack_start (GTK_BOX (priv->main_layout), priv->progress_indicator, FALSE, TRUE, 0);
 
   gis_assistant_locale_changed (assistant);
-  gtk_box_pack_start (GTK_BOX (priv->main_layout), priv->action_area, FALSE, TRUE, 0);
-
   update_applying_state (assistant);
+
   gtk_widget_show_all (GTK_WIDGET (assistant));
 }
 
diff --git a/gnome-initial-setup/gis-page.c b/gnome-initial-setup/gis-page.c
index 7346412..997ebbb 100644
--- a/gnome-initial-setup/gis-page.c
+++ b/gnome-initial-setup/gis-page.c
@@ -259,14 +259,6 @@ gis_page_set_complete (GisPage *page, gboolean complete)
   g_object_notify_by_pspec (G_OBJECT (page), obj_props[PROP_COMPLETE]);
 }
 
-GtkWidget *
-gis_page_get_action_widget (GisPage *page)
-{
-  if (GIS_PAGE_GET_CLASS (page)->get_action_widget)
-    return GIS_PAGE_GET_CLASS (page)->get_action_widget (page);
-  return NULL;
-}
-
 void
 gis_page_locale_changed (GisPage *page)
 {
diff --git a/gnome-initial-setup/gis-page.h b/gnome-initial-setup/gis-page.h
index 17452ea..77e427c 100644
--- a/gnome-initial-setup/gis-page.h
+++ b/gnome-initial-setup/gis-page.h
@@ -59,7 +59,6 @@ struct _GisPageClass
   char *page_id;
 
   GtkBuilder * (*get_builder) (GisPage *page);
-  GtkWidget  * (*get_action_widget) (GisPage *page);
   void         (*locale_changed) (GisPage *page);
   gboolean     (*apply) (GisPage *page,
                          GCancellable *cancellable);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]