From f4f624f7523a6b7b0c12ce9ad4aa1bd4d27663dc Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Wed, 27 Sep 2017 12:25:12 -0400 Subject: mq_application_add_window(), mq_window_new(): Make uris const --- (limited to 'src') diff --git a/src/application.c b/src/application.c index f836ec1..43a236a 100644 --- a/src/application.c +++ b/src/application.c @@ -51,7 +51,7 @@ mq_application_main(MqApplication __attribute__((unused)) *application) } MqWindow * -mq_application_add_window(MqApplication *application, gchar **uris) +mq_application_add_window(MqApplication *application, const gchar **uris) { MqWindow *window; diff --git a/src/application.h b/src/application.h index a717e7e..2cfebf0 100644 --- a/src/application.h +++ b/src/application.h @@ -39,7 +39,7 @@ int mq_application_main(MqApplication *application); MqWindow * -mq_application_add_window(MqApplication *application, gchar **uris); +mq_application_add_window(MqApplication *application, const gchar **uris); void mq_application_delete_window(GtkWidget *window, MqApplication *application); diff --git a/src/main.c b/src/main.c index 018b74f..277dbd3 100644 --- a/src/main.c +++ b/src/main.c @@ -32,7 +32,7 @@ static gchar *opt_profile; static gboolean opt_private; static gboolean opt_version; -static gchar **opt_uris; +static const gchar **opt_uris; static GOptionEntry entries[] = { {"profile", 'P', G_OPTION_FLAG_NONE, G_OPTION_ARG_STRING, diff --git a/src/tab-body.c b/src/tab-body.c index 6bf95b1..b69b538 100644 --- a/src/tab-body.c +++ b/src/tab-body.c @@ -51,7 +51,7 @@ static void menu_open_link_win_activate_cb(GtkAction __attribute__((unused)) *action, MqTabBody *body) { - gchar *uris[2] = { + const gchar *uris[2] = { webkit_hit_test_result_get_link_uri(body->hit_test_result), NULL }; @@ -79,7 +79,7 @@ static void menu_open_image_win_activate_cb(GtkAction __attribute__((unused)) *action, MqTabBody *body) { - gchar *uris[2] = { + const gchar *uris[2] = { webkit_hit_test_result_get_image_uri(body->hit_test_result), NULL }; @@ -107,7 +107,7 @@ static void menu_open_video_win_activate_cb(GtkAction __attribute__((unused)) *action, MqTabBody *body) { - gchar *uris[2] = { + const gchar *uris[2] = { webkit_hit_test_result_get_media_uri(body->hit_test_result), NULL }; @@ -135,7 +135,7 @@ static void menu_open_audio_win_activate_cb(GtkAction __attribute__((unused)) *action, MqTabBody *body) { - gchar *uris[2] = { + const gchar *uris[2] = { webkit_hit_test_result_get_media_uri(body->hit_test_result), NULL }; diff --git a/src/window.c b/src/window.c index 71b0c4e..258fcbf 100644 --- a/src/window.c +++ b/src/window.c @@ -41,7 +41,7 @@ update_positions(GtkNotebook __attribute__((unused)) *notebook, } MqWindow * -mq_window_new(MqApplication *application, gchar **uris) +mq_window_new(MqApplication *application, const gchar **uris) { MqWindow *window; guint i; diff --git a/src/window.h b/src/window.h index a5c7b3d..962106e 100644 --- a/src/window.h +++ b/src/window.h @@ -37,7 +37,7 @@ struct MqWindow { }; MqWindow * -mq_window_new(MqApplication *application, gchar **uris); +mq_window_new(MqApplication *application, const gchar **uris); MqApplication * mq_window_get_application(MqWindow *window); -- cgit v0.9.1