[gtranslator/gtk4: 32/79] initial compilable version with runtime errors and warnings




commit 6d883ffecc22c2ece784c06708cab650370dfb5f
Author: afshan ahmed khan <afshanahmeda2k gmail com>
Date:   Sat Jun 4 18:23:57 2022 +0530

    initial compilable version with runtime errors and warnings

 meson.build                                        |  5 +-
 .../gtr-alternate-language-panel.c                 |  6 +-
 src/codeview/gtr-viewer.c                          | 11 ++--
 src/gtr-actions-edit.c                             |  8 +--
 src/gtr-actions-file.c                             | 57 +++++++++++++-----
 src/gtr-application.c                              | 46 +++++++-------
 src/gtr-close-button.c                             |  3 +-
 src/gtr-close-confirmation-dialog.c                | 18 +++---
 src/gtr-context.c                                  |  8 +--
 src/gtr-dl-teams.c                                 | 16 ++---
 src/gtr-dl-teams.h                                 |  2 +-
 src/gtr-dl-teams.ui                                |  2 +-
 src/gtr-file-dialogs.c                             |  6 +-
 src/gtr-filter-selection.c                         | 36 +++++++----
 src/gtr-io-error-info-bar.c                        |  9 +--
 src/gtr-languages-fetcher.c                        | 70 ++++++++++++++++------
 src/gtr-preferences-dialog.c                       |  8 +--
 src/gtr-profile-dialog.c                           | 63 ++++++++++++-------
 src/gtr-search-bar.c                               | 20 +++----
 src/gtr-tab.c                                      | 28 ++++-----
 src/gtr-utils.c                                    | 26 ++------
 src/gtr-window.c                                   | 42 ++++++-------
 src/gtr-window.h                                   |  1 +
 src/meson.build                                    |  2 +-
 src/translation-memory/gtr-translation-memory-ui.c | 22 +++----
 25 files changed, 309 insertions(+), 206 deletions(-)
---
diff --git a/meson.build b/meson.build
index 9124f5f7..aa71ed5e 100644
--- a/meson.build
+++ b/meson.build
@@ -105,12 +105,13 @@ src_dir = join_paths(meson.source_root(), 'src')
 
 glib_dep = dependency('glib-2.0', version: '>= 2.71.3')
 gtk_dep = dependency('gtk4', version: '>= 4.6.0')
-libhandy_dep = dependency('libhandy-1', version: '>= 1.5.0')
+# libhandy_dep = dependency('libhandy-1', version: '>= 1.5.0')
+libadwaita_dep = dependency('libadwaita-1', version: '>= 1.1.0')
 
 gtr_deps = [
   glib_dep,
   gtk_dep,
-  libhandy_dep,
+  libadwaita_dep,
   dependency('libgda-6.0'),
   dependency('atk'),
   dependency('gio-2.0', version: '>= 2.36.0'),
diff --git a/plugins/alternate-language/gtr-alternate-language-panel.c 
b/plugins/alternate-language/gtr-alternate-language-panel.c
index 17460144..7fc5ce17 100644
--- a/plugins/alternate-language/gtr-alternate-language-panel.c
+++ b/plugins/alternate-language/gtr-alternate-language-panel.c
@@ -141,8 +141,10 @@ open_file (GtkWidget *dialog, GtrAlternateLangPanel *panel)
   GList *l;
   GError *error = NULL;
 
-  po_file = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
-  file = g_file_new_for_path (po_file);
+  //po_file = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+  file = gtk_file_chooser_get_file (chooser);
+  //filename = g_file_get_path(file);
+  //file = g_file_new_for_path (po_file);
   g_free (po_file);
 
   if (panel->priv->po != NULL)
diff --git a/src/codeview/gtr-viewer.c b/src/codeview/gtr-viewer.c
index 5980fa0d..92e373fe 100644
--- a/src/codeview/gtr-viewer.c
+++ b/src/codeview/gtr-viewer.c
@@ -53,7 +53,7 @@ dialog_response_handler (GtkDialog *dlg, gint res_id)
   switch (res_id)
     {
     default:
-      gtk_window_destroy (GTK_WIDGET (dlg));
+      gtk_window_destroy (GTK_WINDOW (dlg));
     }
 }
 
@@ -63,7 +63,7 @@ gtr_viewer_init (GtrViewer *dlg)
   GtkBox *content_area;
   GtkWidget *sw;
   GtkBuilder *builder;
-  gchar *root_objects[] = {
+  const gchar *root_objects[] = {
     "main_box",
     NULL
   };
@@ -105,7 +105,8 @@ gtr_viewer_init (GtrViewer *dlg)
   priv->view = gtk_source_view_new ();
   gtk_text_view_set_editable (GTK_TEXT_VIEW (priv->view), FALSE);
   gtk_widget_show (priv->view);
-  gtk_container_add (GTK_CONTAINER (sw), priv->view);
+  //gtk_container_add (GTK_CONTAINER (sw), priv->view);
+  gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW(sw), priv->view);
 
   gtk_source_view_set_highlight_current_line (GTK_SOURCE_VIEW
                                               (priv->view), TRUE);
@@ -177,9 +178,9 @@ gtk_source_buffer_load_file (GtkSourceBuffer *source_buffer,
       return FALSE;
     }
 
-  gtk_source_buffer_begin_irreversible_action (source_buffer);
+  gtk_text_buffer_begin_irreversible_action (GTK_TEXT_BUFFER(source_buffer));
   gtk_text_buffer_set_text (GTK_TEXT_BUFFER (source_buffer), buffer, -1);
-  gtk_source_buffer_end_irreversible_action (source_buffer);
+  gtk_text_buffer_end_irreversible_action (GTK_TEXT_BUFFER(source_buffer));
   gtk_text_buffer_set_modified (GTK_TEXT_BUFFER (source_buffer), FALSE);
 
   /* move cursor to the beginning */
diff --git a/src/gtr-actions-edit.c b/src/gtr-actions-edit.c
index 0b56749e..b488bddb 100644
--- a/src/gtr-actions-edit.c
+++ b/src/gtr-actions-edit.c
@@ -52,8 +52,8 @@ gtr_actions_edit_undo (GtrWindow * window)
     GTK_SOURCE_BUFFER (gtk_text_view_get_buffer
                        (GTK_TEXT_VIEW (active_view)));
 
-  if (gtk_source_buffer_can_undo (active_document))
-    gtk_source_buffer_undo (active_document);
+  if (gtk_text_buffer_get_can_undo (GTK_TEXT_BUFFER(active_document)))
+    gtk_text_buffer_undo (GTK_TEXT_BUFFER(active_document));
 
   gtk_widget_grab_focus (GTK_WIDGET (active_view));
   g_signal_emit_by_name (current, "message_changed", msg->data);
@@ -79,8 +79,8 @@ gtr_actions_edit_redo (GtrWindow * window)
     GTK_SOURCE_BUFFER (gtk_text_view_get_buffer
                        (GTK_TEXT_VIEW (active_view)));
 
-  if (gtk_source_buffer_can_redo (active_document))
-    gtk_source_buffer_redo (active_document);
+  if (gtk_text_buffer_get_can_redo (GTK_TEXT_BUFFER(active_document)))
+    gtk_text_buffer_redo (GTK_TEXT_BUFFER(active_document));
 
   gtk_widget_grab_focus (GTK_WIDGET (active_view));
   g_signal_emit_by_name (current, "message_changed", msg->data);
diff --git a/src/gtr-actions-file.c b/src/gtr-actions-file.c
index cff749c9..f398d425 100644
--- a/src/gtr-actions-file.c
+++ b/src/gtr-actions-file.c
@@ -141,18 +141,26 @@ static void
 gtr_po_parse_files_from_dialog (GtkNativeDialog * dialog, GtrWindow * window)
 {
   GSList *po_files, *l;
+  GListModel *po_files_model;
   GSList *locations = NULL;
   GFile *file, *parent;
   gchar *uri;
 
-  po_files = gtk_file_chooser_get_uris (GTK_FILE_CHOOSER (dialog));
-  for (l = po_files; l != NULL; l = g_slist_next (l))
+  /*for (l = po_files; l != NULL; l = g_slist_next (l))
     {
       GFile *file;
 
       file = g_file_new_for_uri (l->data);
       locations = g_slist_prepend (locations, file);
-    }
+    }*/
+
+  po_files_model = gtk_file_chooser_get_files (GTK_FILE_CHOOSER (dialog));
+  guint i = 0;
+  while (i < g_list_model_get_n_items(po_files_model)) {
+    GFile *file = g_list_model_get_item(po_files_model, i);
+    locations = g_slist_prepend (locations, file);
+  }
+  g_free(i);
 
   /*
    * We store latest directory
@@ -188,6 +196,18 @@ gtr_file_chooser_cb (GtkNativeDialog * dialog, guint reply, gpointer user_data)
   gtk_native_dialog_destroy (dialog);
 }
 
+static void
+handle_dialog_response (GtkNativeDialog *dialog, gint response_id, GtrWindow *window ){
+  if (response_id == GTK_RESPONSE_YES)
+  {
+    gtr_save_current_file_dialog (NULL, window);
+  }
+  else if (response_id == GTK_RESPONSE_CANCEL)
+  {
+    //to be implemented
+  }
+}
+
 gboolean
 gtr_want_to_save_current_dialog (GtrWindow * window)
 {
@@ -227,14 +247,17 @@ gtr_want_to_save_current_dialog (GtrWindow * window)
                           _("Continue without saving"), GTK_RESPONSE_NO,
                           NULL);
 
-  res = gtk_dialog_run (GTK_DIALOG (dialog));
-  gtk_widget_destroy (dialog);
+  //res = gtk_dialog_run (GTK_DIALOG (dialog));
+  gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
+  //gtk_widget_destroy (dialog);
 
-  if (res == GTK_RESPONSE_CANCEL)
+  // Below code can be removed as response signal is connected
+  /*if (res == GTK_RESPONSE_CANCEL)
     return FALSE;
 
   if (res == GTK_RESPONSE_YES)
-    gtr_save_current_file_dialog (NULL, window);
+    gtr_save_current_file_dialog (NULL, window);*/
+  g_signal_connect(dialog, "response", G_CALLBACK(handle_dialog_response), window);
 
   return TRUE;
 }
