Adjust completion test after modifying the location entry
This commit is contained in:
parent
e3ed65c3f2
commit
964bcd0c1c
|
@ -189,7 +189,8 @@ midori_location_action_class_init (MidoriLocationActionClass* class)
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkWidget*
|
/* Allow this to be used in tests, it's otherwise private */
|
||||||
|
/*static*/ GtkWidget*
|
||||||
midori_location_action_entry_for_proxy (GtkWidget* proxy)
|
midori_location_action_entry_for_proxy (GtkWidget* proxy)
|
||||||
{
|
{
|
||||||
GtkWidget* alignment = gtk_bin_get_child (GTK_BIN (proxy));
|
GtkWidget* alignment = gtk_bin_get_child (GTK_BIN (proxy));
|
||||||
|
|
|
@ -15,6 +15,10 @@
|
||||||
|
|
||||||
#include "midori.h"
|
#include "midori.h"
|
||||||
|
|
||||||
|
/* This is a private function */
|
||||||
|
GtkWidget*
|
||||||
|
midori_location_action_entry_for_proxy (GtkWidget* proxy);
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
const gchar* uri;
|
const gchar* uri;
|
||||||
|
@ -41,7 +45,6 @@ completion_count (void)
|
||||||
{
|
{
|
||||||
MidoriLocationAction* action;
|
MidoriLocationAction* action;
|
||||||
GtkWidget* toolitem;
|
GtkWidget* toolitem;
|
||||||
GtkWidget* alignment;
|
|
||||||
GtkWidget* location_entry;
|
GtkWidget* location_entry;
|
||||||
GtkWidget* entry;
|
GtkWidget* entry;
|
||||||
GtkTreeModel* model;
|
GtkTreeModel* model;
|
||||||
|
@ -49,8 +52,7 @@ completion_count (void)
|
||||||
|
|
||||||
action = g_object_new (MIDORI_TYPE_LOCATION_ACTION, NULL);
|
action = g_object_new (MIDORI_TYPE_LOCATION_ACTION, NULL);
|
||||||
toolitem = gtk_action_create_tool_item (GTK_ACTION (action));
|
toolitem = gtk_action_create_tool_item (GTK_ACTION (action));
|
||||||
alignment = gtk_bin_get_child (GTK_BIN (toolitem));
|
location_entry = midori_location_action_entry_for_proxy (toolitem);
|
||||||
location_entry = gtk_bin_get_child (GTK_BIN (alignment));
|
|
||||||
entry = gtk_bin_get_child (GTK_BIN (location_entry));
|
entry = gtk_bin_get_child (GTK_BIN (location_entry));
|
||||||
model = gtk_combo_box_get_model (GTK_COMBO_BOX (location_entry));
|
model = gtk_combo_box_get_model (GTK_COMBO_BOX (location_entry));
|
||||||
|
|
||||||
|
@ -129,7 +131,6 @@ completion_fill (void)
|
||||||
{
|
{
|
||||||
MidoriLocationAction* action;
|
MidoriLocationAction* action;
|
||||||
GtkWidget* toolitem;
|
GtkWidget* toolitem;
|
||||||
GtkWidget* alignment;
|
|
||||||
GtkWidget* location_entry;
|
GtkWidget* location_entry;
|
||||||
GtkWidget* entry;
|
GtkWidget* entry;
|
||||||
GtkTreeModel* model;
|
GtkTreeModel* model;
|
||||||
|
@ -138,8 +139,7 @@ completion_fill (void)
|
||||||
|
|
||||||
action = g_object_new (MIDORI_TYPE_LOCATION_ACTION, NULL);
|
action = g_object_new (MIDORI_TYPE_LOCATION_ACTION, NULL);
|
||||||
toolitem = gtk_action_create_tool_item (GTK_ACTION (action));
|
toolitem = gtk_action_create_tool_item (GTK_ACTION (action));
|
||||||
alignment = gtk_bin_get_child (GTK_BIN (toolitem));
|
location_entry = midori_location_action_entry_for_proxy (toolitem);
|
||||||
location_entry = gtk_bin_get_child (GTK_BIN (alignment));
|
|
||||||
entry = gtk_bin_get_child (GTK_BIN (location_entry));
|
entry = gtk_bin_get_child (GTK_BIN (location_entry));
|
||||||
|
|
||||||
g_print ("...\n");
|
g_print ("...\n");
|
||||||
|
@ -217,7 +217,6 @@ completion_match (void)
|
||||||
{
|
{
|
||||||
MidoriLocationAction* action;
|
MidoriLocationAction* action;
|
||||||
GtkWidget* toolitem;
|
GtkWidget* toolitem;
|
||||||
GtkWidget* alignment;
|
|
||||||
GtkWidget* location_entry;
|
GtkWidget* location_entry;
|
||||||
GtkWidget* entry;
|
GtkWidget* entry;
|
||||||
GtkEntryCompletion* completion;
|
GtkEntryCompletion* completion;
|
||||||
|
@ -230,8 +229,7 @@ completion_match (void)
|
||||||
midori_location_action_thaw (action);
|
midori_location_action_thaw (action);
|
||||||
|
|
||||||
toolitem = gtk_action_create_tool_item (GTK_ACTION (action));
|
toolitem = gtk_action_create_tool_item (GTK_ACTION (action));
|
||||||
alignment = gtk_bin_get_child (GTK_BIN (toolitem));
|
location_entry = midori_location_action_entry_for_proxy (toolitem);
|
||||||
location_entry = gtk_bin_get_child (GTK_BIN (alignment));
|
|
||||||
entry = gtk_bin_get_child (GTK_BIN (location_entry));
|
entry = gtk_bin_get_child (GTK_BIN (location_entry));
|
||||||
completion = gtk_entry_get_completion (GTK_ENTRY (entry));
|
completion = gtk_entry_get_completion (GTK_ENTRY (entry));
|
||||||
g_signal_connect (completion, "insert-prefix",
|
g_signal_connect (completion, "insert-prefix",
|
||||||
|
|
Loading…
Reference in a new issue