summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorP. F. Chimento <philip.chimento@gmail.com>2013-05-17 14:28:18 +0200
committerP. F. Chimento <philip.chimento@gmail.com>2013-05-17 15:28:59 +0200
commit3d82f2675aaa4d3ad959441d29bff04e1fb0f6e2 (patch)
tree39b20c1692e90dc9c568d8e477bd261b15465169
parent3990045a46a961cfa0bf29399137c202b60fae5b (diff)
Various fixes from code review
- Style fixes - Add API to documentation - Add header to private headers [endlessm/eos-sdk#60]
-rw-r--r--docs/reference/endless/endless-sections.txt6
-rw-r--r--endless/Makefile.am2
-rw-r--r--endless/eosmainarea-private.h4
-rw-r--r--endless/eosmainarea.c38
4 files changed, 22 insertions, 28 deletions
diff --git a/docs/reference/endless/endless-sections.txt b/docs/reference/endless/endless-sections.txt
index 3bdd962..329eaf9 100644
--- a/docs/reference/endless/endless-sections.txt
+++ b/docs/reference/endless/endless-sections.txt
@@ -26,6 +26,8 @@ EosApplicationPrivate
<FILE>window</FILE>
EosWindow
eos_window_new
+eos_window_get_page_manager
+eos_window_set_page_manager
<SUBSECTION Standard>
EosWindowClass
EOS_IS_WINDOW
@@ -49,6 +51,10 @@ eos_page_manager_get_visible_page_name
eos_page_manager_set_visible_page_name
eos_page_manager_get_page_name
eos_page_manager_set_page_name
+eos_page_manager_get_page_actions
+eos_page_manager_set_page_actions
+eos_page_manager_get_page_custom_toolbox_widget
+eos_page_manager_set_page_custom_toolbox_widget
eos_page_manager_remove_page_by_name
<SUBSECTION Standard>
EOS_IS_PAGE_MANAGER
diff --git a/endless/Makefile.am b/endless/Makefile.am
index fa86fc5..5333206 100644
--- a/endless/Makefile.am
+++ b/endless/Makefile.am
@@ -16,7 +16,7 @@ endless_library_sources = \
endless/eoshello.c \
endless/eosinit.c endless/eosinit-private.h \
endless/eospagemanager.c \
- endless/eosmainarea.c \
+ endless/eosmainarea.c endless/eosmainarea-private.h \
endless/eostopbar.c endless/eostopbar-private.h \
endless/eoswindow.c
diff --git a/endless/eosmainarea-private.h b/endless/eosmainarea-private.h
index d2459ab..c0c6582 100644
--- a/endless/eosmainarea-private.h
+++ b/endless/eosmainarea-private.h
@@ -3,10 +3,6 @@
#ifndef EOS_MAIN_AREA_H
#define EOS_MAIN_AREA_H
-#if !(defined(_EOS_SDK_INSIDE_ENDLESS_H) || defined(COMPILING_EOS_SDK))
-#error "Please do not include this header file directly."
-#endif
-
#include "eostypes.h"
#include <gtk/gtk.h>
diff --git a/endless/eosmainarea.c b/endless/eosmainarea.c
index 3ef4761..cf6911d 100644
--- a/endless/eosmainarea.c
+++ b/endless/eosmainarea.c
@@ -30,8 +30,6 @@ struct _EosMainAreaPrivate
guint actions_visible : 1;
};
-static GtkContainerClass *parent_klass = NULL;
-
static void
eos_main_area_get_preferred_width (GtkWidget *widget,
gint *minimal,
@@ -95,10 +93,10 @@ eos_main_area_get_preferred_height (GtkWidget *widget,
}
}
-// Don't size width for height or height for width, at least for now...
+/* Don't size width for height or height for width, at least for now... */
static void
-eos_main_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation)
+eos_main_area_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation)
{
EosMainArea *self = EOS_MAIN_AREA (widget);
GtkWidget *toolbox = self->priv->toolbox;
@@ -156,7 +154,7 @@ eos_main_size_allocate (GtkWidget *widget,
}
}
- // Allocate size
+ /* Allocate size */
gint x = allocation->x;
gint y = allocation->y;
if (toolbox_visible)
@@ -188,7 +186,6 @@ eos_main_size_allocate (GtkWidget *widget,
allocation->width - num_sidebars * sidebar_width);
content_allocation.height = allocation->height;
gtk_widget_size_allocate (content, &content_allocation);
- x += content_allocation.width;
}
}
@@ -235,13 +232,14 @@ eos_main_area_forall(GtkContainer *container,
(*callback) (priv->actions_standin, callback_data);
}
-void
-eos_main_destroy (GtkWidget *widget)
+static void
+eos_main_area_destroy (GtkWidget *widget)
{
EosMainArea *self = EOS_MAIN_AREA (widget);
- GTK_WIDGET_CLASS (parent_klass)->destroy (widget);
gtk_widget_destroy (self->priv->actions_standin);
+
+ GTK_WIDGET_CLASS (eos_main_area_parent_class)->destroy (widget);
}
static void
@@ -250,14 +248,12 @@ eos_main_area_class_init (EosMainAreaClass *klass)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
- parent_klass = g_type_class_peek_parent (klass);
-
g_type_class_add_private (klass, sizeof (EosMainAreaPrivate));
widget_class->get_preferred_width = eos_main_area_get_preferred_width;
widget_class->get_preferred_height = eos_main_area_get_preferred_height;
- widget_class->size_allocate = eos_main_size_allocate;
- widget_class->destroy = eos_main_destroy;
+ widget_class->size_allocate = eos_main_area_size_allocate;
+ widget_class->destroy = eos_main_area_destroy;
container_class->forall = eos_main_area_forall;
container_class->add = eos_main_area_add;
@@ -325,9 +321,6 @@ eos_main_area_set_toolbox (EosMainArea *self,
gtk_widget_set_parent (toolbox, self_widget);
gtk_widget_show (toolbox);
}
-
- if (gtk_widget_get_visible (self_widget))
- gtk_widget_queue_resize (self_widget);
}
/*
@@ -354,7 +347,8 @@ eos_main_area_get_toolbox (EosMainArea *self)
* Adds the content widget to the main area.
*/
void
-eos_main_area_set_content (EosMainArea *self, GtkWidget *content)
+eos_main_area_set_content (EosMainArea *self,
+ GtkWidget *content)
{
g_return_if_fail (EOS_IS_MAIN_AREA (self));
g_return_if_fail (content == NULL || GTK_IS_WIDGET (content));
@@ -372,9 +366,6 @@ eos_main_area_set_content (EosMainArea *self, GtkWidget *content)
priv->content = content;
if (content)
gtk_widget_set_parent (content, self_widget);
-
- if (gtk_widget_get_visible (self_widget))
- gtk_widget_queue_resize (self_widget);
}
/*
@@ -403,7 +394,8 @@ eos_main_area_get_content (EosMainArea *self)
* something.
*/
void
-eos_main_area_set_actions (EosMainArea *self, gboolean actions_visible)
+eos_main_area_set_actions (EosMainArea *self,
+ gboolean actions_visible)
{
g_return_if_fail (EOS_IS_MAIN_AREA (self));
@@ -423,7 +415,7 @@ eos_main_area_set_actions (EosMainArea *self, gboolean actions_visible)
gtk_widget_unparent (priv->actions_standin);
}
-/**
+/*
* eos_main_area_get_actions:
* @self: a #EosMainArea
*