~ubuntu-branches/ubuntu/saucy/baobab/saucy

« back to all changes in this revision

Viewing changes to src/baobab-location.c

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-11-16 10:50:11 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20121116105011-ra4yyhh6le6djig2
Tags: 3.6.3-0ubuntu1
* New upstream release
* debian/patches/baobab_about_segfault.patch: 
  - Applied upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* baobab-location.c generated by valac 0.17.4.2-5a035, the Vala compiler
 
1
/* baobab-location.c generated by valac 0.18.0.29-efcd0, the Vala compiler
2
2
 * generated from baobab-location.vala, do not modify */
3
3
 
4
4
/* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
201
201
static void baobab_location_fill_from_mount (BaobabLocation* self);
202
202
BaobabLocation* baobab_location_new_for_main_volume (void);
203
203
BaobabLocation* baobab_location_construct_for_main_volume (GType object_type);
 
204
const gchar* baobab_location_get_name (BaobabLocation* self);
204
205
BaobabLocation* baobab_location_new_for_recent_info (GtkRecentInfo* recent_info);
205
206
BaobabLocation* baobab_location_construct_for_recent_info (GType object_type, GtkRecentInfo* recent_info);
206
207
BaobabLocation* baobab_location_new_for_file (GFile* file_);
221
222
static void baobab_location_mount_volume_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
222
223
BaobabLocation* baobab_location_new (void);
223
224
BaobabLocation* baobab_location_construct (GType object_type);
224
 
const gchar* baobab_location_get_name (BaobabLocation* self);
225
225
gboolean baobab_location_get_is_volume (BaobabLocation* self);
226
226
static guint64* _uint64_dup (guint64* self);
227
227
guint64* baobab_location_get_reserved (BaobabLocation* self);
667
667
 
668
668
BaobabLocation* baobab_location_construct_for_main_volume (GType object_type) {
669
669
        BaobabLocation* self = NULL;
670
 
        GFile* _tmp4_ = NULL;
671
 
        GFile* _tmp5_;
672
 
        GThemedIcon* _tmp6_;
 
670
        const gchar* _tmp3_;
 
671
        GFile* _tmp5_ = NULL;
 
672
        GFile* _tmp6_;
673
673
        GThemedIcon* _tmp7_;
674
 
        GFile* _tmp8_;
675
 
        BaobabScanner* _tmp9_;
 
674
        GThemedIcon* _tmp8_;
 
675
        GFile* _tmp9_;
676
676
        BaobabScanner* _tmp10_;
 
677
        BaobabScanner* _tmp11_;
677
678
        GError * _inner_error_ = NULL;
678
679
        self = (BaobabLocation*) g_type_create_instance (object_type);
679
680
        {
683
684
                _tmp0_ = baobab_location_get_hostname (self, &_inner_error_);
684
685
                _tmp1_ = _tmp0_;
685
686
                if (_inner_error_ != NULL) {
686
 
                        goto __catch4_g_error;
 
687
                        goto __catch5_g_error;
687
688
                }
688
689
                _tmp2_ = _tmp1_;
689
690
                baobab_location_set_name (self, _tmp2_);
690
691
                _g_free0 (_tmp2_);
691
692
        }
692
 
        goto __finally4;
693
 
        __catch4_g_error:
 
693
        goto __finally5;
 
694
        __catch5_g_error:
694
695
        {
695
696
                GError* e = NULL;
696
 
                const gchar* _tmp3_ = NULL;
697
697
                e = _inner_error_;
698
698
                _inner_error_ = NULL;
699
 
                _tmp3_ = _ ("Main volume");
700
 
                baobab_location_set_name (self, _tmp3_);
 
699
                baobab_location_set_name (self, NULL);
701
700
                _g_error_free0 (e);
702
701
        }
703
 
        __finally4:
 
702
        __finally5:
704
703
        if (_inner_error_ != NULL) {
705
704
                g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
706
705
                g_clear_error (&_inner_error_);
707
706
                return NULL;
708
707
        }
709
 
        _tmp4_ = g_file_new_for_path ("/");
710
 
        _tmp5_ = _tmp4_;
711
 
        baobab_location_set_file (self, _tmp5_);
712
 
        _g_object_unref0 (_tmp5_);
 
708
        _tmp3_ = self->priv->_name;
 
709
        if (_tmp3_ == NULL) {
 
710
                const gchar* _tmp4_ = NULL;
 
711
                _tmp4_ = _ ("Main volume");
 
712
                baobab_location_set_name (self, _tmp4_);
 
713
        }
 
714
        _tmp5_ = g_file_new_for_path ("/");
 
715
        _tmp6_ = _tmp5_;
 
716
        baobab_location_set_file (self, _tmp6_);
 
717
        _g_object_unref0 (_tmp6_);
713
718
        baobab_location_get_file_info (self);
714
 
        _tmp6_ = (GThemedIcon*) g_themed_icon_new ("drive-harddisk-system");
715
 
        _tmp7_ = _tmp6_;
716
 
        baobab_location_set_icon (self, (GIcon*) _tmp7_);
717
 
        _g_object_unref0 (_tmp7_);
 
719
        _tmp7_ = (GThemedIcon*) g_themed_icon_new ("drive-harddisk-system");
 
720
        _tmp8_ = _tmp7_;
 
721
        baobab_location_set_icon (self, (GIcon*) _tmp8_);
 
722
        _g_object_unref0 (_tmp8_);
718
723
        baobab_location_get_fs_usage (self);
719
 
        _tmp8_ = self->priv->_file;
720
 
        _tmp9_ = baobab_scanner_new (_tmp8_, BAOBAB_SCAN_FLAGS_EXCLUDE_MOUNTS);
721
 
        _tmp10_ = _tmp9_;
722
 
        baobab_location_set_scanner (self, _tmp10_);
723
 
        _g_object_unref0 (_tmp10_);
 
724
        _tmp9_ = self->priv->_file;
 
725
        _tmp10_ = baobab_scanner_new (_tmp9_, BAOBAB_SCAN_FLAGS_EXCLUDE_MOUNTS);
 
726
        _tmp11_ = _tmp10_;
 
727
        baobab_location_set_scanner (self, _tmp11_);
 
728
        _g_object_unref0 (_tmp11_);
724
729
        return self;
725
730
}
726
731
 
951
956
                _tmp1_ = g_file_query_info (_tmp0_, BAOBAB_LOCATION_FILE_ATTRIBUTES, G_FILE_QUERY_INFO_NONE, NULL, &_inner_error_);
952
957
                _tmp2_ = _tmp1_;
953
958
                if (_inner_error_ != NULL) {
954
 
                        goto __catch5_g_error;
 
959
                        goto __catch6_g_error;
955
960
                }
956
961
                _tmp3_ = _tmp2_;
957
962
                baobab_location_set_info (self, _tmp3_);
958
963
                _g_object_unref0 (_tmp3_);
959
964
        }
960
 
        goto __finally5;
961
 
        __catch5_g_error:
 
965
        goto __finally6;
 
966
        __catch6_g_error:
962
967
        {
963
968
                GError* e = NULL;
964
969
                e = _inner_error_;
966
971
                baobab_location_set_info (self, NULL);
967
972
                _g_error_free0 (e);
968
973
        }
969
 
        __finally5:
 
974
        __finally6:
970
975
        if (_inner_error_ != NULL) {
971
976
                g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
972
977
                g_clear_error (&_inner_error_);
996
1001
                _tmp1_ = g_file_query_filesystem_info (_tmp0_, BAOBAB_LOCATION_FS_ATTRIBUTES, NULL, &_inner_error_);
997
1002
                info = _tmp1_;
998
1003
                if (_inner_error_ != NULL) {
999
 
                        goto __catch6_g_error;
 
1004
                        goto __catch7_g_error;
1000
1005
                }
1001
1006
                _tmp2_ = g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_FILESYSTEM_SIZE);
1002
1007
                if (_tmp2_) {
1044
1049
                }
1045
1050
                _g_object_unref0 (info);
1046
1051
        }
1047
 
        goto __finally6;
1048
 
        __catch6_g_error:
 
1052
        goto __finally7;
 
1053
        __catch7_g_error:
1049
1054
        {
1050
1055
                GError* e = NULL;
1051
1056
                e = _inner_error_;
1052
1057
                _inner_error_ = NULL;
1053
1058
                _g_error_free0 (e);
1054
1059
        }
1055
 
        __finally6:
 
1060
        __finally7:
1056
1061
        if (_inner_error_ != NULL) {
1057
1062
                g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
1058
1063
                g_clear_error (&_inner_error_);