• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GTK_PROGRESS_BAR函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GTK_PROGRESS_BAR函数的典型用法代码示例。如果您正苦于以下问题:C++ GTK_PROGRESS_BAR函数的具体用法?C++ GTK_PROGRESS_BAR怎么用?C++ GTK_PROGRESS_BAR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GTK_PROGRESS_BAR函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: linphone_gtk_show_buddy_lookup_window

void linphone_gtk_show_buddy_lookup_window(SipSetupContext *ctx){
	GtkListStore *store;
	GtkCellRenderer *renderer;
	GtkTreeViewColumn *column;
	GtkTreeSelection *select;
	GtkWidget *w=linphone_gtk_create_window("buddylookup");
	GtkWidget *results=linphone_gtk_get_widget(w,"search_results");
	GtkProgressBar *pb=GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar"));
	
	store = gtk_list_store_new(LOOKUP_RESULT_NCOL, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
	
	gtk_tree_view_set_model(GTK_TREE_VIEW(results),GTK_TREE_MODEL(store));
	g_object_unref(G_OBJECT(store));

	renderer = gtk_cell_renderer_text_new ();
	column = gtk_tree_view_column_new_with_attributes (_("Firstname, Lastname"),
                                                   renderer,
                                                   "text", LOOKUP_RESULT_NAME,
                                                   NULL);
	g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
	gtk_tree_view_append_column (GTK_TREE_VIEW (results), column);

	column = gtk_tree_view_column_new_with_attributes (_("SIP address"),
                                                   renderer,
                                                   "text", LOOKUP_RESULT_SIP_URI,
                                                   NULL);
	g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
	gtk_tree_view_append_column (GTK_TREE_VIEW (results), column);
	
	select = gtk_tree_view_get_selection (GTK_TREE_VIEW (results));
	gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);

	gtk_tree_view_set_tooltip_column(GTK_TREE_VIEW(results),LOOKUP_RESULT_ADDRESS);
	g_object_set_data(G_OBJECT(w),"SipSetupContext",ctx);
	g_object_weak_ref(G_OBJECT(w),(GWeakNotify)linphone_gtk_buddy_lookup_window_destroyed,w);
	//g_signal_connect_swapped(G_OBJECT(w),"destroy",(GCallback)linphone_gtk_buddy_lookup_window_destroyed,w);
	gtk_progress_bar_set_fraction(pb,0);
	gtk_progress_bar_set_text(pb,NULL);
	gtk_dialog_add_button(GTK_DIALOG(w),GTK_STOCK_CLOSE,GTK_RESPONSE_CLOSE);
	g_object_set_data(G_OBJECT(w),"last_state",GINT_TO_POINTER(-1));
	gtk_widget_show(w);
}
开发者ID:nightfly19,项目名称:renyang-learn,代码行数:42,代码来源:buddylookup.c


示例2: watch_thread

static gint watch_thread(gpointer data){

	char msg[256];

	//LOG(LOG_DEBUG, "IN : watch_thread()");

	if(thread_running){
		pthread_mutex_lock(&mutex);

		sprintf(msg, _("%d hit"), hit_count);
		if(GTK_IS_LABEL(label_match)){
			gtk_label_set_text(GTK_LABEL(label_match), msg);
			gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR(progress), search_progress);
		}

		pthread_mutex_unlock(&mutex);
//		LOG(LOG_DEBUG, "OUT : watch_thread() : CONTINUE");
		return(1);
	}
	gtk_timeout_remove(tag_timeout);

	show_result_tree();
	if(search_result == NULL)
		push_message(_("No hit."));
	else {
		push_message("");
	}

//	if(ebook_search_method() != SEARCH_METHOD_GREP)
		select_first_item();
	gtk_grab_remove(cancel_dialog);
	gtk_widget_destroy(cancel_dialog);
	cancel_dialog=NULL;
	label_cancel=NULL;


	pthread_mutex_destroy(&mutex);

	//LOG(LOG_DEBUG, "OUT : watch_thread()");

	return(0);
}
开发者ID:fujii,项目名称:ebview,代码行数:42,代码来源:thread_search.c


