~matttbe/ubuntu/quantal/lxpanel/lp1013171

« back to all changes in this revision

Viewing changes to src/plugins/launchbar.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne
  • Date: 2011-07-24 15:41:01 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20110724154101-pdss358hu486lp7h
Tags: 0.5.7-0ubuntu1
* New upstream release.
* debian/patches:
 - 80_translations.patch: Remove, merged upstream.
 - batt_status.patch: Remove, merged upstream.
 - configure_X11.patch: Remove, merged upstream.
 - missing_glades.patch: Remove, not needed now.
 - redefine-alarm-variable.patch: Remove, merged upstream.
 - indicator-support.patch: Fix Makefile.am.
 - fix_requisition.patch: New patch, fix crash when clicking on the panel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
161
161
    guint time,
162
162
    LaunchButton * b)
163
163
{
164
 
    if (sd->length > 0)
 
164
#if GTK_CHECK_VERSION(2,14,0)
 
165
    if (gtk_selection_data_get_length(sd) > 0)
 
166
#else
 
167
    if (sd->lengh > 0)
 
168
#endif
165
169
    {
166
170
        if (info == TARGET_URILIST)
167
171
        {
 
172
#if GTK_CHECK_VERSION(2,14,0)
 
173
            gchar * s = (gchar *) gtk_selection_data_get_data(sd);
 
174
#else
168
175
            gchar * s = (gchar *) sd->data;
169
 
            gchar * end = s + sd->length;
 
176
#endif
 
177
#if GTK_CHECK_VERSION(2,14,0)
 
178
            gchar * end = s + gtk_selection_data_get_length(sd);
 
179
#else
 
180
            gchar * end = s + sd->lenght;
 
181
#endif
170
182
            gchar * str = g_strdup(b->action);
171
183
            while (s < end)
172
184
            {
211
223
        /* Create an event box. */
212
224
        GtkWidget * event_box = gtk_event_box_new();
213
225
        gtk_container_set_border_width(GTK_CONTAINER(event_box), 0);
 
226
#if GLIB_CHECK_VERSION(2,18,0)
 
227
        gtk_widget_set_can_focus            (event_box, FALSE);
 
228
#else
214
229
        GTK_WIDGET_UNSET_FLAGS(event_box, GTK_CAN_FOCUS);
 
230
#endif
215
231
        lb->bootstrap_button->widget = event_box;
216
232
        g_signal_connect(event_box, "button-press-event", G_CALLBACK(launchbutton_press_event), lb->bootstrap_button);
217
233
 
287
303
    /* Create a button with the specified icon. */
288
304
    GtkWidget * button = fb_button_new_from_file(btn->image, p->panel->icon_size, p->panel->icon_size, PANEL_ICON_HIGHLIGHT, TRUE);
289
305
    btn->widget = button;
290
 
    GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_FOCUS);
 
306
#if GLIB_CHECK_VERSION(2,18,0)
 
307
     gtk_widget_set_can_focus(button, FALSE);
 
308
#else
 
309
     GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_FOCUS);
 
310
#endif
 
311
    
291
312
    if (btn->tooltip != NULL)
292
313
        gtk_widget_set_tooltip_text(button, btn->tooltip);
293
314
 
396
417
 
397
418
    /* Allocate top level widget and set into Plugin widget pointer. */
398
419
    p->pwid = gtk_event_box_new();
 
420
#if GLIB_CHECK_VERSION(2,18,0)
 
421
    gtk_widget_set_has_window(p->pwid, FALSE);
 
422
#else
399
423
    GTK_WIDGET_SET_FLAGS(p->pwid, GTK_NO_WINDOW);
 
424
#endif
400
425
    gtk_widget_set_name(p->pwid, "launchbar");
401
426
 
402
427
    /* Allocate an icon grid manager to manage the container. */