#include "config.h"
#include "ev-loading-message.h"
#include <string.h>
#include <glib/gi18n.h>
Go to the source code of this file.
Definition at line 152 of file ev-loading-message.c.
154 GtkWidgetClass *gtk_widget_class = GTK_WIDGET_CLASS (klass);
static gboolean ev_loading_message_draw |
( |
GtkWidget * |
widget, |
|
|
cairo_t * |
cr |
|
) |
| |
|
static |
Definition at line 113 of file ev-loading-message.c.
116 GtkStyleContext *context;
119 context = gtk_widget_get_style_context (widget);
120 width = gtk_widget_get_allocated_width (widget);
121 height = gtk_widget_get_allocated_height (widget);
123 gtk_render_background (context, cr, 0, 0, width, height);
124 gtk_render_frame (context, cr, 0, 0, width, height);
126 GTK_WIDGET_CLASS (ev_loading_message_parent_class)->draw (widget, cr);
static void ev_loading_message_get_preferred_height |
( |
GtkWidget * |
widget, |
|
|
gint * |
minimum_size, |
|
|
gint * |
natural_size |
|
) |
| |
|
static |
Definition at line 99 of file ev-loading-message.c.
105 GTK_WIDGET_CLASS (ev_loading_message_parent_class)->get_preferred_height (widget, minimum_size, natural_size);
108 *minimum_size += padding.top + padding.bottom;
109 *natural_size += padding.top + padding.bottom;
static void ev_loading_message_get_preferred_width |
( |
GtkWidget * |
widget, |
|
|
gint * |
minimum_size, |
|
|
gint * |
natural_size |
|
) |
| |
|
static |
Definition at line 85 of file ev-loading-message.c.
91 GTK_WIDGET_CLASS (ev_loading_message_parent_class)->get_preferred_width (widget, minimum_size, natural_size);
94 *minimum_size += padding.left + padding.right;
95 *natural_size += padding.left + padding.right;
static void ev_loading_message_hide |
( |
GtkWidget * |
widget) | |
|
|
static |
Definition at line 132 of file ev-loading-message.c.
136 gtk_spinner_stop (GTK_SPINNER (message->spinner));
138 GTK_WIDGET_CLASS (ev_loading_message_parent_class)->hide (widget);
Definition at line 40 of file ev-loading-message.c.
44 gtk_container_set_border_width (GTK_CONTAINER (message), 10);
46 message->spinner = gtk_spinner_new ();
47 gtk_box_pack_start (GTK_BOX (message), message->spinner,
FALSE,
FALSE, 0);
48 gtk_widget_show (message->spinner);
50 label = gtk_label_new (
_(
"Loading…"));
51 gtk_box_pack_start (GTK_BOX (message), label,
FALSE,
FALSE, 0);
52 gtk_widget_show (label);
GtkWidget* ev_loading_message_new |
( |
void |
) | |
|
static void ev_loading_message_show |
( |
GtkWidget * |
widget) | |
|
|
static |
Definition at line 142 of file ev-loading-message.c.
146 gtk_spinner_start (GTK_SPINNER (message->spinner));
148 GTK_WIDGET_CLASS (ev_loading_message_parent_class)->show (widget);
static void ev_loading_message_size_allocate |
( |
GtkWidget * |
widget, |
|
|
GtkAllocation * |
allocation |
|
) |
| |
|
static |
Definition at line 68 of file ev-loading-message.c.
71 GtkAllocation child_allocation;
75 child_allocation.y = allocation->x + padding.left;
76 child_allocation.x = allocation->y + padding.top;
77 child_allocation.width = MAX (1, allocation->width - (padding.left + padding.right));
78 child_allocation.height = MAX (1, allocation->height - (padding.top + padding.bottom));
80 GTK_WIDGET_CLASS (ev_loading_message_parent_class)->size_allocate (widget, &child_allocation);
81 gtk_widget_set_allocation (widget, allocation);
static void get_widget_padding |
( |
GtkWidget * |
widget, |
|
|
GtkBorder * |
padding |
|
) |
| |
|
static |
Definition at line 56 of file ev-loading-message.c.
59 GtkStyleContext *context;
62 context = gtk_widget_get_style_context (widget);
63 state = gtk_style_context_get_state (context);
64 gtk_style_context_get_padding (context, state, padding);