示例3: replay_update_progress_bar

static void replay_update_progress_bar(int time_offset)
{
	float fraction = (float)time_offset / time_span;
	if (fraction > 1.0) {
		log_debug("fraction=%f", fraction);
		fraction = 1.0;
	}
	if (! direction_forward)
		fraction = 1.0 - fraction;
	gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress_bar), fraction);

	char buf[32];
	time_t tm = replay_start_time + time_offset;
	struct tm *t = localtime(&tm);
	int len = sprintf(buf, "%2d%%   ", (int)(fraction * 100));
	if (len > 0) {
		strftime(&buf[len], sizeof(buf) - len, "[%b %d, %H:%M:%S]",  t);
		gtk_label_set_text(GTK_LABEL(desc_label), buf);
	}
}
开发者ID:dss91,项目名称:omgps,代码行数:20,代码来源:ctx_track_replay.c


示例4: progress_bar_timeout_cb

static int progress_bar_timeout_cb (Simulation *s)
{
	gchar *str;
	double p;
	g_return_val_if_fail (s != NULL, FALSE);

	oregano_engine_get_progress (s->engine, &p);

	if (p >= 1)
		p = 0;

	gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (s->progress), p);

	str = g_strdup_printf (_ ("Progress: <b>%s</b>"),
	                       oregano_engine_get_current_operation (s->engine));
	gtk_label_set_markup (s->progress_label, str);
	g_free (str);

	return TRUE;
}
开发者ID:felipebetancur,项目名称:oregano,代码行数:20,代码来源:simulation.c


示例5: append_progress_page

static void append_progress_page(TyonXceleratorCalibrationAssistant *assistant) {
	TyonXceleratorCalibrationAssistantPrivate *priv = assistant->priv;
	GtkWidget *vbox;

	priv->progress_label = GTK_LABEL(gtk_label_new(NULL));
	priv->progress_page = gtk_hbox_new(FALSE, 0);
	priv->positional = TYON_2D_POSITIONAL(tyon_2d_positional_new());
	vbox = gtk_vbox_new(FALSE, 0);
	priv->progress_bar = GTK_PROGRESS_BAR(gtk_progress_bar_new());

	gtk_box_pack_start(GTK_BOX(priv->progress_page), GTK_WIDGET(priv->positional), FALSE, FALSE, 0);
	gtk_box_pack_start(GTK_BOX(priv->progress_page), vbox, TRUE, TRUE, 0);
	gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(priv->progress_label), TRUE, FALSE, 0);
	gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(priv->progress_bar), TRUE, FALSE, 0);

	gtk_assistant_append_page(GTK_ASSISTANT(assistant), priv->progress_page);
	gtk_assistant_set_page_title(GTK_ASSISTANT(assistant), priv->progress_page, _("Calibration"));
	gtk_assistant_set_page_type(GTK_ASSISTANT(assistant), priv->progress_page, GTK_ASSISTANT_PAGE_PROGRESS);
	gtk_assistant_set_page_complete(GTK_ASSISTANT(assistant), priv->progress_page, FALSE);
}
开发者ID:ngg,项目名称:roccat-tools,代码行数:20,代码来源:tyon_xcelerator_calibration_assistant.c


示例6: rejilla_status_dialog_init