@@ -285,7 +308,9 @@ save_dialog_response_cb (GtkNativeDialog * dialog,
       return;
     }
 
-  filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+  //filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+  GFile * file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER(dialog));
+  filename = g_file_get_path(file);
   g_return_if_fail (filename != NULL);
 
   location = g_file_new_for_path (filename);
@@ -400,7 +425,7 @@ _upload_file_callback (GObject      *object,
 end:
   g_signal_connect (dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
   gtk_window_present (GTK_WINDOW (dialog));
-  gtk_widget_destroy (upload_dialog);
+  gtk_window_destroy (GTK_WINDOW(upload_dialog));
   g_free (ud);
 }
 
@@ -438,7 +463,7 @@ gtr_upload_file (GtkWidget *upload_dialog,
 
   if (response_id != GTK_RESPONSE_ACCEPT)
     {
-      gtk_widget_destroy (upload_dialog);
+      gtk_window_destroy (GTK_WINDOW(upload_dialog));
       return;
     }
 
@@ -717,7 +742,7 @@ close_all_tabs (GtrWindow * window)
   gtr_notebook_remove_all_pages (nb);
 
   //FIXME: This has to change once we add the close all documents menuitem*/
-  gtk_widget_destroy (GTK_WIDGET (window));
+  gtk_window_destroy (GTK_WINDOW (window));
 }
 
 static void
@@ -769,7 +794,7 @@ save_and_close_all_documents (GList * unsaved_documents, GtrWindow * window)
   }
 
   gtr_window_remove_tab (window);
-  gtk_widget_destroy (GTK_WIDGET (window));
+  gtk_window_destroy (GTK_WINDOW (window));
 }
 
 static void
@@ -794,7 +819,7 @@ close_confirmation_dialog_response_handler (GtrCloseConfirmationDialog
         {
           if (is_closing_all)
             {
-              gtk_widget_destroy (GTK_WIDGET (dlg));
+              gtk_window_destroy (GTK_WINDOW (dlg));
 
               close_all_tabs (window);
 
@@ -822,7 +847,7 @@ close_confirmation_dialog_response_handler (GtrCloseConfirmationDialog
     case GTK_RESPONSE_NO:      /* Close without Saving */
       if (is_closing_all)
         {
-          gtk_widget_destroy (GTK_WIDGET (dlg));
+          gtk_window_destroy (GTK_WINDOW (dlg));
 
           close_all_tabs (window);
 
@@ -847,7 +872,7 @@ close_confirmation_dialog_response_handler (GtrCloseConfirmationDialog
       break;
     }
 
-  gtk_widget_destroy (GTK_WIDGET (dlg));
+  gtk_window_destroy (GTK_WINDOW (dlg));
 }
 
 void
@@ -948,7 +973,7 @@ close_all_documents (GtrWindow * window, gboolean logout_mode)
 
       if (logout_mode)
         {
-          gtk_widget_destroy (GTK_WIDGET (window));
+          gtk_window_destroy (GTK_WINDOW (window));
         }
     }
 }
diff --git a/src/gtr-application.c b/src/gtr-application.c
index becb3b3c..89ee0b36 100644
--- a/src/gtr-application.c
+++ b/src/gtr-application.c
@@ -42,14 +42,16 @@
 #include <gio/gio.h>
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
-#include <libhandy-1/handy.h>
+//#include <libhandy-1/handy.h>
+#include <adwaita.h>
 
 #ifdef ENABLE_INTROSPECTION
 #include <girepository.h>
 #endif
 
 #ifdef GDK_WINDOWING_X11
-#include <gdk/gdkx.h>
+//#include <gdk/gdkx.h>
+#include <gdk/gdk.h>
 #endif
 
 typedef struct
@@ -101,7 +103,7 @@ load_accels (void)
                                NULL);
   if (filename != NULL)
     {
-      gtk_accel_map_load (filename);
+      //gtk_accel_map_load (filename);
       g_free (filename);
     }
 }
@@ -116,7 +118,7 @@ save_accels (void)
                                NULL);
   if (filename != NULL)
     {
-      gtk_accel_map_save (filename);
+      //gtk_accel_map_save (filename);
       g_free (filename);
     }
 }
@@ -139,7 +141,7 @@ set_active_window (GtrApplication *app,
 
 static gboolean
 window_focus_in_event (GtrWindow      *window,
-                      GdkEventFocus  *event,
+                      GdkFocusEvent  *event,
                       GtrApplication *app)
 {
   /* updates active_view and active_child when a new toplevel receives focus */
@@ -368,8 +370,9 @@ shortcuts_activated (GSimpleAction *action,
 
       g_signal_connect (shortcuts_window,
                 "destroy",
-                G_CALLBACK (gtk_widget_destroyed),
-                &shortcuts_window);
+                G_CALLBACK (gtk_window_destroy),
+                NULL);
+      g_free(shortcuts_window);
 
       g_object_unref (builder);
     }
@@ -379,7 +382,7 @@ shortcuts_activated (GSimpleAction *action,
         gtk_window_set_transient_for (GTK_WINDOW (shortcuts_window), GTK_WINDOW (window));
       }
 
-  gtk_widget_show_all (shortcuts_window);
+  gtk_widget_show (shortcuts_window);
   gtk_window_present (GTK_WINDOW (shortcuts_window));
 }
 
@@ -668,7 +671,7 @@ gtr_application_startup (GApplication *application)
 
   G_APPLICATION_CLASS (gtr_application_parent_class)->startup (application);
 
-  hdy_init();
+  adw_init();
   g_set_application_name (_("Translation Editor"));
   gtk_window_set_default_icon_name (PACKAGE_APPID);
 
@@ -679,12 +682,14 @@ gtr_application_startup (GApplication *application)
   load_accels ();
 
   /* TODO Remove in GTK 4 port */
-  hdy_style_manager_set_color_scheme (hdy_style_manager_get_default (),
-                                      HDY_COLOR_SCHEME_PREFER_LIGHT);
+  /*hdy_style_manager_set_color_scheme (hdy_style_manager_get_default (),
+                                      HDY_COLOR_SCHEME_PREFER_LIGHT);*/
+  adw_style_manager_set_color_scheme (adw_style_manager_get_default (),
+                                      ADW_COLOR_SCHEME_PREFER_LIGHT);
 
   /* We set the default icon dir */
-  gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
-                                     gtr_dirs_get_gtr_pixmaps_dir ());
+  /*gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
+                                     gtr_dirs_get_gtr_pixmaps_dir ());*/
 
   g_action_map_add_action_entries (G_ACTION_MAP (application), app_entries,
                                    G_N_ELEMENTS (app_entries), application);
@@ -728,7 +733,7 @@ gtr_application_startup (GApplication *application)
   set_kb (application, "app.tm_8", "<Ctrl>8");
   set_kb (application, "app.tm_9", "<Ctrl>9");
 
-  gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
+  gtk_style_context_add_provider_for_display (gdk_display_get_default (),
                                              GTK_STYLE_PROVIDER (priv->provider), 600);
 }
 
