Sun, 03 Nov 2024 00:05:44 -0500
remove purple3-url-handler.desktop.in.in
The application that did the launching was removed long ago. Also this should
be implemented by the user interfaces and they might provide separate files to
groups schemas as well.
Testing Done:
Called in the turtles.
Reviewed at https://reviews.imfreedom.org/r/3640/
|
42443
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Pidgin - Internet Messenger |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * source distribution. |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * This program is free software; you can redistribute it and/or modify |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * (at your option) any later version. |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * This program is distributed in the hope that it will be useful, |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * GNU General Public License for more details. |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #include <gtk/gtk.h> |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | #include "pidginautoadjustment.h" |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | struct _PidginAutoAdjustment { |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | GtkAdjustment parent; |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | gboolean auto_scroll; |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | }; |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | |
|
42575
580339aa47cc
Make sure all of the final types in pidgin are defined as such
Gary Kramlich <grim@reaperworld.com>
parents:
42443
diff
changeset
|
33 | G_DEFINE_FINAL_TYPE(PidginAutoAdjustment, pidgin_auto_adjustment, |
|
580339aa47cc
Make sure all of the final types in pidgin are defined as such
Gary Kramlich <grim@reaperworld.com>
parents:
42443
diff
changeset
|
34 | GTK_TYPE_ADJUSTMENT) |
|
42443
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | /****************************************************************************** |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | * Callbacks |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | *****************************************************************************/ |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | static gboolean |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | pidgin_auto_adjustment_scroll(gpointer data) { |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | GtkAdjustment *adjustment = data; |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | gdouble upper = 0.0; |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | gdouble pagesize = 0.0; |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | upper = gtk_adjustment_get_upper(adjustment); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | pagesize = gtk_adjustment_get_page_size(adjustment); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | gtk_adjustment_set_value(adjustment, upper - pagesize); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | return G_SOURCE_REMOVE; |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | } |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | static void |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | pidgin_auto_adjustment_changed(GtkAdjustment *gtk_adjustment) { |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | PidginAutoAdjustment *adjustment = PIDGIN_AUTO_ADJUSTMENT(gtk_adjustment); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | if(adjustment->auto_scroll) { |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | /* If we set the value here, we interrupt the updates to the other |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | * values of the adjustment which breaks the adjustment. |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | * |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | * The specific behavior we've seen is that the upper property doesn't |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | * get updated when we call set value here. Which means you can't even |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | * scroll down anymore in a scrolled window because you're already at |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
64 | * the upper bound. However, if you scroll up, even if there's no where |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
65 | * to scroll, it will update the adjustment's properties and you can |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | * then scroll down. |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 | * |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
68 | * By using a timeout to set the value during the next main loop |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
69 | * iteration we avoid this problem. |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
70 | */ |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
71 | g_timeout_add(0, pidgin_auto_adjustment_scroll, adjustment); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
72 | } |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
73 | } |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
74 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
75 | static void |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
76 | pidgin_auto_adjustment_value_changed(GtkAdjustment *gtk_adjustment) { |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
77 | PidginAutoAdjustment *adjustment = PIDGIN_AUTO_ADJUSTMENT(gtk_adjustment); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
78 | gdouble current = 0.0; |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
79 | gdouble upper = 0.0; |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
80 | gdouble pagesize = 0.0; |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
81 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
82 | current = gtk_adjustment_get_value(gtk_adjustment); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
83 | upper = gtk_adjustment_get_upper(gtk_adjustment); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
84 | pagesize = gtk_adjustment_get_page_size(gtk_adjustment); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
85 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
86 | adjustment->auto_scroll = (current + pagesize >= upper); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
87 | } |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
88 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
89 | /****************************************************************************** |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
90 | * GObject Implementation |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
91 | *****************************************************************************/ |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
92 | static void |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
93 | pidgin_auto_adjustment_init(PidginAutoAdjustment *adjustment) { |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
94 | adjustment->auto_scroll = TRUE; |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
95 | } |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
96 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
97 | static void |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
98 | pidgin_auto_adjustment_class_init(PidginAutoAdjustmentClass *klass) { |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
99 | GtkAdjustmentClass *adjustment_class = GTK_ADJUSTMENT_CLASS(klass); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
100 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
101 | adjustment_class->changed = pidgin_auto_adjustment_changed; |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
102 | adjustment_class->value_changed = pidgin_auto_adjustment_value_changed; |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
103 | } |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
104 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
105 | /****************************************************************************** |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
106 | * Public API |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
107 | *****************************************************************************/ |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
108 | GtkAdjustment * |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
109 | pidgin_auto_adjustment_new(void) { |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
110 | return g_object_new(PIDGIN_TYPE_AUTO_ADJUSTMENT, NULL); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
111 | } |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
112 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
113 | void |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
114 | pidgin_auto_adjustment_decrement(PidginAutoAdjustment *adjustment) { |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
115 | gdouble value = 0.0; |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
116 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
117 | g_return_if_fail(PIDGIN_IS_AUTO_ADJUSTMENT(adjustment)); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
118 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
119 | value = gtk_adjustment_get_value(GTK_ADJUSTMENT(adjustment)); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
120 | value -= gtk_adjustment_get_page_increment(GTK_ADJUSTMENT(adjustment)); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
121 | gtk_adjustment_set_value(GTK_ADJUSTMENT(adjustment), value); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
122 | } |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
123 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
124 | void |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
125 | pidgin_auto_adjustment_increment(PidginAutoAdjustment *adjustment) { |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
126 | gdouble value = 0.0; |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
127 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
128 | g_return_if_fail(PIDGIN_IS_AUTO_ADJUSTMENT(adjustment)); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
129 | |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
130 | value = gtk_adjustment_get_value(GTK_ADJUSTMENT(adjustment)); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
131 | value += gtk_adjustment_get_page_increment(GTK_ADJUSTMENT(adjustment)); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
132 | gtk_adjustment_set_value(GTK_ADJUSTMENT(adjustment), value); |
|
ba2a26d44c0e
Port TalkatuAutoScroller to PidginAutoAdjustment
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
133 | } |