static void
rejilla_status_dialog_init (RejillaStatusDialog *object)
{
	RejillaStatusDialogPrivate *priv;
	GtkWidget *main_box;
	GtkWidget *box;

	priv = REJILLA_STATUS_DIALOG_PRIVATE (object);

	gtk_dialog_add_button (GTK_DIALOG (object),
			       GTK_STOCK_CANCEL,
			       GTK_RESPONSE_CANCEL);

	box = gtk_vbox_new (FALSE, 4);
	gtk_widget_show (box);
	main_box = gtk_dialog_get_content_area (GTK_DIALOG (object));
	gtk_box_pack_end (GTK_BOX (main_box),
			  box,
			  TRUE,
			  TRUE,
			  0);

	priv->progress = gtk_progress_bar_new ();
	gtk_widget_show (priv->progress);
	gtk_progress_bar_set_text (GTK_PROGRESS_BAR (priv->progress), " ");
	gtk_box_pack_start (GTK_BOX (box),
			    priv->progress,
			    TRUE,
			    TRUE,
			    0);

	priv->action = gtk_label_new ("");
	gtk_widget_show (priv->action);
	gtk_label_set_use_markup (GTK_LABEL (priv->action), TRUE);
	gtk_misc_set_alignment (GTK_MISC (priv->action), 0.0, 0.5);
	gtk_box_pack_start (GTK_BOX (box),
			    priv->action,
			    FALSE,
			    TRUE,
			    0);
}
开发者ID:DjCBS3,项目名称:mate-disc-burner,代码行数:41,代码来源:rejilla-status-dialog.c


示例7: _lib_backgroundjobs_progress

static void _lib_backgroundjobs_progress(dt_lib_module_t *self, const guint *key, double progress)
{
  if(!darktable.control->running) return;
  gboolean i_own_lock = dt_control_gdk_lock();
  dt_lib_backgroundjobs_t *d = (dt_lib_backgroundjobs_t*)self->data;

  dt_bgjob_t *j = (dt_bgjob_t*)g_hash_table_lookup(d->jobs, key);
  if(j)
  {
    if( j->type == 0 )
    {
      gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(j->progressbar), CLAMP(progress, 0, 1.0));

#ifdef HAVE_UNITY
      unity_launcher_entry_set_progress( j->darktable_launcher, CLAMP(progress, 0, 1.0));
#endif
    }
  }

  if(i_own_lock) dt_control_gdk_unlock();
}
开发者ID:hauva69,项目名称:darktable,代码行数:21,代码来源:backgroundjobs.c


示例8: interface_set_playing

void interface_set_playing (PlayerState state)
{
	GtkWidget *progress_area;
	progress_area = interface_get_widget ("alignment_progress");
	
	switch(state) {
		case STATE_PLAY_LOCAL:	
			interface_set_playimage("gtk-media-pause");
			gtk_widget_show (progress_area);
			break;
		case STATE_PLAY_STREAM:
			interface_set_playimage("gtk-media-stop");
			gtk_widget_hide (progress_area);
			break;
		case STATE_PLAY_NOTHING:
			interface_set_playimage("gtk-media-play");
			interface_set_songinfo ("", "");
			gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progress), 0);
			break;
	}
}
开发者ID:BackupTheBerlios,项目名称:tractasono-svn,代码行数:21,代码来源:interface.c


示例9: biblio_init

GuBiblio* biblio_init (GtkBuilder* builder) {
    g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL);

    GuBiblio* b = g_new0 (GuBiblio, 1);
    b->progressbar =
        GTK_PROGRESS_BAR (gtk_builder_get_object (builder, "bibprogressbar"));
    b->progressmon =
        GTK_ADJUSTMENT (gtk_builder_get_object (builder, "bibprogressmon"));
    b->list_biblios =
        GTK_LIST_STORE (gtk_builder_get_object (builder, "list_biblios"));
    b->filenm_label =
        GTK_LABEL (gtk_builder_get_object (builder, "bibfilenm"));
    b->refnr_label =
        GTK_LABEL (gtk_builder_get_object (builder, "bibrefnr"));
    b->list_filter =
        GTK_ENTRY (gtk_builder_get_object (builder, "biblio_filter"));
    b->biblio_treeview =
        GTK_TREE_VIEW (gtk_builder_get_object (builder, "bibtreeview"));
    b->progressval = 0.0;
    return b;
}
开发者ID:BafDyce,项目名称:gummi,代码行数:21,代码来源:biblio.c


