[console/wip/msandova/remember-window-size: 16/19] window: Remove kgx_window_get_size
- From: Maximiliano <msandova src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [console/wip/msandova/remember-window-size: 16/19] window: Remove kgx_window_get_size
- Date: Thu, 11 Aug 2022 10:27:44 +0000 (UTC)
commit 3007b152baf63a9d0e35463648ee07f8b7ecb5a3
Author: Maximiliano Sandoval R <msandova gnome org>
Date: Fri Jul 29 22:48:27 2022 +0200
window: Remove kgx_window_get_size
This is a gtk 3 leftover, gtk_window_get_default_size does the same.
src/kgx-pages.c | 2 +-
src/kgx-window.c | 24 ------------------------
src/kgx-window.h | 7 -------
3 files changed, 1 insertion(+), 32 deletions(-)
---
diff --git a/src/kgx-pages.c b/src/kgx-pages.c
index 4f94aee..5dc2df1 100644
--- a/src/kgx-pages.c
+++ b/src/kgx-pages.c
@@ -433,7 +433,7 @@ create_window (AdwTabView *view,
window = GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (self)));
app = gtk_window_get_application (window);
- kgx_window_get_size (KGX_WINDOW (window), &width, &height);
+ gtk_window_get_default_size (GTK_WINDOW (window), &width, &height);
new_window = g_object_new (KGX_TYPE_WINDOW,
"application", app,
diff --git a/src/kgx-window.c b/src/kgx-window.c
index 9c63bb2..c8b948a 100644
--- a/src/kgx-window.c
+++ b/src/kgx-window.c
@@ -220,15 +220,6 @@ active_changed (GObject *object, GParamSpec *pspec, gpointer data)
}
-static void
-size_changed (KgxWindow *self)
-{
- gtk_window_get_default_size (GTK_WINDOW (self),
- &self->current_width,
- &self->current_height);
-}
-
-
static void
zoom (KgxPages *pages,
KgxZoom dir,
@@ -341,7 +332,6 @@ kgx_window_class_init (KgxWindowClass *klass)
gtk_widget_class_bind_template_child (widget_class, KgxWindow, primary_menu);
gtk_widget_class_bind_template_callback (widget_class, active_changed);
- gtk_widget_class_bind_template_callback (widget_class, size_changed);
gtk_widget_class_bind_template_callback (widget_class, zoom);
gtk_widget_class_bind_template_callback (widget_class, status_changed);
@@ -630,17 +620,3 @@ kgx_window_get_pages (KgxWindow *self)
return KGX_PAGES (self->pages);
}
-
-
-void
-kgx_window_get_size (KgxWindow *self,
- int *width,
- int *height)
-{
- g_return_if_fail (KGX_IS_WINDOW (self));
-
- if (width)
- *width = self->current_width;
- if (height)
- *height = self->current_height;
-}
diff --git a/src/kgx-window.h b/src/kgx-window.h
index 2b364d2..f39df57 100644
--- a/src/kgx-window.h
+++ b/src/kgx-window.h
@@ -97,9 +97,6 @@ struct _KgxWindow
GtkWidget *pages;
GMenu *primary_menu;
- int current_width;
- int current_height;
-
GActionMap *tab_actions;
};
@@ -110,8 +107,4 @@ void kgx_window_show_status (KgxWindow *self,
const char *status);
KgxPages *kgx_window_get_pages (KgxWindow *self);
-void kgx_window_get_size (KgxWindow *self,
- int *width,
- int *height);
-
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]