blob: 17e8b7e1661702b27cdc71fa9012d96c9673481b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
--- Tomboy/Tray.cs.orig 2006-10-03 14:58:21.000000000 -0500
+++ Tomboy/Tray.cs 2006-10-03 15:01:31.000000000 -0500
@@ -50,8 +50,6 @@
tips.Sink ();
SetupDragAndDrop ();
-
- InitSomeStuff ();
}
void ButtonPress (object sender, Gtk.ButtonPressEventArgs args)
@@ -398,49 +396,9 @@
int icon_size = Math.Min (rect.Height, rect.Width);
if (icon_size_last != icon_size) {
icon_size_last = icon_size;
- image.Pixbuf = GuiUtils.GetIcon (GetIconName (), icon_size);
- }
- }
-
- void ReloadIcon ()
- {
- icon_size_last = -1;
- QueueResize ();
+ image.Pixbuf = GuiUtils.GetIcon ("tomboy", icon_size);
}
-
- // NOTHING TO SEE HERE
- void InitSomeStuff ()
- {
- manager.NoteDeleted += OnNoteDeletedUpdateIcon;
- manager.NoteAdded += OnNoteAddedUpdateIcon;
- manager.NoteRenamed += OnNoteRenamedUpdateIcon;
- }
-
- void OnNoteDeletedUpdateIcon (object sender, Note changed)
- {
- if (changed.Title == "Tintin")
- ReloadIcon ();
- }
-
- void OnNoteAddedUpdateIcon (object sender, Note changed)
- {
- if (changed.Title == "Tintin")
- ReloadIcon ();
- }
-
- void OnNoteRenamedUpdateIcon (Note note, string old_title)
- {
- if (note.Title == "Tintin" || old_title == "Tintin")
- ReloadIcon ();
- }
-
- string GetIconName ()
- {
- if (manager.Find ("Tintin") != null)
- return "tintin";
- return "tomboy";
}
- // GO ABOUT YOUR BUSINESS
}
//
|