@@ -836,7 +841,8 @@ GtrWindow *
 gtr_application_create_window (GtrApplication *app)
 {
   GtrWindow *window;
-  GdkWindowState state;
+  //GdkWindowState state;
+  GdkToplevelState state;
   gint w, h;
   GtrApplicationPrivate *priv = gtr_application_get_instance_private (app);
 
@@ -855,15 +861,15 @@ gtr_application_create_window (GtrApplication *app)
   gtk_window_set_default_size (GTK_WINDOW (window), w, h);
   gtk_application_window_set_show_menubar (GTK_APPLICATION_WINDOW (window), FALSE);
 
-  if ((state & GDK_WINDOW_STATE_MAXIMIZED) != 0)
+  if ((state & GDK_TOPLEVEL_STATE_MAXIMIZED) != 0)
     gtk_window_maximize (GTK_WINDOW (window));
   else
     gtk_window_unmaximize (GTK_WINDOW (window));
 
-  if ((state & GDK_WINDOW_STATE_STICKY ) != 0)
-    gtk_window_stick (GTK_WINDOW (window));
-  else
-    gtk_window_unstick (GTK_WINDOW (window));
+  if ((state & GDK_TOPLEVEL_STATE_STICKY ) != 0);
+    ///gtk_window_stick (GTK_WINDOW (window));
+  else;
+    //gtk_window_unstick (GTK_WINDOW (window));
 
   g_signal_connect (window, "focus_in_event",
                     G_CALLBACK (window_focus_in_event), app);
diff --git a/src/gtr-close-button.c b/src/gtr-close-button.c
index b54b388e..542183a8 100644
--- a/src/gtr-close-button.c
+++ b/src/gtr-close-button.c
@@ -56,7 +56,8 @@ gtr_close_button_init (GtrCloseButton *button)
        gtk_widget_show (image);
        g_object_unref (icon);
 
-       gtk_container_add (GTK_CONTAINER (button), image);
+       //gtk_container_add (GTK_CONTAINER (button), image);
+       gtk_button_set_child (GTK_BUTTON(button), image);
 
        /* make it small */
        context = gtk_widget_get_style_context (GTK_WIDGET (button));
diff --git a/src/gtr-close-confirmation-dialog.c b/src/gtr-close-confirmation-dialog.c
index d5ad518e..40cecdc3 100644
--- a/src/gtr-close-confirmation-dialog.c
+++ b/src/gtr-close-confirmation-dialog.c
@@ -134,7 +134,7 @@ set_logout_mode (GtrCloseConfirmationDialog * dlg, gboolean logout_mode)
 static void
 gtr_close_confirmation_dialog_init (GtrCloseConfirmationDialog * dlg)
 {
-  AtkObject *atk_obj;
+  //AtkObject *atk_obj;
   GtkWidget *content_area = gtk_dialog_get_content_area (GTK_DIALOG (dlg));
 
   gtk_widget_set_margin_start (GTK_WIDGET (content_area), 6);
@@ -144,16 +144,17 @@ gtr_close_confirmation_dialog_init (GtrCloseConfirmationDialog * dlg)
 
   gtk_box_set_spacing (GTK_BOX (content_area), 14);
   gtk_window_set_resizable (GTK_WINDOW (dlg), FALSE);
-  gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dlg), TRUE);
+  //gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dlg), TRUE);
 
   gtk_window_set_title (GTK_WINDOW (dlg), "");
 
   gtk_window_set_modal (GTK_WINDOW (dlg), TRUE);
   gtk_window_set_destroy_with_parent (GTK_WINDOW (dlg), TRUE);
 
-  atk_obj = gtk_widget_get_accessible (GTK_WIDGET (dlg));
+  /* started use of gtk_widget_class_set_accessible role in class_init
+   * atk_obj = gtk_widget_get_accessible (GTK_WIDGET (dlg));
   atk_object_set_role (atk_obj, ATK_ROLE_ALERT);
-  atk_object_set_name (atk_obj, _("Question"));
+  atk_object_set_name (atk_obj, _("Question"));*/
 
   g_signal_connect (dlg, "response", G_CALLBACK (response_cb), NULL);
 }
@@ -252,6 +253,8 @@ static void
                                                          FALSE,
                                                          (G_PARAM_READWRITE |
                                                           G_PARAM_CONSTRUCT_ONLY)));
+
+  gtk_widget_class_set_accessible_role (klass, GTK_ACCESSIBLE_ROLE_ALERT);
 }
 
 static GList *
@@ -351,7 +354,7 @@ build_single_doc_dialog (GtrCloseConfirmationDialog * dlg)
 
   /* Image */
   image = gtk_image_new_from_icon_name ("dialog-warning-symbolic");
-  gtk_image_set_icon_size(image, GTK_ICON_SIZE_NORMAL);
+  gtk_image_set_icon_size(GTK_IMAGE(image), GTK_ICON_SIZE_NORMAL);
 
   gtk_widget_set_halign (image, 0.5);
   gtk_widget_set_valign (image, 0.0);
@@ -523,7 +526,7 @@ build_multiple_docs_dialog (GtrCloseConfirmationDialog * dlg)
   /* Image */
   image = gtk_image_new_from_icon_name ("dialog-warning-symbolic");
                                         //GTK_ICON_SIZE_DIALOG);
-  gtk_image_set_icon_size (image, GTK_ICON_SIZE_NORMAL);
+  gtk_image_set_icon_size (GTK_IMAGE(image), GTK_ICON_SIZE_NORMAL);
   gtk_widget_set_halign (image, 0.5);
   gtk_widget_set_valign (image, 0.0);
   gtk_box_append (GTK_BOX (hbox), image);
@@ -589,7 +592,8 @@ build_multiple_docs_dialog (GtrCloseConfirmationDialog * dlg)
                                        GTK_SHADOW_IN);*/
 
   treeview = create_treeview (priv);
-  gtk_container_add (GTK_CONTAINER (scrolledwindow), treeview);
+  //gtk_container_add (GTK_CONTAINER (scrolledwindow), treeview);
+  gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW(scrolledwindow), treeview);
 
   /* Secondary label */
   if (priv->disable_save_to_disk)
diff --git a/src/gtr-context.c b/src/gtr-context.c
index fda4123d..0b18678a 100644
--- a/src/gtr-context.c
+++ b/src/gtr-context.c
@@ -80,7 +80,7 @@ dialog_response_cb (GtkDialog *dialog, guint response, gpointer user_data)
   if (response == GTK_RESPONSE_ACCEPT)
     buffer_end_user_action (dd->text_buffer, dd->panel);
 
-  gtk_window_destroy (GTK_WIDGET (dialog));
+  gtk_window_destroy (GTK_WINDOW (dialog));
   reload_values (dd->panel);
   g_free (dd);
 }
@@ -99,7 +99,7 @@ setup_notes_edition (GtrContextPanel *panel)
   priv = gtr_context_panel_get_instance_private (panel);
 
   dialog = gtk_dialog_new_with_buttons (_("Notes"),
-                                        GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (panel))),
+                                        GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (panel))),
                                         GTK_DIALOG_MODAL|
                                         GTK_DIALOG_USE_HEADER_BAR|
                                         GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -122,7 +122,7 @@ setup_notes_edition (GtrContextPanel *panel)
                                   GTK_POLICY_AUTOMATIC,
                                   GTK_POLICY_AUTOMATIC);
 
-  gtk_container_add (GTK_CONTAINER (scrolled_window),
+  gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scrolled_window),
                                          text_view);
   gtk_widget_set_margin_start (scrolled_window, 6);
   gtk_widget_set_margin_end (scrolled_window, 6);
@@ -144,7 +144,7 @@ setup_notes_edition (GtrContextPanel *panel)
   dd->text_buffer = text_buffer;
 
   g_signal_connect (dialog, "response", G_CALLBACK (dialog_response_cb), dd);
-  gtk_widget_show_all (dialog);
+  gtk_widget_show (dialog);
 }
 
 static void
diff --git a/src/gtr-dl-teams.c b/src/gtr-dl-teams.c
index 94a94769..91ae94b7 100644
--- a/src/gtr-dl-teams.c
+++ b/src/gtr-dl-teams.c
@@ -135,7 +135,7 @@ gtr_dl_teams_parse_teams_json (GObject *object,
                                              GTK_BUTTONS_CLOSE,
                                              "%s",
                                              error->message);
-      g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+      g_signal_connect (dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
       gtk_window_present (GTK_WINDOW (dialog));
       return;
     }
@@ -218,7 +218,7 @@ gtr_dl_teams_load_module_details_json (GtkWidget  *widget,
                                        GTK_BUTTONS_CLOSE,
                                        "Error loading module info: %s",
                                        message);
-      g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+      g_signal_connect (dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
       gtk_window_present (GTK_WINDOW (dialog));
       return;
     }
@@ -308,7 +308,7 @@ gtr_dl_teams_parse_modules_json (GObject *object,
                                              GTK_BUTTONS_CLOSE,
                                              "%s",
                                              error->message);
-      g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+      g_signal_connect (dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
       gtk_window_present (GTK_WINDOW (dialog));
       return;
     }
@@ -415,7 +415,7 @@ gtr_dl_teams_get_file_info (GtrDlTeams *self)
                                        GTK_BUTTONS_CLOSE,
                                        "Error loading file info: %s",
                                        message);
-      g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+      g_signal_connect (dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
       gtk_window_present (GTK_WINDOW (dialog));
       return;
     }
@@ -546,7 +546,7 @@ gtr_dl_teams_load_po_file (GtkButton *button, GtrDlTeams *self)
                                        GTK_BUTTONS_CLOSE,
                                        "Error loading file: %s",
                                        message);
-      g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+      g_signal_connect (dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
       gtk_window_present (GTK_WINDOW (dialog));
       return;
     }
@@ -561,7 +561,7 @@ gtr_dl_teams_load_po_file (GtkButton *button, GtrDlTeams *self)
                                        GTK_BUTTONS_CLOSE,
                                        "Error creating temp file: %s",
                                        error->message);
-      g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+      g_signal_connect (dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
       gtk_window_present (GTK_WINDOW (dialog));
       g_error_free (error);
       return;
@@ -705,7 +705,7 @@ gtr_dl_teams_reserve_for_translation (GtkWidget *button, GtrDlTeams *self)
         "permissions to reserve this module."
       ),
       message);
-    g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+    g_signal_connect (dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
     gtk_window_present (GTK_WINDOW (dialog));
 
     return FALSE;
@@ -722,7 +722,7 @@ gtr_dl_teams_reserve_for_translation (GtkWidget *button, GtrDlTeams *self)
                                            priv->selected_team,
                                            priv->selected_domain);
 
