[gnome-flashback/wip/segeiger/gnome-3-18-inputmethods: 7/7] fixup



commit 40328ce93aaf1881ce4d2349330b127cff313fbb
Author: Sebastian Geiger <sbastig gmx net>
Date:   Mon Jan 18 00:11:10 2016 +0100

    fixup

 gnome-flashback/Adwaita.css                        |    6 ++++
 .../libinput-sources/gf-candidate-popup.c          |   26 +++++++++----------
 2 files changed, 18 insertions(+), 14 deletions(-)
---
diff --git a/gnome-flashback/Adwaita.css b/gnome-flashback/Adwaita.css
index 29dda4e..783afff 100644
--- a/gnome-flashback/Adwaita.css
+++ b/gnome-flashback/Adwaita.css
@@ -4,6 +4,12 @@ GfPopupWindow
   border: 1px solid rgba(0, 0, 0, 0.23);
 }
 
+GfCandidatePopup
+{
+  border-radius: 0;
+  background: rgba(255, 255, 255, 1);
+}
+
 GfInputSourcePopup #input-source
 {
    font-size: 22px;
diff --git a/gnome-flashback/libinput-sources/gf-candidate-popup.c 
b/gnome-flashback/libinput-sources/gf-candidate-popup.c
index 251ad02..94840ac 100644
--- a/gnome-flashback/libinput-sources/gf-candidate-popup.c
+++ b/gnome-flashback/libinput-sources/gf-candidate-popup.c
@@ -31,8 +31,6 @@ struct _GfCandidatePopup
 
   IBusPanelService *service;
 
-  GtkWidget        *window;
-
   GtkWidget        *box_layout;
 
   GtkWidget        *pre_edit_text;
@@ -90,9 +88,9 @@ update_window_location (GfCandidatePopup *popup)
   gint monitor;
   gint x, y;
 
-  gtk_window_get_size (GTK_WINDOW (popup->window), &popup_width, &popup_height);
+  gtk_window_get_size (GTK_WINDOW (popup), &popup_width, &popup_height);
 
-  window = gtk_widget_get_window (popup->window);
+  window = gtk_widget_get_window (GTK_WIDGET (popup));
 
   if (window == NULL)
     return;
@@ -112,10 +110,11 @@ update_window_location (GfCandidatePopup *popup)
   else
     y = y + popup->cursor_height;
 
-  gtk_window_move (GTK_WINDOW (popup->window), x, y);
+  gtk_window_move (GTK_WINDOW (popup), x, y);
 
-  gtk_widget_get_preferred_size (popup->window, NULL, &preferred_window_size);
-  gtk_window_resize (GTK_WINDOW (popup->window),
+  gtk_widget_get_preferred_size (GTK_WIDGET (popup), NULL,
+                                 &preferred_window_size);
+  gtk_window_resize (GTK_WINDOW (popup),
                      preferred_window_size.width, preferred_window_size.height);
 }
 
@@ -196,7 +195,7 @@ update_lookup_table_cb (IBusPanelService *service,
   indexes = NULL;
   candidates = NULL;
 
-  gtk_widget_set_visible (popup->window, visible);
+  gtk_widget_set_visible (GTK_WIDGET (popup), visible);
   update_window_location (popup);
   n_candidates = ibus_lookup_table_get_number_of_candidates (lookup_table);
   cursor_position = ibus_lookup_table_get_cursor_pos (lookup_table);
@@ -246,7 +245,7 @@ static void
 show_lookup_table_cb (IBusPanelService *service,
                       GfCandidatePopup *popup)
 {
-  gtk_widget_show (popup->window);
+  gtk_widget_show (GTK_WIDGET (popup));
   update_window_location (popup);
 }
 
@@ -254,7 +253,7 @@ static void
 hide_lookup_table_cb (IBusPanelService *service,
                       GfCandidatePopup *popup)
 {
-  gtk_widget_hide (popup->window);
+  gtk_widget_hide (GTK_WIDGET (popup));
   update_window_location (popup);
 }
 
@@ -319,13 +318,12 @@ gf_candidate_popup_init (GfCandidatePopup *popup)
 
   popup->candidate_area = gf_candidate_area_new();
 
-  popup->window = gtk_window_new (GTK_WINDOW_POPUP);
-  gtk_widget_set_size_request (GTK_WIDGET (popup->window), 1, 1);
-  context = gtk_widget_get_style_context (popup->window);
+  gtk_widget_set_size_request (GTK_WIDGET (popup), 1, 1);
+  context = gtk_widget_get_style_context (GTK_WIDGET (popup));
   gtk_style_context_add_class (context, "candidate-popup");
 
   popup->box_layout = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
-  gtk_container_add (GTK_CONTAINER (popup->window), popup->box_layout);
+  gtk_container_add (GTK_CONTAINER (popup), popup->box_layout);
 
   popup->pre_edit_text = gtk_label_new (NULL);
   popup->aux_text = gtk_label_new (NULL);


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