~ubuntu-branches/ubuntu/oneiric/gnome-panel/oneiric

« back to all changes in this revision

Viewing changes to applets/notification_area/fixedtip.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher, Sebastien Bacher, Jeremy Bicha
  • Date: 2011-05-30 11:04:49 UTC
  • mfrom: (1.13.10 upstream) (2.2.5 experimental)
  • Revision ID: james.westby@ubuntu.com-20110530110449-hinl17kxkcefjw6x
Tags: 1:3.0.2-0ubuntu1
[ Sebastien Bacher ]
* New upstream version
* debian/control.in:
  - the new libgweather version is in oneiric, use it
  - drop the python and python-gconf depends, 
    they were added for gnome-panel-add which is still using gconf and buggy
* debian/gnome-panel-data.install:
  - don't install the apport hook, it's only getting gconf datas which 
    doesn't work since gnome-panel uses gsettings
* debian/patches/90_build_fixes.patch:
  - restore build fix from git not applied in the new serie
* debian/patches/01_panel_submenus.patch:
  - don't take that Debian diff, the .menus use the upstream naming in Ubuntu
* debian/patches/06_no_resize_grip.patch:
  - dropped, the issue is fixed in the new version
* debian/patches/50_fix-potfiles.patch:
  - dropped, the issue is fixed in the new version
* debian/watch:
  - track unstable series as well

Drop those delta, since gnome-panel is not the default Ubuntu session now we
can go back to an experience closer to the upstream one: 
* debian/control.in:
  - drop the indicators recommends, unity-2d is the ubuntu fallback session
    so we can get back to use an upstream config for gnome-panel and reduce
    the delta we carry
* debian/patches/04_default_panel_config.patch:
  - don't modify the upstream layout
* debian/patches/05_no_session_delay.patch:
  - no need to tweak the upstream session to optimize it
* debian/patches/16_compiz_workspace_switcher.patch:
  - go back to the upstream switcher behaviour    
* debian/patches/25_dynamic_fusa_detection.patch:
  - not needed since we use the upstream layout, could be ported if someone
    is wanting to do the work though
* debian/patches/30_disable-initial-animation.patch, debian/rules:
  - drop the --disable-initial-animation, that was some login optimization
    but since it's not the default desktop you should go back to the 
    upstream behaviour

[ Jeremy Bicha ]   
* New upstream version
* Merge from Debian experimental, remaining Ubuntu changes:
* debian/control:
  - Recommends gnome-settings-daemon which has the timezone polkit service
* debian/rules:
  - Update translations template.
* debian/gnome-panel-data.install:
  - Install apport hook
  - Install the "About Ubuntu" menu item.
* debian/patches/01_layout.patch:
  - Disabled, Help & About Ubuntu don't fit as well in Gnome Panel 3
* debian/patches/01_panel_submenus.patch.
  - Dropped
* debian/patches/03_dnd_places_link.patch:
  - Disabled, when using Drag'n'Drop from Places menu, install a link launcher
    (.desktop file) instead of copying the entire directory.
* debian/patches/17_about-ubuntu-translation.patch:
  - List ubuntu-about.desktop for translation.
* debian/patches/40_unset_menuproxy.patch:
  - Make sure gnome-panel and the applets don't pick up menu proxies.
* debian/patches/50_fix-potfiles.patch
  - Fix i18n
* debian/patches/85_disable_shutdown_on_ltsp.patch:
  - Suppress the shutdown option in the panel if LTSP_CLIENT is set.
* debian/patches/71_change_bookmark_submenu_limit_value.patch
  - Dropped, picked up by Debian
* debian/patches/18_lockdown_lock_editor.patch:
* debian/patches/90_git_wnck_show_realize.patch:
* debian/patches/90_fix_linking_DSO_link.patch:
* debian/patches/91_gir_annotations.patch
* debian/patches/92_git_calendar_day.patch
* debian/patches/92_git_fix_applets_in_multiscreen.patch:
  - Dropped, applied upstream
* debian/watch:
  - watch unstable versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
}
53
53
 
54
54
static gboolean
55
 
expose_handler (GtkWidget *fixedtip)
 
55
na_fixed_tip_draw (GtkWidget *widget, cairo_t *cr)
56
56
{
57
 
  GtkRequisition req;
58
 
 
59
 
  gtk_widget_size_request (fixedtip, &req);
60
 
 
61
 
  gtk_paint_flat_box (gtk_widget_get_style (fixedtip),
62
 
                      gtk_widget_get_window (fixedtip),
63
 
                      GTK_STATE_NORMAL, GTK_SHADOW_OUT, 
64
 
                      NULL, fixedtip, "tooltip",
65
 
                      0, 0, req.width, req.height);
 
57
  GtkStyleContext *context;
 
58
  GtkStateFlags state;
 
59
  int width, height;
 
60
 
 
61
  width = gtk_widget_get_allocated_width (widget);
 
62
  height = gtk_widget_get_allocated_height (widget);
 
63
 
 
64
  state = gtk_widget_get_state_flags (widget);
 
65
  context = gtk_widget_get_style_context (widget);
 
66
  gtk_style_context_save (context);
 
67
  gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOOLTIP);
 
68
  gtk_style_context_set_state (context, state);
 
69
 
 
70
  cairo_save (cr);
 
71
  gtk_render_background (context, cr,
 
72
                         0., 0.,
 
73
                         (gdouble)width,
 
74
                         (gdouble)height);
 
75
  cairo_restore (cr);
 
76
 
 
77
  gtk_style_context_restore (context);
66
78
 
67
79
  return FALSE;
68
80
}
70
82
static void
71
83
na_fixed_tip_class_init (NaFixedTipClass *class)
72
84
{
 
85
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
 
86
 
 
87
  widget_class->draw = na_fixed_tip_draw;
 
88
 
73
89
  fixedtip_signals[CLICKED] =
74
90
    g_signal_new ("clicked",
75
91
                  G_OBJECT_CLASS_TYPE (class),
106
122
  gtk_container_add (GTK_CONTAINER (fixedtip), label);
107
123
  fixedtip->priv->label = label;
108
124
 
109
 
  g_signal_connect (fixedtip, "expose_event",
110
 
                    G_CALLBACK (expose_handler), NULL);
111
 
 
112
125
  gtk_widget_add_events (GTK_WIDGET (fixedtip), GDK_BUTTON_PRESS_MASK);
113
 
  
 
126
 
114
127
  g_signal_connect (fixedtip, "button_press_event",
115
128
                    G_CALLBACK (button_press_handler), NULL);
116
129
 
135
148
 
136
149
  gtk_window_set_screen (GTK_WINDOW (fixedtip), screen);
137
150
 
138
 
  gtk_widget_size_request (GTK_WIDGET (fixedtip), &req);
 
151
  gtk_widget_get_preferred_size (GTK_WIDGET (fixedtip), &req, NULL);
139
152
 
140
153
  gdk_window_get_origin (parent_window, &root_x, &root_y);
141
 
  gdk_drawable_get_size (GDK_DRAWABLE (parent_window),
142
 
                         &parent_width, &parent_height);
 
154
  parent_width = gdk_window_get_width (parent_window);
 
155
  parent_height = gdk_window_get_height (parent_window);
143
156
 
144
157
  screen_width = gdk_screen_get_width (screen);
145
158
  screen_height = gdk_screen_get_height (screen);