diff options
author | Maximiliano Sandoval R <msandova@gnome.org> | 2021-10-11 00:23:58 +0200 |
---|---|---|
committer | David King <amigadave@amigadave.com> | 2022-03-28 17:11:49 +0100 |
commit | 257f2e7c664cb5ac03d600943408bbafc123ea20 (patch) | |
tree | b1536334d37308be4cc83d448990da3941ebf044 | |
parent | 4f85beec38c4fc3b2f49da162b6157be2b11b6d2 (diff) | |
download | gnome-logs-257f2e7c664cb5ac03d600943408bbafc123ea20.tar.gz |
Use libadwaita and gtk4 in C files
-rw-r--r-- | data/gl-eventtoolbar.ui | 2 | ||||
-rw-r--r-- | meson.build | 4 | ||||
-rw-r--r-- | src/gl-application.c | 6 | ||||
-rw-r--r-- | src/gl-eventtoolbar.c | 2 | ||||
-rw-r--r-- | src/gl-eventtoolbar.h | 2 | ||||
-rw-r--r-- | src/gl-eventviewlist.c | 9 | ||||
-rw-r--r-- | src/gl-window.c | 2 | ||||
-rw-r--r-- | src/gl-window.h | 4 |
8 files changed, 16 insertions, 15 deletions
diff --git a/data/gl-eventtoolbar.ui b/data/gl-eventtoolbar.ui index f4ec873..734ee29 100644 --- a/data/gl-eventtoolbar.ui +++ b/data/gl-eventtoolbar.ui @@ -26,7 +26,7 @@ </menu> <template class="GlEventToolbar"> <child> - <object class="AdwHeaderBar"> + <object class="AdwHeaderBar" id="headerbar"> <property name="hexpand">True</property> <property name="visible">True</property> <child type="end"> diff --git a/meson.build b/meson.build index d218bcc..015e1c2 100644 --- a/meson.build +++ b/meson.build @@ -70,8 +70,8 @@ endif gl_deps = [ dependency('gio-unix-2.0', version : '>=2.43.90'), - dependency('gtk+-3.0', version : '>=3.22.0'), - dependency('libhandy-1', version : '>=1.5.0'), + dependency('gtk4', version : '>=4.6.0'), + dependency('libadwaita-1', version : '>=1.0.0'), dependency('libsystemd') ] 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 <glib/gi18n.h> -#include <libhandy-1/handy.h> +#include <libadwaita-1/adwaita.h> #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 <gtk/gtk.h> -#include <libhandy-1/handy.h> +#include <libadwaita-1/adwaita.h> 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 <glib/gi18n.h> #include <glib-unix.h> -#include <libhandy-1/handy.h> +#include <libadwaita-1/adwaita.h> #include <stdlib.h> #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 <gtk/gtk.h> -#include <libhandy-1/handy.h> +#include <libadwaita-1/adwaita.h> #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); |