-  g_signal_connect (success_dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+  g_signal_connect (success_dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
   gtk_window_present (GTK_WINDOW (success_dialog));
   gtk_widget_set_sensitive (priv->reserve_button, FALSE);
 
diff --git a/src/gtr-dl-teams.h b/src/gtr-dl-teams.h
index 121e86df..9fb02724 100644
--- a/src/gtr-dl-teams.h
+++ b/src/gtr-dl-teams.h
@@ -19,7 +19,7 @@
 #pragma once
 
 #include <gtk/gtk.h>
-#include "libhandy-1/handy.h"
+//#include "libhandy-1/handy.h"
 
 G_BEGIN_DECLS
 
diff --git a/src/gtr-dl-teams.ui b/src/gtr-dl-teams.ui
index 322b4401..6aed323a 100644
--- a/src/gtr-dl-teams.ui
+++ b/src/gtr-dl-teams.ui
@@ -4,7 +4,7 @@
   <requires lib="libhandy" version="1.0"/>
   <template class="GtrDlTeams" parent="GtkFrame">
     <child>
-      <object class="HdyClamp">
+      <object class="AdwClamp">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="halign">fill</property>
diff --git a/src/gtr-file-dialogs.c b/src/gtr-file-dialogs.c
index 8229b56c..7bb9bbd5 100644
--- a/src/gtr-file-dialogs.c
+++ b/src/gtr-file-dialogs.c
@@ -47,7 +47,11 @@ gtr_file_chooser_new (GtkWindow * parent,
                                         _("_Open"), _("_Cancel"));
 
   if (dir)
-    gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (dialog), dir);
+    //gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (dialog), dir);
+  {
+    GFile * file = g_file_new_for_uri (dir);
+    gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER(dialog), file, NULL);
+  }
 
   if (mode != FILESEL_SAVE)
     {
diff --git a/src/gtr-filter-selection.c b/src/gtr-filter-selection.c
index 9f3be601..657aa2fa 100644
--- a/src/gtr-filter-selection.c
+++ b/src/gtr-filter-selection.c
@@ -58,7 +58,7 @@ change_option (GtkListBox         *box,
 {
   GSList *o = NULL;
   GtrFilterSelectionPrivate *priv = gtr_filter_selection_get_instance_private (self);
-  GtkWidget *label = gtk_bin_get_child (GTK_BIN (row));
+  GtkWidget *label = gtk_list_box_row_get_child (row);
   const char *label_text = gtk_label_get_text (GTK_LABEL (label));
 
   for (o = priv->options; o != NULL; o = g_slist_next (o))
@@ -79,17 +79,26 @@ filter_option (GtkEditable        *entry,
                GtrFilterSelection *self)
 {
   GtrFilterSelectionPrivate *priv = gtr_filter_selection_get_instance_private (self);
-  const char *text = gtk_entry_get_text (GTK_ENTRY (entry));
+  //const char *text = gtk_entry_get_text (GTK_ENTRY (entry));
+  GtkEntryBuffer *buffer = gtk_entry_get_buffer (GTK_ENTRY (entry));
+  const char* text = gtk_entry_buffer_get_text (buffer);
   g_autofree char *uptext = g_ascii_strup (text, -1);
   const GSList *o;
-  GList *children;
+  GtkWidget *children;
 
-  children = gtk_container_get_children (GTK_CONTAINER (priv->option_list));
+  /* children = gtk_container_get_children (GTK_CONTAINER (priv->option_list));
   while (children)
     {
       GtkWidget *w = GTK_WIDGET (children->data);
       gtk_list_box_remove (GTK_LIST_BOX (priv->option_list), w);
       children = g_list_next (children);
+    } */
+
+  children = gtk_widget_get_first_child (GTK_WIDGET (priv->option_list));
+  while (children)
+    {
+      gtk_list_box_remove (GTK_LIST_BOX (priv->option_list), children);
+      children = gtk_widget_get_next_sibling (children);
     }
 
   for (o = priv->options; o != NULL; o = g_slist_next (o))
@@ -105,7 +114,7 @@ filter_option (GtkEditable        *entry,
       gtk_label_set_xalign (GTK_LABEL (child), 0.0);
       gtk_list_box_append (GTK_LIST_BOX (priv->option_list), child);
     }
-  gtk_widget_show_all (priv->option_list);
+  gtk_widget_show (priv->option_list);
 }
 
 static void
@@ -148,13 +157,13 @@ gtr_filter_selection_init (GtrFilterSelection *self)
   priv->options = NULL;
   gtk_widget_init_template (GTK_WIDGET (self));
 
-  gtk_popover_set_relative_to(GTK_POPOVER(priv->popup),GTK_WIDGET(self));
+  gtk_popover_set_default_widget (GTK_POPOVER(priv->popup),GTK_WIDGET(self));
   g_signal_connect (self,
                     "clicked",
                     G_CALLBACK(handle_filter_selection_btn_clicked),
                     NULL);
 
-  gtk_widget_show_all (priv->option_list);
+  gtk_widget_show (priv->option_list);
 
   g_signal_connect (priv->option_list,
                     "row-activated",
@@ -214,18 +223,25 @@ gtr_filter_selection_set_options_full (GtrFilterSelection *self,
 {
   GtrFilterSelectionPrivate *priv = gtr_filter_selection_get_instance_private (self);
   const GSList *o;
-  GList *children;
 
   if (priv->options)
     g_slist_free_full (priv->options, (GDestroyNotify)gtr_filter_option_free);
   priv->options = options;
 
-  children = gtk_container_get_children (GTK_CONTAINER (priv->option_list));
+  GtkWidget *children;
+  /* children = gtk_container_get_children (GTK_CONTAINER (priv->option_list));
   while (children)
     {
       GtkWidget *w = GTK_WIDGET (children->data);
       gtk_list_box_remove (GTK_LIST_BOX (priv->option_list), w);
       children = g_list_next (children);
+    } */
+
+  children = gtk_widget_get_first_child (GTK_WIDGET (priv->option_list));
+  while (children)
+    {
+      gtk_list_box_remove (GTK_LIST_BOX (priv->option_list), GTK_WIDGET(children));
+      children = gtk_widget_get_next_sibling (children);
     }
 
   for (o = priv->options; o != NULL; o = g_slist_next (o))
@@ -236,7 +252,7 @@ gtr_filter_selection_set_options_full (GtrFilterSelection *self,
       gtk_list_box_append (GTK_LIST_BOX (priv->option_list), child);
     }
 
-  gtk_widget_show_all (priv->option_list);
+  gtk_widget_show (priv->option_list);
 }
 
 void
diff --git a/src/gtr-io-error-info-bar.c b/src/gtr-io-error-info-bar.c
index adedc3ed..ab16cf3b 100644
--- a/src/gtr-io-error-info-bar.c
+++ b/src/gtr-io-error-info-bar.c
@@ -39,10 +39,11 @@ static void show_info_bar (GtrTab * tab);
 static void
 set_contents (GtkInfoBar * infobar, GtkWidget * contents)
 {
-  GtkWidget *content_area;
+  /*GtkWidget *content_area;
 
   content_area = gtk_info_bar_get_content_area (infobar);
-  gtk_container_add (GTK_CONTAINER (content_area), contents);
+  gtk_container_add (GTK_CONTAINER (content_area), contents);*/
+  gtk_info_bar_add_child (infobar, contents);
 }
 
 /*
@@ -86,7 +87,7 @@ set_info_bar_text_and_icon (GtkInfoBar * infobar,
   gtk_widget_set_vexpand (primary_label, TRUE);
   gtk_box_append (GTK_BOX (vbox), primary_label);
   gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE);
-  gtk_label_set_line_wrap (GTK_LABEL (primary_label), FALSE);
+  gtk_label_set_wrap (GTK_LABEL (primary_label), FALSE);
   gtk_label_set_xalign (GTK_LABEL (primary_label), 0.0);
   gtk_label_set_yalign (GTK_LABEL (primary_label), 0.5);
 
@@ -109,7 +110,7 @@ set_info_bar_text_and_icon (GtkInfoBar * infobar,
       gtk_widget_set_can_focus (secondary_label, TRUE);
 
       gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE);
-      gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
+      gtk_label_set_wrap (GTK_LABEL (secondary_label), TRUE);
       gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
       gtk_label_set_xalign (GTK_LABEL (secondary_label), 0.0);
       gtk_label_set_yalign (GTK_LABEL (secondary_label), 0.5);
diff --git a/src/gtr-languages-fetcher.c b/src/gtr-languages-fetcher.c
index f50318db..c63def9e 100644
--- a/src/gtr-languages-fetcher.c
+++ b/src/gtr-languages-fetcher.c
@@ -142,12 +142,16 @@ fill_encoding_and_charset (GtrLanguagesFetcher *fetcher)
   const gchar *text;
   GtrLanguagesFetcherPrivate *priv = gtr_languages_fetcher_get_instance_private (fetcher);
 
-  text = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->charset))));
+  //text = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->charset))));
+  GtkEntryBuffer *buffer = gtk_entry_get_buffer (GTK_ENTRY (gtk_combo_box_get_child(GTK_COMBO_BOX 
(priv->charset))));
+  text = gtk_entry_buffer_get_text (buffer);
 
   if (text == NULL || *text == '\0' || !gtk_widget_is_sensitive (priv->charset))
     gtk_combo_box_set_active (GTK_COMBO_BOX (priv->charset), 0);
 
-  text = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->encoding))));
+  //text = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->encoding))));
+  buffer = gtk_entry_get_buffer (GTK_ENTRY (gtk_combo_box_get_child(GTK_COMBO_BOX (priv->encoding))));
+  text = gtk_entry_buffer_get_text (buffer);
 
   if (text == NULL || *text == '\0' || !gtk_widget_is_sensitive (priv->encoding))
     gtk_combo_box_set_active (GTK_COMBO_BOX (priv->encoding), 0);
@@ -164,12 +168,20 @@ fill_from_language_entry (GtrLanguagesFetcher *fetcher,
   const gchar *code;
   code = gtr_language_get_code (lang);
   if (code != NULL && *code != '\0')
-    gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->language_code))), code);
+    //gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->language_code))), code);
+  {
+    GtkEntryBuffer * buffer = gtk_entry_get_buffer (GTK_ENTRY (gtk_combo_box_get_child(GTK_COMBO_BOX 
(priv->language_code))));
+    gtk_entry_buffer_set_text (buffer, code, -1);
+  }
 
   const gchar *plural_form;
   plural_form = gtr_language_get_plural_form (lang);
   if (plural_form != NULL && *plural_form != '\0')
-    gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->plural_forms))), plural_form);
+    //gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->plural_forms))), plural_form);
+  {
+    GtkEntryBuffer * buffer = gtk_entry_get_buffer (GTK_ENTRY (gtk_combo_box_get_child(GTK_COMBO_BOX 
(priv->plural_forms))));
+    gtk_entry_buffer_set_text (buffer, plural_form, -1);
+  }
 }
 
 static void
@@ -193,7 +205,9 @@ fill_from_language_code_entry (GtrLanguagesFetcher *fetcher,
         gtr_lang_button_set_lang (GTR_LANG_BUTTON (priv->language), name);
     }
 
-  entry_text = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->plural_forms))));
+  //entry_text = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->plural_forms))));
+  GtkEntryBuffer *buffer = gtk_entry_get_buffer (GTK_ENTRY (gtk_combo_box_get_child(GTK_COMBO_BOX 
(priv->plural_forms))));
+  entry_text = gtk_entry_buffer_get_text (buffer);
 
   if (*entry_text == '\0')
     {
@@ -202,7 +216,11 @@ fill_from_language_code_entry (GtrLanguagesFetcher *fetcher,
       plural_form = gtr_language_get_plural_form (lang);
 
       if (plural_form != NULL && *plural_form != '\0')
-        gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->plural_forms))), plural_form);
+        //gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->plural_forms))), plural_form);
+      {
+        GtkEntryBuffer * buffer = gtk_entry_get_buffer (GTK_ENTRY (gtk_combo_box_get_child(GTK_COMBO_BOX 
(priv->plural_forms))));
+        gtk_entry_buffer_set_text (buffer, plural_form, -1);
+      }
     }
 }
 
@@ -277,7 +295,9 @@ on_language_code_activate (GtkEntry            *entry,
                            GtrLanguagesFetcher *fetcher)
 {
   GtrLanguagesFetcherPrivate *priv = gtr_languages_fetcher_get_instance_private (fetcher);
-  const gchar *text = gtk_entry_get_text (entry);
+  //const gchar *text = gtk_entry_get_text (entry);
+  GtkEntryBuffer *buffer = gtk_entry_get_buffer (entry);
+  const gchar *text = gtk_entry_buffer_get_text (buffer);
 
   fill_boxes (fetcher, text, GTK_TREE_MODEL (priv->code_store),
               fill_from_language_code_entry);
@@ -364,11 +384,11 @@ gtr_languages_fetcher_init (GtrLanguagesFetcher *fetcher)
                     "clicked",
                     G_CALLBACK (on_language_activate),
                     fetcher);
-  g_signal_connect (gtk_bin_get_child (GTK_BIN (priv->language_code)),
+  g_signal_connect (GTK_ENTRY (gtk_combo_box_get_child(GTK_COMBO_BOX (priv->language_code))),
                     "activate",
                     G_CALLBACK (on_language_code_activate),
                     fetcher);
-  g_signal_connect (gtk_bin_get_child (GTK_BIN (priv->language_code)),
+  g_signal_connect (GTK_ENTRY (gtk_combo_box_get_child(GTK_COMBO_BOX (priv->language_code))),
                     "focus-out-event",
                     G_CALLBACK (on_language_code_focus_out_event),
                     fetcher);
@@ -427,7 +447,9 @@ gtr_languages_fetcher_get_language_code (GtrLanguagesFetcher *fetcher)
   GtrLanguagesFetcherPrivate *priv = gtr_languages_fetcher_get_instance_private (fetcher);
   g_return_val_if_fail (GTR_IS_LANGUAGES_FETCHER (fetcher), NULL);
 
-  return gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->language_code))));
+  //return gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->language_code))));
+  GtkEntryBuffer *buffer = gtk_entry_get_buffer (GTK_ENTRY (gtk_combo_box_get_child(GTK_COMBO_BOX 
(priv->language_code))));
+  return gtk_entry_buffer_get_text (buffer);
 }
 
 void
@@ -438,7 +460,9 @@ gtr_languages_fetcher_set_language_code (GtrLanguagesFetcher *fetcher,
   g_return_if_fail (GTR_IS_LANGUAGES_FETCHER (fetcher));
   g_return_if_fail (code != NULL);
 
-  gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->language_code))), code);
+  //gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->language_code))), code);
+  GtkEntryBuffer * buffer = gtk_entry_get_buffer (GTK_ENTRY (gtk_combo_box_get_child(GTK_COMBO_BOX 
(priv->language_code))));
+  gtk_entry_buffer_set_text (buffer, code, -1);
 }
 
 const gchar *
@@ -447,7 +471,9 @@ gtr_languages_fetcher_get_charset (GtrLanguagesFetcher *fetcher)
   GtrLanguagesFetcherPrivate *priv = gtr_languages_fetcher_get_instance_private (fetcher);
   g_return_val_if_fail (GTR_IS_LANGUAGES_FETCHER (fetcher), NULL);
 
-  return gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->charset))));
+  //return gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->charset))));
+  GtkEntryBuffer *buffer = gtk_entry_get_buffer (GTK_ENTRY (gtk_combo_box_get_child(GTK_COMBO_BOX 
(priv->charset))));
+  return gtk_entry_buffer_get_text(buffer);
 }
 
 void
@@ -458,7 +484,9 @@ gtr_languages_fetcher_set_charset (GtrLanguagesFetcher *fetcher,
   g_return_if_fail (GTR_IS_LANGUAGES_FETCHER (fetcher));
   g_return_if_fail (charset != NULL);
 
-  gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->charset))), charset);
+  //gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->charset))), charset);
+  GtkEntryBuffer * buffer = gtk_entry_get_buffer (GTK_ENTRY (gtk_combo_box_get_child(GTK_COMBO_BOX 
(priv->charset))));
+  gtk_entry_buffer_set_text (buffer, charset, -1);
 }
 
 const gchar *
@@ -467,7 +495,9 @@ gtr_languages_fetcher_get_encoding (GtrLanguagesFetcher *fetcher)
   GtrLanguagesFetcherPrivate *priv = gtr_languages_fetcher_get_instance_private (fetcher);
   g_return_val_if_fail (GTR_IS_LANGUAGES_FETCHER (fetcher), NULL);
 
-  return gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->encoding))));
+  //return gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->encoding))));
+  GtkEntryBuffer *buffer = gtk_entry_get_buffer (GTK_ENTRY (gtk_combo_box_get_child(GTK_COMBO_BOX 
(priv->charset))));
+  return gtk_entry_buffer_get_text(buffer);
 }
 
 void
@@ -478,7 +508,9 @@ gtr_languages_fetcher_set_encoding (GtrLanguagesFetcher *fetcher,
   g_return_if_fail (GTR_IS_LANGUAGES_FETCHER (fetcher));
   g_return_if_fail (enc != NULL);
 
-  gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->encoding))), enc);
+  //gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->encoding))), enc);
+  GtkEntryBuffer * buffer = gtk_entry_get_buffer (GTK_ENTRY (gtk_combo_box_get_child(GTK_COMBO_BOX 
(priv->encoding))));
+  gtk_entry_buffer_set_text (buffer, enc, -1);
 }
 
 const gchar *
@@ -487,7 +519,9 @@ gtr_languages_fetcher_get_plural_form (GtrLanguagesFetcher *fetcher)
   GtrLanguagesFetcherPrivate *priv = gtr_languages_fetcher_get_instance_private (fetcher);
   g_return_val_if_fail (GTR_IS_LANGUAGES_FETCHER (fetcher), NULL);
 
-  return gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->plural_forms))));
+  //return gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->plural_forms))));
+  GtkEntryBuffer *buffer = gtk_entry_get_buffer (GTK_ENTRY (gtk_combo_box_get_child(GTK_COMBO_BOX 
(priv->charset))));
+  return gtk_entry_buffer_get_text(buffer);
 }
 
 void
@@ -498,5 +532,7 @@ gtr_languages_fetcher_set_plural_form (GtrLanguagesFetcher *fetcher,
   g_return_if_fail (GTR_IS_LANGUAGES_FETCHER (fetcher));
   g_return_if_fail (plural_form != NULL);
 
-  gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->plural_forms))), plural_form);
+  //gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->plural_forms))), plural_form);
+  GtkEntryBuffer * buffer = gtk_entry_get_buffer (GTK_ENTRY (gtk_combo_box_get_child(GTK_COMBO_BOX 
(priv->plural_forms))));
+  gtk_entry_buffer_set_text (buffer, plural_form, -1);
 }
diff --git a/src/gtr-preferences-dialog.c b/src/gtr-preferences-dialog.c
index 950d069f..5a0d1e9e 100644
--- a/src/gtr-preferences-dialog.c
+++ b/src/gtr-preferences-dialog.c
@@ -297,7 +297,7 @@ on_profile_dialog_response_cb (GtrProfileDialog     *profile_dialog,
     }
 
   g_object_unref (prof_manager);
-  gtk_window_destroy (GTK_WIDGET (profile_dialog));
+  gtk_window_destroy (GTK_WINDOW (profile_dialog));
 }
 
 static void
@@ -402,7 +402,7 @@ delete_confirm_dialog_cb (GtkWidget *dialog,
         }
     }
 
-  gtk_widget_destroy (dialog);
+  gtk_window_destroy (GTK_WINDOW(dialog));
 }
 
 static void
@@ -633,7 +633,7 @@ dialog_response_handler (GtkDialog * dlg, gint res_id)
       gtr_show_help (GTK_WINDOW (dlg));
       break;
     default:
-      gtk_widget_destroy (GTK_WIDGET (dlg));
+      gtk_window_destroy (GTK_WINDOW (dlg));
     }
 }
 
@@ -645,7 +645,7 @@ gtr_preferences_dialog_init (GtrPreferencesDialog * dlg)
   GtkBuilder *builder;
   GtkBox *content_area;
   GtkStyleContext *context;
-  gchar *root_objects[] = {
+  const gchar *root_objects[] = {
     "notebook",
     "adjustment1",
     "adjustment2",
diff --git a/src/gtr-profile-dialog.c b/src/gtr-profile-dialog.c
index 96b2ca68..f7bb9bf8 100644
--- a/src/gtr-profile-dialog.c
+++ b/src/gtr-profile-dialog.c
@@ -63,7 +63,7 @@ gtr_profile_dialog_init (GtrProfileDialog *dlg)
   GtkBox *content_area;
   GtkWidget *fetcher_box;
   GtkBuilder *builder;
-  gchar *root_objects[] = {
+  const gchar *root_objects[] = {
     "main_box",
     NULL
   };
@@ -115,24 +115,39 @@ fill_entries (GtrProfileDialog *dlg, GtrProfile *profile)
 {
   GtrProfileDialogPrivate *priv = gtr_profile_dialog_get_instance_private (dlg);
   if (gtr_profile_get_name (profile) != NULL)
-    gtk_entry_set_text (GTK_ENTRY (priv->profile_name),
-                        gtr_profile_get_name (profile));
+    //gtk_entry_set_text (GTK_ENTRY (priv->profile_name), gtr_profile_get_name (profile));
+  {
+    GtkEntryBuffer *entry_buffer = gtk_entry_get_buffer (GTK_ENTRY(priv->profile_name));
+    gtk_entry_buffer_set_text (entry_buffer, gtr_profile_get_name (profile), -1);
+  }
 
   if (gtr_profile_get_auth_token (profile) != NULL)
-    gtk_entry_set_text (GTK_ENTRY (priv->auth_token),
-                        gtr_profile_get_auth_token (profile));                      
+    //gtk_entry_set_text (GTK_ENTRY (priv->auth_token), gtr_profile_get_auth_token (profile));
+  {
+    GtkEntryBuffer *entry_buffer = gtk_entry_get_buffer (GTK_ENTRY(priv->auth_token));
+    gtk_entry_buffer_set_text (entry_buffer, gtr_profile_get_auth_token (profile), -1);
+  }
 
   if (gtr_profile_get_author_name (profile) != NULL)
-    gtk_entry_set_text (GTK_ENTRY (priv->author_name),
-                        gtr_profile_get_author_name (profile));
+    //gtk_entry_set_text (GTK_ENTRY (priv->author_name), gtr_profile_get_author_name (profile));
+  {
+    GtkEntryBuffer *entry_buffer = gtk_entry_get_buffer (GTK_ENTRY(priv->author_name));
+    gtk_entry_buffer_set_text (entry_buffer, gtr_profile_get_author_name (profile), -1);
+  }
 
   if (gtr_profile_get_author_email (profile) != NULL)
-    gtk_entry_set_text (GTK_ENTRY (priv->author_email),
-                        gtr_profile_get_author_email (profile));
+    //gtk_entry_set_text (GTK_ENTRY (priv->author_email), gtr_profile_get_author_email (profile));
+  {
+    GtkEntryBuffer *entry_buffer = gtk_entry_get_buffer (GTK_ENTRY(priv->author_email));
+    gtk_entry_buffer_set_text (entry_buffer, gtr_profile_get_author_email (profile), -1);
+  }
 
   if (gtr_profile_get_group_email (profile) != NULL)
-    gtk_entry_set_text (GTK_ENTRY (priv->team_email),
-                        gtr_profile_get_group_email (profile));
+    //gtk_entry_set_text (GTK_ENTRY (priv->team_email), gtr_profile_get_group_email (profile));
+  {
+    GtkEntryBuffer *entry_buffer = gtk_entry_get_buffer (GTK_ENTRY(priv->team_email));
+    gtk_entry_buffer_set_text (entry_buffer,  gtr_profile_get_group_email (profile), -1);
+  }
 
   if (gtr_profile_get_language_name (profile) != NULL)
     gtr_languages_fetcher_set_language_name (GTR_LANGUAGES_FETCHER (priv->languages_fetcher),
@@ -190,26 +205,32 @@ GtrProfile *
 gtr_profile_dialog_get_profile (GtrProfileDialog *dlg)
 {
   GtrProfile *profile;
+  GtkEntryBuffer *buffer;
   GtrProfileDialogPrivate *priv = gtr_profile_dialog_get_instance_private (dlg);
 
   g_return_val_if_fail (GTR_IS_PROFILE_DIALOG (dlg), NULL);
 
   profile = gtr_profile_new ();
 
-  gtr_profile_set_name (profile,
-                        gtk_entry_get_text (GTK_ENTRY (priv->profile_name)));
+  buffer = gtk_entry_get_buffer (GTK_ENTRY(priv->profile_name));
+  gtr_profile_set_name (profile,gtk_entry_buffer_get_text (buffer));
+                        //gtk_entry_get_text (GTK_ENTRY (priv->profile_name)));
 
-  gtr_profile_set_auth_token (profile,
-                        gtk_entry_get_text (GTK_ENTRY (priv->auth_token)));
+  buffer = gtk_entry_get_buffer (GTK_ENTRY(priv->auth_token));
+  gtr_profile_set_auth_token (profile,gtk_entry_buffer_get_text (buffer));
+                        //gtk_entry_get_text (GTK_ENTRY (priv->auth_token)));
 
-  gtr_profile_set_author_name (profile,
-                               gtk_entry_get_text (GTK_ENTRY (priv->author_name)));
+  buffer = gtk_entry_get_buffer (GTK_ENTRY(priv->author_name));
+  gtr_profile_set_author_name (profile,gtk_entry_buffer_get_text (buffer));
+                               //gtk_entry_get_text (GTK_ENTRY (priv->author_name)));
 
-  gtr_profile_set_author_email (profile,
-                                gtk_entry_get_text (GTK_ENTRY (priv->author_email)));
+  buffer = gtk_entry_get_buffer (GTK_ENTRY(priv->author_email));
+  gtr_profile_set_author_email (profile,gtk_entry_buffer_get_text (buffer));
+                                //gtk_entry_get_text (GTK_ENTRY (priv->author_email)));
 
-  gtr_profile_set_group_email (profile,
-                               gtk_entry_get_text (GTK_ENTRY (priv->team_email)));
+  buffer = gtk_entry_get_buffer (GTK_ENTRY(priv->team_email));
+  gtr_profile_set_group_email (profile,gtk_entry_buffer_get_text (buffer));
+                               //gtk_entry_get_text (GTK_ENTRY (priv->team_email)));
 
   gtr_profile_set_language_name (profile,
                                  gtr_languages_fetcher_get_language_name (GTR_LANGUAGES_FETCHER 
(priv->languages_fetcher)));
diff --git a/src/gtr-search-bar.c b/src/gtr-search-bar.c
index c6b73f31..ab02775c 100644
--- a/src/gtr-search-bar.c
+++ b/src/gtr-search-bar.c
@@ -403,17 +403,17 @@ pacify_null_text (GBinding     *binding,
   return TRUE;
 }
 
-static void
+static gboolean
 gtr_search_bar_grab_focus (GtkWidget *widget)
 {
   GtrSearchBar *self = (GtrSearchBar *)widget;
 
   g_assert (GTR_IS_SEARCH_BAR (self));
 
-  gtk_widget_grab_focus (GTK_WIDGET (self->search_entry));
+  return gtk_widget_grab_focus (GTK_WIDGET (self->search_entry));
 }
 
-static void
+/*static void
 search_entry_populate_popup (GtrSearchBar *self,
                              GtkWidget    *widget,
                              GtkEntry     *entry)
@@ -453,11 +453,11 @@ search_entry_populate_popup (GtrSearchBar *self,
       gtk_menu_shell_insert (GTK_MENU_SHELL (widget), item, pos++);
       gtk_widget_show (item);
 
-      /*sep = gtk_separator_menu_item_new ();
-      gtk_menu_shell_insert (GTK_MENU_SHELL (widget), sep, pos++);
-      gtk_widget_show (sep);*/
+      //sep = gtk_separator_menu_item_new ();
+      //gtk_menu_shell_insert (GTK_MENU_SHELL (widget), sep, pos++);
+      //gtk_widget_show (sep);
     }
-}
+}*/
 
 static void
 gtr_search_bar_destroy (GtkWidget *widget)
@@ -679,7 +679,7 @@ gtr_search_bar_class_init (GtrSearchBarClass *klass)
   /*binding_set = gtk_binding_set_by_class (klass);
   gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0,
                                 "stop-search", 0);*/
-  gtk_widget_class_add_binding_signal (klass, GDK_KEY_Escape, 0, 
+  gtk_widget_class_add_binding_signal (GTK_WIDGET_CLASS(klass), GDK_KEY_Escape, 0, 
                                       "stop-search", NULL);
 }
 
@@ -721,10 +721,10 @@ gtr_search_bar_init (GtrSearchBar *self)
                             G_CALLBACK (gtr_search_bar_find_next),
                             self);
 
-  g_signal_connect_swapped (self->search_entry,
+  /*g_signal_connect_swapped (self->search_entry,
                             "populate-popup",
                             G_CALLBACK (search_entry_populate_popup),
-                            self);
+                            self);*/
 
   g_signal_connect_swapped (self->next_button,
                             "clicked",
diff --git a/src/gtr-tab.c b/src/gtr-tab.c
index c7a937db..045753c5 100644
--- a/src/gtr-tab.c
+++ b/src/gtr-tab.c
@@ -542,7 +542,8 @@ gtr_tab_append_msgstr_page (const gchar * tab_label,
   view = gtr_view_new ();
   gtk_widget_show (view);
 
-  gtk_container_add (GTK_CONTAINER (scroll), view);
+  //gtk_container_add (GTK_CONTAINER (scroll), view);
+  gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW(scroll), view);
 
   /*gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll),
                                        GTK_SHADOW_IN);*/
@@ -576,10 +577,10 @@ gtr_message_plural_forms (GtrTab * tab, GtrMsg * msg)
           buf =
             gtk_text_view_get_buffer (GTK_TEXT_VIEW
                                       (priv->trans_msgstr[i]));
-          gtk_source_buffer_begin_not_undoable_action (GTK_SOURCE_BUFFER
-                                                       (buf));
+          //gtk_source_buffer_begin_not_undoable_action (GTK_SOURCE_BUFFER (buf));
+          gtk_text_buffer_begin_irreversible_action (buf);
           gtk_text_buffer_set_text (buf, (gchar *) msgstr_plural, -1);
-          gtk_source_buffer_end_not_undoable_action (GTK_SOURCE_BUFFER (buf));
+          gtk_text_buffer_end_irreversible_action (buf);
         }
     }
 }
