/pidgin/main: e27e4a465dba: Fix erroneous spacing.
Elliott Sales de Andrade
qulogic at pidgin.im
Tue Jul 24 04:04:00 EDT 2012
Changeset: e27e4a465dba43b19d29ddd7728b54f64a4e4efb
Author: Elliott Sales de Andrade <qulogic at pidgin.im>
Date: 2012-07-24 03:21 -0400
Branch: cpw.qulogic.gtk3-required
URL: http://hg.pidgin.im/pidgin/main/rev/e27e4a465dba
Description:
Fix erroneous spacing.
diffstat:
pidgin/gtkstatusbox.c | 145 ++++++++++++++++++++++++-------------------------
1 files changed, 72 insertions(+), 73 deletions(-)
diffs (198 lines):
diff --git a/pidgin/gtkstatusbox.c b/pidgin/gtkstatusbox.c
--- a/pidgin/gtkstatusbox.c
+++ b/pidgin/gtkstatusbox.c
@@ -354,7 +354,7 @@
gchar *name = (gchar *) gtk_selection_data_get_data(sd);
if ((gtk_selection_data_get_length(sd) >= 0)
- && (gtk_selection_data_get_format(sd) == 8)) {
+ && (gtk_selection_data_get_format(sd) == 8)) {
/* Well, it looks like the drag event was cool.
* Let's do something with it */
if (!g_ascii_strncasecmp(name, "file://", 7)) {
@@ -379,7 +379,7 @@
static void
statusbox_got_url(PurpleUtilFetchUrlData *url_data, gpointer user_data,
- const gchar *themedata, size_t len, const gchar *error_message)
+ const gchar *themedata, size_t len, const gchar *error_message)
{
FILE *f;
gchar *path;
@@ -542,7 +542,7 @@
static void
pidgin_status_box_set_property(GObject *object, guint param_id,
- const GValue *value, GParamSpec *pspec)
+ const GValue *value, GParamSpec *pspec)
{
PidginStatusBox *statusbox = PIDGIN_STATUS_BOX(object);
@@ -611,7 +611,7 @@
static GType
pidgin_status_box_child_type (GtkContainer *container)
{
- return GTK_TYPE_WIDGET;
+ return GTK_TYPE_WIDGET;
}
static void
@@ -1134,7 +1134,7 @@
static gboolean combo_box_scroll_event_cb(GtkWidget *w, GdkEventScroll *event, GtkIMHtml *imhtml)
{
- pidgin_status_box_popup(PIDGIN_STATUS_BOX(w));
+ pidgin_status_box_popup(PIDGIN_STATUS_BOX(w));
return TRUE;
}
@@ -1308,74 +1308,73 @@
static void
pidgin_status_box_list_position (PidginStatusBox *status_box, int *x, int *y, int *width, int *height)
{
- GdkScreen *screen;
- gint monitor_num;
- GdkRectangle monitor;
- GtkRequisition popup_req;
- GtkPolicyType hpolicy, vpolicy;
- GtkAllocation allocation;
-
- gtk_widget_get_allocation(GTK_WIDGET(status_box), &allocation);
- gdk_window_get_origin (gtk_widget_get_window(GTK_WIDGET(status_box)), x, y);
-
- *x += allocation.x;
- *y += allocation.y;
-
- *width = allocation.width;
-
- hpolicy = vpolicy = GTK_POLICY_NEVER;
+ GdkScreen *screen;
+ gint monitor_num;
+ GdkRectangle monitor;
+ GtkRequisition popup_req;
+ GtkPolicyType hpolicy, vpolicy;
+ GtkAllocation allocation;
+
+ gtk_widget_get_allocation(GTK_WIDGET(status_box), &allocation);
+ gdk_window_get_origin(gtk_widget_get_window(GTK_WIDGET(status_box)), x, y);
+
+ *x += allocation.x;
+ *y += allocation.y;
+
+ *width = allocation.width;
+
+ hpolicy = vpolicy = GTK_POLICY_NEVER;
g_object_set(G_OBJECT(status_box->scrolled_window),
- "hscrollbar-policy", hpolicy,
- "vscrollbar-policy", vpolicy,
- NULL);
- gtk_widget_size_request (status_box->popup_frame, &popup_req);
-
- if (popup_req.width > *width)
- {
- hpolicy = GTK_POLICY_ALWAYS;
- g_object_set(G_OBJECT(status_box->scrolled_window),
- "hscrollbar-policy", hpolicy,
- "vscrollbar-policy", vpolicy,
- NULL);
- gtk_widget_size_request (status_box->popup_frame, &popup_req);
- }
-
- *height = popup_req.height;
-
- screen = gtk_widget_get_screen (GTK_WIDGET (status_box));
- monitor_num = gdk_screen_get_monitor_at_window (screen,
- gtk_widget_get_window(GTK_WIDGET (status_box)));
- gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
-
- if (*x < monitor.x)
- *x = monitor.x;
- else if (*x + *width > monitor.x + monitor.width)
- *x = monitor.x + monitor.width - *width;
-
- if (*y + allocation.height + *height <= monitor.y + monitor.height)
- *y += allocation.height;
- else if (*y - *height >= monitor.y)
- *y -= *height;
- else if (monitor.y + monitor.height - (*y + allocation.height) > *y - monitor.y)
- {
- *y += allocation.height;
- *height = monitor.y + monitor.height - *y;
- }
- else
- {
- *height = *y - monitor.y;
- *y = monitor.y;
- }
-
- if (popup_req.height > *height)
- {
- vpolicy = GTK_POLICY_ALWAYS;
-
- g_object_set(G_OBJECT(status_box->scrolled_window),
- "hscrollbar-policy", hpolicy,
- "vscrollbar-policy", vpolicy,
- NULL);
- }
+ "hscrollbar-policy", hpolicy,
+ "vscrollbar-policy", vpolicy,
+ NULL);
+ gtk_widget_size_request(status_box->popup_frame, &popup_req);
+
+ if (popup_req.width > *width) {
+ hpolicy = GTK_POLICY_ALWAYS;
+ g_object_set(G_OBJECT(status_box->scrolled_window),
+ "hscrollbar-policy", hpolicy,
+ "vscrollbar-policy", vpolicy,
+ NULL);
+ gtk_widget_size_request(status_box->popup_frame, &popup_req);
+ }
+
+ *height = popup_req.height;
+
+ screen = gtk_widget_get_screen(GTK_WIDGET(status_box));
+ monitor_num = gdk_screen_get_monitor_at_window(screen,
+ gtk_widget_get_window(GTK_WIDGET(status_box)));
+ gdk_screen_get_monitor_geometry(screen, monitor_num, &monitor);
+
+ if (*x < monitor.x)
+ *x = monitor.x;
+ else if (*x + *width > monitor.x + monitor.width)
+ *x = monitor.x + monitor.width - *width;
+
+ if (*y + allocation.height + *height <= monitor.y + monitor.height)
+ *y += allocation.height;
+ else if (*y - *height >= monitor.y)
+ *y -= *height;
+ else if (monitor.y + monitor.height - (*y + allocation.height) > *y - monitor.y)
+ {
+ *y += allocation.height;
+ *height = monitor.y + monitor.height - *y;
+ }
+ else
+ {
+ *height = *y - monitor.y;
+ *y = monitor.y;
+ }
+
+ if (popup_req.height > *height)
+ {
+ vpolicy = GTK_POLICY_ALWAYS;
+
+ g_object_set(G_OBJECT(status_box->scrolled_window),
+ "hscrollbar-policy", hpolicy,
+ "vscrollbar-policy", vpolicy,
+ NULL);
+ }
}
static gboolean
@@ -2078,7 +2077,7 @@
gtk_widget_size_allocate(status_box->icon_box, &icon_alc);
}
gtk_widget_size_allocate(status_box->toggle_button, &parent_alc);
- gtk_widget_set_allocation(GTK_WIDGET(status_box), allocation);
+ gtk_widget_set_allocation(GTK_WIDGET(status_box), allocation);
}
#if GTK_CHECK_VERSION(3,0,0)
More information about the Commits
mailing list