示例10: _lib_backgroundjobs_progress

static void _lib_backgroundjobs_progress(dt_lib_module_t *self, const guint *key, double progress)
{
  if(!darktable.control->running) return;
  dt_lib_backgroundjobs_t *d = (dt_lib_backgroundjobs_t*)self->data;  
  gboolean i_own_lock = dt_control_gdk_lock();

  dt_bgjob_t *j = (dt_bgjob_t*)g_hash_table_lookup(d->jobs, key);
  if(j)
  {
    /* check if progress is above 1.0 and destroy bgjob if finished */
    /* FIXME: actually we are having some rounding issues, where the */
    /* FIXME: last item doesn't bring to total to 1.0 flat */
    /* FIXME: so this is why we have the ugly kludge below */
    if (progress > 0.999999)
    {
      if (GTK_IS_WIDGET(j->widget))
	gtk_container_remove( GTK_CONTAINER(d->jobbox), j->widget );

#ifdef HAVE_UNITY
	unity_launcher_entry_set_progress( j->darktable_launcher, 1.0 );
	unity_launcher_entry_set_progress_visible( j->darktable_launcher, FALSE );
#endif
      
      /* hide jobbox if theres no jobs left */
      if (g_list_length(gtk_container_get_children(GTK_CONTAINER(d->jobbox))) == 0 )
	gtk_widget_hide(d->jobbox);
    }
    else
    {
      if( j->type == 0 )
	gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR(j->progressbar), progress );

#ifdef HAVE_UNITY
	unity_launcher_entry_set_progress( j->darktable_launcher, progress );
#endif
    }
  }

  if(i_own_lock) dt_control_gdk_unlock();
}
开发者ID:sk1p,项目名称:darktable,代码行数:40,代码来源:backgroundjobs.c


示例11: main

int main(int argc, char *argv[]) {
    GladeXML *xml;
	GtkWidget *window1;
	int a=1;

    gtk_init(&argc, &argv);

    /* load the interface */
    xml = glade_xml_new("test.glade", NULL, NULL);

	window1 = glade_xml_get_widget(xml, "window");
//		treeview = glade_xml_get_widget(xml, "treeview");
//	init_list(treeview);

	GtkWidget *progress_bar = glade_xml_get_widget (xml, "progressbar1");
  	gtk_progress_bar_pulse (GTK_PROGRESS_BAR (progress_bar));
	g_assert(progress_bar);

	GtkWidget *my_button = glade_xml_get_widget (xml, butt "1");
  	g_signal_connect (G_OBJECT (my_button), "pressed", G_CALLBACK (button_clicked),&a);

	g_assert(my_button);

	gint func_ref = g_timeout_add (100, update_progress_bar, progress_bar);

	gtk_widget_show (window1);

	GTimer *wasted_time_tracker = g_timer_new ();

  	GtkWidget *widget = glade_xml_get_widget (xml, "WasteTimeWindow");
  	g_signal_connect (G_OBJECT (widget), "delete_event", G_CALLBACK (inform_user_of_time_wasted),wasted_time_tracker);

    /* connect the signals in the interface */
    glade_xml_signal_autoconnect(xml);

    /* start the event loop */
    gtk_main();
	g_source_remove (func_ref);
    return 0;
}
开发者ID:saurabh1403,项目名称:attendance-on-openmoko,代码行数:40,代码来源:main.c


示例12: sync_progress_gtk

static void
sync_progress_gtk(gpointer data, LJSyncProgress progress, int cur, int max, const char *date) {
	SyncStatus *status = data;
	double fraction = 0.0;
	StatusStage stage;

	switch (progress) {
	case LJ_SYNC_PROGRESS_ITEMS:
		stage = STAGE_ENTRYMETA; break;
	case LJ_SYNC_PROGRESS_ENTRIES:
		stage = STAGE_ENTRY; break;
	}

	if (stage != status->stage) {
		status->stage = stage;
		show_status_stage(status);
	}

	if (max > 0) fraction = cur/(double)max;
	gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(status->progress),
			fraction);
}
开发者ID:andy-shev,项目名称:LogJam,代码行数:22,代码来源:sync.c