@@ -625,9 +626,9 @@ gtr_tab_show_message (GtrTab * tab, GtrMsg * msg)
     {
       gchar *msg_error = gtr_msg_check (msg);
       buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->text_msgid));
-      gtk_source_buffer_begin_not_undoable_action (GTK_SOURCE_BUFFER (buf));
+      gtk_text_buffer_begin_irreversible_action (buf);
       gtk_text_buffer_set_text (buf, (gchar *) msgid, -1);
-      gtk_source_buffer_end_not_undoable_action (GTK_SOURCE_BUFFER (buf));
+      gtk_text_buffer_begin_irreversible_action (buf);
 
       if (gtr_msg_is_fuzzy (msg))
         gtk_label_set_text (GTK_LABEL (priv->msgid_tags), _("fuzzy"));
@@ -648,12 +649,10 @@ gtr_tab_show_message (GtrTab * tab, GtrMsg * msg)
       gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->trans_notebook), 0);
       if (msgstr)
         {
-          buf =
-            gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->trans_msgstr[0]));
-          gtk_source_buffer_begin_not_undoable_action (GTK_SOURCE_BUFFER
-                                                       (buf));
+          buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->trans_msgstr[0]));
+          gtk_text_buffer_begin_irreversible_action (buf);
           gtk_text_buffer_set_text (buf, (gchar *) msgstr, -1);
