EphyLocationEntry

EphyLocationEntry — A location entry widget

Synopsis

                    EphyLocationEntry;
void                ephy_location_entry_set_location    (EphyLocationEntry *entry,
                                                         const char *address);
const char *        ephy_location_entry_get_location    (EphyLocationEntry *entry);
gboolean            ephy_location_entry_get_can_undo    (EphyLocationEntry *entry);
gboolean            ephy_location_entry_get_can_redo    (EphyLocationEntry *entry);
void                ephy_location_entry_activate        (EphyLocationEntry *entry);
gboolean            ephy_location_entry_reset           (EphyLocationEntry *entry);
void                ephy_location_entry_undo_reset      (EphyLocationEntry *entry);
void                ephy_location_entry_set_favicon     (EphyLocationEntry *entry,
                                                         GdkPixbuf *pixbuf);
void                ephy_location_entry_set_show_lock   (EphyLocationEntry *entry,
                                                         gboolean show_lock);
void                ephy_location_entry_set_lock_stock  (EphyLocationEntry *entry,
                                                         const char *stock_id);
void                ephy_location_entry_set_lock_tooltip
                                                        (EphyLocationEntry *entry,
                                                         const char *tooltip);
void                ephy_location_entry_set_completion  (EphyLocationEntry *entry,
                                                         GtkTreeModel *model,
                                                         guint text_col,
                                                         guint action_col,
                                                         guint keywords_col,
                                                         guint relevance_col,
                                                         guint url_col,
                                                         guint extra_col,
                                                         guint favicon_col);
void                ephy_location_entry_set_match_func  (EphyLocationEntry *entry,
                                                         GtkEntryCompletionMatchFunc match_func,
                                                         gpointer user_data,
                                                         GDestroyNotify notify);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkWidget
               +----GtkEntry
                     +----EphyLocationEntry

Implemented Interfaces

EphyLocationEntry implements AtkImplementorIface, GtkBuildable, GtkEditable and GtkCellEditable.

Properties

  "favicon"                  GdkPixbuf*            : Write
  "location"                 gchar*                : Read / Write
  "lock-stock-id"            gchar*                : Write
  "show-favicon"             gboolean              : Write
  "show-lock"                gboolean              : Write

Signals

  "get-location"                                   : Run First
  "get-title"                                      : Run First
  "lock-clicked"                                   : Run First
  "user-changed"                                   : Run First

Description

EphyLocationEntry implements the location bar in the main Epiphany window.

Details

EphyLocationEntry

typedef struct _EphyLocationEntry EphyLocationEntry;


ephy_location_entry_set_location ()

void                ephy_location_entry_set_location    (EphyLocationEntry *entry,
                                                         const char *address);

Sets the current address of entry to address.

entry :

an EphyLocationEntry widget

address :

new location address

ephy_location_entry_get_location ()

const char *        ephy_location_entry_get_location    (EphyLocationEntry *entry);

Retrieves the text displayed by the internal GtkEntry of entry. This is the currently displayed text, like in any GtkEntry.

entry :

an EphyLocationEntry widget

Returns :

the text inside the inner GtkEntry of entry, owned by GTK+

ephy_location_entry_get_can_undo ()

gboolean            ephy_location_entry_get_can_undo    (EphyLocationEntry *entry);

Wheter entry can restore the displayed user modified text to the unmodified previous text.

entry :

an EphyLocationEntry widget

Returns :

TRUE or FALSE indicating if the text can be restored

ephy_location_entry_get_can_redo ()

gboolean            ephy_location_entry_get_can_redo    (EphyLocationEntry *entry);

Wheter entry can restore the displayed text to the user modified version before the undo.

entry :

an EphyLocationEntry widget

Returns :

TRUE or FALSE indicating if the text can be restored

ephy_location_entry_activate ()

void                ephy_location_entry_activate        (EphyLocationEntry *entry);

Set focus on entry and select the text whithin. This is called when the user hits Control+L.

entry :

an EphyLocationEntry widget

ephy_location_entry_reset ()

gboolean            ephy_location_entry_reset           (EphyLocationEntry *entry);

Restore the entry to the text corresponding to the current location, this does not fire the user_changed signal. This is called each time the user presses Escape while the location entry is selected.

entry :

an EphyLocationEntry widget

Returns :

TRUE on success, FALSE otherwise

ephy_location_entry_undo_reset ()

void                ephy_location_entry_undo_reset      (EphyLocationEntry *entry);

Undo a previous ephy_location_entry_reset.

entry :

an EphyLocationEntry widget

ephy_location_entry_set_favicon ()

void                ephy_location_entry_set_favicon     (EphyLocationEntry *entry,
                                                         GdkPixbuf *pixbuf);

Sets the icon in the internal EphyIconEntry of entry