示例13: gtk_disable_setlocale

extern "C" const char *Init( int *argc, char ***argv )
{
	// Need to use external library to load this image. Native loader seems broken :/
	const gchar *splash_image_path = "Data/splash.png";
	GtkWidget *vbox;

	gtk_disable_setlocale();
	if( !gtk_init_check(argc,argv) )
		return "Couldn't initialize gtk (cannot open display)";

	window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
	gtk_window_set_position( GTK_WINDOW(window), GTK_WIN_POS_CENTER );
	gtk_widget_set_size_request(window,468,-1);
	gtk_window_set_deletable( GTK_WINDOW(window), FALSE );
	gtk_window_set_resizable(GTK_WINDOW(window),FALSE);
	gtk_window_set_role( GTK_WINDOW(window), "sm-startup" );
	//gtk_window_set_icon( GTK_WINDOW(window), );
	gtk_widget_realize(window);

	splash = gtk_image_new_from_file(splash_image_path);

	label = gtk_label_new(NULL);
	gtk_label_set_justify(GTK_LABEL(label),GTK_JUSTIFY_CENTER);
	gtk_label_set_ellipsize(GTK_LABEL(label),PANGO_ELLIPSIZE_END);
	gtk_label_set_line_wrap(GTK_LABEL(label),FALSE);

	progressBar = gtk_progress_bar_new();
	gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR(progressBar), 0.0 );

	vbox = gtk_vbox_new(FALSE,0);
	gtk_container_add(GTK_CONTAINER(window),vbox);
	gtk_box_pack_start(GTK_BOX(vbox),splash,FALSE,FALSE,0);
	gtk_box_pack_end(GTK_BOX(vbox),progressBar,FALSE,FALSE,0);
	gtk_box_pack_end(GTK_BOX(vbox),label,TRUE,TRUE,0);

	gtk_widget_show_all(window);
	gtk_main_iteration_do(FALSE);
	return NULL;
}
开发者ID:Highlogic,项目名称:stepmania-event,代码行数:39,代码来源:LoadingWindow_GtkModule.cpp


示例14: progress_timer

gboolean progress_timer(gpointer data)
{
	//TOFIX optimize, show only if hidden, hide only if visible
	if(g_bMsgBox){
		//hide progress dialog while waiting soem message box to finish
		gtk_widget_hide(g_wndProgressDlg);
	}
	else
	{
		//ensure progress dialog is visible and pulse the progress
		if(g_wndProgressDlg) gtk_widget_show(g_wndProgressDlg);
		if(g_progress1){
			if(ProgressDlg::m_nTotalSize > 0)	//TOFIX what if two loads at te same time ? not static!??
			{
				gtk_progress_set_percentage(GTK_PROGRESS(g_progress1), ((double)ProgressDlg::m_nCurrentSize)/ProgressDlg::m_nTotalSize);
			}
			else
				gtk_progress_bar_pulse(GTK_PROGRESS_BAR(g_progress1));
		}
	}
	return TRUE;
}
开发者ID:ellysh,项目名称:notecase,代码行数:22,代码来源:ProgressDlg.cpp


示例15: qtcAnimationUpdateInfo

/* update the animation information for each widget. This will also queue a redraw
 * and stop the animation if it is done. */
