fixes about lxde and xfce
This commit is contained in:
1 parent
96beefda3b
commit
06bdecee4f
10 files changed
+287
-11
No files matched your search
@@ -0,0 +1,89 @@
|
||||
From 0eb1a31843691b4e5f3354c153315dcb7ebeda3d Mon Sep 17 00:00:00 2001
|
||||
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
|
||||
Date: Sun, 25 Feb 2024 16:58:43 +0900
|
||||
Subject: [PATCH] Fix: support gcc14 -Werror=incompatible-pointer-types
|
||||
|
||||
gcc14 now defaults to -Werror=incompatible-pointer-types.
|
||||
To support compilation with gcc14, cast GTK related objects
|
||||
properly.
|
||||
---
|
||||
lxpolkit/lxpolkit-listener.c | 22 +++++++++++-----------
|
||||
1 file changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/lxpolkit/lxpolkit-listener.c b/lxpolkit/lxpolkit-listener.c
|
||||
index 00bda424..819d2c58 100644
|
||||
--- a/lxpolkit/lxpolkit-listener.c
|
||||
+++ b/lxpolkit/lxpolkit-listener.c
|
||||
@@ -85,13 +85,13 @@ static void on_completed(PolkitAgentSession* session, gboolean authorized, DlgDa
|
||||
|
||||
if(!authorized && !g_cancellable_is_cancelled(data->cancellable))
|
||||
{
|
||||
- show_msg(data->dlg, GTK_MESSAGE_ERROR, _("Authentication failed!\nWrong password?"));
|
||||
+ show_msg(GTK_WINDOW(data->dlg), GTK_MESSAGE_ERROR, _("Authentication failed!\nWrong password?"));
|
||||
/* initiate a new session */
|
||||
g_object_unref(data->session);
|
||||
data->session = NULL;
|
||||
- gtk_entry_set_text(data->request, "");
|
||||
+ gtk_entry_set_text(GTK_ENTRY(data->request), "");
|
||||
gtk_widget_grab_focus(data->request);
|
||||
- on_user_changed(data->id, data);
|
||||
+ on_user_changed(GTK_COMBO_BOX(data->id), data);
|
||||
return;
|
||||
}
|
||||
g_simple_async_result_complete(data->result);
|
||||
@@ -106,20 +106,20 @@ static void on_request(PolkitAgentSession* session, gchar* request, gboolean ech
|
||||
msg = _("Password: ");
|
||||
else
|
||||
msg = request;
|
||||
- gtk_label_set_text(data->request_label, msg);
|
||||
- gtk_entry_set_visibility(data->request, echo_on);
|
||||
+ gtk_label_set_text(GTK_LABEL(data->request_label), msg);
|
||||
+ gtk_entry_set_visibility(GTK_ENTRY(data->request), echo_on);
|
||||
}
|
||||
|
||||
static void on_show_error(PolkitAgentSession* session, gchar* text, DlgData* data)
|
||||
{
|
||||
DEBUG("on error: %s", text);
|
||||
- show_msg(data->dlg, GTK_MESSAGE_ERROR, text);
|
||||
+ show_msg(GTK_WINDOW(data->dlg), GTK_MESSAGE_ERROR, text);
|
||||
}
|
||||
|
||||
static void on_show_info(PolkitAgentSession* session, gchar* text, DlgData* data)
|
||||
{
|
||||
DEBUG("on info: %s", text);
|
||||
- show_msg(data->dlg, GTK_MESSAGE_INFO, text);
|
||||
+ show_msg(GTK_WINDOW(data->dlg), GTK_MESSAGE_INFO, text);
|
||||
}
|
||||
|
||||
void on_dlg_response(GtkDialog* dlg, int response, DlgData* data)
|
||||
@@ -127,7 +127,7 @@ void on_dlg_response(GtkDialog* dlg, int response, DlgData* data)
|
||||
DEBUG("on_response: %d", response);
|
||||
if(response == GTK_RESPONSE_OK)
|
||||
{
|
||||
- const char* request = gtk_entry_get_text(data->request);
|
||||
+ const char* request = gtk_entry_get_text(GTK_ENTRY(data->request));
|
||||
polkit_agent_session_response(data->session, request);
|
||||
gtk_widget_set_sensitive(data->dlg, FALSE);
|
||||
}
|
||||
@@ -195,7 +195,7 @@ static void initiate_authentication(PolkitAgentListener *listener,
|
||||
DEBUG("%s: %s", *p, polkit_details_lookup(details, *p));
|
||||
#endif
|
||||
data->listener = (LXPolkitListener*)listener;
|
||||
- data->result = g_simple_async_result_new(listener, callback, user_data, initiate_authentication);
|
||||
+ data->result = g_simple_async_result_new(G_OBJECT(listener), callback, user_data, initiate_authentication);
|
||||
|
||||
data->action_id = g_strdup(action_id);
|
||||
data->cancellable = (GCancellable*)g_object_ref(cancellable);
|
||||
@@ -260,10 +260,10 @@ static void initiate_authentication(PolkitAgentListener *listener,
|
||||
g_free(str);
|
||||
}
|
||||
}
|
||||
- gtk_combo_box_set_model(data->id, GTK_TREE_MODEL(store));
|
||||
+ gtk_combo_box_set_model(GTK_COMBO_BOX(data->id), GTK_TREE_MODEL(store));
|
||||
g_object_unref(store);
|
||||
/* select the fist user in the list */
|
||||
- gtk_combo_box_set_active(data->id, 0);
|
||||
+ gtk_combo_box_set_active(GTK_COMBO_BOX(data->id), 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -0,0 +1,86 @@
|
||||
https://github.com/lxde/lxsession/pull/34
|
||||
|
||||
From a0d8f8b865ce25867983cd45720adfff33b3fdfb Mon Sep 17 00:00:00 2001
|
||||
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
|
||||
Date: Sun, 25 Feb 2024 16:58:43 +0900
|
||||
Subject: [PATCH] Fix: support gcc14 -Werror=incompatible-pointer-types
|
||||
|
||||
gcc14 now defaults to -Werror=incompatible-pointer-types.
|
||||
To support compilation with gcc14, cast GTK related objects
|
||||
properly.
|
||||
--- a/lxpolkit/lxpolkit-listener.c
|
||||
+++ b/lxpolkit/lxpolkit-listener.c
|
||||
@@ -85,13 +85,13 @@ static void on_completed(PolkitAgentSession* session, gboolean authorized, DlgDa
|
||||
|
||||
if(!authorized && !g_cancellable_is_cancelled(data->cancellable))
|
||||
{
|
||||
- show_msg(data->dlg, GTK_MESSAGE_ERROR, _("Authentication failed!\nWrong password?"));
|
||||
+ show_msg(GTK_WINDOW(data->dlg), GTK_MESSAGE_ERROR, _("Authentication failed!\nWrong password?"));
|
||||
/* initiate a new session */
|
||||
g_object_unref(data->session);
|
||||
data->session = NULL;
|
||||
- gtk_entry_set_text(data->request, "");
|
||||
+ gtk_entry_set_text(GTK_ENTRY(data->request), "");
|
||||
gtk_widget_grab_focus(data->request);
|
||||
- on_user_changed(data->id, data);
|
||||
+ on_user_changed(GTK_COMBO_BOX(data->id), data);
|
||||
return;
|
||||
}
|
||||
g_simple_async_result_complete(data->result);
|
||||
@@ -106,20 +106,20 @@ static void on_request(PolkitAgentSession* session, gchar* request, gboolean ech
|
||||
msg = _("Password: ");
|
||||
else
|
||||
msg = request;
|
||||
- gtk_label_set_text(data->request_label, msg);
|
||||
- gtk_entry_set_visibility(data->request, echo_on);
|
||||
+ gtk_label_set_text(GTK_LABEL(data->request_label), msg);
|
||||
+ gtk_entry_set_visibility(GTK_ENTRY(data->request), echo_on);
|
||||
}
|
||||
|
||||
static void on_show_error(PolkitAgentSession* session, gchar* text, DlgData* data)
|
||||
{
|
||||
DEBUG("on error: %s", text);
|
||||
- show_msg(data->dlg, GTK_MESSAGE_ERROR, text);
|
||||
+ show_msg(GTK_WINDOW(data->dlg), GTK_MESSAGE_ERROR, text);
|
||||
}
|
||||
|
||||
static void on_show_info(PolkitAgentSession* session, gchar* text, DlgData* data)
|
||||
{
|
||||
DEBUG("on info: %s", text);
|
||||
- show_msg(data->dlg, GTK_MESSAGE_INFO, text);
|
||||
+ show_msg(GTK_WINDOW(data->dlg), GTK_MESSAGE_INFO, text);
|
||||
}
|
||||
|
||||
void on_dlg_response(GtkDialog* dlg, int response, DlgData* data)
|
||||
@@ -127,7 +127,7 @@ void on_dlg_response(GtkDialog* dlg, int response, DlgData* data)
|
||||
DEBUG("on_response: %d", response);
|
||||
if(response == GTK_RESPONSE_OK)
|
||||
{
|
||||
- const char* request = gtk_entry_get_text(data->request);
|
||||
+ const char* request = gtk_entry_get_text(GTK_ENTRY(data->request));
|
||||
polkit_agent_session_response(data->session, request);
|
||||
gtk_widget_set_sensitive(data->dlg, FALSE);
|
||||
}
|
||||
@@ -195,7 +195,7 @@ static void initiate_authentication(PolkitAgentListener *listener,
|
||||
DEBUG("%s: %s", *p, polkit_details_lookup(details, *p));
|
||||
#endif
|
||||
data->listener = (LXPolkitListener*)listener;
|
||||
- data->result = g_simple_async_result_new(listener, callback, user_data, initiate_authentication);
|
||||
+ data->result = g_simple_async_result_new(G_OBJECT(listener), callback, user_data, initiate_authentication);
|
||||
|
||||
data->action_id = g_strdup(action_id);
|
||||
data->cancellable = (GCancellable*)g_object_ref(cancellable);
|
||||
@@ -260,10 +260,10 @@ static void initiate_authentication(PolkitAgentListener *listener,
|
||||
g_free(str);
|
||||
}
|
||||
}
|
||||
- gtk_combo_box_set_model(data->id, GTK_TREE_MODEL(store));
|
||||
+ gtk_combo_box_set_model(GTK_COMBO_BOX(data->id), GTK_TREE_MODEL(store));
|
||||
g_object_unref(store);
|
||||
/* select the fist user in the list */
|
||||
- gtk_combo_box_set_active(data->id, 0);
|
||||
+ gtk_combo_box_set_active(GTK_COMBO_BOX(data->id), 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -7,25 +7,27 @@ description='Lightweight X11 session manager'
|
||||
email='akarsu@protonmail.com'
|
||||
maintainer='akarsu'
|
||||
license=('GPL2')
|
||||
source=("https://salsa.debian.org/lxde-team/lxsession/-/archive/debian/$version-2/lxsession-debian-$version-2.tar.gz")
|
||||
_commit="95e902d76758e09f9226abd39163aadd5cd50bc1"
|
||||
source=("https://github.com/lxde/lxsession/archive/${_commit}.zip")
|
||||
depends=(gtk3 polkit)
|
||||
makedepends=(intltool vala docbook-xsl)
|
||||
sha256sums=('c9ed57c23c682fbd33cf5a8092a5d5c5415a922f8e36d350dcbb637434db6843')
|
||||
sha256sums=('19df9abfda70fb051c4e0f6d17a68d6e635728065faee7b95e441e26af4098d9')
|
||||
group=(lxde.base)
|
||||
uses=()
|
||||
arch=('x86_64')
|
||||
|
||||
cd $name-debian-$version-2
|
||||
cd $name-${_commit}
|
||||
|
||||
export CC="clang"
|
||||
export CXX="clang++"
|
||||
|
||||
setup(){
|
||||
autoreconf -fvi
|
||||
./autogen.sh
|
||||
./configure --prefix=/usr\
|
||||
--sysconfdir=/etc \
|
||||
--libexecdir=/usr/libexec \
|
||||
--enable-gtk3 \
|
||||
--enable-buildin-clipboard \
|
||||
--libdir=/usr/lib64/ \
|
||||
--enable-buildin-polkit
|
||||
--libdir=/usr/lib64/
|
||||
}
|
||||
|
||||
build(){
|
||||
|
||||
Reference in new issue
Block a user