entry :

an EphyLocationEntry widget

pixbuf :

a GdkPixbuf to be set as the icon of the entry

ephy_location_entry_set_show_lock ()

void                ephy_location_entry_set_show_lock   (EphyLocationEntry *entry,
                                                         gboolean show_lock);

If show_lock is TRUE, the location bar will show an icon reflecting the security level of the page, by default it's shown only in secure and insecure pages (insecure meaning secure pages with something broken in such security)

entry :

an EphyLocationEntry widget

show_lock :

if entry should show a lock icon indicating the security level of the page

ephy_location_entry_set_lock_stock ()

void                ephy_location_entry_set_lock_stock  (EphyLocationEntry *entry,
                                                         const char *stock_id);

Set the lock icon to be displayed, to actually show the icon see ephy_location_entry_set_show_lock.

entry :

an EphyLocationEntry widget

stock_id :

a stock_id from GTK+ stock icons

ephy_location_entry_set_lock_tooltip ()

void                ephy_location_entry_set_lock_tooltip
                                                        (EphyLocationEntry *entry,
                                                         const char *tooltip);

Set the text to be displayed when hovering the lock icon of entry.

entry :

an EphyLocationEntry widget

tooltip :

the text to be set in the tooltip for the lock icon

ephy_location_entry_set_completion ()

void                ephy_location_entry_set_completion  (EphyLocationEntry *entry,
                                                         GtkTreeModel *model,
                                                         guint text_col,
                                                         guint action_col,
                                                         guint keywords_col,
                                                         guint relevance_col,
                                                         guint url_col,
                                                         guint extra_col,
                                                         guint favicon_col);

Initializes entry to have a GtkEntryCompletion using model as the internal GtkModel. The *_col arguments are for internal data retrieval from model, like when setting the text property of one of the GtkCellRenderer of the completion.

entry :

an EphyLocationEntry widget

model :

the GtkModel for the completion

text_col :

column id to access GtkModel relevant data

action_col :

column id to access GtkModel relevant data

keywords_col :

column id to access GtkModel relevant data

relevance_col :

column id to access GtkModel relevant data

url_col :

column id to access GtkModel relevant data

extra_col :

column id to access GtkModel relevant data

favicon_col :

column id to access GtkModel relevant data

ephy_location_entry_set_match_func ()

void                ephy_location_entry_set_match_func  (EphyLocationEntry *entry,
                                                         GtkEntryCompletionMatchFunc match_func,
                                                         gpointer user_data,
                                                         GDestroyNotify notify);

Sets the match_func for the internal GtkEntryCompletion to match_func.

entry :

an EphyLocationEntry widget

match_func :

a GtkEntryCompletionMatchFunc

user_data :

user_data to pass to the match_func

notify :

a GDestroyNotify, like the one given to gtk_entry_completion_set_match_func

Property Details

The "favicon" property

  "favicon"                  GdkPixbuf*            : Write

The icon corresponding to the current location.


The "location" property

  "location"                 gchar*                : Read / Write

The current location.

Default value: ""


The "lock-stock-id" property

  "lock-stock-id"            gchar*                : Write

Stock id of the security icon.

Default value: NULL


The "show-favicon" property

  "show-favicon"             gboolean              : Write

Whether to show the favicon.

Default value: TRUE


The "show-lock" property

  "show-lock"                gboolean              : Write

If we should show the security icon.

Default value: FALSE

Signal Details

The "get-location" signal

gchar*              user_function                      (EphyLocationEntry *entry,
                                                        gpointer           user_data)      : Run First

entry :

the object on which the signal is emitted

user_data :

user data set when the signal handler was connected.

Returns :

the current page address as a string For drag and drop purposes, the location bar will request you the real address of where it is pointing to. The signal handler for this function should return the address of the currently loaded site.

The "get-title" signal

gchar*              user_function                      (EphyLocationEntry *entry,
                                                        gpointer           user_data)      : Run First

entry :

the object on which the signal is emitted

user_data :

user data set when the signal handler was connected.

Returns :

the current page title as a string For drag and drop purposes, the location bar will request you the title of where it is pointing to. The signal handler for this function should return the title of the currently loaded site.

The "lock-clicked" signal

void                user_function                      (EphyLocationEntry *entry,
                                                        gpointer           user_data)      : Run First

Emitted when the user clicks the security icon inside the EphyLocationEntry.

entry :

the object on which the signal is emitted

user_data :

user data set when the signal handler was connected.

The "user-changed" signal

void                user_function                      (EphyLocationEntry *entry,
                                                        gpointer           user_data)      : Run First

Emitted when the user changes the contents of the internal GtkEntry

entry :

the object on which the signal is emitted

user_data :

user data set when the signal handler was connected.

See Also

GtkEntry