154
154
void document_load (Document* self, GFile* location);
155
155
DocumentTab* document_tab_new_with_view (DocumentView* view);
156
156
DocumentTab* document_tab_construct_with_view (GType object_type, DocumentView* view);
157
static void _lambda26_ (DocumentTab* self);
157
static void _lambda95_ (DocumentTab* self);
158
158
static void document_tab_update_label_text (DocumentTab* self);
159
159
static void document_tab_update_label_tooltip (DocumentTab* self);
160
static void __lambda26__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
160
static void __lambda95__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
161
161
static void _document_tab_update_label_tooltip_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
162
162
static void _document_tab_update_label_text_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
163
static void _lambda27_ (GtkTextBuffer* s, DocumentTab* self);
163
static void _lambda96_ (GtkTextBuffer* s, DocumentTab* self);
164
164
gboolean document_get_modified (Document* self);
165
static void __lambda27__gtk_text_buffer_modified_changed (GtkTextBuffer* _sender, gpointer self);
165
static void __lambda96__gtk_text_buffer_modified_changed (GtkTextBuffer* _sender, gpointer self);
166
166
DocumentView* document_tab_get_view (DocumentTab* self);
167
167
static gboolean document_tab_view_focused_in (DocumentTab* self);
168
168
static gboolean _document_tab_view_focused_in_gtk_widget_focus_in_event (GtkWidget* _sender, GdkEventFocus* event, gpointer self);
169
static void _lambda29_ (DocumentTab* self);
170
static void __lambda29__gtk_button_clicked (GtkButton* _sender, gpointer self);
169
static void _lambda98_ (DocumentTab* self);
170
static void __lambda98__gtk_button_clicked (GtkButton* _sender, gpointer self);
171
171
void document_tab_set_auto_save (DocumentTab* self, gboolean value);
172
172
void document_tab_set_auto_save_interval (DocumentTab* self, guint value);
173
173
static gboolean document_tab_install_auto_save_timeout_if_needed (DocumentTab* self);
174
static void _lambda30_ (DocumentTab* self);
175
static void __lambda30__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
174
static void _lambda99_ (DocumentTab* self);
175
static void __lambda99__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
176
176
GType tab_info_bar_get_type (void) G_GNUC_CONST;
177
177
TabInfoBar* document_tab_add_message (DocumentTab* self, const gchar* primary_msg, const gchar* secondary_msg, GtkMessageType msg_type);
178
178
TabInfoBar* tab_info_bar_new (const gchar* primary_msg, const gchar* secondary_msg, GtkMessageType msg_type);
195
195
gchar* document_tab_get_menu_tip (DocumentTab* self);
196
196
gboolean document_is_local (Document* self);
197
197
gboolean document_is_externally_modified (Document* self);
198
static Block21Data* block21_data_ref (Block21Data* _data21_);
199
static void block21_data_unref (Block21Data* _data21_);
198
static Block1Data* block1_data_ref (Block1Data* _data1_);
199
static void block1_data_unref (Block1Data* _data1_);
200
200
void tab_info_bar_add_stock_button_with_text (TabInfoBar* self, const gchar* text, const gchar* stock_id, gint response_id);
201
static void _lambda28_ (gint response_id, Block21Data* _data21_);
202
static void __lambda28__gtk_info_bar_response (GtkInfoBar* _sender, gint response_id, gpointer self);
201
static void _lambda97_ (gint response_id, Block1Data* _data1_);
202
static void __lambda97__gtk_info_bar_response (GtkInfoBar* _sender, gint response_id, gpointer self);
203
203
static void document_tab_install_auto_save_timeout (DocumentTab* self);
204
204
gboolean document_tab_get_auto_save (DocumentTab* self);
205
205
guint document_tab_get_auto_save_interval (DocumentTab* self);
279
static void _lambda26_ (DocumentTab* self) {
279
static void _lambda95_ (DocumentTab* self) {
280
280
document_tab_update_label_text (self);
281
281
document_tab_update_label_tooltip (self);
285
static void __lambda26__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
285
static void __lambda95__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
326
static void _lambda29_ (DocumentTab* self) {
326
static void _lambda98_ (DocumentTab* self) {
327
327
g_signal_emit_by_name (self, "close-document");
331
static void __lambda29__gtk_button_clicked (GtkButton* _sender, gpointer self) {
331
static void __lambda98__gtk_button_clicked (GtkButton* _sender, gpointer self) {
336
static void _lambda30_ (DocumentTab* self) {
336
static void _lambda99_ (DocumentTab* self) {
337
337
if (self->priv->auto_save_timeout <= 0) {
338
338
document_tab_install_auto_save_timeout_if_needed (self);
343
static void __lambda30__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
343
static void __lambda99__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
365
365
_tmp0_ = _g_object_ref0 (self);
366
366
_g_object_unref0 (self->priv->_document->tab);
367
367
self->priv->_document->tab = _tmp0_;
368
g_signal_connect_object ((GObject*) self->priv->_document, "notify::location", (GCallback) __lambda26__g_object_notify, self, 0);
368
g_signal_connect_object ((GObject*) self->priv->_document, "notify::location", (GCallback) __lambda95__g_object_notify, self, 0);
369
369
g_signal_connect_object ((GObject*) self->priv->_document, "notify::project-id", (GCallback) _document_tab_update_label_tooltip_g_object_notify, self, 0);
370
370
g_signal_connect_object ((GObject*) self->priv->_document, "notify::unsaved-document-n", (GCallback) _document_tab_update_label_text_g_object_notify, self, 0);
371
g_signal_connect_object ((GtkTextBuffer*) self->priv->_document, "modified-changed", (GCallback) __lambda27__gtk_text_buffer_modified_changed, self, 0);
371
g_signal_connect_object ((GtkTextBuffer*) self->priv->_document, "modified-changed", (GCallback) __lambda96__gtk_text_buffer_modified_changed, self, 0);
372
372
g_signal_connect_object ((GtkWidget*) self->priv->_view, "focus-in-event", (GCallback) _document_tab_view_focused_in_gtk_widget_focus_in_event, self, 0);
373
373
_tmp1_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
374
374
sw = g_object_ref_sink (_tmp1_);
392
392
_tmp5_ = g_object_ref_sink (_tmp4_);
393
393
gtk_container_add ((GtkContainer*) close_button, (GtkWidget*) _tmp5_);
394
394
_g_object_unref0 (_tmp5_);
395
g_signal_connect_object (close_button, "clicked", (GCallback) __lambda29__gtk_button_clicked, self, 0);
395
g_signal_connect_object (close_button, "clicked", (GCallback) __lambda98__gtk_button_clicked, self, 0);
396
396
_tmp6_ = (GtkHBox*) gtk_hbox_new (FALSE, 0);
397
397
_g_object_unref0 (self->priv->_label);
398
398
self->priv->_label = g_object_ref_sink (_tmp6_);
408
408
g_settings_get (settings, "auto-save-interval", "u", &tmp);
409
409
document_tab_set_auto_save_interval (self, tmp);
410
410
document_tab_install_auto_save_timeout_if_needed (self);
411
g_signal_connect_object ((GObject*) self->priv->_document, "notify::location", (GCallback) __lambda30__g_object_notify, self, 0);
411
g_signal_connect_object ((GObject*) self->priv->_document, "notify::location", (GCallback) __lambda99__g_object_notify, self, 0);
412
412
_g_object_unref0 (settings);
413
413
_g_object_unref0 (close_button);
414
414
_g_object_unref0 (sw);
602
static Block21Data* block21_data_ref (Block21Data* _data21_) {
603
g_atomic_int_inc (&_data21_->_ref_count_);
602
static Block1Data* block1_data_ref (Block1Data* _data1_) {
603
g_atomic_int_inc (&_data1_->_ref_count_);
608
static void block21_data_unref (Block21Data* _data21_) {
609
if (g_atomic_int_dec_and_test (&_data21_->_ref_count_)) {
610
_g_object_unref0 (_data21_->self);
611
_g_object_unref0 (_data21_->infobar);
612
g_slice_free (Block21Data, _data21_);
608
static void block1_data_unref (Block1Data* _data1_) {
609
if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
610
_g_object_unref0 (_data1_->self);
611
_g_object_unref0 (_data1_->infobar);
612
g_slice_free (Block1Data, _data1_);
617
static void _lambda28_ (gint response_id, Block21Data* _data21_) {
617
static void _lambda97_ (gint response_id, Block1Data* _data1_) {
618
618
DocumentTab * self;
619
self = _data21_->self;
619
self = _data1_->self;
620
620
if (response_id == GTK_RESPONSE_OK) {
621
621
GFile* _tmp0_ = NULL;
622
622
_tmp0_ = document_get_location (self->priv->_document);
623
623
document_load (self->priv->_document, _tmp0_);
624
624
self->priv->ask_if_externally_modified = FALSE;
626
gtk_object_destroy ((GtkObject*) _data21_->infobar);
626
gtk_object_destroy ((GtkObject*) _data1_->infobar);
627
627
gtk_widget_grab_focus ((GtkWidget*) self->priv->_view);
631
static void __lambda28__gtk_info_bar_response (GtkInfoBar* _sender, gint response_id, gpointer self) {
632
_lambda28_ (response_id, self);
631
static void __lambda97__gtk_info_bar_response (GtkInfoBar* _sender, gint response_id, gpointer self) {
632
_lambda97_ (response_id, self);
662
662
TabInfoBar* _tmp13_ = NULL;
663
663
const gchar* _tmp14_ = NULL;
664
_data21_ = g_slice_new0 (Block21Data);
665
_data21_->_ref_count_ = 1;
666
_data21_->self = g_object_ref (self);
664
_data1_ = g_slice_new0 (Block1Data);
665
_data1_->_ref_count_ = 1;
666
_data1_->self = g_object_ref (self);
667
667
self->priv->ask_if_externally_modified = TRUE;
668
668
_tmp2_ = _ ("The file %s changed on disk.");
669
669
_tmp3_ = document_get_location (self->priv->_document);
690
690
secondary_msg = _tmp12_;
692
692
_tmp13_ = document_tab_add_message (self, primary_msg, secondary_msg, GTK_MESSAGE_WARNING);
693
_data21_->infobar = _tmp13_;
693
_data1_->infobar = _tmp13_;
694
694
_tmp14_ = _ ("Reload");
695
tab_info_bar_add_stock_button_with_text (_data21_->infobar, _tmp14_, GTK_STOCK_REFRESH, (gint) GTK_RESPONSE_OK);
696
gtk_info_bar_add_button ((GtkInfoBar*) _data21_->infobar, GTK_STOCK_CANCEL, (gint) GTK_RESPONSE_CANCEL);
697
g_signal_connect_data ((GtkInfoBar*) _data21_->infobar, "response", (GCallback) __lambda28__gtk_info_bar_response, block21_data_ref (_data21_), (GClosureNotify) block21_data_unref, 0);
695
tab_info_bar_add_stock_button_with_text (_data1_->infobar, _tmp14_, GTK_STOCK_REFRESH, (gint) GTK_RESPONSE_OK);
696
gtk_info_bar_add_button ((GtkInfoBar*) _data1_->infobar, GTK_STOCK_CANCEL, (gint) GTK_RESPONSE_CANCEL);
697
g_signal_connect_data ((GtkInfoBar*) _data1_->infobar, "response", (GCallback) __lambda97__gtk_info_bar_response, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
698
698
_g_free0 (secondary_msg);
699
699
_g_free0 (primary_msg);
700
block21_data_unref (_data21_);
700
block1_data_unref (_data1_);