Commit 03d551e4 authored by Guido Gunther's avatar Guido Gunther
Browse files

system-prompt: Use PhoshSystemModal


Signed-off-by: Guido Gunther's avatarGuido Günther <guido.gunther@puri.sm>
parent fbf314ea
......@@ -98,12 +98,12 @@ typedef struct
struct _PhoshSystemPrompt
{
PhoshLayerSurface parent;
PhoshSystemModal parent;
};
static void phosh_system_prompt_iface_init (GcrPromptIface *iface);
G_DEFINE_TYPE_WITH_CODE(PhoshSystemPrompt, phosh_system_prompt, PHOSH_TYPE_LAYER_SURFACE,
G_DEFINE_TYPE_WITH_CODE(PhoshSystemPrompt, phosh_system_prompt, PHOSH_TYPE_SYSTEM_MODAL,
G_IMPLEMENT_INTERFACE (GCR_TYPE_PROMPT,
phosh_system_prompt_iface_init)
G_ADD_PRIVATE (PhoshSystemPrompt));
......@@ -738,18 +738,7 @@ phosh_system_prompt_init (PhoshSystemPrompt *self)
GtkWidget *
phosh_system_prompt_new (gpointer layer_shell,
gpointer wl_output)
phosh_system_prompt_new (void)
{
return g_object_new (PHOSH_TYPE_SYSTEM_PROMPT,
"wl-output", wl_output,
"anchor", ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP |
ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM |
ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT |
ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT,
"layer", ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY,
"kbd-interactivity", TRUE,
"exclusive-zone", -1,
"namespace", "phosh prompter",
NULL);
return g_object_new (PHOSH_TYPE_SYSTEM_PROMPT, NULL);
}
......@@ -7,11 +7,10 @@
#pragma once
#include <gtk/gtk.h>
#include "layersurface.h"
#include "system-modal.h"
#define PHOSH_TYPE_SYSTEM_PROMPT (phosh_system_prompt_get_type())
G_DECLARE_FINAL_TYPE (PhoshSystemPrompt, phosh_system_prompt, PHOSH, SYSTEM_PROMPT, PhoshLayerSurface)
G_DECLARE_FINAL_TYPE (PhoshSystemPrompt, phosh_system_prompt, PHOSH, SYSTEM_PROMPT, PhoshSystemModal)
GtkWidget *phosh_system_prompt_new (gpointer layer_shell,
gpointer wl_output);
GtkWidget *phosh_system_prompt_new (void);
......@@ -33,15 +33,12 @@ static GcrPrompt *
new_prompt_cb (GcrSystemPrompter *prompter,
gpointer user_data)
{
PhoshWayland *wl = phosh_wayland_get_default ();
PhoshShell *shell = phosh_shell_get_default ();
GtkWidget *prompt;
g_debug ("Building new system prompt");
g_return_val_if_fail (GCR_IS_SYSTEM_PROMPTER (prompter), NULL);
prompt = phosh_system_prompt_new (phosh_wayland_get_zwlr_layer_shell_v1 (wl),
phosh_shell_get_primary_monitor (shell)->wl_output);
prompt = phosh_system_prompt_new ();
/* Show widget when not locked and keep that in sync */
g_object_bind_property (phosh_shell_get_default (), "locked",
......
......@@ -2,7 +2,7 @@
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<template class="PhoshSystemPrompt" parent="PhoshLayerSurface">
<template class="PhoshSystemPrompt" parent="PhoshSystemModal">
<property name="can_focus">False</property>
<child>
<placeholder/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment