void on_close1_activate(GtkWidget *widget) { document_manager_try_close_current_document(main_window.docmg); if(document_manager_get_document_count(main_window.docmg)!=0) { classbrowser_update(GPHPEDIT_CLASSBROWSER(main_window.classbrowser)); update_app_title(document_manager_get_current_document(main_window.docmg)); update_zoom_level(); classbrowser_force_label_update(GPHPEDIT_CLASSBROWSER(main_window.classbrowser)); } }
/** * Update the application title when switching tabs, closing or opening * or opening new tabs or opening new files. */ void update_app_title(MainWindow *main_window, Documentable *document) { gphpedit_debug(DEBUG_MAIN_WINDOW); gchar *title = NULL; if (document) g_object_get(document, "title", &title, NULL); update_status_combobox(main_window, document); update_zoom_level(main_window, document); update_controls(main_window, document); //If there is no file opened set the name as gPHPEdit if (!title) title = g_strdup(_("gPHPEdit")); gtk_window_set_title(GTK_WINDOW(main_window->window), title); g_free(title); }
void zoom_100(GtkWidget *widget) { document_zoom_restore(document_manager_get_current_document(main_window.docmg)); update_zoom_level(); }
static void document_manager_zoom_change_cb (DocumentManager *docmg, Documentable *doc, gpointer user_data) { MainWindow *main_window = (MainWindow *) user_data; update_zoom_level(main_window, doc); }