-          gtk_source_buffer_end_not_undoable_action (GTK_SOURCE_BUFFER (buf));
+          gtk_text_buffer_end_irreversible_action (buf);
           gtk_label_set_mnemonic_widget (GTK_LABEL (priv->msgstr_label),
                                          priv->trans_msgstr[0]);
         }
@@ -1158,8 +1157,8 @@ gtr_tab_update_undo_buttons (GtrTab *tab,
     GTK_SOURCE_BUFFER (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
   g_return_if_fail(active_document);
 
-  can_undo = gtk_source_buffer_can_undo (active_document);
-  can_redo = gtk_source_buffer_can_redo (active_document);
+  can_undo = gtk_text_buffer_get_can_undo (GTK_TEXT_BUFFER(active_document));
+  can_redo = gtk_text_buffer_get_can_redo (GTK_TEXT_BUFFER(active_document));
 
   gtk_widget_set_sensitive (priv->undo, can_undo);
   gtk_widget_set_sensitive (priv->redo, can_redo);
@@ -2103,7 +2102,8 @@ gtr_tab_set_info_bar (GtrTab * tab, GtkWidget * infobar)
     return;
 
   if (priv->infobar != NULL)
-    gtk_widget_destroy (priv->infobar);
+    //gtk_widget_destroy (priv->infobar);
+    g_object_unref(priv->infobar);
 
   priv->infobar = infobar;
 
diff --git a/src/gtr-utils.c b/src/gtr-utils.c
index 98563765..80f13a8e 100644
--- a/src/gtr-utils.c
+++ b/src/gtr-utils.c
@@ -80,8 +80,8 @@ gtr_gtk_button_new_with_icon_name (const gchar * label,
                         gtk_image_new_from_icon_name (icon_name,
                                                       GTK_ICON_SIZE_BUTTON));*/
   button = gtk_button_new_from_icon_name (icon_name);
-  gtk_button_set_label (button, label);
-  gtk_button_set_use_underline (button, true);
+  gtk_button_set_label (GTK_BUTTON(button), label);
+  gtk_button_set_use_underline (GTK_BUTTON(button), true);
 
   return button;
 }
@@ -457,8 +457,8 @@ finally_2:
 void
 gtr_utils_help_display (GtkWindow * window)
 {
-  gtk_show_uri_on_window (GTK_WINDOW (window), "help:gtranslator",
-                          gtk_get_current_event_time (), NULL);
+  /*gtk_show_uri_on_window (GTK_WINDOW (window), "help:gtranslator",
+                          gtk_get_current_event_time (), NULL);*/
 }
 
 gchar *
@@ -804,24 +804,6 @@ pango_font_description_to_css (PangoFontDescription *desc)
   return g_string_free (s, FALSE);
 }
 
