Mercurial > pidgin.yaz
comparison src/gtkimhtml.c @ 10871:6240d7fd5b2c
[gaim-migrate @ 12558]
Make a bunch of stuff static and rename set_gaim_user_dir to
gaim_util_set_user_dir
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 25 Apr 2005 04:22:29 +0000 |
parents | c28766b87f64 |
children | 1e6bdc7175e9 |
comparison
equal
deleted
inserted
replaced
10870:b75ce371c812 | 10871:6240d7fd5b2c |
---|---|
119 MESSAGE_SEND, | 119 MESSAGE_SEND, |
120 LAST_SIGNAL | 120 LAST_SIGNAL |
121 }; | 121 }; |
122 static guint signals [LAST_SIGNAL] = { 0 }; | 122 static guint signals [LAST_SIGNAL] = { 0 }; |
123 | 123 |
124 GtkTargetEntry selection_targets[] = { | 124 static GtkTargetEntry selection_targets[] = { |
125 { "text/html", 0, TARGET_HTML }, | 125 { "text/html", 0, TARGET_HTML }, |
126 { "UTF8_STRING", 0, TARGET_UTF8_STRING }, | 126 { "UTF8_STRING", 0, TARGET_UTF8_STRING }, |
127 { "COMPOUND_TEXT", 0, TARGET_COMPOUND_TEXT }, | 127 { "COMPOUND_TEXT", 0, TARGET_COMPOUND_TEXT }, |
128 { "STRING", 0, TARGET_STRING }, | 128 { "STRING", 0, TARGET_STRING }, |
129 { "TEXT", 0, TARGET_TEXT}}; | 129 { "TEXT", 0, TARGET_TEXT}}; |
130 | 130 |
131 GtkTargetEntry link_drag_drop_targets[] = { | 131 static GtkTargetEntry link_drag_drop_targets[] = { |
132 GTK_IMHTML_DND_TARGETS | 132 GTK_IMHTML_DND_TARGETS |
133 }; | 133 }; |
134 | 134 |
135 #ifdef _WIN32 | 135 #ifdef _WIN32 |
136 /* Win32 clipboard format value, and functions to convert back and | 136 /* Win32 clipboard format value, and functions to convert back and |
1368 clipboard = gtk_widget_get_clipboard(w, GDK_SELECTION_CLIPBOARD); | 1368 clipboard = gtk_widget_get_clipboard(w, GDK_SELECTION_CLIPBOARD); |
1369 gtk_clipboard_set_text(clipboard, url, -1); | 1369 gtk_clipboard_set_text(clipboard, url, -1); |
1370 } | 1370 } |
1371 | 1371 |
1372 /* The callback for an event on a link tag. */ | 1372 /* The callback for an event on a link tag. */ |
1373 gboolean tag_event(GtkTextTag *tag, GObject *imhtml, GdkEvent *event, GtkTextIter *arg2, gpointer unused) { | 1373 static gboolean tag_event(GtkTextTag *tag, GObject *imhtml, GdkEvent *event, GtkTextIter *arg2, gpointer unused) { |
1374 GdkEventButton *event_button = (GdkEventButton *) event; | 1374 GdkEventButton *event_button = (GdkEventButton *) event; |
1375 if (GTK_IMHTML(imhtml)->editable) | 1375 if (GTK_IMHTML(imhtml)->editable) |
1376 return FALSE; | 1376 return FALSE; |
1377 if (event->type == GDK_BUTTON_RELEASE) { | 1377 if (event->type == GDK_BUTTON_RELEASE) { |
1378 if ((event_button->button == 1) || (event_button->button == 2)) { | 1378 if ((event_button->button == 1) || (event_button->button == 2)) { |
2204 } | 2204 } |
2205 } | 2205 } |
2206 | 2206 |
2207 #define MAX_SCROLL_TIME 0.4 | 2207 #define MAX_SCROLL_TIME 0.4 |
2208 | 2208 |
2209 gboolean scroll_cb(gpointer data) | 2209 static gboolean scroll_cb(gpointer data) |
2210 { | 2210 { |
2211 GtkIMHtml *imhtml = data; | 2211 GtkIMHtml *imhtml = data; |
2212 GtkAdjustment *adj = GTK_TEXT_VIEW(imhtml)->vadjustment; | 2212 GtkAdjustment *adj = GTK_TEXT_VIEW(imhtml)->vadjustment; |
2213 gdouble val = adj->upper - adj->page_size; | 2213 gdouble val = adj->upper - adj->page_size; |
2214 gdouble t; | 2214 gdouble t; |
2229 return FALSE; | 2229 return FALSE; |
2230 } else | 2230 } else |
2231 return TRUE; | 2231 return TRUE; |
2232 } | 2232 } |
2233 | 2233 |
2234 gboolean scroll_idle_cb(gpointer data) | 2234 static gboolean scroll_idle_cb(gpointer data) |
2235 { | 2235 { |
2236 GtkIMHtml *imhtml = data; | 2236 GtkIMHtml *imhtml = data; |
2237 imhtml->scroll_src = g_timeout_add(33, scroll_cb, imhtml); | 2237 imhtml->scroll_src = g_timeout_add(33, scroll_cb, imhtml); |
2238 return FALSE; | 2238 return FALSE; |
2239 } | 2239 } |