From 257f2e7c664cb5ac03d600943408bbafc123ea20 Mon Sep 17 00:00:00 2001 From: Maximiliano Sandoval R Date: Mon, 11 Oct 2021 00:23:58 +0200 Subject: Use libadwaita and gtk4 in C files --- src/gl-application.c | 6 +++--- src/gl-eventtoolbar.c | 2 +- src/gl-eventtoolbar.h | 2 +- src/gl-eventviewlist.c | 9 +++++---- src/gl-window.c | 2 +- src/gl-window.h | 4 ++-- 6 files changed, 13 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/gl-application.c b/src/gl-application.c index 19d837f..dc9069c 100644 --- a/src/gl-application.c +++ b/src/gl-application.c @@ -20,7 +20,7 @@ #include "gl-application.h" #include -#include +#include #include "gl-categorylist.h" #include "gl-eventtoolbar.h" @@ -200,8 +200,8 @@ gl_application_startup (GApplication *application) /* Calls gtk_init() with no arguments. */ G_APPLICATION_CLASS (gl_application_parent_class)->startup (application); - /* Initialize libhandy widgets and styling */ - hdy_init (); + /* Initialize libadwaita widgets and styling */ + adw_init (); /* gtk_init() calls setlocale(), so gettext must be called after that. */ g_set_application_name (_(PACKAGE_NAME)); diff --git a/src/gl-eventtoolbar.c b/src/gl-eventtoolbar.c index cf8b5c8..0d40413 100644 --- a/src/gl-eventtoolbar.c +++ b/src/gl-eventtoolbar.c @@ -155,7 +155,7 @@ gl_event_toolbar_add_boots (GlEventToolbar *toolbar, gtk_grid_attach (GTK_GRID (grid), arrow, 1, 0, 1, 2); gtk_widget_show_all (grid); - hdy_header_bar_set_custom_title (HDY_HEADER_BAR (toolbar), + adw_header_bar_set_title_widget (ADW_HEADER_BAR (priv->headerbar), priv->menu_button); g_free (current_boot); diff --git a/src/gl-eventtoolbar.h b/src/gl-eventtoolbar.h index c397825..cd45f51 100644 --- a/src/gl-eventtoolbar.h +++ b/src/gl-eventtoolbar.h @@ -20,7 +20,7 @@ #define GL_EVENT_TOOLBAR_H_ #include -#include +#include G_BEGIN_DECLS diff --git a/src/gl-eventviewlist.c b/src/gl-eventviewlist.c index 8792585..0369756 100644 --- a/src/gl-eventviewlist.c +++ b/src/gl-eventviewlist.c @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include "gl-categorylist.h" @@ -465,12 +465,13 @@ gl_event_view_create_empty (G_GNUC_UNUSED GlEventViewList *view) { GtkWidget *status_page; - status_page = hdy_status_page_new (); - hdy_status_page_set_icon_name (HDY_STATUS_PAGE (status_page), + status_page = adw_status_page_new (); + gtk_widget_set_hexpand (status_page, TRUE); + adw_status_page_set_icon_name (ADW_STATUS_PAGE (status_page), "action-unavailable-symbolic"); /* Translators: Shown when there are no (zero) results in the current * view. */ - hdy_status_page_set_title (HDY_STATUS_PAGE (status_page), _("No Results")); + adw_status_page_set_title (ADW_STATUS_PAGE (status_page), _("No Results")); gtk_widget_show (status_page); diff --git a/src/gl-window.c b/src/gl-window.c index ca8b3ce..c5f5e75 100644 --- a/src/gl-window.c +++ b/src/gl-window.c @@ -39,7 +39,7 @@ typedef struct GtkWidget *info_bar; } GlWindowPrivate; -G_DEFINE_TYPE_WITH_PRIVATE (GlWindow, gl_window, HDY_TYPE_APPLICATION_WINDOW) +G_DEFINE_TYPE_WITH_PRIVATE (GlWindow, gl_window, ADW_TYPE_APPLICATION_WINDOW) static const gchar SETTINGS_SCHEMA[] = "org.gnome.Logs"; static const gchar IGNORE_WARNING[] = "ignore-warning"; diff --git a/src/gl-window.h b/src/gl-window.h index b088a68..5f2a08b 100644 --- a/src/gl-window.h +++ b/src/gl-window.h @@ -20,7 +20,7 @@ #define GL_WINDOW_H_ #include -#include +#include #include "gl-application.h" #include "gl-journal-model.h" @@ -28,7 +28,7 @@ G_BEGIN_DECLS #define GL_TYPE_WINDOW (gl_window_get_type ()) -G_DECLARE_FINAL_TYPE (GlWindow, gl_window, GL, WINDOW, HdyApplicationWindow) +G_DECLARE_FINAL_TYPE (GlWindow, gl_window, GL, WINDOW, AdwApplicationWindow) void gl_window_load_journal (GlWindow *window, GlJournal *journal); GtkWidget * gl_window_new (GtkApplication *application); -- cgit v1.2.1