本文整理汇总了C++中GTK_STATUSBAR函数的典型用法代码示例。如果您正苦于以下问题:C++ GTK_STATUSBAR函数的具体用法?C++ GTK_STATUSBAR怎么用?C++ GTK_STATUSBAR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GTK_STATUSBAR函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ui_log_level_info
/* Map G_LOG_LEVEL_INFO logs to the window's status bar. */
static void
ui_log_level_info (const gchar * log_domain, GLogLevelFlags log_level,
const char * message, gpointer user_data)
{
static GtkWidget * statusbar;
static guint context;
static guint initialized = 0;
if (!initialized)
{
statusbar = GET_OBJECT ("statusbar");
context = gtk_statusbar_get_context_id(GTK_STATUSBAR (statusbar), "Game messages");
initialized = 1;
}
gtk_statusbar_pop (GTK_STATUSBAR (statusbar), context);
gtk_statusbar_push (GTK_STATUSBAR (statusbar), context, message);
gtk_main_iteration();
}
开发者ID:davazp,项目名称:connection,代码行数:18,代码来源:conn-ui.c
示例2: statusbar_clear_status
void
statusbar_clear_status(StatusBar_t *statusbar)
{
if (statusbar->message_id)
gtk_statusbar_remove(GTK_STATUSBAR(statusbar->status),
statusbar->status_id,
statusbar->message_id);
}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:8,代码来源:imap_statusbar.c
示例3: mark_set_callback
static void
mark_set_callback (GtkTextBuffer *buffer,
const GtkTextIter *new_location,
GtkTextMark *mark,
gpointer data)
{
update_statusbar (buffer, GTK_STATUSBAR (data));
}
开发者ID:3dfxmadscientist,项目名称:gnome-apps,代码行数:8,代码来源:application.c
示例4: clear_widgets
void clear_widgets()
{
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(chkLED1), FALSE);
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(chkLED2), FALSE);
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(chkLED3), FALSE);
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(chkLED4), FALSE);
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(chkRumble), FALSE);
gtk_statusbar_push(GTK_STATUSBAR(statBattery), 0, "");
gtk_statusbar_push(GTK_STATUSBAR(statExtension), 0, "");
clear_acc_widgets();
clear_ir_data();
clear_nunchuk_widgets();
clear_classic_widgets();
clear_motionplus_widgets();
}
开发者ID:bobbens,项目名称:cwiid,代码行数:17,代码来源:main.c
示例5: explorer_init
static void explorer_init(Explorer *self) {
if (g_file_test (FYRE_DATADIR "/explorer.glade", G_FILE_TEST_EXISTS))
self->xml = glade_xml_new (FYRE_DATADIR "/explorer.glade", NULL, NULL);
if (!self->xml)
self->xml = glade_xml_new(BR_DATADIR("/fyre/explorer.glade"), NULL, NULL);
if (!self->xml) {
GtkWidget *dialog;
dialog = gtk_message_dialog_new_with_markup(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
"<b>Fyre can't find its data files.</b>\n\n"
"The main glade file could not be located.\n"
"We tried looking for it in the following places:\n"
"\n"
" %s\n"
" %s",
FYRE_DATADIR "/explorer.glade",
BR_DATADIR("/fyre/explorer.glade"));
gtk_dialog_run(GTK_DIALOG(dialog));
exit(0);
}
self->window = glade_xml_get_widget(self->xml, "explorer_window");
fyre_set_icon_later(self->window);
fyre_set_icon_later(glade_xml_get_widget(self->xml, "animation_window"));
fyre_set_icon_later(glade_xml_get_widget(self->xml, "interactive_prefs"));
fyre_set_icon_later(glade_xml_get_widget(self->xml, "cluster_window"));
fyre_set_icon_later(glade_xml_get_widget(self->xml, "about_window"));
fyre_set_icon_later(glade_xml_get_widget(self->xml, "error dialog"));
/* Connect signal handlers */
glade_xml_signal_connect_data(self->xml, "on_randomize", G_CALLBACK(on_randomize), self);
glade_xml_signal_connect_data(self->xml, "on_load_defaults", G_CALLBACK(on_load_defaults), self);
glade_xml_signal_connect_data(self->xml, "on_save", G_CALLBACK(on_save), self);
glade_xml_signal_connect_data(self->xml, "on_save_exr", G_CALLBACK(on_save_exr), self);
glade_xml_signal_connect_data(self->xml, "on_quit", G_CALLBACK(on_quit), self);
glade_xml_signal_connect_data(self->xml, "on_pause_rendering_toggle", G_CALLBACK(on_pause_rendering_toggle), self);
glade_xml_signal_connect_data(self->xml, "on_load_from_image", G_CALLBACK(on_load_from_image), self);
glade_xml_signal_connect_data(self->xml, "on_widget_toggle", G_CALLBACK(on_widget_toggle), self);
glade_xml_signal_connect_data(self->xml, "on_zoom_reset", G_CALLBACK(on_zoom_reset), self);
glade_xml_signal_connect_data(self->xml, "on_zoom_in", G_CALLBACK(on_zoom_in), self);
glade_xml_signal_connect_data(self->xml, "on_zoom_out", G_CALLBACK(on_zoom_out), self);
glade_xml_signal_connect_data(self->xml, "on_render_time_changed", G_CALLBACK(on_render_time_changed), self);
glade_xml_signal_connect_data(self->xml, "on_interactive_prefs_delete", G_CALLBACK(on_interactive_prefs_delete), self);
#ifndef HAVE_EXR
/* If we don't have OpenEXR support, gray out the menu item
* so it sits there taunting the user and not breaking HIG
*/
gtk_widget_set_sensitive(glade_xml_get_widget(self->xml, "save_image_as_exr"), FALSE);
#endif
/* Set up the statusbar */
self->statusbar = GTK_STATUSBAR(glade_xml_get_widget(self->xml, "statusbar"));
self->render_status_context = gtk_statusbar_get_context_id(self->statusbar, "Rendering status");
self->speed_timer = g_timer_new();
self->auto_update_rate_timer = g_timer_new();
self->status_update_rate_timer = g_timer_new();
}
开发者ID:ain101,项目名称:Fyre,代码行数:58,代码来源:explorer.c
示例6: eom_statusbar_init
static void
eom_statusbar_init (EomStatusbar *statusbar)
{
EomStatusbarPrivate *priv;
GtkWidget *vbox;
statusbar->priv = EOM_STATUSBAR_GET_PRIVATE (statusbar);
priv = statusbar->priv;
gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (statusbar), TRUE);
priv->img_num_statusbar = gtk_statusbar_new ();
gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (priv->img_num_statusbar), FALSE);
gtk_widget_set_size_request (priv->img_num_statusbar, 100, 10);
gtk_widget_show (priv->img_num_statusbar);
gtk_box_pack_end (GTK_BOX (statusbar),
priv->img_num_statusbar,
FALSE,
TRUE,
0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_box_pack_end (GTK_BOX (statusbar),
vbox,
FALSE,
FALSE,
2);
statusbar->priv->progressbar = gtk_progress_bar_new ();
gtk_box_pack_end (GTK_BOX (vbox),
priv->progressbar,
TRUE,
TRUE,
2);
gtk_widget_set_size_request (priv->progressbar, -1, 10);
gtk_widget_show (vbox);
gtk_widget_hide (statusbar->priv->progressbar);
}
开发者ID:steev,项目名称:mate-image-viewer,代码行数:45,代码来源:eom-statusbar.c
示例7: progress_update_display
static void
progress_update_display (TrackedTask *task)
{
GtkProgressBar *progress = NULL;
GtkStatusbar *status = NULL;
GtkLabel *label = NULL;
GtkWidget *widget;
TrackedPart *part;
gdouble fraction;
guint id;
if (task->builder == NULL)
return;
/* Dig out our progress display stuff */
widget = GTK_WIDGET (gtk_builder_get_object (task->builder, "progress-bar"));
if (widget == NULL)
g_warning ("cannot display progress because seahorse window has no progress widget");
else
progress = GTK_PROGRESS_BAR (widget);
widget = GTK_WIDGET (gtk_builder_get_object (task->builder, "status"));
if (GTK_IS_STATUSBAR (widget)) {
status = GTK_STATUSBAR (widget);
} else {
widget = GTK_WIDGET (gtk_builder_get_object (task->builder, "progress-details"));
if (GTK_IS_LABEL (widget))
label = GTK_LABEL (widget);
}
/* The details is the first on a begun part */
part = tracked_part_find (task, find_part_begun_with_details, NULL);
if (status) {
id = gtk_statusbar_get_context_id (status, "operation-progress");
gtk_statusbar_pop (status, id);
if (part != NULL)
gtk_statusbar_push (status, id, part->details);
} else if (label) {
gtk_label_set_text (label, part ? part->details : "");
}
/* If all parts are running simultaneously then indeterminate */
if (task->parts_prepped == 0 && task->parts_ended == 0) {
fraction = -1;
} else {
fraction = (gdouble)task->parts_ended /
(gdouble)task->parts->length;
}
if (progress) {
if (fraction >= 0.0) {
stop_pulse (progress);
gtk_progress_bar_set_fraction (progress, fraction);
} else {
start_pulse (progress);
}
}
}
开发者ID:atulhjp,项目名称:seahorse,代码行数:57,代码来源:seahorse-progress.c
示例8: gtkgui_set_statustext
void gtkgui_set_statustext(char *testo)
{
// gdk_threads_enter();
contextid=gtk_statusbar_push(GTK_STATUSBAR(statusbar),
contextid, (gchar *) testo);
// gdk_threads_leave();
}
开发者ID:dyne,项目名称:MuSE,代码行数:9,代码来源:musegtk.cpp
示例9: gnac_ui_push_status
void
gnac_ui_push_status(const gchar *message)
{
GtkStatusbar *status_bar = GTK_STATUSBAR(gnac_ui_get_widget("statusbar"));
g_free(status_msg);
status_msg = g_strdup(message);
gtk_statusbar_pop(status_bar, 0);
gtk_statusbar_push(status_bar, 0, status_msg);
}
开发者ID:GNOME,项目名称:gnac,代码行数:9,代码来源:gnac-ui.c
示例10: dcc_gnome_make_load_bar
static GtkWidget * dcc_gnome_make_load_bar (void)
{
GtkWidget *bar;
gint context_id;
bar = gtk_statusbar_new ();
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR (bar), "load");
gtk_statusbar_push(GTK_STATUSBAR (bar), context_id, "Load: ");
g_timeout_add (2000, /* ms */
dcc_gnome_load_update_cb,
bar);
dcc_gnome_load_update_cb (bar);
return bar;
}
开发者ID:aosm,项目名称:distcc,代码行数:18,代码来源:mon-gnome.c
示例11: create_status_bar
static void
create_status_bar (EtStatusBar *self)
{
EtStatusBarPrivate *priv;
priv = et_status_bar_get_instance_private (self);
/* Specify a size to avoid statubar resizing if the message is too long */
gtk_widget_set_size_request (GTK_WIDGET (self), 200, -1);
/* Create serie */
priv->message_context = gtk_statusbar_get_context_id (GTK_STATUSBAR (self),
"messages");
priv->timer_context = gtk_statusbar_get_context_id (GTK_STATUSBAR (self),
"timer");
et_status_bar_message (self, _("Ready to start"), TRUE);
}
开发者ID:GNOME,项目名称:easytag,代码行数:18,代码来源:status_bar.c
示例12: statusbar_set_zoom
void
statusbar_set_zoom(StatusBar_t *statusbar, gint factor)
{
char scratch[16];
sprintf(scratch, "1:%d", factor);
gtk_statusbar_push(GTK_STATUSBAR(statusbar->zoom), statusbar->zoom_id,
scratch);
}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:9,代码来源:imap_statusbar.c
示例13: game_message
void game_message(const char *format, ...)
{
int id;
va_list ap;
char *message;
GtkWidget *status;
va_start(ap, format);
message = g_strdup_vprintf(format, ap);
va_end(ap);
status = lookup_widget(main_win, "statusbar");
id = gtk_statusbar_get_context_id(GTK_STATUSBAR(status), "Main");
gtk_statusbar_pop(GTK_STATUSBAR(status), id);
gtk_statusbar_push(GTK_STATUSBAR(status), id, message);
g_free(message);
}
开发者ID:ralight,项目名称:ggz,代码行数:18,代码来源:game.c
示例14: statusbar_remove_temporary_msg
/*
* Timeout callbacks for statusbar_push_temporary_msg
*/
static gboolean
statusbar_remove_temporary_msg(gpointer data)
{
guint msg_id = GPOINTER_TO_UINT(data);
gtk_statusbar_remove(GTK_STATUSBAR(info_bar), main_ctx, msg_id);
return FALSE;
}
开发者ID:AmesianX,项目名称:wireshark,代码行数:12,代码来源:main_statusbar.c
示例15: statusbar_pop_file_msg
/*
* Pop a message referring to file access off the statusbar.
*/
static void
statusbar_pop_file_msg(void)
{
/*g_warning("statusbar_pop");*/
if (status_levels[STATUS_LEVEL_FILE] > 0) {
status_levels[STATUS_LEVEL_FILE]--;
}
gtk_statusbar_pop(GTK_STATUSBAR(info_bar), file_ctx);
}
开发者ID:AmesianX,项目名称:wireshark,代码行数:12,代码来源:main_statusbar.c
示例16: push_button_clicked
static void push_button_clicked(GtkWidget *widget, gpointer data)
{
static int count = 1;
gchar *buffer;
buffer = g_strdup_printf("Item %d", count++);
gtk_statusbar_push(GTK_STATUSBAR(statusbar), GPOINTER_TO_INT(data), buffer);
g_free(buffer);
}
开发者ID:RainMark,项目名称:gtk3-tutorial,代码行数:9,代码来源:statusbar.c
示例17: _set_admin_mode
static void _set_admin_mode(GtkToggleAction *action)
{
// GtkAction *admin_action = NULL;
if (action)
working_sview_config.admin_mode
= gtk_toggle_action_get_active(action);
if (!working_sview_config.admin_mode)
gtk_statusbar_pop(GTK_STATUSBAR(main_statusbar),
STATUS_ADMIN_MODE);
else
gtk_statusbar_push(GTK_STATUSBAR(main_statusbar),
STATUS_ADMIN_MODE,
"Admin mode activated! "
"Think before you alter anything.");
gtk_action_group_set_sensitive(admin_action_group,
working_sview_config.admin_mode);
}
开发者ID:artpol84,项目名称:slurm,代码行数:18,代码来源:sview.c
示例18: gva_main_statusbar_pop
/**
* gva_main_statusbar_pop:
* @context_id: a context identifier
*
* Thin wrapper for gtk_statusbar_pop() that uses the main window's
* status bar.
*
* Removes the first message in the status bar's stack with the given
* context id.
*
* Note that this may not change the displayed message, if the message
* at the top of the stack has a different context id.
**/
void
gva_main_statusbar_pop (guint context_id)
{
GtkStatusbar *statusbar;
statusbar = GTK_STATUSBAR (GVA_WIDGET_MAIN_STATUSBAR);
gtk_statusbar_pop (statusbar, context_id);
}
开发者ID:GNOME,项目名称:gnome-video-arcade,代码行数:22,代码来源:gva-main.c
示例19: on_menu_options_macspoofing_toggle
void on_menu_options_macspoofing_toggle (GtkCheckMenuItem *menu, struct term_node *node)
{
GtkWidget *notebook, *main_statusbar;
u_int8_t mode;
notebook = lookup_widget(GTK_WIDGET(menu), "main_vhv2_notebook");
mode = gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook));
main_statusbar = lookup_widget(GTK_WIDGET(notebook), "main_statusbar");
if (node->mac_spoofing) {
node->mac_spoofing = 0;
gtk_statusbar_push(GTK_STATUSBAR(main_statusbar), 0, "MAC Spoofing set to OFF");
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(menu), FALSE);
} else {
node->mac_spoofing = 1;
gtk_statusbar_push(GTK_STATUSBAR(main_statusbar), 0, "MAC Spoofing set to ON");
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(menu), TRUE);
}
}
开发者ID:BuddhaLabs,项目名称:yersinia-OSX,代码行数:18,代码来源:gtk-callbacks.c
示例20: gtk_c_on_file_quit_activate
void gtk_c_on_file_quit_activate(GtkMenuItem *menuitem, gpointer user_data)
{
struct gtk_s_helper *helper;
helper = (struct gtk_s_helper *)user_data;
gtk_statusbar_push(GTK_STATUSBAR(helper->statusbar), 0, "Exiting... be patient");
gtk_main_quit();
}
开发者ID:BuddhaLabs,项目名称:yersinia-OSX,代码行数:9,代码来源:gtk-callbacks.c
注:本文中的GTK_STATUSBAR函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论