~ubuntu-branches/ubuntu/lucid/awn-extras-applets/lucid

« back to all changes in this revision

Viewing changes to applets/maintained/garbage/applet.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne
  • Date: 2010-03-30 20:26:40 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100330202640-vza3bdnv9gc9bg5z
Tags: 0.4.0~rc1-0ubuntu1
* New upstream release (rc1) (LP: #551309)
 - Stack applet close on click (LP: #261520)
* debian/patches/
 - 03-remove-cairo-menu-pref.patch: From upstream (r1244 + r1245 + r1252),
   remove menu entry for cairo-menu preferences, it's not implemented
   (LP: #511254)
 - 04-tomboy-threading-free.patch: From upstream (r1246), remove threading to
   make the applet working. 
* debian/*.install: Update installation location of comics and digital 
  applets.
* debian/control: 
 - Move digital applet from python to C, and add proper Replaces.
 - Add Replaces for awn-applets-c-core to handle migration from 0.3.2.2.
   (LP: #524559)

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include <glib.h>
27
27
#include <glib-object.h>
28
28
#include <config.h>
 
29
#include <stdlib.h>
 
30
#include <string.h>
29
31
#include <libawn/libawn.h>
30
32
#include <libdesktop-agnostic/vfs.h>
31
33
#include <libdesktop-agnostic/config.h>
32
34
#include <gtk/gtk.h>
33
 
#include <stdlib.h>
34
 
#include <string.h>
35
35
#include <gdk/gdk.h>
36
36
#include <glib/gi18n.h>
37
37
#include <float.h>
191
191
                        if (_inner_error_->domain == DESKTOP_AGNOSTIC_CONFIG_ERROR) {
192
192
                                goto __catch0_desktop_agnostic_config_error;
193
193
                        }
194
 
                        goto __finally0;
 
194
                        g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
 
195
                        g_clear_error (&_inner_error_);
 
196
                        return NULL;
195
197
                }
196
198
                desktop_agnostic_config_client_bind (self->priv->config, DESKTOP_AGNOSTIC_CONFIG_GROUP_DEFAULT, "confirm_empty", (GObject*) self, "confirm-empty", FALSE, DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK, &_inner_error_);
197
199
                if (_inner_error_ != NULL) {
198
200
                        if (_inner_error_->domain == DESKTOP_AGNOSTIC_CONFIG_ERROR) {
199
201
                                goto __catch0_desktop_agnostic_config_error;
200
202
                        }
201
 
                        goto __finally0;
 
203
                        g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
 
204
                        g_clear_error (&_inner_error_);
 
205
                        return NULL;
202
206
                }
203
207
                g_signal_connect_object ((GObject*) self, "notify::show-count", (GCallback) _garbage_applet_on_prop_changed_g_object_notify, self, 0);
204
208
                garbage_applet_render_applet_icon (self);
372
376
                if (_inner_error_ != NULL) {
373
377
                        argv = (_vala_array_free (argv, argv_length1, (GDestroyNotify) g_free), NULL);
374
378
                        goto __catch1_g_error;
375
 
                        goto __finally1;
376
379
                }
377
380
                argv = (_vala_array_free (argv, argv_length1, (GDestroyNotify) g_free), NULL);
378
381
        }
505
508
        g_return_val_if_fail (self != NULL, FALSE);
506
509
        g_return_val_if_fail (context != NULL, FALSE);
507
510
        if (!self->priv->highlighted) {
508
 
                AwnIcon* _tmp0_;
509
 
                awn_effects_start (awn_overlayable_get_effects ((_tmp0_ = awn_applet_simple_get_icon ((AwnAppletSimple*) self), AWN_IS_OVERLAYABLE (_tmp0_) ? ((AwnOverlayable*) _tmp0_) : NULL)), AWN_EFFECT_HOVER);
 
511
                awn_effects_start (awn_overlayable_get_effects ((AwnOverlayable*) awn_applet_simple_get_icon ((AwnAppletSimple*) self)), AWN_EFFECT_LAUNCHING);
510
512
                self->priv->highlighted = TRUE;
511
513
        }
512
514
        result = TRUE;
518
520
        g_return_if_fail (self != NULL);
519
521
        g_return_if_fail (context != NULL);
520
522
        if (self->priv->highlighted) {
521
 
                AwnIcon* _tmp0_;
522
 
                awn_effects_stop (awn_overlayable_get_effects ((_tmp0_ = awn_applet_simple_get_icon ((AwnAppletSimple*) self), AWN_IS_OVERLAYABLE (_tmp0_) ? ((AwnOverlayable*) _tmp0_) : NULL)), AWN_EFFECT_HOVER);
 
523
                awn_effects_stop (awn_overlayable_get_effects ((AwnOverlayable*) awn_applet_simple_get_icon ((AwnAppletSimple*) self)), AWN_EFFECT_LAUNCHING);
523
524
                self->priv->highlighted = FALSE;
524
525
        }
525
526
}
570
571
                _tmp3_ = desktop_agnostic_vfs_files_from_uri_list ((const char*) data->data, &_inner_error_);
571
572
                if (_inner_error_ != NULL) {
572
573
                        goto __catch2_g_error;
573
 
                        goto __finally2;
574
574
                }
575
575
                file_uris = (_tmp4_ = _tmp3_, __g_slist_free_g_object_unref0 (file_uris), _tmp4_);
576
576
                total = (double) g_slist_length (file_uris);
586
586
                                                desktop_agnostic_vfs_trash_send_to_trash (self->trash, file, &_inner_error_);
587
587
                                                if (_inner_error_ != NULL) {
588
588
                                                        goto __catch2_g_error;
589
 
                                                        goto __finally2;
590
589
                                                }
591
590
                                        }
592
591
                                        g_object_set (self->priv->progress_overlay, "percent-complete", (pos = pos + 1) / total, NULL);