#include "config.h"
#include "ev-history-action.h"
#include <glib/gi18n.h>
Go to the source code of this file.
|
static void | history_menu_link_activated (GtkMenuItem *item, EvHistoryAction *history_action) |
|
static void | popup_menu_hide_cb (GtkMenu *menu, EvHistoryAction *history_action) |
|
static void | ev_history_action_show_popup (EvHistoryAction *history_action, EvHistoryActionButton action_button, guint button, guint32 event_time) |
|
static void | ev_history_action_finalize (GObject *object) |
|
static void | ev_history_action_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) |
|
static void | ev_history_action_constructed (GObject *object) |
|
static void | ev_history_action_class_init (EvHistoryActionClass *class) |
|
static gboolean | button_pressed (GtkWidget *button, GdkEventButton *event, EvHistoryAction *history_action) |
|
static GtkWidget * | ev_history_action_create_button (EvHistoryAction *history_action, EvHistoryActionButton action_button) |
|
static void | ev_history_action_init (EvHistoryAction *history_action) |
|
GtkWidget * | ev_history_action_new (EvHistory *history) |
|
gboolean | ev_history_action_get_popup_shown (EvHistoryAction *action) |
|
Enumerator |
---|
EV_HISTORY_ACTION_BUTTON_BACK |
|
EV_HISTORY_ACTION_BUTTON_FORWARD |
|
Definition at line 32 of file ev-history-action.c.
static gboolean button_pressed |
( |
GtkWidget * |
button, |
|
|
GdkEventButton * |
event, |
|
|
EvHistoryAction * |
history_action |
|
) |
| |
|
static |
Definition at line 180 of file ev-history-action.c.
187 switch (event->button) {
188 case GDK_BUTTON_SECONDARY:
193 event->button, event->time);
194 return GDK_EVENT_STOP;
199 return GDK_EVENT_PROPAGATE;
Definition at line 158 of file ev-history-action.c.
160 GObjectClass *object_class = G_OBJECT_CLASS (
class);
166 g_object_class_install_property (object_class,
168 g_param_spec_object (
"history",
173 G_PARAM_CONSTRUCT_ONLY |
174 G_PARAM_STATIC_STRINGS));
static void ev_history_action_constructed |
( |
GObject * |
object) | |
|
|
static |
Definition at line 147 of file ev-history-action.c.
151 G_OBJECT_CLASS (ev_history_action_parent_class)->constructed (
object);
153 g_object_add_weak_pointer (G_OBJECT (history_action->
priv->
history),
Definition at line 203 of file ev-history-action.c.
208 const gchar *icon_name = NULL;
209 const gchar *tooltip_text = NULL;
210 const gchar *action_name = NULL;
212 button = gtk_button_new ();
213 gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
214 g_signal_connect (button,
"button-press-event",
218 switch (action_button) {
220 icon_name =
"go-previous-symbolic";
221 tooltip_text =
_(
"Go to previous history item");
222 action_name =
"win.go-back-history";
225 icon_name =
"go-next-symbolic";
226 tooltip_text =
_(
"Go to next history item");
227 action_name =
"win.go-forward-history";
231 image = gtk_image_new ();
232 gtk_actionable_set_action_name (GTK_ACTIONABLE (button), action_name);
233 gtk_button_set_image (GTK_BUTTON (button), image);
234 gtk_image_set_from_icon_name (GTK_IMAGE (image), icon_name, GTK_ICON_SIZE_MENU);
235 gtk_widget_set_tooltip_text (button, tooltip_text);
236 gtk_widget_set_can_focus (button,
FALSE);
static void ev_history_action_finalize |
( |
GObject * |
object) | |
|
|
static |
Definition at line 116 of file ev-history-action.c.
121 g_object_remove_weak_pointer (G_OBJECT (history_action->
priv->
history),
125 G_OBJECT_CLASS (ev_history_action_parent_class)->finalize (
object);
Definition at line 242 of file ev-history-action.c.
244 GtkWidget *box = GTK_WIDGET (history_action);
245 GtkStyleContext *style_context;
249 priv = history_action->
priv;
251 gtk_orientable_set_orientation (GTK_ORIENTABLE (box), GTK_ORIENTATION_HORIZONTAL);
252 style_context = gtk_widget_get_style_context (box);
253 gtk_style_context_add_class (style_context, GTK_STYLE_CLASS_RAISED);
254 gtk_style_context_add_class (style_context, GTK_STYLE_CLASS_LINKED);
258 gtk_container_add (GTK_CONTAINER (box), priv->
back_button);
GtkWidget* ev_history_action_new |
( |
EvHistory * |
history) | |
|
static void ev_history_action_set_property |
( |
GObject * |
object, |
|
|
guint |
prop_id, |
|
|
const GValue * |
value, |
|
|
GParamSpec * |
pspec |
|
) |
| |
|
static |
Definition at line 129 of file ev-history-action.c.
138 history_action->
priv->
history = g_value_get_object (value);
141 G_OBJECT_WARN_INVALID_PROPERTY_ID (
object, prop_id, pspec);
Definition at line 68 of file ev-history-action.c.
77 switch (action_button) {
89 menu = gtk_menu_new ();
91 for (l = list; l; l = g_list_next (l)) {
96 g_object_set_data_full (G_OBJECT (item),
"ev-history-menu-item-link",
97 g_object_ref (link), (GDestroyNotify)g_object_unref);
98 g_signal_connect_object (item,
"activate",
101 gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
102 gtk_widget_show (item);
107 g_signal_connect (menu,
"hide",
110 gtk_menu_popup (GTK_MENU (menu),
111 NULL, NULL, NULL, NULL,
static void history_menu_link_activated |
( |
GtkMenuItem * |
item, |
|
|
EvHistoryAction * |
history_action |
|
) |
| |
|
static |
static void popup_menu_hide_cb |
( |
GtkMenu * |
menu, |
|
|
EvHistoryAction * |
history_action |
|
) |
| |
|
static |