Commit 7cac9dff authored by Martin Nordholts's avatar Martin Nordholts

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.
parent 4ab58d2e
...@@ -852,7 +852,7 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory, ...@@ -852,7 +852,7 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
gimp_session_info_is_session_managed (current_info) && gimp_session_info_is_session_managed (current_info) &&
! GTK_WIDGET_VISIBLE (dialog)) ! GTK_WIDGET_VISIBLE (dialog))
{ {
gimp_session_info_set_geometry (current_info); gimp_session_info_apply_geometry (current_info);
} }
info = current_info; info = current_info;
...@@ -875,7 +875,7 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory, ...@@ -875,7 +875,7 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
info->factory_entry = entry; info->factory_entry = entry;
/* if we create a new session info, we never call /* 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 * dialog needs GDK_HINT_USER_POS so it keeps its
* position when hidden/shown within this(!) session. * position when hidden/shown within this(!) session.
*/ */
...@@ -905,7 +905,7 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory, ...@@ -905,7 +905,7 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
"updating session info %p (widget %p) for dock", "updating session info %p (widget %p) for dock",
current_info, current_info->widget); current_info, current_info->widget);
gimp_session_info_set_geometry (current_info); gimp_session_info_apply_geometry (current_info);
info = current_info; info = current_info;
...@@ -927,7 +927,7 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory, ...@@ -927,7 +927,7 @@ gimp_dialog_factory_add_dialog (GimpDialogFactory *factory,
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
/* if we create a new session info, we never call /* 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 * dialog needs GDK_HINT_USER_POS so it keeps its
* position when hidden/shown within this(!) session. * position when hidden/shown within this(!) session.
*/ */
...@@ -1377,7 +1377,7 @@ gimp_dialog_factory_dialog_configure (GtkWidget *dialog, ...@@ -1377,7 +1377,7 @@ gimp_dialog_factory_dialog_configure (GtkWidget *dialog,
if (session_info->widget == dialog) if (session_info->widget == dialog)
{ {
gimp_session_info_get_geometry (session_info); gimp_session_info_read_geometry (session_info);
GIMP_LOG (DIALOG_FACTORY, GIMP_LOG (DIALOG_FACTORY,
"updated session info for \"%s\" from window geometry " "updated session info for \"%s\" from window geometry "
......
...@@ -424,8 +424,15 @@ gimp_session_info_get_appropriate_monitor (GdkScreen *screen, ...@@ -424,8 +424,15 @@ gimp_session_info_get_appropriate_monitor (GdkScreen *screen,
rect.y + rect.height / 2); 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 void
gimp_session_info_set_geometry (GimpSessionInfo *info) gimp_session_info_apply_geometry (GimpSessionInfo *info)
{ {
GdkScreen *screen; GdkScreen *screen;
GdkRectangle rect; GdkRectangle rect;
...@@ -490,8 +497,14 @@ gimp_session_info_set_geometry (GimpSessionInfo *info) ...@@ -490,8 +497,14 @@ gimp_session_info_set_geometry (GimpSessionInfo *info)
info->width, info->height); info->width, info->height);
} }
/**
* gimp_session_info_read_geometry:
* @info:
*
* Read geometry related information from the associated widget.
**/
void void
gimp_session_info_get_geometry (GimpSessionInfo *info) gimp_session_info_read_geometry (GimpSessionInfo *info)
{ {
GdkWindow *window; GdkWindow *window;
...@@ -569,7 +582,7 @@ gimp_session_info_get_info (GimpSessionInfo *info) ...@@ -569,7 +582,7 @@ gimp_session_info_get_info (GimpSessionInfo *info)
g_return_if_fail (GIMP_IS_SESSION_INFO (info)); g_return_if_fail (GIMP_IS_SESSION_INFO (info));
g_return_if_fail (GTK_IS_WIDGET (info->widget)); 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); info->aux_info = gimp_session_info_aux_get_list (info->widget);
......
...@@ -78,8 +78,8 @@ GType gimp_session_info_get_type (void) G_GNUC_CONST; ...@@ -78,8 +78,8 @@ GType gimp_session_info_get_type (void) G_GNUC_CONST;
GimpSessionInfo * gimp_session_info_new (void); GimpSessionInfo * gimp_session_info_new (void);
void gimp_session_info_restore (GimpSessionInfo *info, void gimp_session_info_restore (GimpSessionInfo *info,
GimpDialogFactory *factory); GimpDialogFactory *factory);
void gimp_session_info_set_geometry (GimpSessionInfo *info); void gimp_session_info_apply_geometry (GimpSessionInfo *info);
void gimp_session_info_get_geometry (GimpSessionInfo *info); void gimp_session_info_read_geometry (GimpSessionInfo *info);
void gimp_session_info_get_info (GimpSessionInfo *info); void gimp_session_info_get_info (GimpSessionInfo *info);
void gimp_session_info_clear_info (GimpSessionInfo *info); void gimp_session_info_clear_info (GimpSessionInfo *info);
gboolean gimp_session_info_is_singleton (GimpSessionInfo *info); gboolean gimp_session_info_is_singleton (GimpSessionInfo *info);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment