本文整理汇总了C++中GTK_IS_ACTION函数的典型用法代码示例。如果您正苦于以下问题:C++ GTK_IS_ACTION函数的具体用法?C++ GTK_IS_ACTION怎么用?C++ GTK_IS_ACTION使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GTK_IS_ACTION函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: xviewer_properties_dialog_new
/**
* xviewer_properties_dialog_new:
* @parent:
* @thumbview:
* @next_image_action:
* @previous_image_action:
*
*
*
* Returns: (transfer full) (type XviewerPropertiesDialog): a new #XviewerPropertiesDialog
**/
GtkWidget *
xviewer_properties_dialog_new (GtkWindow *parent,
XviewerThumbView *thumbview,
GtkAction *next_image_action,
GtkAction *previous_image_action)
{
GObject *prop_dlg;
g_return_val_if_fail (GTK_IS_WINDOW (parent), NULL);
g_return_val_if_fail (XVIEWER_IS_THUMB_VIEW (thumbview), NULL);
g_return_val_if_fail (GTK_IS_ACTION (next_image_action), NULL);
g_return_val_if_fail (GTK_IS_ACTION (previous_image_action), NULL);
prop_dlg = g_object_new (XVIEWER_TYPE_PROPERTIES_DIALOG,
"thumbview", thumbview,
"next-action", next_image_action,
"prev-action", previous_image_action,
NULL);
if (parent) {
gtk_window_set_transient_for (GTK_WINDOW (prop_dlg), parent);
}
return GTK_WIDGET (prop_dlg);
}
示例2: on_key_import_keyring
static void
on_key_import_keyring (GtkAction* action, SeahorseCatalog* self)
{
GCancellable *cancellable;
SeahorsePgpBackend *backend;
SeahorseGpgmeKeyring *keyring;
GList* objects;
g_return_if_fail (SEAHORSE_IS_CATALOG (self));
g_return_if_fail (GTK_IS_ACTION (action));
objects = seahorse_catalog_get_selected_objects (self);
objects = objects_prune_non_exportable (objects);
/* No objects, nothing to do */
if (objects == NULL)
return;
cancellable = g_cancellable_new ();
backend = seahorse_pgp_backend_get ();
keyring = seahorse_pgp_backend_get_default_keyring (NULL);
seahorse_pgp_backend_transfer_async (backend, objects, SEAHORSE_PLACE (keyring),
cancellable, on_import_complete, g_object_ref (self));
seahorse_progress_show (cancellable, _ ("Importing keys from key servers"), TRUE);
g_object_unref (cancellable);
g_list_free (objects);
}
示例3: on_remote_find
static void
on_remote_find (GtkAction* action, SeahorseKeyserverResults* self)
{
g_return_if_fail (SEAHORSE_IS_KEYSERVER_RESULTS (self));
g_return_if_fail (GTK_IS_ACTION (action));
seahorse_keyserver_search_show (seahorse_viewer_get_window (SEAHORSE_VIEWER (self)));
}
示例4: gl_ui_cmd_file_print
void
gl_ui_cmd_file_print (GtkAction *action,
glWindow *window)
{
glPrintOpDialog *op;
GtkPrintOperationResult result;
gl_debug (DEBUG_COMMANDS, "START");
g_return_if_fail (action && GTK_IS_ACTION(action));
g_return_if_fail (window && GL_IS_WINDOW(window));
op = gl_print_op_dialog_new (GL_VIEW(window->view)->label);
if (window->print_settings)
{
gl_print_op_set_settings (GL_PRINT_OP (op), window->print_settings);
}
result = gtk_print_operation_run (GTK_PRINT_OPERATION (op),
GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
GTK_WINDOW (window),
NULL);
if ( result == GTK_PRINT_OPERATION_RESULT_APPLY )
{
gl_print_op_free_settings (window->print_settings);
window->print_settings = gl_print_op_get_settings (GL_PRINT_OP (op));
}
gl_debug (DEBUG_COMMANDS, "END");
}
示例5: gl_ui_cmd_objects_merge_properties
void
gl_ui_cmd_objects_merge_properties (GtkAction *action,
glWindow *window)
{
gl_debug (DEBUG_COMMANDS, "START");
g_return_if_fail (action && GTK_IS_ACTION(action));
g_return_if_fail (window && GL_IS_WINDOW(window));
if (window->merge_dialog) {
gtk_window_present (GTK_WINDOW(window->merge_dialog));
gtk_window_set_transient_for (GTK_WINDOW (window->merge_dialog),
GTK_WINDOW (window));
} else {
window->merge_dialog =
g_object_ref (
gl_merge_properties_dialog_new (GL_VIEW(window->view)->label,
GTK_WINDOW(window)) );
g_signal_connect (G_OBJECT(window->merge_dialog), "destroy",
G_CALLBACK (gtk_widget_destroyed),
&window->merge_dialog);
gtk_widget_show (GTK_WIDGET (window->merge_dialog));
}
gl_debug (DEBUG_COMMANDS, "END");
}
示例6: gl_ui_cmd_edit_preferences
void
gl_ui_cmd_edit_preferences (GtkAction *action,
glWindow *window)
{
static GtkWidget *dialog = NULL;
gl_debug (DEBUG_COMMANDS, "START");
g_return_if_fail (action && GTK_IS_ACTION(action));
g_return_if_fail (window && GL_IS_WINDOW(window));
if (dialog != NULL)
{
gtk_window_present (GTK_WINDOW (dialog));
gtk_window_set_transient_for (GTK_WINDOW (dialog),
GTK_WINDOW(window));
} else {
dialog = gl_prefs_dialog_new (GTK_WINDOW(window));
g_signal_connect (G_OBJECT (dialog), "destroy",
G_CALLBACK (gtk_widget_destroyed), &dialog);
gtk_widget_show (dialog);
}
gl_debug (DEBUG_COMMANDS, "END");
}
示例7: on_view_collapse_all
static void
on_view_collapse_all (GtkAction* action, SeahorseKeyserverResults* self)
{
g_return_if_fail (SEAHORSE_IS_KEYSERVER_RESULTS (self));
g_return_if_fail (GTK_IS_ACTION (action));
gtk_tree_view_collapse_all (self->pv->view);
}
示例8: on_app_close
static void
on_app_close (GtkAction* action, SeahorseKeyserverResults* self)
{
g_return_if_fail (SEAHORSE_IS_KEYSERVER_RESULTS (self));
g_return_if_fail (action == NULL || GTK_IS_ACTION (action));
seahorse_widget_destroy (SEAHORSE_WIDGET (self));
}
示例9: gl_ui_cmd_help_contents
void
gl_ui_cmd_help_contents (GtkAction *action,
glWindow *window)
{
GError *error = NULL;
gl_debug (DEBUG_COMMANDS, "START");
g_return_if_fail (action && GTK_IS_ACTION(action));
g_return_if_fail (window && GL_IS_WINDOW(window));
gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (window)),
"ghelp:glabels-3.0",
gtk_get_current_event_time(),
&error);
if (error != NULL)
{
g_message ("%s", error->message);
g_error_free (error);
}
gl_debug (DEBUG_COMMANDS, "END");
}
示例10: gnac_ui_utils_set_action_visible
void
gnac_ui_utils_set_action_visible(GtkBuilder *builder,
const gchar *action_name,
gboolean visible)
{
GtkAction *action = gnac_ui_utils_get_action(builder, action_name);
if (GTK_IS_ACTION(action)) gtk_action_set_visible(action, visible);
}
示例11: gnc_plugin_menu_additions_action_cb
/** The user has selected one of the items added by this plugin.
* Invoke the callback function that was registered along with the
* menu item.
*
* @param action A pointer to the action selected by the user. This
* action represents one of the items in the file history menu.
*
* @param data A pointer to the gnc-main-window data to be used by
* this function. This is mainly to find out which window it was
* that had a menu selected.
*/
static void
gnc_plugin_menu_additions_action_cb (GtkAction *action,
GncMainWindowActionData *data)
{
g_return_if_fail(GTK_IS_ACTION(action));
g_return_if_fail(data != NULL);
gnc_extension_invoke_cb(data->data, gnc_main_window_to_scm(data->window));
}
示例12: thunar_history_action_forward
static void
thunar_history_action_forward (GtkAction *action,
ThunarHistory *history)
{
_thunar_return_if_fail (GTK_IS_ACTION (action));
_thunar_return_if_fail (THUNAR_IS_HISTORY (history));
/* go forward one step */
thunar_history_go_forward (history, 1);
}