static gboolean
qtcAnimationUpdateInfo(gpointer key, gpointer value, gpointer user_data)
{
    QTC_UNUSED(user_data);
    AnimationInfo *animation_info = value;
    GtkWidget *widget = key;

    if ((widget == NULL) || (animation_info == NULL))
        g_assert_not_reached();

    /* remove the widget from the hash table if it is not drawable */
    if (!gtk_widget_is_drawable(widget))
        return TRUE;

    if (GTK_IS_PROGRESS_BAR(widget)) {
        gfloat fraction =
            gtk_progress_bar_get_fraction(GTK_PROGRESS_BAR(widget));
        /* stop animation for filled/not filled progress bars */
        if (fraction <= 0.0 || fraction >= 1.0) {
            return TRUE;
        }
    } else if (GTK_IS_ENTRY(widget)) {
        gfloat fraction = gtk_entry_get_progress_fraction(GTK_ENTRY(widget));

        /* stop animation for filled/not filled progress bars */
        if(fraction <= 0.0 || fraction >= 1.0) {
            return TRUE;
        }
    }

    force_widget_redraw(widget);

    /* stop at stop_time */
    if(animation_info->stop_time != 0 &&
       g_timer_elapsed(animation_info->timer, NULL) > animation_info->stop_time)
        return TRUE;
    return FALSE;
}
开发者ID:Pulfer,项目名称:qtcurve,代码行数:40,代码来源:animation.c


示例16: eds_plugin_busy

static void
eds_plugin_busy (PlannerPlugin *plugin,
		 gboolean       busy)
{
	GdkCursor      *cursor;
	GtkProgressBar *progress = GTK_PROGRESS_BAR (glade_xml_get_widget
			(plugin->priv->glade, "progressbar"));

	if (busy) {
		gint check_time = 1; /* second */

		if (plugin->priv->busy) {
			return;
		}
		plugin->priv->pulse = g_timeout_add_seconds (check_time, eds_check_query, plugin);
		cursor = gdk_cursor_new_for_display (gdk_display_get_default (), GDK_WATCH);
		gtk_widget_set_sensitive
			(glade_xml_get_widget (plugin->priv->glade, "search_box"), FALSE);
		gtk_widget_set_sensitive
			(glade_xml_get_widget (plugin->priv->glade, "progress"), TRUE);
		plugin->priv->busy = TRUE;

	} else {
		g_source_remove (plugin->priv->pulse);
		gtk_progress_bar_set_fraction (progress, 0);

		gtk_widget_set_sensitive
			(glade_xml_get_widget (plugin->priv->glade, "progress"), FALSE);
		gtk_widget_set_sensitive
			(glade_xml_get_widget (plugin->priv->glade, "search_box"), TRUE);
		cursor = gdk_cursor_new_for_display (gdk_display_get_default (), GDK_LEFT_PTR);
		plugin->priv->busy = FALSE;
	}

	gdk_window_set_cursor (gtk_widget_get_parent_window
			       (glade_xml_get_widget (plugin->priv->glade, "ok_button")),
			       cursor);
}
开发者ID:00willo,项目名称:planner,代码行数:38,代码来源:planner-eds-plugin.c


示例17: progress_update_timeout

gboolean progress_update_timeout(gpointer data)
{
	UpdaterAppState *app_state;

	llassert(data != NULL);

	app_state = (UpdaterAppState *) data;

	gdk_threads_enter();
	if (app_state->activity_mode)
	{
		gtk_progress_bar_pulse
			(GTK_PROGRESS_BAR(app_state->progress_bar));
	}
	else
	{
		gtk_progress_set_value(GTK_PROGRESS(app_state->progress_bar),
				       app_state->progress_value);
	}
	gdk_threads_leave();

	return TRUE;
}
开发者ID:wish-ds,项目名称:firestorm-ds,代码行数:23,代码来源:linux_updater.cpp


示例18: update_animation_info

/* update the animation information for each widget. This will also queue a redraw
 * and stop the animation if it is done. */
