summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKrifa75 <yahiaoui.fakhri@gmail.com>2022-10-31 20:00:04 +0100
committerBastien Nocera <hadess@hadess.net>2022-11-16 10:20:52 +0100
commit09d7e8ca6ef4eb59ba086707cf63e80cfb098b80 (patch)
treec6c77a8c25c96789627554667047029aa7a98962 /src
parent7e62ad9d62ae36f6a1f8e616707cf827c0e83fd7 (diff)
downloadtotem-09d7e8ca6ef4eb59ba086707cf63e80cfb098b80.tar.gz
preferences: Modernise preferences UI
Use HdyPreferencesWindow and other libhandy helpers to modernise and simplify the preferences UI. This will eventually make it easier to port to GTK 4. Closes: #543
Diffstat (limited to 'src')
-rw-r--r--src/totem-preferences-dialog.c9
-rw-r--r--src/totem-preferences-dialog.h4
2 files changed, 6 insertions, 7 deletions
diff --git a/src/totem-preferences-dialog.c b/src/totem-preferences-dialog.c
index 3f5ced837..08d43bcfb 100644
--- a/src/totem-preferences-dialog.c
+++ b/src/totem-preferences-dialog.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* Copyright (C) 2001,2002,2003 Bastien Nocera <hadess@hadess.net>
*
* This program is free software; you can redistribute it and/or modify
@@ -45,7 +45,7 @@
#include "totem-plugins-engine.h"
struct _TotemPreferencesDialog {
- GtkDialog parent_instance;
+ HdyPreferencesWindow parent_instance;
Totem *totem;
@@ -67,7 +67,7 @@ struct _TotemPreferencesDialog {
GtkComboBox *subtitle_encoding_combo;
};
-G_DEFINE_TYPE (TotemPreferencesDialog, totem_preferences_dialog, GTK_TYPE_DIALOG)
+G_DEFINE_TYPE (TotemPreferencesDialog, totem_preferences_dialog, HDY_TYPE_PREFERENCES_WINDOW)
static void
disable_kbd_shortcuts_changed_cb (GSettings *settings, const gchar *key, TotemObject *totem)
@@ -292,7 +292,7 @@ totem_preferences_dialog_constructed (GObject *object)
prefs->tpw_auto_subtitles_checkbutton, "active", G_SETTINGS_BIND_DEFAULT);
/* Plugins button */
- g_signal_connect (prefs->tpw_plugins_button, "clicked",
+ g_signal_connect (prefs->tpw_plugins_button, "activated",
G_CALLBACK (plugin_button_clicked_cb), totem);
/* Brightness and all */
@@ -418,6 +418,5 @@ totem_preferences_dialog_new (Totem *totem)
{
return g_object_new (TOTEM_TYPE_PREFERENCES_DIALOG,
"totem", totem,
- "use-header-bar", 1,
NULL);
}
diff --git a/src/totem-preferences-dialog.h b/src/totem-preferences-dialog.h
index 19ceb9ec3..8553c1b22 100644
--- a/src/totem-preferences-dialog.h
+++ b/src/totem-preferences-dialog.h
@@ -28,9 +28,9 @@
#pragma once
-#include <gtk/gtk.h>
+#include <handy.h>
#define TOTEM_TYPE_PREFERENCES_DIALOG (totem_preferences_dialog_get_type())
-G_DECLARE_FINAL_TYPE (TotemPreferencesDialog, totem_preferences_dialog, TOTEM, PREFERENCES_DIALOG, GtkDialog)
+G_DECLARE_FINAL_TYPE (TotemPreferencesDialog, totem_preferences_dialog, TOTEM, PREFERENCES_DIALOG, HdyPreferencesWindow)
GtkWidget *totem_preferences_dialog_new (Totem *totem);