-void
-gtk_box_append (GtkBox *box, GtkWidget *child)
-{
-  gtk_container_add (GTK_CONTAINER (box), child);
-}
-
-void
-gtk_list_box_append (GtkListBox *box, GtkWidget *child)
-{
-  gtk_container_add (GTK_CONTAINER (box), child);
-}
-
-void
-gtk_list_box_remove (GtkListBox *box, GtkWidget *child)
-{
-  gtk_container_remove (GTK_CONTAINER (box), child);
-}
-
 // TODO: Improve this parser, this string parsing is weak
 // It could be better to use GRegex: https://docs.gtk.org/glib/method.Regex.match.html
 int
diff --git a/src/gtr-window.c b/src/gtr-window.c
index 70373a5e..8f2c60b5 100644
--- a/src/gtr-window.c
+++ b/src/gtr-window.c
@@ -83,7 +83,7 @@ typedef struct
 
   gint width;
   gint height;
-  GdkWindowState window_state;
+  GdkToplevelState window_state;
 
   GtrProfileManager *prof_manager;
 
@@ -150,9 +150,9 @@ gtr_window_update_statusbar_message_count (GtrTab * tab,
 static GtrWindow *
 get_drop_window (GtkWidget * widget)
 {
-  GtkWidget *target_window;
+  GtkWindow *target_window;
 
-  target_window = gtk_widget_get_toplevel (widget);
+  target_window = GTK_WINDOW(gtk_widget_get_root (widget));
   g_return_val_if_fail (GTR_IS_WINDOW (target_window), NULL);
 
   return GTR_WINDOW (target_window);
@@ -226,12 +226,12 @@ set_window_title (GtrWindow * window, gboolean with_path)
       title = g_strdup (_("Translation Editor"));
     }
 
-  //gtk_window_set_title (GTK_WINDOW (window), title);
+  gtk_window_set_title (GTK_WINDOW (window), title);
 
   // notebook headerbar
   header = GTK_HEADER_BAR (gtr_tab_get_header (GTR_TAB (priv->active_tab)));
-  gtk_header_bar_set_title (header, title);
-  gtk_widget_show_all(GTK_WIDGET(header));
+  //gtk_header_bar_set_title (header, title);
+  gtk_widget_show(GTK_WIDGET(header));
 
   //g_free (title);
 }
