summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-13 04:13:01 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-13 04:13:01 (EDT)
commit0f3866849d63cbb7b3dfd548f7d260443efd5660 (patch)
treeae4831446d49cd6e200343ae7e7669b43277f4a6 /src
parentea01dcb136267b99ec6fcd280d0c5d8efdeb8181 (diff)
downloadmarquee-0f3866849d63cbb7b3dfd548f7d260443efd5660.zip
marquee-0f3866849d63cbb7b3dfd548f7d260443efd5660.tar.gz
marquee-0f3866849d63cbb7b3dfd548f7d260443efd5660.tar.bz2
Revert "MqStopReloadButton: Make icons static"
This reverts commit ea01dcb136267b99ec6fcd280d0c5d8efdeb8181.
Diffstat (limited to 'src')
-rw-r--r--src/stop-reload-button.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/stop-reload-button.c b/src/stop-reload-button.c
index a15b92f..7a006a3 100644
--- a/src/stop-reload-button.c
+++ b/src/stop-reload-button.c
@@ -28,6 +28,8 @@
struct _MqStopReloadButton {
GtkToolButton parent_instance;
+ GtkWidget *stop_icon;
+ GtkWidget *reload_icon;
MqWebView *web_view;
};
@@ -44,16 +46,14 @@ struct _MqStopReloadButtonClass {
G_DEFINE_TYPE(MqStopReloadButton, mq_stop_reload_button, GTK_TYPE_TOOL_BUTTON)
-static GtkWidget *stop_icon = NULL;
-static GtkWidget *reload_icon = NULL;
-
static void
loading_cb(MqWebView *web_view, GParamSpec G_GNUC_UNUSED *paramspec,
MqStopReloadButton *stop_reload_button)
{
if (webkit_web_view_is_loading(WEBKIT_WEB_VIEW(web_view))) {
gtk_tool_button_set_icon_widget(
- GTK_TOOL_BUTTON(stop_reload_button), stop_icon);
+ GTK_TOOL_BUTTON(stop_reload_button),
+ stop_reload_button->stop_icon);
gtk_tool_button_set_label(
GTK_TOOL_BUTTON(stop_reload_button), "Stop");
gtk_widget_set_tooltip_text(
@@ -61,7 +61,8 @@ loading_cb(MqWebView *web_view, GParamSpec G_GNUC_UNUSED *paramspec,
"Stop loading the current page");
} else {
gtk_tool_button_set_icon_widget(
- GTK_TOOL_BUTTON(stop_reload_button), reload_icon);
+ GTK_TOOL_BUTTON(stop_reload_button),
+ stop_reload_button->reload_icon);
gtk_tool_button_set_label(
GTK_TOOL_BUTTON(stop_reload_button), "Reload");
gtk_widget_set_tooltip_text(
@@ -146,24 +147,24 @@ mq_stop_reload_button_class_init(MqStopReloadButtonClass *klass)
G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
g_object_class_install_properties(object_class, N_PROPERTIES,
obj_properties);
+}
+static void
+mq_stop_reload_button_init(MqStopReloadButton *stop_reload_button)
+{
/* Stop icon */
- stop_icon = gtk_image_new_from_icon_name(
+ stop_reload_button->stop_icon = gtk_image_new_from_icon_name(
"process-stop", GTK_ICON_SIZE_SMALL_TOOLBAR);
- g_object_ref_sink(stop_icon);
+ g_object_ref_sink(stop_reload_button->stop_icon);
/* Reload icon */
- reload_icon = gtk_image_new_from_icon_name(
+ stop_reload_button->reload_icon = gtk_image_new_from_icon_name(
"view-refresh", GTK_ICON_SIZE_SMALL_TOOLBAR);
- g_object_ref_sink(reload_icon);
-}
+ g_object_ref_sink(stop_reload_button->reload_icon);
-static void
-mq_stop_reload_button_init(MqStopReloadButton *stop_reload_button)
-{
/* Button */
gtk_tool_button_set_icon_widget(GTK_TOOL_BUTTON(stop_reload_button),
- stop_icon);
+ stop_reload_button->stop_icon);
gtk_tool_button_set_label(GTK_TOOL_BUTTON(stop_reload_button), "Stop");
gtk_widget_set_tooltip_text(GTK_WIDGET(stop_reload_button),
"Stop loading the current page");