Ticket #10599 (closed patch: fixed)

Opened 2 years ago

Last modified 14 months ago

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

pidgin-make-scrollable.diff (50.0 kB) - added by nix_nix 19 months ago.
Centralize all gtk_scrolled_window-related calls into gtkutils.c

Change History

  Changed 2 years ago by darkrain42

  • milestone set to Patches Needing Review

  Changed 2 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.

  Changed 19 months 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 19 months ago by nix_nix

Centralize all gtk_scrolled_window-related calls into gtkutils.c

  Changed 19 months ago by nix_nix

  • version changed from 2.6.3 to 2.7.2

follow-up: ↓ 6   Changed 19 months 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.

in reply to: ↑ 5   Changed 17 months 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.

  Changed 14 months ago by rekkanoryo

  • status changed from new to closed
  • resolution set to fixed

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.

  Changed 14 months 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!