@@ -339,7 +339,7 @@ notebook_tab_added (GtkNotebook * notebook,
 static void
 gtr_window_init (GtrWindow *window)
 {
-  GtkTargetList *tl;
+  //GtkTargetList *tl;
   GtrWindowPrivate *priv = gtr_window_get_instance_private(window);
 
   priv->search_bar_shown = FALSE;
@@ -414,7 +414,7 @@ gtr_window_init (GtrWindow *window)
                        gtr_dl_teams_get_header (GTR_DL_TEAMS (priv->dlteams)),
                        "dlteams");
 
-  gtk_widget_show_all (priv->stack);
+  gtk_widget_show (priv->stack);
 
   // translation memory
   priv->translation_memory = GTR_TRANSLATION_MEMORY (gtr_gda_new());
@@ -436,9 +436,9 @@ save_window_state (GtrWindow * window)
   GtrWindowPrivate *priv = gtr_window_get_instance_private(window);
 
   if ((priv->window_state &
-        (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN)) == 0)
+        (GDK_TOPLEVEL_STATE_MAXIMIZED | GDK_TOPLEVEL_STATE_FULLSCREEN)) == 0)
     {
-      gtk_window_get_size (GTK_WINDOW (window), &priv->width, &priv->height);
+      gtk_window_get_default_size (GTK_WINDOW (window), &priv->width, &priv->height);
       g_settings_set (priv->state_settings, GTR_SETTINGS_WINDOW_SIZE,
                                "(ii)", priv->width, priv->height);
     }
@@ -471,7 +471,7 @@ gtr_window_finalize (GObject * object)
   G_OBJECT_CLASS (gtr_window_parent_class)->finalize (object);
 }
 
-static gboolean
+/*static gboolean
 gtr_window_configure_event (GtkWidget * widget, GdkEventConfigure * event)
 {
   GtrWindow *window = GTR_WINDOW (widget);
@@ -482,7 +482,7 @@ gtr_window_configure_event (GtkWidget * widget, GdkEventConfigure * event)
 
   return GTK_WIDGET_CLASS (gtr_window_parent_class)->configure_event (widget,
                                                                       event);
-}
+}*/
 
 static void
 gtr_window_class_init (GtrWindowClass *klass)
@@ -493,7 +493,7 @@ gtr_window_class_init (GtrWindowClass *klass)
   object_class->finalize = gtr_window_finalize;
   object_class->dispose = gtr_window_dispose;
 
-  widget_class->configure_event = gtr_window_configure_event;
+  //widget_class->configure_event = gtr_window_configure_event;
 
   gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
                                                "/org/gnome/translator/gtr-window.ui");
@@ -519,13 +519,15 @@ gtr_window_remove_tab (GtrWindow * window)
   GtrWindowPrivate *priv = gtr_window_get_instance_private(window);
   if (priv->active_tab != NULL)
   {
-    gtk_widget_destroy(GTK_WIDGET(priv->active_tab));
+    //gtk_container_remove(GTK_CONTAINER(window), GTK_WIDGET(priv->active_tab));
+    g_object_unref(priv->active_tab);
   }
   //as set_window_title not working in gtr_window_create_tab that's why we are removing whole child of stack 
and again adding it in gtr_window_create_tab
-  if (gtk_stack_get_child_by_name(priv->header_stack,"poeditor") != NULL)
+  /*if (gtk_stack_get_child_by_name(priv->header_stack,"poeditor") != NULL)
   {
-    gtk_widget_destroy(GTK_WIDGET(gtk_stack_get_child_by_name(priv->header_stack,"poeditor")));
-  }
+    //gtk_container_remove(GTK_CONTAINER(window), 
GTK_WIDGET(gtk_stack_get_child_by_name(priv->header_stack,"poeditor")));
+    g_object_unref ()
+  }*/
 }
 
 /**
@@ -587,10 +589,10 @@ gtr_window_create_tab (GtrWindow * window, GtrPo * po)
   gtr_notebook_reset_sort (GTR_NOTEBOOK (priv->notebook));
   */
 
-  if (gtk_stack_get_child_by_name (priv->stack,"poeditor") == NULL) {
+  if (gtk_stack_get_child_by_name (GTK_STACK(priv->stack),"poeditor") == NULL) {
     gtk_stack_add_named (GTK_STACK (priv->stack), GTK_WIDGET(priv->active_tab), "poeditor");
   }
-  if (gtk_stack_get_child_by_name (priv->header_stack,"poeditor") == NULL) {
+  if (gtk_stack_get_child_by_name (GTK_STACK(priv->header_stack),"poeditor") == NULL) {
     gtk_stack_add_named (GTK_STACK (priv->header_stack),
                          gtr_tab_get_header (GTR_TAB (priv->active_tab)),
                          "poeditor");
@@ -901,7 +903,7 @@ gtr_window_show_tm_dialog (GtrWindow *window)
   dlg = gtr_translation_memory_dialog_new (GTK_WINDOW (window),
                                            priv->translation_memory);
 
-  g_signal_connect (dlg, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+  g_signal_connect (dlg, "response", G_CALLBACK (gtk_window_destroy), NULL);
 
   gtk_window_present (GTK_WINDOW (dlg));
 }
diff --git a/src/gtr-window.h b/src/gtr-window.h
index 862e4db2..dfd5822b 100644
--- a/src/gtr-window.h
+++ b/src/gtr-window.h
@@ -70,6 +70,7 @@ GtkWidget *gtr_window_get_tab_from_location (GtrWindow * window, GFile * locatio
 //void gtr_window_set_active_tab (GtrWindow * window, GtkWidget * tab);
 
 //void _gtr_window_close_tab (GtrWindow * window, GtrTab * tab);
+void gtr_window_remove_tab (GtrWindow * window);
 
 GtrTranslationMemory * gtr_window_get_tm (GtrWindow *window);
 void gtr_window_show_tm_dialog (GtrWindow *window);
diff --git a/src/meson.build b/src/meson.build
index 5cf6a74d..475a2645 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -62,7 +62,7 @@ sources = files(
   'gtr-profile-manager.c',
   'gtr-settings.c',
   'gtr-tab.c',
-  'gtr-tab-label.c',
+  # 'gtr-tab-label.c',
   'gtr-utils.c',
   'gtr-view.c',
   'gtr-projects.c',
diff --git a/src/translation-memory/gtr-translation-memory-ui.c 
b/src/translation-memory/gtr-translation-memory-ui.c
index 97119ea8..b3f751f7 100644
--- a/src/translation-memory/gtr-translation-memory-ui.c
+++ b/src/translation-memory/gtr-translation-memory-ui.c
@@ -244,7 +244,7 @@ popup_menu_remove_from_memory (GtkMenuItem *menuitem,
   showed_message_cb (priv->tab, priv->msg, tm_ui);
 }*/
 
-static GtkWidget *
+/*static GtkWidget *
 create_tree_popup_menu (GtrTranslationMemoryUi *self)
 {
   GtkWidget *menu;
@@ -253,20 +253,20 @@ create_tree_popup_menu (GtrTranslationMemoryUi *self)
   menu = gtk_menu_new ();
 
   item = gtk_menu_item_new_with_mnemonic (_("_Use this translation"));
-  /*g_signal_connect (item, "activate",
-                    G_CALLBACK (popup_menu_translation_activate), self);*/
+  //g_signal_connect (item, "activate",
+                    //G_CALLBACK (popup_menu_translation_activate), self);
   gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
 
   item = gtk_menu_item_new_with_mnemonic (_("_Remove"));
-  /*g_signal_connect (item, "activate",
-                    G_CALLBACK (popup_menu_remove_from_memory), self);*/
+  //g_signal_connect (item, "activate",
+                    //G_CALLBACK (popup_menu_remove_from_memory), self);
   gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
   gtk_widget_set_sensitive (item, TRUE);
 
   gtk_widget_show_all (menu);
 
   return menu;
-}
+}*/
 
 /*static void
 tree_popup_menu_detach (GtrTranslationMemoryUi *self, GtkMenu * menu)
@@ -341,12 +341,12 @@ tree_view_button_press_event (GtkTreeView *tree,
   return TRUE;
 }*/
 
-static gboolean
+/*static gboolean
 tree_view_popup_menu (GtkTreeView *tree, GtrTranslationMemoryUi *tm_ui)
 {
   gtr_translation_memory_ui_show_menu (tm_ui, NULL);
   return TRUE;
-}
+}*/
 
 static void
 gtr_translation_memory_ui_init (GtrTranslationMemoryUi * tm_ui)
@@ -404,8 +404,8 @@ gtr_translation_memory_ui_init (GtrTranslationMemoryUi * tm_ui)
   /*g_signal_connect (priv->tree_view, "button-press-event",
                     G_CALLBACK (tree_view_button_press_event), tm_ui);*/
 
-  g_signal_connect (priv->tree_view, "popup-menu",
-                    G_CALLBACK (tree_view_popup_menu), tm_ui);
+  /*g_signal_connect (priv->tree_view, "popup-menu",
+                    G_CALLBACK (tree_view_popup_menu), tm_ui);*/
 
   g_signal_connect (priv->tree_view, "row-activated",
                     G_CALLBACK (tree_view_row_activated), tm_ui);
@@ -462,7 +462,7 @@ gtr_translation_memory_ui_new (GtkWidget *tab,
                     "showed-message", G_CALLBACK (showed_message_cb), tm_ui);
 
   /* Scrolledwindow needs to be realized to add a widget */
-  gtk_container_add (GTK_CONTAINER (tm_ui), priv->tree_view);
+  gtk_frame_set_child (GTK_FRAME (tm_ui), priv->tree_view);
 
   return GTK_WIDGET (tm_ui);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]