[gimp] app: gimp_session_info_set/get_geometry -> apply/read_geometry()
- From: Martin Nordholts <martinn src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] app: gimp_session_info_set/get_geometry -> apply/read_geometry()
- Date: Sun, 20 Sep 2009 11:14:11 +0000 (UTC)
commit 7cac9dff67d9ad3492e2b34734d79c6f28003fe4
Author: Martin Nordholts <martinn src gnome org>
Date: Sun Sep 20 13:13:50 2009 +0200
app: gimp_session_info_set/get_geometry -> apply/read_geometry()
Rename gimp_session_info_set_geometry() to
gimp_session_info_apply_geometry() and gimp_session_info_get_geometry
to gimp_session_info_read_geometry(). The old functions were not
getters and setters and thus the names were misleading.
app/widgets/gimpdialogfactory.c | 10 +++++-----
app/widgets/gimpsessioninfo.c | 19 ++++++++++++++++---
app/widgets/gimpsessioninfo.h | 4 ++--
3 files changed, 23 insertions(+), 10 deletions(-)
---
diff --git a/app/widgets/gimpdialogfactory.c b/app/widgets/gimpdialogfactory.c
index 3c0e72a..cff0ef2 100644
--- a/app/widgets/gimpdialogfactory.c
+++ b/app/widgets/gimpdialogfactory.c
@@ -852,7 +852,7 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
gimp_session_info_is_session_managed (current_info) &&
! GTK_WIDGET_VISIBLE (dialog))
{
- gimp_session_info_set_geometry (current_info);
+ gimp_session_info_apply_geometry (current_info);
}
info = current_info;
@@ -875,7 +875,7 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
info->factory_entry = entry;
/* if we create a new session info, we never call
- * gimp_session_info_set_geometry(), but still the
+ * gimp_session_info_apply_geometry(), but still the
* dialog needs GDK_HINT_USER_POS so it keeps its
* position when hidden/shown within this(!) session.
*/
@@ -905,7 +905,7 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
"updating session info %p (widget %p) for dock",
current_info, current_info->widget);
- gimp_session_info_set_geometry (current_info);
+ gimp_session_info_apply_geometry (current_info);
info = current_info;
@@ -927,7 +927,7 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
/* if we create a new session info, we never call
- * gimp_session_info_set_geometry(), but still the
+ * gimp_session_info_apply_geometry(), but still the
* dialog needs GDK_HINT_USER_POS so it keeps its
* position when hidden/shown within this(!) session.
*/
@@ -1377,7 +1377,7 @@ gimp_dialog_factory_dialog_configure (GtkWidget *dialog,
if (session_info->widget == dialog)
{
- gimp_session_info_get_geometry (session_info);
+ gimp_session_info_read_geometry (session_info);
GIMP_LOG (DIALOG_FACTORY,
"updated session info for \"%s\" from window geometry "
diff --git a/app/widgets/gimpsessioninfo.c b/app/widgets/gimpsessioninfo.c
index abf5e57..55bbd26 100644
--- a/app/widgets/gimpsessioninfo.c
+++ b/app/widgets/gimpsessioninfo.c
@@ -424,8 +424,15 @@ gimp_session_info_get_appropriate_monitor (GdkScreen *screen,
rect.y + rect.height / 2);
}
+/**
+ * gimp_session_info_apply_geometry:
+ * @info:
+ *
+ * Apply the geometry stored in the session info object to the
+ * associated widget.
+ **/
void
-gimp_session_info_set_geometry (GimpSessionInfo *info)
+gimp_session_info_apply_geometry (GimpSessionInfo *info)
{
GdkScreen *screen;
GdkRectangle rect;
@@ -490,8 +497,14 @@ gimp_session_info_set_geometry (GimpSessionInfo *info)
info->width, info->height);
}
+/**
+ * gimp_session_info_read_geometry:
+ * @info:
+ *
+ * Read geometry related information from the associated widget.
+ **/
void
-gimp_session_info_get_geometry (GimpSessionInfo *info)
+gimp_session_info_read_geometry (GimpSessionInfo *info)
{
GdkWindow *window;
@@ -569,7 +582,7 @@ gimp_session_info_get_info (GimpSessionInfo *info)
g_return_if_fail (GIMP_IS_SESSION_INFO (info));
g_return_if_fail (GTK_IS_WIDGET (info->widget));
- gimp_session_info_get_geometry (info);
+ gimp_session_info_read_geometry (info);
info->aux_info = gimp_session_info_aux_get_list (info->widget);
diff --git a/app/widgets/gimpsessioninfo.h b/app/widgets/gimpsessioninfo.h
index 5fb977c..124976b 100644
--- a/app/widgets/gimpsessioninfo.h
+++ b/app/widgets/gimpsessioninfo.h
@@ -78,8 +78,8 @@ GType gimp_session_info_get_type (void) G_GNUC_CONST;
GimpSessionInfo * gimp_session_info_new (void);
void gimp_session_info_restore (GimpSessionInfo *info,
GimpDialogFactory *factory);
-void gimp_session_info_set_geometry (GimpSessionInfo *info);
-void gimp_session_info_get_geometry (GimpSessionInfo *info);
+void gimp_session_info_apply_geometry (GimpSessionInfo *info);
+void gimp_session_info_read_geometry (GimpSessionInfo *info);
void gimp_session_info_get_info (GimpSessionInfo *info);
void gimp_session_info_clear_info (GimpSessionInfo *info);
gboolean gimp_session_info_is_singleton (GimpSessionInfo *info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]