Merge lp:~cimi/indicator-messages/right-rounded-numbers into lp:indicator-messages/0.5
Proposed by
Andrea Cimitan
on 2010-07-29
| Status: | Merged |
|---|---|
| Approved by: | David Barth on 2010-07-29 |
| Approved revision: | 194 |
| Merged at revision: | 190 |
| Proposed branch: | lp:~cimi/indicator-messages/right-rounded-numbers |
| Merge into: | lp:indicator-messages/0.5 |
| Diff against target: |
124 lines (+83/-2) 1 file modified
src/indicator-messages.c (+83/-2) |
| To merge this branch: | bzr merge lp:~cimi/indicator-messages/right-rounded-numbers |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| David Barth | 2010-07-29 | Approve on 2010-07-29 | |
| Indicator Applet Developers | 2010-07-29 | Pending | |
|
Review via email:
|
|||
Description of the Change
Add rounded numbers on the right
To post a comment you must log in.
lp:~cimi/indicator-messages/right-rounded-numbers
updated
on 2010-07-29
- 193. By Andrea Cimitan on 2010-07-29
-
Ops, readded the label :P
| David Barth (dbarth) wrote : | # |
Something like that:
=== modified file 'src/indicator-
--- src/indicator-
+++ src/indicator-
@@ -314,6 +314,8 @@
PangoLayout * layout;
gint font_size = RIGHT_LABEL_
+ if (! GTK_IS_WIDGET (widget)) return;
+
/* get style */
style = gtk_widget_
lp:~cimi/indicator-messages/right-rounded-numbers
updated
on 2010-07-29
- 194. By Andrea Cimitan on 2010-07-29
-
check if widget is really a widget before getting its style (from dbarth)
| Andrea Cimitan (cimi) wrote : | # |
> +1 Congrats for your 1st DX merge proposal ;)
ahaha ty ;)

THe patch compiles and runs, but the rendering omits the label. Re-add the gtk_label_new call you suppressed.
On a more general note, you should check all arguments passed to your functions, in particular callbacks. If they are NULL or not of the right type, exit early to avoid de-referencing a pointer (and crashing).