Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#10599 closed patch (fixed)

New API proposal: pidgin_make_scrollable

Reported by: nix_nix Owned by:
Milestone: 2.8.0 Component: pidgin (gtk)
Version: 2.7.2 Keywords:
Cc:

Description

GtkWidget *pidgin_make_scrollable(GtkWidget *child, GtkPolicyType hscrollbar_policy, GtkPolicyType vscrollbar_policy, GtkShadowType shadow_type, int width, int height);

This replaces all the code involving gtk_scrolled_window. A few places deal with GtkScrolledWindow? widgets after their creation (gtkstatusbox, gtkimhtmltoolbar, and gtkimhtml). They all do so by setting h- or vscrollbar policies later. I have replaced those calls with g_object_set in order to make them widget-independent.

  • 295 lines

+ 128 lines

The patch can also be pulled via monotone:

mtn pull piiickoska.go-nix.ca org.maemo.garage.pidgin.pidgin.pidgin-make-scrollable

Attachments (1)

pidgin-make-scrollable.diff (50.0 KB) - added by nix_nix 9 years ago.
Centralize all gtk_scrolled_window-related calls into gtkutils.c

Download all attachments as: .zip

Change History (9)

comment:1 Changed 9 years ago by darkrain42

  • Milestone set to Patches Needing Review

comment:2 Changed 9 years ago by sadrul

The patch looks good. I am a bit surprised that this hasn't already been done.

The use of set_scroll_adjustments_signal may be replaced with the use of gtk_widget_set_scroll_adjustments, but this is probably simpler.

The doxygen markups are not correct, btw, but I wouldn't bother updating the patch for that.

comment:3 Changed 9 years ago by nix_nix

Well, since the patch didn't get applied for 2.7.0, I updated it against t:v2.7.2 in anticipation of 2.8.0 ...

Changed 9 years ago by nix_nix

Centralize all gtk_scrolled_window-related calls into gtkutils.c

comment:4 Changed 9 years ago by nix_nix

  • Version changed from 2.6.3 to 2.7.2

comment:5 follow-up: Changed 9 years ago by rekkanoryo

  • Milestone changed from Patches Needing Review to 2.8.0

Sadrul, does this patch look acceptable to you (since you've already looked at it once)? If so, I'm in favor of tossing this up on next.minor, then merging that to i.p.p soon after we push out 2.7.3.

comment:6 in reply to: ↑ 5 Changed 9 years ago by nix_nix

I've propagated 2.7.3 to the branch I mention in the inital report, and I've updated the "since" tag to 2.8.0. I'll update this patch as well, if you'd like, but, since it seems to already have been reviewed, I'm reluctant to do that.

comment:7 Changed 8 years ago by rekkanoryo

  • Resolution set to fixed
  • Status changed from new to closed

I committed this patch. I referenced the wrong ticket, though. For completeness, I'll copy the appropriate stuff here:

(In f07e2367652cc664834b1968911b2455b6b0640e):
Add pidgin_make_scrollable and use it. Cleans up a bunch of duplicate code. Net code loss of 180 lines. Fixes #13073.

(In ecfa76230379acd410497a0402c297294db7302f):
Credit Gabriel for his patch. Refs #13073.

comment:8 Changed 8 years ago by rekkanoryo@…

(In 7b0fb4f2e8b153a4459630e96103b68c07cc5c11):
Use the right ticket number. Refs #10599.

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!