After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783598 - Entry Completion menu item with text invisible
Entry Completion menu item with text invisible
Status: RESOLVED OBSOLETE
Product: glade
Classification: Applications
Component: general
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-09 14:29 UTC by medeoTL
Modified: 2018-03-26 16:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of the error (7.91 KB, image/png)
2017-06-09 14:29 UTC, medeoTL
Details

Description medeoTL 2017-06-09 14:29:42 UTC
Created attachment 353465 [details]
Screenshot of the error

If you set a GtkEntryCompletion in glade, and add some item to a GtkListStore (inside glade file or via python script), the menu *items* for the completion are selected but the text of the completion isn't displayed.

Screenshot of the error attached.

code to riproduce the bug:

*** PYTHON ***

#!/usr/bin/env python3
'''Double Entry Completion

   Showing a strange behavour when importing completion from Glade

'''

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk

def create_completion_model(name1, name2, name3):
    ''' Creates a tree model containing the completions. '''
    store = Gtk.ListStore(str)
    iter = store.append()
    # Append one word
    store.set(iter, 0, name1)

    # Append another word
    iter = store.append()
    store.set(iter, 0, name2)

    # And another word
    iter = store.append()
    store.set(iter, 0, name3)

    return store


class Handler:
    def onDeleteWindow(self, *args):
        Gtk.main_quit(*args)

GUI_file = "doubleentry.glade"
builder = Gtk.Builder()
builder.add_from_file(GUI_file)
builder.connect_signals( Handler() )

entry1 = builder.get_object("entry1")
entry2 = builder.get_object("entry2")

completion1 = Gtk.EntryCompletion()
completion2 = builder.get_object("completion2")

entry1.set_completion(completion1)
# entry2 have already setted completion2 in glade file

completion1.set_model(create_completion_model("Alan", "Bonny", "Clyde"))
completion2.set_model(create_completion_model("Alan", "Bonny", "Clyde"))

completion1.set_text_column(0)
# completion2 text column already setted to 0 on glade

window = builder.get_object("window")
window.show_all()

Gtk.main()



*** GLADE ***

<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 -->
<interface>
  <requires lib="gtk+" version="3.20"/>
  <object class="GtkEntryCompletion" id="completion2">
    <property name="text_column">0</property>
  </object>
  <object class="GtkWindow" id="window">
    <property name="can_focus">False</property>
    <property name="border_width">14</property>
    <signal name="delete-event" handler="onDeleteWindow" swapped="no"/>
    <child>
      <object class="GtkBox">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="spacing">6</property>
        <child>
          <object class="GtkEntry" id="entry1">
            <property name="visible">True</property>
            <property name="can_focus">True</property>
          </object>
          <packing>
            <property name="expand">False</property>
            <property name="fill">True</property>
            <property name="position">0</property>
          </packing>
        </child>
        <child>
          <object class="GtkEntry" id="entry2">
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="completion">completion2</property>
          </object>
          <packing>
            <property name="expand">False</property>
            <property name="fill">True</property>
            <property name="position">1</property>
          </packing>
        </child>
      </object>
    </child>
    <child type="titlebar">
      <placeholder/>
    </child>
  </object>
</interface>
Comment 1 GNOME Infrastructure Team 2018-03-26 16:00:58 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glade/issues/272.