static gboolean
update_animation_info (gpointer key, gpointer value, gpointer user_data)
{
	AnimationInfo *animation_info = value;
	GtkWidget *widget = key;
	gdouble elapsed;
	
	if ((widget == NULL) || (animation_info == NULL))
		g_assert_not_reached ();
	
	/* remove the widget from the hash table if it is not drawable */
	if (!GTK_WIDGET_DRAWABLE (widget))
		return TRUE;
	
	if (GTK_IS_PROGRESS_BAR (widget))
	{
		gfloat fraction = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (widget));
				
		/* stop animation for filled/not filled progress bars */
		if (fraction <= 0.0 || fraction >= 1.0)
			return TRUE;
		
		animation_info->update_delay--;
		if (animation_info->update_delay <= 0) {
			animation_info->update_delay = PROGRESSBAR_DELAY;
			force_widget_redraw (widget);
		}
	}
	else
		force_widget_redraw (widget);
	
	/* stop at stop_time */
	if (animation_info->stop_time != 0 && g_timer_elapsed (animation_info->timer, NULL) > animation_info->stop_time)
		return TRUE;
	
	return FALSE;
}
开发者ID:iegor,项目名称:x11-themes-aurora,代码行数:39,代码来源:animation.c


示例19: cache_manager_standard_clean_valid_cb

static void cache_manager_standard_clean_valid_cb(const gchar *path, gboolean valid, gpointer data)
{
	CleanData *cd = data;

	if (path)
		{
		if (!valid)
			{
			DEBUG_1("thumb cleaned: %s", path);
			unlink_file(path);
			}

		cd->count_done++;
		if (cd->count_total != 0)
			{
			gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(cd->progress),
						      (gdouble)cd->count_done / cd->count_total);
			}
		}

	cd->tl = NULL;
	if (cd->list)
		{
		FileData *next_fd;

		next_fd = cd->list->data;
		cd->list = g_list_remove(cd->list, next_fd);

		cd->tl = thumb_loader_std_thumb_file_validate(next_fd->path, cd->days,
							      cache_manager_standard_clean_valid_cb, cd);
		file_data_unref(next_fd);
		}
	else
		{
		cache_manager_standard_clean_done(cd);
		}
}
开发者ID:GroupO,项目名称:geeqie_zas,代码行数:37,代码来源:cache_maint.c


示例20: utt_dashboard_new

struct utt_dashboard *
utt_dashboard_new (struct utt_wubi *utt)
{
  struct utt_dashboard *dash;
  struct utt_dashboard_priv *priv;
  GtkWidget *fix, *align;
  gchar *path;

  dash = g_new0 (struct utt_dashboard, 1);
  dash->align = align = gtk_alignment_new (0.5, 0.5, 0, 0);
  fix = gtk_fixed_new ();
  gtk_container_add (GTK_CONTAINER (align), fix);
  gtk_container_set_border_width (GTK_CONTAINER (align), 4);

  priv = dash->priv = g_new0 (struct utt_dashboard, 1);
  priv->utt = utt;
  priv->record = utt->record;
  path = g_build_filename (PKGDATADIR, "dashboard.png", NULL);
  if (!g_file_test (path, G_FILE_TEST_EXISTS)) {
    g_error (G_STRLOC ": %s doesn't exists.", path);
  }
  priv->dashboard_image = cairo_image_surface_create_from_png (path);
  g_free (path);
  dash->draw = gtk_drawing_area_new ();
  gtk_widget_set_size_request (dash->draw,
			       cairo_image_surface_get_width (priv->dashboard_image),
			       cairo_image_surface_get_height (priv->dashboard_image));
  gtk_container_add (GTK_CONTAINER (fix), dash->draw);

  dash->progress = gtk_progress_bar_new ();
  gtk_progress_bar_set_text (GTK_PROGRESS_BAR (dash->progress), "0%");
  gtk_widget_set_size_request (dash->progress, 120, -1);
  gtk_fixed_put (GTK_FIXED (fix), dash->progress, 480, 23);

  g_signal_connect (dash->draw, "expose-event", G_CALLBACK (on_dashboard_draw_expose), dash);
  return dash;
}
开发者ID:babyaries,项目名称:utt-wubi,代码行数:37,代码来源:utt_dashboard.c



注:本文中的GTK_PROGRESS_BAR函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GTK_RADIO_BUTTON函数代码示例发布时间:2022-05-30
下一篇:
C++ GTK_PLUG函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap