remove unused variables

This commit is contained in:
fenze 2022-05-11 02:26:46 +02:00
parent 035a345158
commit 701c61d489
3 changed files with 1 additions and 19 deletions

View File

@ -3,7 +3,7 @@ CFLAGS = `pkg-config --cflags gtk4 webkit2gtk-5.0 x11`
LIBS = `pkg-config --libs gtk4 webkit2gtk-5.0 x11` LIBS = `pkg-config --libs gtk4 webkit2gtk-5.0 x11`
all: all:
${CC} -fPIC -g -O3 -o rose *.c $(CFLAGS) $(LIBS) ${CC} -fPIC -O3 -o rose *.c $(CFLAGS) $(LIBS)
strip ./rose strip ./rose
install: all install: all

View File

@ -62,7 +62,6 @@ static void rose_webview_constructed(GObject *object)
static void rose_webview_dispose(GObject *object) static void rose_webview_dispose(GObject *object)
{ {
RoseWebView *webview = ROSE_WEBVIEW(object); RoseWebView *webview = ROSE_WEBVIEW(object);
WebKitUserContentManager *ucm = webkit_web_view_get_user_content_manager(WEBKIT_WEB_VIEW(webview));
if (webview->cancellable) { if (webview->cancellable) {
g_cancellable_cancel(webview->cancellable); g_cancellable_cancel(webview->cancellable);
@ -84,7 +83,6 @@ static void rose_webview_finalize(GObject *object)
static void rose_webview_class_init(RoseWebViewClass *class) static void rose_webview_class_init(RoseWebViewClass *class)
{ {
GObjectClass *object_class = G_OBJECT_CLASS(class); GObjectClass *object_class = G_OBJECT_CLASS(class);
WebKitWebViewClass *webkit_webview_class = WEBKIT_WEB_VIEW_CLASS(class);
object_class->dispose = rose_webview_dispose; object_class->dispose = rose_webview_dispose;
object_class->finalize = rose_webview_finalize; object_class->finalize = rose_webview_finalize;
@ -111,7 +109,6 @@ void rose_webview_load_url(WebKitWebView *webview, const char *url)
GtkWidget* rose_webview_new() GtkWidget* rose_webview_new()
{ {
char cookiefile[64]; char cookiefile[64];
WebKitWebView *webview;
WebKitCookieManager *cookiemanager; WebKitCookieManager *cookiemanager;
WebKitUserContentManager *contentmanager; WebKitUserContentManager *contentmanager;

View File

@ -97,17 +97,7 @@ static gboolean key_press_callback(RoseWindow *window,
static void rose_window_constructed(GObject *object) static void rose_window_constructed(GObject *object)
{ {
RoseWindow *window;
GAction *action;
GActionGroup *action_group;
GSimpleActionGroup *simple_action_group;
guint i;
GApplication *app;
GtkEventController *controller;
G_OBJECT_CLASS(rose_window_parent_class)->constructed(object); G_OBJECT_CLASS(rose_window_parent_class)->constructed(object);
window = ROSE_WINDOW(window);
} }
static void rose_window_init(RoseWindow *window) static void rose_window_init(RoseWindow *window)
@ -146,13 +136,8 @@ void rose_window_set_webview(RoseWindow *window, GtkWidget *webview)
static void rose_window_class_init(RoseWindowClass *class) static void rose_window_class_init(RoseWindowClass *class)
{ {
GObjectClass *object_class = G_OBJECT_CLASS(class); GObjectClass *object_class = G_OBJECT_CLASS(class);
GtkApplicationWindowClass *window_class = GTK_APPLICATION_WINDOW_CLASS(class);
object_class->constructed = rose_window_constructed; object_class->constructed = rose_window_constructed;
/* g_object_class_override_property(object_class, */
/* PROP_ACTIVE_CHILD, */
/* "active-child"); */
} }
RoseWindow* rose_window_new(GtkApplication *app) RoseWindow* rose_window_new(GtkApplication *app)