summaryrefslogtreecommitdiff
path: root/src/capplet/mate-notification-properties.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-10-10 22:06:59 +0200
committerraveit65 <[email protected]>2019-10-20 23:42:09 +0200
commit9f5e0db85fe80f97c38576922c2748eb94b46a4b (patch)
treedcf40e987e0d5d34a7e8814b941ab1d01428919c /src/capplet/mate-notification-properties.c
parenta4054692c35b5e1ed584177de94baa1aca80886d (diff)
downloadmate-notification-daemon-9f5e0db85fe80f97c38576922c2748eb94b46a4b.tar.bz2
mate-notification-daemon-9f5e0db85fe80f97c38576922c2748eb94b46a4b.tar.xz
Use gresource for mate-notification-properties.ui
Diffstat (limited to 'src/capplet/mate-notification-properties.c')
-rw-r--r--src/capplet/mate-notification-properties.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/capplet/mate-notification-properties.c b/src/capplet/mate-notification-properties.c
index d0c3acf..6a496da 100644
--- a/src/capplet/mate-notification-properties.c
+++ b/src/capplet/mate-notification-properties.c
@@ -39,8 +39,6 @@
#define GSETTINGS_KEY_USE_ACTIVE_MONITOR "use-active-monitor"
#define GSETTINGS_KEY_DO_NOT_DISTURB "do-not-disturb"
-#define NOTIFICATION_UI_FILE "mate-notification-properties.ui"
-
typedef struct {
GSettings* gsettings;
@@ -539,25 +537,14 @@ static void notification_properties_dialog_destroyed(GtkWidget* widget, Notifica
static gboolean notification_properties_dialog_init(NotificationAppletDialog* dialog)
{
- const char* ui_file;
-
- if (g_file_test(NOTIFICATION_UI_FILE, G_FILE_TEST_EXISTS))
- {
- ui_file = NOTIFICATION_UI_FILE;
- }
- else
- {
- ui_file = NOTIFICATION_UIDIR "/" NOTIFICATION_UI_FILE;
- }
-
GtkBuilder* builder = gtk_builder_new();
GError* error = NULL;
- gtk_builder_add_from_file(builder, ui_file, &error);
+ gtk_builder_add_from_resource (builder, "/org/mate/notifications/properties/mate-notification-properties.ui", &error);
if (error != NULL)
{
- g_warning(_("Could not load user interface file: %s"), error->message);
+ g_warning(_("Could not load user interface: %s"), error->message);
g_error_free(error);
return FALSE;
}